arXiv:2608.23895physics.chem-phAug 2026

Manuscript Offprint

arXiv:2608.23895

Learning the Kohn-Sham map with neural operators for quasi-linear scaling density functional theory

Danish Khan, Maurice D. Hanisch, Nikolai Argatoff, Evan Xie, Sandeep Sharma, Anima Anandkumar

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Kohn–Sham density functional theory (DFT) underpins electronic-structure simulations, but repeated orbital diagonalizations lead to cubic scaling, restricting quantum calculations to modest scales only. Eliminating these auxiliary orbitals while retaining Kohn–Sham accuracy is the central goal of orbital-free DFT, but both analytical and machine-learning methods have so far fallen short. Prior learning approaches either try to learn the variational kinetic-energy functionals, which are ill-conditioned, or directly predict the ground state, which extrapolate poorly to larger systems. Instead, we identify the Kohn–Sham map as the right learning target for orbital-free DFT. It maps a Kohn–Sham potential directly to the corresponding density and noninteracting kinetic energy, quantities otherwise obtained through an orbital diagonalization. Focusing on the density component in this work, a domain-invariant SE(3)-equivariant Fourier neural operator learns to predict it from the potential as input on real-space grids, enabling stable quasi-linear scaling SCFs. Trained jointly on 8,504 molecules and solids, a single model generalizes to out-of-distribution organic molecules, insulators, and metals. For the first time, the same method converges SCFs across these systems without explicitly constructing Kohn–Sham orbitals, while reproducing densities, electronic spectra, and structural observables at Kohn–Sham DFT accuracy. Linear-scaling SCFs additionally allow converging magnesium dislocation densities containing up to 82,500 valence electrons on a single GPU.

1 Introduction

More than six decades after Hohenberg and Kohn established the ground-state density as the fundamental variable of electronic structure, extending predictive first-principles calculations to mesoscopic scales remains a central challenge [1]. Kohn and Sham made density functional theory (DFT) computationally practical, leading to its ubiquitous use across chemistry, materials science, condensed-matter physics, and biophysics [2–5]. Their formulation introduces an auxiliary system of non-interacting electrons whose orbitals must be solved for and orthogonalized at every self-consistent field (SCF) iteration. These operations scale nominally as O(N3)\mathcal{O}(N^{3}) with N electrons, restricting the length scales accessible to first-principles simulations of extended defects, interfaces, electrochemical environments, and biological systems [6, 7].

The diagonalization of Kohn–Sham Hamiltonians is among the most frequently repeated and computationally consequential eigenvalue problems in modern science. As an example, nearly

30% of the workload at the US National Energy Research Scientific Computing Center in 2018 was attributed to DFT calculations [8].

The search for linear-scaling electronic structure methods has a long history. Several efforts leverage Kohn's nearsightedness principle to truncate the density matrix (DM) through localized orbitals, leading to sparse-matrix operations, while others use DM purification methods to impose idempotency [9, 10]. Other approaches include Fermi-operator expansions, selected inversion, and stochastic trace estimation [11, 12]. These methods extend the reach of KS-DFT, but their performance depends on density-matrix decay, sparsity, dimensionality, or stochastic error. There is therefore no general framework for near-linear scaling DFT with KS accuracy across molecules, metals, insulators, and chemically heterogeneous systems.

Hohenberg and Kohn originally formulated DFT as a variational theory of the density alone. At fixed spatial resolution, the size of the density representation grows linearly with system size, offering a route to linear or quasi-linear scaling assuming a similar cost of applying the energy functionals. Orbital-free DFT (OF-DFT) seeks to recover this density-only formulation by minimizing the energy directly over the density [13]. Its central unknown is the non-interacting kinetic energy density functional (KEDF). KS-DFT evaluates this quantity from the auxiliary orbitals, whereas OF-DFT requires an explicit density functional Ts[n]T_{s}[n]. Existing analytical KEDFs are efficient but lack the accuracy and transferability needed to describe shell structure, chemical bonding, and nonlocal response across molecules and materials [13]. Machine-learned KEDFs have improved this description [14, 15], but stable self-consistent use requires accurate functional derivatives, which are considerably harder to learn than energies evaluated on prescribed densities [16]. OF-DFT thus defines the goal, namely a density-only solver, but leaves open the best object to learn.

In contrast to OF-DFT, models that infer a converged density from atomic structure [17–19] take the direct approach of learning the composite ground-state (GS) map GGS:vext↦n⋆\mathcal{G}_{\mathrm{GS}} : v_{\mathrm{ext}} \mapsto n^\star. Here, vextv_{\mathrm{ext}} and n⋆n^\star denote the ionic external Coulomb potential and corresponding ground-state density, respectively. In exact theory, this map involves the interacting many-electron ground-state problem. KS-DFT determines n⋆n^\star through a sequence of simpler noninteracting problems: each SCF iteration solves for the density associated with a KS potential and uses that density to construct the next potential, allowing later iterations to refine earlier estimates. A direct GS prediction model must instead learn the endpoint of an arbitrarily long, XC-specific trajectory. A similar direct endpoint-learning strategy underlies machine-learned interatomic potentials, which learn the energy map vext↦E[n⋆]v_{\mathrm{ext}} \mapsto E[n^\star] [20]. Alternatives that use near-converged quantum-mechanical (from e.g. semi-empirical calculations) features as input rather than being learned directly like Orbitall [21] greatly simplify this map and have been shown to outperform state-of-the-art MLIPs. The benefit of retaining intermediate computation is also evident through inference-time reasoning in large language models, where difficult answers are constructed through intermediate steps rather than in one prediction [22].

Models that predict the converged DFT Hamiltonian from atomic structure are also direct ground-state models [23–25]. In KS-DFT, the Hamiltonian can be directly constructed from the density alone. Predicting it separately therefore introduces an unnecessary basis-dependent matrix whose number of entries grows quadratically with the system size. NeuralSCF [26] learns the composite update from the density at a KS-DFT SCF iteration and atomic structure to the next density, and iterates this map to self-consistency, outperforming a matched one-shot ground-state predictor. Because the KS potential is not supplied explicitly, however, the model must learn both its XC-dependent construction, non-local Hartree screening, and then the subsequent non-interacting solution. Additionally, it depends on the XC approximation used to generate the learned SCF trajectory, as well as the basis representation used for the density, limiting its transferability between molecules and periodic systems.

A Self-consistent field (SCF) cycle

Figure

B Model outline

Kohn-Sham potential

Density solution

t=1,2,…,Lt = 1, 2, \ldots, L

Figure

C Accuracy

D Extrapolation

E Scaling

Figure

Figure

Figure

Figure 1: Summary of the Kohn–Sham Fourier Neural Operator (Kohn-Sham FNO) based self-consistent field (SCF) cycles for density optimization. (A) Conventional DFT and Kohn-Sham FNO workflows. The model replaces the orbital-solution step (see SI) while retaining the rest of a standard DFT SCF cycle. Our SCF implementations for both molecules and solids closely follow Quantum ESPRESSO (QE) 7.5 [27, 28] with minor modifications for retaining quasi-linear scaling. All DFT calculations are also performed using QE. See SI. (B) Schematic of the model mapping an input potential to the density produced by solving the corresponding Kohn-Sham equations. See SI. (C) Band structures for tetragonal perovskite CaTiO3CaTiO_{3} (MC3D [29] ID mc3d-69107; I4/mcm, No. 140) obtained using the Kohn-Sham FNO (blue) converged densities and regular DFT (black). EgE_{g} values denote the corresponding band gaps. See SI. (D) Density error versus molecular size for self-consistent and direct ground-state prediction on small-organic QM9 [30] and larger drug-like QMugs molecules [31]. See Fig. 3. (E) Measured total SCF cycle wall time versus electron count for QE and Kohn-Sham FNO. See SI.

Our Approach: A natural and universal learning target already exists in every Kohn–Sham calculation. At each SCF iteration, the density n defines an effective potential vKS[n]v_{\mathrm{KS}}[n]. Solving its non-interacting Hamiltonian and occupying the eigenstates produces the output density,

[−12∇2+vKS[n](r)]ϕp(r)=εpϕp(r)⟹nout(r)=∑pfp∣ϕp(r)∣2(1)\left[-\frac{1}{2}\nabla^{2}+v_{\mathrm{K S}}[n](\mathbf{r})\right]\phi_{p}(\mathbf{r})=\varepsilon_{p}\phi_{p}(\mathbf{r})\quad\Longrightarrow\quad n^{\mathrm{o u t}}(\mathbf{r})=\sum_{p}f_{p}\left|\phi_{p}(\mathbf{r})\right|^{2} \tag{1}

The SCF converges when nout=nn^{\text{out}} = n, but every preceding iteration also supplies an exact sample of the same forward universal operator,

GKS(n,T):vKS[n](r)⟼(nout(r),Ts[nout]),(2)\mathcal{G}_{\mathrm{K S}}^{(n,T)}:v_{\mathrm{K S}}[n](\mathbf{r})\longmapsto\left(n^{\mathrm{o u t}}(\mathbf{r}),T_{s}[n^{\mathrm{o u t}}]\right), \tag{2}

where the electron number, boundary conditions, and occupations are implicit. Both the density and kinetic energy are therefore one non-interacting solve away from a prescribed KS potential, and together form a complete orbital-free DFT target.

Stable density optimization has historically been the harder test for OF-DFT [13, 16] and hence in this work we learn only the density component, i.e. vKS[n](r)⟼nout(r)v_{\mathrm{KS}}[n](\mathbf{r}) \longmapsto n^{\mathrm{out}}(\mathbf{r}), denoted GKS\mathcal{G}_{\mathrm{KS}} for performing stable orbital-free SCFs at inference. Consequently, we obtain total energies and electronic spectra via a fixed-density post-SCF diagonalization in the following results.

This forward formulation is the inverse of the relation used in traditional OF-DFT. For a local KS potential, minimization of the total energy at fixed electron number gives

δTs[ρ]δρ(r)∣ρ=nout=μ−vKS[n](r),(3)\left.\frac{\delta T_{s}[\rho]}{\delta\rho(\mathbf{r})}\right|_{\rho=n^{\mathrm{o u t}}}=\mu-v_{\mathrm{K S}}[n](\mathbf{r}), \tag{3}

where μ\mu enforces the electron number. A KEDF therefore maps the density to the kinetic energy, and its functional derivative recovers the generating effective potential up to the additive constant μ:nout(r)↦μ−vKS[n](r)\mu : n^{\text{out}}(\mathbf{r}) \mapsto \mu - v_{\text{KS}}[n](\mathbf{r}), which is the inverse of the eq. 2 operator. By contrast, the two outputs in Eq. 2 map the generating potential directly to its density and kinetic energy.

Compared to direct prediction models, vKS[n]↦noutv_{\mathrm{KS}}[n] \mapsto n^{\mathrm{out}} is a more elementary map defined via a single non-interacting Hamiltonian solution. Compared to MLIPs, a simpler forward counterpart is vKS[n⋆]↦Ts[n⋆]v_{\mathrm{KS}}[n^\star] \mapsto T_s[n^\star], after which the remaining energy terms are explicit. Section 2.1 discusses this energy analogy further, while Fig. 3 directly compares forward KS and one-shot density prediction.

Equation 2 gives the local form of the KS operator while our calculations use nonlocal pseudopotentials [32, 33] to smooth the core region and allow us to use uniform-grid fast Fourier transforms (FFT). For each fixed set of nonlocal projectors, we combine their operator with the kinetic energy in a generalized non-interacting kinetic functional defined by constrained search [34, 35]. This preserves the joint forward map and its inverse Euler relation for the pseudopotential problem. See SI. This defines one operator across SCF iterations, chemical composition, geometry, and exchange-correlation (XC) approximations. These inputs modify the KS potential but not the non-interacting solution operator being learned. Potential-density pairs from different XC approximations can therefore be combined in training. We test this separation by applying a PBE-trained model [36] to PBEsol SCFs [37] without retraining [Fig. 4].

The KS map is an operator between spatial fields, making neural operators a natural model class for this framework. Neural operators learn maps between function spaces rather than between fixed-dimensional vectors. We specifically utilize Fourier neural operator (FNO) since the Fourier layers of an FNO capture global nonlocality with quasi-linear O(Nglog⁡Ng)\mathcal{O}(N_g \log N_g) scaling [38, 39] on the same grid used to construct the Kohn-Sham potential. The complete update therefore scales as O(Nglog⁡Ng)\mathcal{O}(N_g \log N_g) for NgN_g grid points. Alternative architectures, e.g., graph neural networks rely either on finite spatial cutoffs or on globally coupled operations whose cost grows quadratically with system size, e.g., transformers.

In this work, we introduce a new domain-invariant, SE(3)-equivariant FNO architecture. Unlike the standard FNO, whose spectral weights are tied to a fixed domain size, the domain-invariant FNO evaluates radially factorized filters as functions of physical reciprocal-space radius. The same learned filters can therefore be sampled on the reciprocal-space grids of differently sized domains, allowing one architecture to treat molecules and materials across system sizes. The radial filters and spherical mode truncation make the spectral convolution rotation equivariant; together with its translation equivariance, this yields full SE(3) equivariance.

We first show that learning the KS-map leads to significantly improved stability, and chemical extrapolation than the inverse OF-DFT and direct ground-state learning approaches respectively. Following this, we show, for the first time, a single method converging SCF calculations without invoking the auxiliary Kohn-Sham orbitals across organic molecules of varying sizes as well as insulating and metallic systems spanning the first 5 rows of the periodic table. The corresponding converged densities are shown to produce observables nearly indistinguishable in quality from a regular KS-DFT calculation. This is verified using electronic and structural observables, including band structures, band gaps, density of states, equation of state curves, equilibrium volumes, and bulk moduli. The computational advantage over conventional KS-DFT is particularly large for periodic systems since the Kohn–Sham FNO inference loop evolves only the k-independent, lattice-periodic potential and density on the unit cell and requires no explicit k-point sampling [40] skipping Niterations×NkN_{\text{iterations}} \times N_k diagonalizations. Finally, after training on cells with at most 364 atoms, we obtain stable SCFs for magnesium dislocations containing up to 8,250 atoms on one GPU, empirically verifying the expected near-linear scaling.

References (47)