Stationarity Constraints Improve Both Energies and Densities of Machine-Learned Exchange-Correlation Functionals
Authors: Yuhao Chen, Donald G. Truhlar, Xiao He
Organizations: Shanghai Engineering Research Center of Molecular Therapeutics and New Drug Development, Shanghai Frontiers Science Center of Molecule Intelligent Syntheses, School of Chemistry and Molecular Engineering, East China Normal University, Shanghai 200062, China · Department of Chemistry, Chemical Theory Center, and Minnesota Supercomputing Institute, University of Minnesota, Minneapolis, Minnesota 55455-0431, USA · Anhui Provincial Key Laboratory of Advanced Catalysis and Energy Materials, Anhui Ultra High Molecular Weight Polyethylene Fiber Engineering Research Center, School of Chemistry and Chemical Engineering, Anqing Normal University, Anqing 261433, China · New York University–East China Normal University Center for Computational Chemistry, New York University Shanghai, Shanghai 200062, China
Empirical exchange-correlation functionals are fitted on fixed orbitals but used self-consistently, so better energies often come with worse densities. We show that the Brillouin residual of a trained functional on the Kohn-Sham orbitals of an accurate density controls, to first order, both the self-consistent density shift and the gap between fitted and self-consistent energies. Penalizing it requires no self-consistent-field solution during training. Trained on 6 energies and 11 CCSD densities, a neural meta-GGA surpasses SCAN in both atomization energies and densities of unseen molecules.
Figures & tables
Figure 1: Training XC functionals on fixed orbitals. (a) Wu-Yang inversion of the CCSD density gives fixed KS orbitals, on which the occupied-virtual Fock block Fai of the trained functional yields the predicted SCF rotation κai (stationarity loss LG ) and the first-order density change δn (density loss LD ); the energy loss LE uses the same orbitals. One Fock build per system gives the parameter gradient, with no SCF. (b) Energy along one occupied-virtual rotation. Energy-only training (E) matches the reference energy at κ=0 , but the orbital gradient 2Fai drives the SCF solution to κ∗=−Fai/Δai , causing an energy error Δaiκ∗2 and a density shift δn . EGD makes the reference orbitals stationary.
Figure 2: Absolute errors of self-consistent atomization and ionization energies on the test sets. Boxes: interquartile range; bars: medians; diamonds: MAEs. “Energy loss only” denotes E training; the other NN functionals use the full loss, Eq. ( 9 ) (EGD). The stationarity and density terms lower the errors of both NN functionals on all atomization-energy sets, most strongly for new bond pairs. CCSD uses the aug-cc-pVTZ basis.
Figure 3: (a) GGA and (b) meta-GGA functionals in the plane of AE103 atomization-energy MAE and DP99 density error. Open circles: conventional functionals; filled blue circles: Pareto-optimal conventional functionals; blue line: Pareto front; red diamonds: NN functionals trained with L=E or L=EGD . The two constraints move both NN functionals from the interior to the low-density-error end of the front. Values for all functionals are in the SM [ 38 ] .
Training
Validation
Atomization
H 2 , LiH, O 2 , CO
N 2 , NO, F 2 , HF
Density
H, Li, Ne, H 2 , Li 2 , LiH, B 2 , O 2 , CO, O + , Ne +
He, Be, N, N 2 , F 2 , HF
Ionization
O, Ne
N, F
Table 1: Training and validation systems. Density systems use CCSD Λ densities and their Wu-Yang orbitals, entering LG and LD (training) or the density error (validation). Atomic energies of C and O needed for atomization energies are evaluated on fixed orbitals but do not enter LG or LD . The partition follows Ref. [ 32 ] , with O + and Ne + added to the density set.
Machine-learned (ML) exchange-correlation (XC) functionals aim to replace human-designed density functional approximations by learning directly from reference data, but they still do not consistently outperform traditional O(N4)-scaling hybrid functionals. We study a hybrid-distillation setting in which O(N3)-scaling ML-XC functionals are trained to reproduce B3LYP/def2-SVP targets. We introduce Derivative Informed XC-Loss (DI-Loss), a loss that incorporates additional information from the reference hybrid functional by supervising first and second derivatives of the energy on the Grassmannian of admissible density matrices. Rather than only matching the self-consistent fixed point, DI-Loss aligns the local first- and second-order response of the learned functional with that of the target functional. Across four evaluated architectures, DI-Loss consistently improves the main energy metrics. Averaged uniformly across architectures, the total-energy MAE decreases by 66% relative to energy and density supervision alone. The density-sensitive mean-field energy metric Eρ improves from 1.2 to 0.8 mEh on average, while dipole and L2 density errors do not improve uniformly. We further show that densities from the distilled functionals reduce hybrid-functional SCF iterations by up to 50%. In downstream TDDFT calculations, Hessian supervision improves excited-state predictions, with XCdiff reducing the mean excitation-energy MAE by 19 - 35%.
Eike S. Eberhard, Luca A. Thiede, Abdul Aldossary +5
Technical University of Munich, Munich, Germany · Munich Data Science Institute, Munich, Germany · Munich Center for Machine Learning, Munich, Germany +4
Machine-learned exchange-correlation functionals correct band gaps at near-semilocal cost, while density-functional tight binding reaches the 103-106-atom regime; combining them assumes that a better parent yields a better parameterization, but we show it does not. Current-generation functionals are orbital-dependent generalized Kohn-Sham operators, whereas the parameterization channel is built on a multiplicative potential, preventing exact representation. Using the transfer ratio, the surviving fraction of a parent-level change, we find anti-transfer: coherently negative ratios across four covalent semiconductors move the gap in the wrong direction, consistent with a molecular proxy and an r2SCAN control. The minimal-basis overgap is dominated by the on-site convention rather than basis incompleteness; correcting the on-site block removes most of it, while one d-polarization shell closes a further 16-40, depending on the placement of the empty d level, which no free-atom eigenvalue uniquely fixes. Occupied-manifold enhancements, ionic and closed-shell repulsive potentials, and rocksalt-oxide gaps inherit, whereas elemental and III-V covalent networks inherit neither gaps nor repulsive potentials and oxide networks inherit only the latter. We screen 23 elements and release the parameter sets, showing that the transfer ratio provides a cheap pre-test before any parameterization campaign.
Can Polat, Mustafa Kurban, Erchin Serpedin +1
Department of Computer and Electrical Engineering, Texas A&M University, College Station, TX, USA · Department of Electrical and Computer Engineering, Texas A&M University at Qatar, Doha, Qatar · Department of Prosthetics and Orthotics, Ankara University, Ankara, Turkey +1
Density Functional Theory (DFT) is widely used for first-principles simulations in chemistry and materials science, but its computational cost remains a key limitation for large systems. Motivated by recent advances in ML-based exchange-correlation (XC) functionals, this paper introduces a differentiable framework that integrates machine learning models into density functional theory (DFT) for solids and other periodic systems. The framework defines a clean API for neural network models that can act as drop in replacements for conventional exchange-correlation (XC) functionals and enables gradients to flow through the full self-consistent DFT workflow. The framework is implemented in Python using a PyTorch backend, making it fully differentiable and easy to use with standard deep learning tools. We integrate the implementation with the DeepChem library to promote the reuse of established models and to lower the barrier for experimentation. In initial benchmarks against established electronic structure packages (GPAW and PySCF), our models achieve relative errors on the order of 5-10%.
Rakshit Kumar Singh, Aryan Amit Barsainyan, Bharath Ramsundar