Skip to main content

Thank you for visiting You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

Identifying topological order through unsupervised machine learning


The Landau description of phase transitions relies on the identification of a local order parameter that indicates the onset of a symmetry-breaking phase. In contrast, topological phase transitions evade this paradigm and, as a result, are harder to identify. Recently, machine learning techniques have been shown to be capable of characterizing topological order in the presence of human supervision. Here, we propose an unsupervised approach based on diffusion maps that learns topological phase transitions from raw data without the need for manual feature engineering. Using bare spin configurations as input, the approach is shown to be capable of classifying samples of the two-dimensional XY model by winding number and capture the Berezinskii–Kosterlitz–Thouless transition. We also demonstrate the success of the approach on the Ising gauge theory, another paradigmatic model with topological order. In addition, a connection between the output of diffusion maps and the eigenstates of a quantum-well Hamiltonian is derived. Topological classification via diffusion maps can therefore enable fully unsupervised studies of exotic phases of matter.

Access options

Rent or Buy article

Get time limited or full article access on ReadCube.


All prices are NET prices.

Fig. 1: Topological classification using sample connectivity.
Fig. 2: Detection of topological order in the 1D XY model.
Fig. 3: Detection of topological order in the 2D XY model.
Fig. 4: Detection of topological order in the Ising gauge theory.
Fig. 5: Illustration of the diffusion map in the continuum limit.

Data availability

The data that support the plots within this paper and other findings of this study are available from the corresponding authors upon reasonable request.

Code availability

The code used to generate the results presented in this work can be found in the online version of the paper.


  1. 1.

    Nielsen, M. A. Neural Networks and Deep Learning (Determination Press, 2015).

  2. 2.

    Goodfellow, I., Bengio, Y. & Courville, A. Deep Learning (MIT Press, 2016).

  3. 3.

    Mehta, P. et al. A high-bias, low-variance introduction to machine learning for physicists. Preprint at (2018).

  4. 4.

    Mehta, P. & Schwab, D. J. An exact mapping between the variational renormalization group and deep learning. Preprint at (2014).

  5. 5.

    Carleo, G. & Troyer, M. Solving the quantum many-body problem with artificial neural networks. Science 355, 602–606 (2017).

    ADS  MathSciNet  Article  Google Scholar 

  6. 6.

    Deng, D.-L., Li, X. & Das Sarma, S. Machine learning topological states. Phys. Rev. B 96, 195145 (2017).

    ADS  Article  Google Scholar 

  7. 7.

    Liu, J., Qi, Y., Meng, Z. Y. & Fu, L. Self-learning Monte Carlo method. Phys. Rev. B 95, 041101 (2017).

    ADS  Article  Google Scholar 

  8. 8.

    Torlai, G. et al. Neural-network quantum state tomography. Nat. Phy. (2018).

  9. 9.

    You, Y.-Z., Yang, Z. & Qi, X.-L. Machine learning spatial geometry from entanglement features. Phys. Rev. B 97, 045153 (2018).

    ADS  Article  Google Scholar 

  10. 10.

    Carleo, G., Nomura, Y. & Imada, M. Constructing exact representations of quantum many-body systems with deep neural networks. Nat. Commun. 9, 5322 (2018).

    ADS  Article  Google Scholar 

  11. 11.

    Spillard, S., Turner, C. J. & Meichanetzidis, K. Machine learning entanglement freedom. Int. J. Quantum Inf. 16, 1840002 (2018).

    Article  Google Scholar 

  12. 12.

    Carrasquilla, J. & Melko, R. G. Machine learning phases of matter. Nat. Phys. 13, 431–434 (2017).

    Article  Google Scholar 

  13. 13.

    Ch’ng, K., Carrasquilla, J., Melko, R. G. & Khatami, E. Machine learning phases of strongly correlated fermions. Phys. Rev. X 7, 031038 (2017).

    Google Scholar 

  14. 14.

    Zhang, Y. & Kim, E.-A. Quantum loop topography for machine learning. Phys. Rev. Lett. 118, 216401 (2017).

    ADS  MathSciNet  Article  Google Scholar 

  15. 15.

    Zhang, Y., Melko, R. G. & Kim, E.-A. Machine learning 2 quantum spin liquids with quasiparticle statistics. Phys. Rev. B 96, 245119 (2017).

    ADS  Article  Google Scholar 

  16. 16.

    van Nieuwenburg, E. P. L., Liu, Y.-H. & Huber, S. D. Learning phase transitions by confusion. Nat. Phys. 13, 435–439 (2017).

    Article  Google Scholar 

  17. 17.

    Ohtsuki, T. & Ohtsuki, T. Deep learning the quantum phase transitions in random two-dimensional electron systems. J. Phys. Soc. Jpn 85, 123706 (2016).

    ADS  Article  Google Scholar 

  18. 18.

    Ohtsuki, T. & Ohtsuki, T. Deep learning the quantum phase transitions in random electron systems: applications to three dimensions. J. Phys.Soc. Jpn 86, 044708 (2017).

    ADS  Article  Google Scholar 

  19. 19.

    Yoshioka, N., Akagi, Y. & Katsura, H. Learning disordered topological phases by statistical recovery of symmetry. Phys. Rev. B 97, 205110 (2018).

    ADS  Article  Google Scholar 

  20. 20.

    Zhang, P., Shen, H. & Zhai, H. Machine learning topological invariants with neural networks. Phys. Rev. Lett. 120, 066401 (2018).

    ADS  Article  Google Scholar 

  21. 21.

    Carvalho, D., García-Martínez, N. A., Lado, J. L. & Fernández-Rossier, J. Real-space mapping of topological invariants using artificial neural networks. Phys. Rev. B 97, 115453 (2018).

    ADS  Article  Google Scholar 

  22. 22.

    Huembeli, P., Dauphin, A. & Wittek, P. Identifying quantum phase transitions with adversarial neural networks. Phys. Rev. B 97, 134109 (2018).

    ADS  Article  Google Scholar 

  23. 23.

    Iakovlev, I. A., Sotnikov, O. M. & Mazurenko, V. V. Supervised learning approach for recognizing magnetic skyrmion phases. Phys. Rev. B 98, 174411 (2018).

    ADS  Article  Google Scholar 

  24. 24.

    Vargas-Hernández, R. A., Sous, J., Berciu, M. & Krems, R. V. Extrapolating quantum observables with machine learning: inferring multiple phase transitions from properties of a single phase. Phys. Rev. Lett. 121, 255702 (2018).

    ADS  Article  Google Scholar 

  25. 25.

    Beach, M. J. S., Golubeva, A. & Melko, R. G. Machine learning vortices at the Kosterlitz–Thouless transition. Phys. Rev. B 97, 045207 (2018).

    ADS  Article  Google Scholar 

  26. 26.

    Wang, C. & Zhai, H. Machine learning of frustrated classical spin models (II): Kernel principal component analysis. Front. Phys. 13, 130507 (2018).

    Article  Google Scholar 

  27. 27.

    Hu, W., Singh, R. R. P. & Scalettar, R. T. Discovering phases, phase transitions and crossovers through unsupervised machine learning: a critical examination. Phys. Rev. E 95, 062122 (2017).

    ADS  Article  Google Scholar 

  28. 28.

    Wetzel, S. J. Unsupervised learning of phase transitions: from principal component analysis to variational autoencoders. Phys. Rev. E 96, 022140 (2017).

    ADS  Article  Google Scholar 

  29. 29.

    Wang, C. & Zhai, H. Machine learning of frustrated classical spin models. I. Principal component analysis. Phys. Rev. B 96, 144432 (2017).

    ADS  Article  Google Scholar 

  30. 30.

    Cristoforetti, M., Jurman, G., Nardelli, A. I. & Furlanello, C. Towards meaningful physics from generative models. Preprint at (2017).

  31. 31.

    Broecker, P., Assaad, F. F. & Trebst, S. Quantum phase recognition via unsupervised machine learning. Preprint at (2017).

  32. 32.

    Zhang, W., Liu, J. & Wei, T.-C. Machine learning of phase transitions in the percolation and XY models. Preprint at

  33. 33.

    Suchsland, P. & Wessel, S. Parameter diagnostics of phases and phase transition learning by neural networks. Phys. Rev. B 97, 174435 (2018).

    ADS  Article  Google Scholar 

  34. 34.

    Kosterlitz, J. M. & Thouless, D. J. Ordering, metastability and phase transitions in two-dimensional systems. J. Phys. C 6, 1181 (1973).

    ADS  Article  Google Scholar 

  35. 35.

    Sachdev, S. Topological order, emergent gauge fields, and Fermi surface reconstruction. Rep. Prog. Phys. 82, 014001 (2019).

    ADS  MathSciNet  Article  Google Scholar 

  36. 36.

    Coifman, R. R. et al. Geometric diffusions as a tool for harmonic analysis and structure definition of data: diffusion maps. Proc. Natl Acad. Sci USA 102, 7426–7431 (2005).

    ADS  Article  Google Scholar 

  37. 37.

    Nadler, B., Lafon, S., Kevrekidis, I. & Coifman, R. R. Diffusion maps, spectral clustering and eigenfunctions of Fokker–Planck operators. In Advances in Neural Information Processing Systems Vol. 18 (eds Weiss, Y., Scholkopf, B. & Platt, J.) 955–962 (MIT Press, 2006).

  38. 38.

    Coifman, R. R. & Lafon, S. Diffusion maps. Appl. Comput. Harmon, Anal. 21, 5–30 (2006).

    MathSciNet  Article  Google Scholar 

  39. 39.

    Michalevsky, Y., Talmon, R. & Cohen, I. Speaker identification using diffusion maps. In 19th European Signal Processing Conference, 2011, 1299–1302 (IEEE, 2011).

  40. 40.

    Barkan, O., Weill, J., Wolf, L. & Aronowitz, H. Fast high dimensional vector multiplication face recognition. In Proceedings of the IEEE International Conference on Computer Vision, 1960–1967 (IEEE, 2013).

  41. 41.

    Berezinskii, V. Destruction of long-range order in one-dimensional and two-dimensional systems having a continuous symmetry group I. Classical systems. Sov. Phys. JETP 32, 493–500 (1971).

    ADS  MathSciNet  Google Scholar 

  42. 42.

    Berezinskii, V. Destruction of long-range order in one-dimensional and two-dimensional systems possessing a continuous symmetry group. II. Quantum systems. Sov. J. Exp. Theor. Phys. 34, 610 (1972).

    ADS  Google Scholar 

  43. 43.

    Kosterlitz, J. M. The critical properties of the two-dimensional XY model. J. Phys. C 7, 1046 (1974).

    ADS  Article  Google Scholar 

  44. 44.

    Wegner, F. J. Duality in generalized Ising models and phase transitions without local order parameters. J. Math. Phys. 12, 2259–2272 (1971).

    ADS  MathSciNet  Article  Google Scholar 

  45. 45.

    Kogut, J. B. An introduction to lattice gauge theory and spin systems. Rev. Mod. Phys. 51, 659–713 (1979).

    ADS  MathSciNet  Article  Google Scholar 

  46. 46.

    Su, W. P., Schrieffer, J. R. & Heeger, A. J. Solitons in polyacetylene. Phys. Rev. Lett. 42, 1698–1701 (1979).

    ADS  Article  Google Scholar 

  47. 47.

    Kitaev, A. Y. Unpaired Majorana fermions in quantum wires. Phys.-Uspekhi 44, 131 (2001).

    ADS  Article  Google Scholar 

  48. 48.

    Komura, Y. & Okabe, Y. Large-scale Monte Carlo simulation of two-dimensional classical XY model using multiple GPUs. J. Phys. Soc. Jpn 81, 113001 (2012).

    ADS  Article  Google Scholar 

Download references


The authors thank S. Chatterjee, E. Demler, P.P. Orth, H. Pichler, S. Sachdev, H. Shackleton and Y.-Z. You for useful discussions. J.F.R.-N. acknowledges support from AFOSR-MURI: Photonic Quantum Matter (award FA95501610323). M.S.S. acknowledges support from the German National Academy of Sciences Leopoldina through grant no. LPDS 2016-12 and from the National Science Foundation under grant no. DMR-1664842.

Author information




J.F.R.-N. and M.S.S. contributed equally to the design of the study, performing the simulations, analysis of the results and writing of the manuscript.

Corresponding authors

Correspondence to Joaquin F. Rodriguez-Nieva or Mathias S. Scheurer.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Publisher’s note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary information

Supplementary Information

Eight figures, three references.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Rodriguez-Nieva, J.F., Scheurer, M.S. Identifying topological order through unsupervised machine learning. Nat. Phys. 15, 790–795 (2019).

Download citation

Further reading


Quick links

Nature Briefing

Sign up for the Nature Briefing newsletter — what matters in science, free to your inbox daily.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing