NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Enhancing the Scalability and Applicability of Kohn-Sham Hamiltonians for Molecular Systems

Yunyang Li, Zaishuo Xia, Lin Huang, Xinran Wei, Han Yang, Sam Harshe, Zun Wang, Chang Liu, Jia Zhang, Bin Shao, Mark B. Gerstein · DOI

TL;DR

This paper introduces a new loss function, Wavefunction Alignment Loss (WALoss), and a novel neural network architecture, WANet, to significantly improve the accuracy and efficiency of predicting Kohn-Sham Hamiltonians for large molecular systems. This advancement is crucial for making Density Functional Theory (DFT) calculations more scalable and applicable to complex problems in chemistry and materials science.

What Problem Does This Paper Address?

Density Functional Theory (DFT) is a cornerstone of quantum chemistry and materials science, enabling the study of molecular and solid-state properties. However, a major bottleneck in DFT is the computational cost associated with solving the Kohn-Sham equations to construct the Hamiltonian. This iterative process, known as the Self-Consistent Field (SCF) method, scales poorly with system size (O(N³) to O(N⁴)), making it impractical for large molecules. While deep learning has shown promise in predicting Hamiltonians, existing methods struggle with scalability and often produce non-physical results for larger systems, a phenomenon termed "Scaling-Induced MAE-Applicability Divergence" (SAD). This paper aims to overcome these limitations by developing a more robust and scalable approach to Hamiltonian prediction.

Methods

The core innovation of this paper lies in two key areas:

  • Wavefunction Alignment Loss (WALoss): Traditional deep learning approaches for Hamiltonian prediction often rely on element-wise loss functions like Mean Absolute Error (MAE) or Mean Squared Error (MSE). The authors argue these are insufficient for capturing the complex physics of molecular systems. WALoss addresses this by aligning the eigenspaces of the predicted and ground-truth Hamiltonians. This is achieved by performing a basis change on the predicted Hamiltonian using the ground-truth eigenvectors, effectively evaluating how well the predicted Hamiltonian reproduces the true orbital energies and wavefunctions without requiring backpropagation through eigensolvers. This loss function also incorporates a weighting scheme to prioritize the most important eigenvalues (occupied orbitals and LUMO).
  • WANet Architecture: The authors propose WANet, a novel neural network architecture designed for efficient and accurate Hamiltonian prediction. Key features include:
  • SO(2) Convolutions: To address the computational cost of SO(3)-equivariant convolutions for high-order tensor representations, WANet utilizes SO(2) convolutions, reducing complexity and enabling efficient handling of larger systems.
  • Mixture of Long-Short-Range (LSR) Experts: To capture the varying importance of interactions at different distances in large molecules, WANet employs a Mixture-of-Experts layer that specializes in handling proximal and distal interactions.
  • Many-Body Interaction Layer: This layer, inspired by the MACE framework, efficiently computes many-body interactions using a "density trick" to implicitly include three-body terms, crucial for accurate electron correlation.

Datasets

  • PubChemQH: A newly introduced dataset comprising molecular Hamiltonians for structures with atom counts ranging from 40 to 100. This dataset is significantly larger and contains more complex molecules than previous benchmarks. It was generated using a CUDA-accelerated SCF implementation with the B3LYP functional and Def2TZVP basis set.
  • QH9: A comprehensive quantum chemistry dataset containing Hamiltonian matrices for 130,831 stable molecular geometries with up to nine heavy atoms. This dataset was used for evaluating models in stable and dynamic settings.

Key Insights and Ideas

  • Element-wise losses are insufficient for large systems: The paper strongly demonstrates that simply minimizing the MAE of Hamiltonian matrix elements leads to catastrophic errors in predicted physical properties (like system energy) for larger molecules, a phenomenon they term SAD.
  • Eigenspace alignment is crucial: By focusing on aligning the predicted and true eigenspaces (eigenvalues and eigenvectors) through WALoss, the model can achieve much higher accuracy and physical relevance, even with a higher Hamiltonian MAE.
  • Scalability requires architectural innovation: The proposed WANet architecture, with its SO(2) convolutions, LSR experts, and density trick for many-body interactions, is specifically designed to overcome the computational hurdles of large molecular systems.
  • WALoss significantly accelerates SCF convergence: Beyond improving prediction accuracy, WALoss also dramatically reduces the number of SCF iterations required for convergence, leading to substantial speedups in DFT calculations.

Key Results

  • System Energy MAE Reduction: WANet with WALoss achieved a dramatic reduction in System Energy MAE from 63579.233 kcal/mol to 47.193 kcal/mol on the PubChemQH dataset, a factor of 1347 improvement.
  • SCF Acceleration: The model achieved an 18% reduction in SCF cycles compared to baseline methods, and a speed-up of 82% relative to initial guess calculations on the PubChemQH dataset.
  • Improved Accuracy: WANet with WALoss achieved state-of-the-art performance across various metrics, including Hamiltonian MAE, HOMO/LUMO energies, and energy gaps, particularly on the challenging PubChemQH dataset.
  • Scalability Demonstrated: The model showed strong performance on elongated alkanes with up to 182 atoms, demonstrating its ability to scale beyond the training data distribution.
  • Property Prediction Versatility: The predicted Hamiltonian enabled accurate predictions for various properties beyond energy, including dipole moments and electronic spatial extent.

Limitations and Future Work

  • Computational Cost of Dataset Generation: The authors acknowledge the high computational cost associated with generating large training datasets like PubChemQH.
  • System Energy MAE: While significantly improved, the MAE of 47 kcal/mol for system energy prediction is still above the threshold for chemical accuracy.
  • Further Refinement: The authors suggest that their approach can be further refined and applied to a wider range of complex molecular systems.
  • Broader Applicability: The work demonstrates promise for application to larger and more complex molecular systems, and for broader quantum mechanical calculations.

Summary updated

BibTeX
@inproceedings{li2025enhancing,
  author = {Yunyang Li and Zaishuo Xia and Lin Huang and Xinran Wei and Han Yang and Sam Harshe and Zun Wang and Chang Liu and Jia Zhang and Bin Shao and Mark B. Gerstein},
  title = {{Enhancing the Scalability and Applicability of Kohn-Sham Hamiltonians for Molecular Systems}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=twEvvkQqPS},
}
Figure