Abstract
The integration of deep neural networks with the variational Monte Carlo (VMC) method has marked a substantial advancement in solving the Schrödinger equation. In this work we enforce spin symmetry in the neural-network-based VMC calculation using a modified optimization target. Our method is designed to solve for the ground state and multiple excited states with target spin symmetry at a low computational cost. It predicts accurate energies while maintaining the correct symmetry in strongly correlated systems, even in cases in which different spin states are nearly degenerate. Our approach also excels at spin–gap calculations, including the singlet–triplet gap in biradical systems, which is of high interest in photochemistry. Overall, this work establishes a robust framework for efficiently calculating various quantum states with specific spin symmetry in correlated systems.
This is a preview of subscription content, access via your institution
Access options
Access Nature and 54 other Nature Portfolio journals
Get Nature+, our best-value online-access subscription
27,99 € / 30 days
cancel any time
Subscribe to this journal
Receive 12 digital issues and online access to articles
99,00 € per year
only 8,25 € per issue
Buy this article
- Purchase on SpringerLink
- Instant access to full article PDF
Prices may be subject to local taxes which are calculated during checkout




Similar content being viewed by others
Data availability
The statistical estimations shown in the figures are provided in Supplementary Information. The dataset is available at Zenodo68. Source Data are provided with this paper.
Code availability
We open-source the implementation of our spin symmetry-enforced solution in the JaQMC repository on Github (https://github.com/bytedance/jaqmc). The sample code to reproduce the results in this work is also available on CodeOcean: https://codeocean.com/capsule/8440915/tree (ref. 69).
References
Kohn, W. & Sham, L. J. Self-consistent equations including exchange and correlation effects. Phys. Rev. 140, A1133–A1138 (1965).
Cohen, A. J., Mori-Sánchez, P. & Yang, W. Insights into current limitations of density functional theory. Science 321, 792–794 (2008).
Dunlap, B. I. in Density Functional Methods in Chemistry 49–60 (Springer, 1991).
Görling, A. Symmetry in density-functional theory. Phys. Rev. A 47, 2783–2799 (1993).
Szalay, P. G., Müller, T., Gidofalvi, G., Lischka, H. & Shepard, R. Multiconfiguration self-consistent field and multireference configuration interaction methods and applications. Chem. Rev. 112, 108–181 (2012).
Lischka, H. et al. Multireference approaches for excited states of molecules. Chem. Rev. 118, 7293–7361 (2018).
Hermann, J. et al. Ab initio quantum chemistry with neural-network wavefunctions. Nat. Rev. Chem. 7, 692–709 (2023).
Carleo, G. & Troyer, M. Solving the quantum many-body problem with artificial neural networks. Science 355, 602–606 (2017).
Han, J., Zhang, L. & Weinan, E. Solving many-electron Schrödinger equation using deep neural networks. J. Comput. Phys. 399, 108929 (2019).
Hermann, J., Schätzle, Z. & Noé, F. Deep-neural-network solution of the electronic Schrödinger equation. Nat. Chem. 12, 891–897 (2020).
Pfau, D., Spencer, J. S., Matthews, A. G. D. G. & Foulkes, W. M. C. Ab initio solution of the many-electron Schrödinger equation with deep neural networks. Phys. Rev. Res. 2, 033429 (2020).
Li, X., Li, Z. & Chen, J. Ab initio calculation of real solids via neural network ansatz. Nat. Commun. 13, 7895 (2022).
Luo, D. & Clark, B. K. Backflow transformations via neural networks for quantum many-body wave functions. Phys. Rev. Lett. 122, 226401 (2019).
Gerard, L., Scherbela, M., Marquetand, P. & Grohs, P. Gold-standard solutions to the Schrödinger equation using deep learning: how much physics do we need? In 36th Conference on Neural Information Processing Systems Vol. 35, 10282–10294 (NeurIPS, 2022).
Gao, N. & Günnemann, S. Ab initio potential energy surfaces by pairing GNNs with neural wave functions. International Conference on Learning Representations (ICLR, 2022).
Gao, N. & Günnemann, S. Generalizing neural wave functions. In International Conference on Machine Learning 10708–10726 (PMLR, 2023).
von Glehn, I., Spencer, J. S. & Pfau, D. A self-attention ansatz for ab initio quantum chemistry. 11th International Conference on Learning Representations (ICLR, 2023).
Lin, J., Goldshlager, G. & Lin, L. Explicitly antisymmetrized neural network layers for variational Monte Carlo simulation. J. Comput. Phys. 474, 111765 (2023).
Li, R. et al. A computational framework for neural network-based variational Monte Carlo with forward Laplacian. Nat. Mach. Intell. 6, 209–219 (2024).
Fu, W., Ren, W. & Chen, J. Variance extrapolation method for neural-network variational Monte Carlo. Mach. Learn. Sci. Technol. 5, 015016 (2024).
Entwistle, M. T., Schätzle, Z., Erdman, P. A., Hermann, J. & Noé, F. Electronic excited states in deep variational Monte Carlo. Nat. Commun. 14, 274 (2023).
Pfau, D., Axelrod, S., Sutterud, H., von Glehn, I. & Spencer, J. S. Accurate computation of quantum excited states with neural networks. Science 385, eadn0137 (2024).
Andrews, J. S., Jayatilaka, D., Bone, R. G., Handy, N. C. & Amos, R. D. Spin contamination in single-determinant wavefunctions. Chem. Phys. Lett. 183, 423–431 (1991).
Baker, J., Scheiner, A. & Andzelm, J. Spin contamination in density functional theory. Chem. Phys. Lett. 216, 380–388 (1993).
Dirac, P. A. M. & Fowler, R. H. Quantum mechanics of many-electron systems. Proc. R. Soc. A 123, 714–733 (1929).
Löwdin, P.-O. Quantum theory of many-particle systems. i. Physical interpretations by means of density matrices, natural spin–orbitals, and convergence problems in the method of configurational interaction. Phys. Rev. 97, 1474–1489 (1955).
Wang, J., Becke, A. D. & Smith Jr, V. H. Evaluation of 〈S2〉 in restricted, unrestricted Hartree–Fock, and density functional based theories. J. Chem. Phys. 102, 3477–3480 (1995).
Cramer, C. J. Essentials of Computational Chemistry: Theories and Models (John Wiley & Sons, 2013).
Huang, C.-J., Filippi, C. & Umrigar, C. J. Spin contamination in quantum Monte Carlo wave functions. J. Chem. Phys. 108, 8838–8847 (1998).
Szabó, P. B., Schätzle, Z., Entwistle, M. T. & Noé, F. An improved penalty-based excited-state variational Monte Carlo approach with deep-learning ansatzes. J. Chem. Theory Comput. 20, 7922–7935 (2024).
Pathak, S., Busemeyer, B., Rodrigues, J. N. B. & Wagner, L. K. Excited states in variational Monte Carlo using a penalty method. J. Chem. Phys. 154, 034101 (2021).
Wheeler, W. A., Kleiner, K. G. & Wagner, L. K. Ensemble variational Monte Carlo for optimization of correlated excited state wave functions. Electron. Struct. 6, 025001 (2024).
Abe, M. Diradicals. Chem. Rev. 113, 7011–7088 (2013).
Cogan, S., Haas, Y. & Zilberg, S. Intersystem crossing at singlet conical intersections. J. Photochem. Photobiol. A 190, 200–206 (2007).
Gu, H. & Warde, C. Evaluation of organic light-emitting diodes as light sources for a compact optoelectronic integrated neural coprocessor. Appl. Optics 55, 8576–8581 (2016).
Smith, M. B. & Michl, J. Singlet fission. Chem. Rev. 110, 6891–6936 (2010).
Stoneburner, S. J. et al. Systematic design of active spaces for multi-reference calculations of singlet–triplet gaps of organic diradicals, with benchmarks against doubly electron-attached coupled-cluster data. J. Chem. Phys. 147, 164120 (2017).
Manohar, P. U. & Krylov, A. I. A non-iterative perturbative triples correction for the spin-flipping and spin-conserving equation-of-motion coupled-cluster methods with single and double substitutions. J. Chem. Phys. 129, 194105 (2008).
Bao, J. L., Sand, A., Gagliardi, L. & Truhlar, D. G. Correlated-participating-orbitals pair-density functional method and application to multiplet energy splittings of main-group divalent radicals. J. Chem. Theory Comput. 12, 4274–4283 (2016).
Stoneburner, S. J., Truhlar, D. G. & Gagliardi, L. MC-PDFT can calculate singlet–triplet splittings of organic diradicals. J. Chem. Phys. 148, 064108 (2018).
Yang, Y., Davidson, E. R. & Yang, W. Nature of ground and electronic excited states of higher acenes. Proc. Natl Acad. Sci. USA 113, E5098–E5107 (2016).
Yang, Y., van Aggelen, H., Steinmann, S. N., Peng, D. & Yang, W. Benchmark tests and spin adaptation for the particle–particle random phase approximation. J. Chem. Phys. 139, 174110 (2013).
van Aggelen, H., Yang, Y. & Yang, W. Exchange–correlation energy from pairing matrix fluctuation and the particle–particle random-phase approximation. Phys. Rev. A 88, 030501 (2013).
Boyn, J.-N. & Mazziotti, D. A. Accurate singlet–triplet gaps in biradicals via the spin averaged anti-Hermitian contracted Schrödinger equation. J. Chem. Phys. 154, 134103 (2021).
Lee, J., Malone, F. D. & Morales, M. A. Utilizing essential symmetry breaking in auxiliary-field quantum Monte Carlo: application to the spin gaps of the C36 fullerene and an iron porphyrin model complex. J. Chem. Theory Comput. 16, 3019–3027 (2020).
Shee, J., Arthur, E. J., Zhang, S., Reichman, D. R. & Friesner, R. A. Singlet–triplet energy gaps of organic biradicals and polyacenes with auxiliary-field quantum Monte Carlo. J. Chem. Theory Comput. 15, 4924–4932 (2019).
Li, X., Fan, C., Ren, W. & Chen, J. Fermionic neural network with effective core potential. Phys. Rev. Res. 4, 013021 (2022).
Ren, W., Fu, W., Wu, X. & Chen, J. Towards the ground state of molecules via diffusion Monte Carlo on neural networks. Nat. Commun. 14, 1860 (2023).
Wilson, M., Gao, N., Wudarski, F., Rieffel, E. & Tubman, N. M. Simulations of state-of-the-art fermionic neural network wave functions with diffusion Monte Carlo. Preprint at https://arxiv.org/abs/2103.12570 (2021).
Curutchet, C. & Mennucci, B. Quantum chemical studies of light harvesting. Chem. Rev. 117, 294–343 (2016).
Swart, M. & Gruden, M. Spinning around in transition-metal chemistry. Acc. Chem. Res. 49, 2690–2697 (2016).
Vaswani, A. et al. Attention is all you need. In Advances in Neural Information Processing Systems (eds Guyon, I. et al.) Vol. 30, 6000–6010 (Curran Associates, 2017).
Brown, T. B. et al. Language models are few-shot learners. In Proc. 34th International Conference on Neural Information Processing Systems 1877–1901 (NeurIPS, 2020).
Feynman, R. P. & Cohen, M. Energy spectrum of the excitations in liquid helium. Phys. Rev. 102, 1189–1204 (1956).
Taddei, M., Ruggeri, M., Moroni, S. & Holzmann, M. Iterative backflow renormalization procedure for many-body ground-state wave functions of strongly interacting normal fermi liquids. Phys. Rev. B 91, 115106 (2015).
Ruggeri, M., Moroni, S. & Holzmann, M. Nonlinear network description for many-body quantum systems in continuous space. Phys. Rev. Lett. 120, 205302 (2018).
Martens, J. & Grosse, R. Optimizing neural networks with Kronecker-factored approximate curvature. In International Conference on Machine Learning 2408–2417 (PMLR, 2015).
Feldt, J. & Filippi, C. Excited-State Calculations with Quantum Monte Carlo Ch. 8, 247–275 (John Wiley & Sons, 2020).
Zimmerman, P. M., Toulouse, J., Zhang, Z., Musgrave, C. B. & Umrigar, C. J. Excited states of methylene from quantum Monte Carlo. J. Chem. Phys. 131, 124103 (2009).
Shepard, S., Panadés-Barrueta, R. L., Moroni, S., Scemama, A. & Filippi, C. Double excitation energies from quantum Monte Carlo using state-specific energy optimization. J. Chem. Theory Comput. 18, 6722–6731 (2022).
Choo, K., Carleo, G., Regnault, N. & Neupert, T. Symmetries and many-body excitations with neural-network quantum states. Phys. Rev. Lett. 121, 167204 (2018).
Lu, Z. & Fu, W. Penalty and auxiliary wave function methods for electronic excitation in neural network variational Monte Carlo. Preprint at https://arxiv.org/abs/2311.17595 (2023).
Otis, L., Craig, I. M. & Neuscamman, E. A hybrid approach to excited-state-specific variational Monte Carlo and doubly excited states. J. Chem. Phys. 153, 234105 (2020).
Otis, L. & Neuscamman, E. A promising intersection of excited-state-specific methods from quantum chemistry and quantum Monte Carlo. WIREs Comput. Mol. Sci. 13, e1659 (2023).
Zhao, L. & Neuscamman, E. Variational excitations in real solids: optical gaps and insights into many-body perturbation theory. Phys. Rev. Lett. 123, 036402 (2019).
Jónsson, B., Bauer, B. & Carleo, G. Neural-network states for the classical simulation of quantum computing. Preprint at https://arxiv.org/abs/1808.05232 (2018).
Medvidović, M. & Carleo, G. Classical variational simulation of the quantum approximate optimization algorithm. npj Quant. Inform. 7, 101 (2021).
Li, Z. Dataset for spin-symmetry-enforced solution of the many-body Schrödinger equation with a deep neural network. Zenodo https://doi.org/10.5281/zenodo.14176986 (2024).
Li, Z. et al. Supplymentary code for ‘symmetry enforced solution of the many-body Schrödinger equation with deep neural network’. Code Ocean https://doi.org/10.24433/CO.4978933.v1 (2024).
Sansonetti, J. E. & Martin, W. C. Handbook of basic atomic spectroscopic data. J. Phys. Chem. Ref. Data 34, 1559–2259 (2005).
Acknowledgements
We would like to thank H. Chen for helpful discussions. We also want to thank ByteDance Research Group for inspiration and encouragement. This work is directed and supported by H. Li and ByteDance Research. J. Chen is supported by the National Key R&D Program of China (grant no. 2021YFA1400500) and National Science Foundation of China (grant no. 12334003). Liwei Wang is supported by National Science Foundation of China (grant no. NSFC62276005).
Author information
Authors and Affiliations
Contributions
Z. Li, Z. Lu, R.L, L.W., J.C. and W.R. conceived the study. Z. Li, Z. Lu and R.L. proposed the algorithms. Z. Li, Z. Lu and X.L. performed implementations. Z. Li, Z. Lu, R.L. and X.W. performed simulations and analysis. Z. Li, L.W., J.C. and W.R. supervised the project. Z. Li, Z. Lu, R.L, X.L., X.W., L.W., J.C. and W.R. wrote the paper.
Corresponding authors
Ethics declarations
Competing interests
The authors declare no competing interests.
Peer review
Peer review information
Nature Computational Science thanks Xiao He, and the other, anonymous, reviewer(s) for their contribution to the peer review of this work. Primary Handling Editor: Kaitlin McCardle, in collaboration with the Nature Computational Science team.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary information
Supplementary Information
Supplementary Figs. 1–3 and Tables 1–7.
Source data
Source Data Fig. 1
Raw data of time cost each step of different penalty terms.
Source Data Fig. 2
The zip file contains several files. Subfolder ‘subfigure_a’ contains two data files to plot Fig. 2a: ‘singlet_no_penalty.csv’ and ‘singelt_with_penalty.csv’, which correspond to the orange and red curves, respectively. Subfolder ‘subfigure_b’ contains three data files to plot Fig. 2b: 'overlap.csv', the raw data to compute the overlap between the contaminated state and the singlet and triplet states in Fig. 2b; 'singlet_nature_orb_occupy_num.csv', the occupation number of cc-pVTZ atomic orbitals for all of the occupied nature orbitals in the singlet state visualized in Fig. 2b; and 'triplet_nature_orb_occupy_num.csv', the occupation number of cc-pVTZ atomic orbitals for all of the occupied nature orbitals in the triplet state visualized in Fig. 2b.
Source Data Fig. 3
There are three subfolders/file under the root directory. Estimation values and error bars in Fig. 3a,c are derived by reblock analysis using the raw data from subfolders ‘subfigure_a’ and ‘subfigure_c’; ‘subfigure_d’ comprises the raw data to plot the curves in Fig. 3d.
Source Data Fig. 4
All raw data to derive the estimation values and error bars of our penalty method in Fig. 4.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Li, Z., Lu, Z., Li, R. et al. Spin-symmetry-enforced solution of the many-body Schrödinger equation with a deep neural network. Nat Comput Sci 4, 910–919 (2024). https://doi.org/10.1038/s43588-024-00730-4
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1038/s43588-024-00730-4
This article is cited by
-
Teaching spin symmetry while learning neural network wave functions
Nature Computational Science (2024)