Embedding to Reference t-SNE Space Addresses Batch Effects in Single-Cell Classification

  • Pavlin G. PoličarEmail author
  • Martin Stražar
  • Blaž Zupan
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11828)


Dimensionality reduction techniques, such as t-SNE, can construct informative visualizations of high-dimensional data. When working with multiple data sets, a straightforward application of these methods often fails; instead of revealing underlying classes, the resulting visualizations expose data set-specific clusters. To circumvent these batch effects, we propose an embedding procedure that uses a t-SNE visualization constructed on a reference data set as a scaffold for embedding new data points. Each data instance in the secondary data is embedded independently, and does not change the reference embedding. This prevents any interactions between instances in the secondary data and implicitly mitigates batch effects. We demonstrate the utility of this approach by analyzing six recently published single-cell gene expression data sets with up to tens of thousands of cells and thousands of genes. The batch effects in our studies are particularly strong as the data comes from different institutions and was obtained using different experimental protocols. The visualizations constructed by our proposed approach are cleared of batch effects, and the cells from secondary data sets correctly co-cluster with cells of the same type from the primary data.


Batch effects Embedding t-SNE Visualization Single-cell transcriptomics Data integration Domain adaptation 



This work was supported by the Slovenian Research Agency Program Grant P2-0209, and by the BioPharm.SI project supported from European Regional Development Fund and the Slovenian Ministry of Education, Science and Sport. We would also like to thank Dmitry Kobak for many helpful discussions on t-SNE.


  1. 1.
    van der Maaten, L., Hinton, G.: Visualizing data using t-SNE. J. Mach. Learn. Res. 9(Nov), 2579–2605 (2008)zbMATHGoogle Scholar
  2. 2.
    McInnes, L., Healy, L., Melville, L.: UMAP: uniform manifold approximation and projection for dimension reduction. ArXiv e-prints, February 2018CrossRefGoogle Scholar
  3. 3.
    Wattenberg, M., Viégas, F., Johnson, I.: How to use t-SNE effectively. Distill 1(10), e2 (2016)CrossRefGoogle Scholar
  4. 4.
    Becht, E., et al.: Dimensionality reduction for visualizing single-cell data using UMAP. Nat. Biotechnol. 37(1), 38 (2019)CrossRefGoogle Scholar
  5. 5.
    Gopalan, R., Li, R., Chellappa, R.: Domain adaptation for object recognition: an unsupervised approach. In: 2011 International Conference on Computer Vision, pp. 999–1006. IEEE (2011)Google Scholar
  6. 6.
    Bickel, S., Brückner, M., Scheffer, T.: Discriminative learning under covariate shift. J. Mach. Learn. Res. 10(Sep), 2137–2155 (2009)MathSciNetzbMATHGoogle Scholar
  7. 7.
    Quionero-Candela, J., Sugiyama, M., Schwaighofer, A., Lawrence, N.D.: Dataset Shift in Machine Learning. The MIT Press, Cambridge (2009)Google Scholar
  8. 8.
    Butler, A., Hoffman, P., Smibert, P., Papalexi, E., Satija, R.: Integrating single-cell transcriptomic data across different conditions, technologies, and species. Nat. Biotechnol. 36(5), 411 (2018)CrossRefGoogle Scholar
  9. 9.
    Haghverdi, L., Lun, A.T.L., Morgan, M.D., Marioni, J.C.: Batch effects in single-cell RNA-sequencing data are corrected by matching mutual nearest neighbors. Nat. Biotechnol. 36(5), 421 (2018)CrossRefGoogle Scholar
  10. 10.
    Stuart, T., et al.: Comprehensive Integration of Single-Cell Data. Cell 177(7), 1888–1902 (2019)CrossRefGoogle Scholar
  11. 11.
    Hrvatin, S., et al.: Single-cell analysis of experience-dependent transcriptomic states in the mouse visual cortex. Nat. Neurosci. 21(1), 120 (2018)CrossRefGoogle Scholar
  12. 12.
    Chen, R., Xiaoji, W., Jiang, L., Zhang, Y.: Single-cell RNA-seq reveals hypothalamic cell diversity. Cell Rep. 18(13), 3227–3241 (2017)CrossRefGoogle Scholar
  13. 13.
    Baron, M., et al.: A single-cell transcriptomic map of the human and mouse pancreas reveals inter-and intra-cell population structure. Cell Syst. 3(4), 346–360 (2016)CrossRefGoogle Scholar
  14. 14.
    Xin, Y., et al.: RNA sequencing of single human islet cells reveals type 2 diabetes genes. Cell Metab. 24(4), 608–615 (2016)CrossRefGoogle Scholar
  15. 15.
    Kobak, D., Berens, P.: The art of using t-SNE for single-cell transcriptomics. bioRxiv, p. 453449 (2018)Google Scholar
  16. 16.
    Linderman, G.C., Rachh, M., Hoskins, J.G., Steinerberger, S., Kluger, Y.: Fast interpolation-based t-SNE for improved visualization of single-cell RNA-seq data. Nat. Methods 16(3), 243 (2019)CrossRefGoogle Scholar
  17. 17.
    Lee, J.A., Peluffo-Ordóñez, D.H., Verleysen, M.: Multi-scale similarities in stochastic neighbour embedding: reducing dimensionality while preserving both local and global structure. Neurocomputing 169, 246–261 (2015)CrossRefGoogle Scholar
  18. 18.
    Jacobs, R.A.: Increased rates of convergence through learning rate adaptation. Neural Networks 1(4), 295–307 (1988)CrossRefGoogle Scholar
  19. 19.
    van der Maaten, L.: Accelerating t-SNE using tree-based algorithms. J. Mach. Learn. Res. 15(1), 3221–3245 (2014)MathSciNetzbMATHGoogle Scholar
  20. 20.
    Macosko, E.Z., et al.: Highly parallel genome-wide expression profiling of individual cells using nanoliter droplets. Cell 161(5), 1202–1214 (2015)CrossRefGoogle Scholar
  21. 21.
    Shekhar, K., et al.: Comprehensive classification of retinal bipolar neurons by single-cell transcriptomics. Cell 166(5), 1308–1323 (2016)CrossRefGoogle Scholar
  22. 22.
    Bard, J., Rhee, S.Y., Ashburner, M.: An ontology for cell types. Genome Biol. 6(2), R21 (2005)CrossRefGoogle Scholar
  23. 23.
    Wolf, F.A., Angerer, P., Theis, F.J.: SCANPY: large-scale single-cell gene expression data analysis. Genome Biol. 19(1), 15 (2018)CrossRefGoogle Scholar
  24. 24.
    Domingos, P.M.: A few useful things to know about machine learning. Commun. ACM 55(10), 78–87 (2012)CrossRefGoogle Scholar
  25. 25.
    Islam, S., et al.: Quantitative single-cell RNA-seq with unique molecular identifiers. Nat. Methods 11(2), 163 (2014)CrossRefGoogle Scholar
  26. 26.
    Kiselev, V.Y., Yiu, A., Hemberg, M.: scmap: projection of single-cell RNA-seq data across data sets. Nat. Methods 15(5), 359 (2018)CrossRefGoogle Scholar
  27. 27.
    Rozenblatt-Rosen, O., Stubbington, M.J.T., Regev, A., Teichmann, S.A.: The Human Cell Atlas: from vision to reality. Nat. News 550(7677), 451 (2017)CrossRefGoogle Scholar
  28. 28.
    Poličar, P.G., Stražar, M., Zupan, B.: openTSNE: a modular Python library for t-SNE dimensionality reduction and embedding. bioRxiv (2019)Google Scholar

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  • Pavlin G. Poličar
    • 1
    Email author
  • Martin Stražar
    • 1
  • Blaž Zupan
    • 1
    • 2
  1. 1.University of LjubljanaLjubljanaSlovenia
  2. 2.Baylor College of MedicineHoustonUSA

Personalised recommendations