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, Samuel Harshe, Han Yang, Erpai Luo, Zun Wang, Jia Zhang, Chang Liu, Bin Shao, Mark Gerstein

Abstract

Density Functional Theory (DFT) is a cornerstone of computational chemistry, yet its reliance on the iterative Self-Consistent Field (SCF) method limits its scalability for large molecular systems. While deep learning models, specifically SE(3)-equivariant Graph Neural Networks (EGNNs), have been proposed to predict the Kohn-Sham Hamiltonian directly, they suffer from Scaling-Induced MAE-Applicability Divergence (SAD). This paper introduces WANet and a novel Wavefunction Alignment Loss (WALoss) to bridge this gap. By training on the new PubChemQH dataset, the proposed framework achieves a 1347-fold reduction in system energy error and significantly accelerates DFT calculations, demonstrating robust extrapolation to molecules three times larger than those in the training set.

Introduction

The simulation of electronic structures is fundamental to understanding molecular behavior. Density Functional Theory (DFT) serves as the primary tool for these simulations, primarily by solving the Kohn-Sham equations to determine the Hamiltonian matrix. However, the computational cost of the iterative Self-Consistent Field (SCF) process scales cubically or worse with the number of electrons, creating a bottleneck for large-scale molecular modeling.

Recent advances in machine learning have sought to replace the SCF process by predicting the Hamiltonian matrix directly from atomic coordinates. While successful for small molecules, these models encounter significant hurdles when scaled to larger systems. This work addresses the divergence between statistical error and physical validity, providing a scalable architecture and a physics-informed loss function to enable accurate Hamiltonian prediction for complex molecules.

The Challenge of Scalability: SAD

A primary contribution of this work is the identification of Scaling-Induced MAE-Applicability Divergence (SAD). In small molecular systems, a low element-wise Mean Absolute Error (MAE) in the predicted Hamiltonian matrix typically corresponds to accurate physical properties. However, as system size increases, this correlation breaks down. A model may achieve a negligible element-wise MAE, yet the resulting physical energy calculations can deviate by orders of magnitude (e.g., errors exceeding 1,000,000 kcal/mol). This phenomenon occurs because standard loss functions do not account for the global quantum mechanical structure of the matrix, particularly its eigenspectrum, which dictates the system's energy and wavefunctions.

Methodology

To overcome the SAD phenomenon and improve architectural efficiency, the authors propose two integrated solutions: WALoss and WANet.

Wavefunction Alignment Loss (WALoss)

Traditional training objectives focus on minimizing the difference between individual matrix elements. In contrast, WALoss aligns the eigenspaces of the predicted and ground-truth Hamiltonians. Directly backpropagating through an iterative eigensolver is numerically unstable and computationally prohibitive. WALoss circumvents this by evaluating the degree to which the ground-truth eigenvectors (wavefunctions) diagonalize the predicted Hamiltonian. By placing higher weights on occupied orbitals and the Lowest Unoccupied Molecular Orbital (LUMO), the loss function prioritizes the electronic states most critical to chemical behavior.

WANet Architecture

WANet is a modernized EGNN designed for high-performance molecular modeling. It incorporates three key features:

  1. eSCN Convolutions: By reducing complex SO(3) spherical convolutions to SO(2), WANet reduces computational complexity from $O(L^6)$ to $O(L^3)$, where $L$ is the maximum degree of spherical harmonics.
  2. Sparse Mixture of Experts (MoE): A routing mechanism allows the model to utilize specialized "experts" for different types of interactions, such as short-range covalent bonding versus long-range electrostatic forces.
  3. Many-Body Interaction Layer: This layer utilizes a "density trick" to implicitly account for multi-electron correlation effects, capturing complex physics without the explicit $O(N^k)$ cost of many-body calculations.

Data and Benchmarking

The study introduces PubChemQH, a large-scale dataset featuring over 50,000 molecules with 40 to 100 atoms. Generated using the B3LYP functional and Def2TZVP basis set, PubChemQH provides a rigorous benchmark for scalability that previous datasets, such as QH9 (limited to 9 heavy atoms), could not offer.

Results and Impact

The implementation of WALoss and WANet yields transformative results in both accuracy and efficiency:

  • Massive Error Reduction: On the PubChemQH dataset, models trained with standard element-wise loss functions produced a System Energy MAE of approximately 63,579 kcal/mol. The introduction of WALoss reduced this error to 47.19 kcal/mol—a 1347-fold improvement.
  • SCF Acceleration: Using the predicted Hamiltonian as an initial guess for DFT calculations reduced the number of required SCF iterations to 82% of the baseline, accelerating the overall simulation time.
  • Generalization and Extrapolation: WANet demonstrated remarkable out-of-distribution performance, accurately predicting the HOMO/LUMO energies of carbon chains containing up to 182 atoms, roughly three times the size of molecules in the training set.

Conclusion

This research highlights that for quantum mechanical applications, physical consistency is as important as statistical precision. By addressing the SAD phenomenon through physics-informed loss functions and scalable architectures, the authors have moved deep learning-based DFT closer to practical utility for large-scale molecular systems. While challenges remain in reaching strict "chemical accuracy" (1 kcal/mol) for massive systems, this work provides a robust foundation for the future of AI-accelerated quantum chemistry.

Summary updated

BibTeX
@inproceedings{li2025enhancing,
  author = {Yunyang Li and Zaishuo Xia and Lin Huang and Xinran Wei and Samuel Harshe and Han Yang and Erpai Luo and Zun Wang and Jia Zhang and Chang Liu and Bin Shao and Mark 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