# Where the Error Lives: Spectral Representations of Learned Kohn-Sham Hamiltonians

DevFeed: [Where the Error Lives: Spectral Representations of Learned Kohn-Sham Hamiltonians](<https://devfeed.tech/articles/where-the-error-lives-spectral-representations-of-learned-kohn-sham-hamiltonians-107973.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2610.37843>)

Author: Fang Sun, Hekai Cheng, Ruoyan Li, Yuanzhou Chen, Wei Wang, Jason Cong, Yizhou Sun

Published: 2026-10-30T04:00:00Z

Content type: article

Language: en

Sources: [arXiv: Artificial Intelligence](<https://devfeed.tech/sources/arxiv-artificial-intelligence.md>)

Topics: [Fine-tuning](<https://devfeed.tech/topics/fine-tuning.md>), [Molecular Dynamics](<https://devfeed.tech/topics/molecular-dynamics.md>)

Tags: [alignment](<https://devfeed.tech/tags/alignment.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [dft](<https://devfeed.tech/tags/dft.md>), [distribution](<https://devfeed.tech/tags/distribution.md>), [eigenvalues](<https://devfeed.tech/tags/eigenvalues.md>), [eigenvectors](<https://devfeed.tech/tags/eigenvectors.md>), [electron](<https://devfeed.tech/tags/electron.md>), [energy](<https://devfeed.tech/tags/energy.md>), [fine-tuning](<https://devfeed.tech/tags/fine-tuning.md>), [gap](<https://devfeed.tech/tags/gap.md>), [hamiltonian](<https://devfeed.tech/tags/hamiltonian.md>), [local](<https://devfeed.tech/tags/local.md>), [machine](<https://devfeed.tech/tags/machine.md>), [matching](<https://devfeed.tech/tags/matching.md>), [molecular-dynamics](<https://devfeed.tech/tags/molecular-dynamics.md>), [networks](<https://devfeed.tech/tags/networks.md>), [observable](<https://devfeed.tech/tags/observable.md>), [physics-chem-ph](<https://devfeed.tech/tags/physics-chem-ph.md>), [physics-informed](<https://devfeed.tech/tags/physics-informed.md>), [signal](<https://devfeed.tech/tags/signal.md>), [space](<https://devfeed.tech/tags/space.md>), [training](<https://devfeed.tech/tags/training.md>)

## AI overview

Entry-wise Hamiltonian accuracy does not guarantee accurate orbital energies or eigenvectors. The abstract argues that wavefunction-alignment and electron-density losses each miss parts of prediction error; in particular, shifting predicted orbital energies leaves the density unchanged. It proposes cumulative local density of states (cumulative LDOS)--the electron count at each spatial point below an energy threshold--as a complete training signal that responds to all error components, uniquely determines the Hamiltonian, and retains gradients for large orbital-energy errors. Fine-tuning three Hamiltonian networks on QH9 with this approach, called FermiScope, reduces HOMO-LUMO gap error without increasing element-wise error. The reported gains extend to out-of-distribution and molecular-dynamics splits, where wavefunction alignment helps less.

## Source excerpt

arXiv:2610.37843v1 Announce Type: cross Abstract: Kohn-Sham density functional theory (DFT) is the standard method for computing the electronic structure of molecules and materials, but its self-consistent-field (SCF) iterations make it expensive for large systems and high-throughput screening. Machine-learned Hamiltonian models offer a shortcut: an equivariant network predicts the Kohn-Sham Hamiltonian matrix in one forward pass, and diagonalizing the prediction yields orbital energies, the HOMO-LUMO gap, molecular orbitals and the electron density. These models are trained to match the reference matrix entry by entry, yet a small entry-wise error does not guarantee accurate eigenvalues or eigenvectors. Two physics-informed alternatives go partway: a recently proposed wavefunction-alignment loss adds a spectral penalty without diagonalizing the prediction, and matching the electron density of the diagonalized prediction supervises it directly. Neither is complete: by representing the prediction error in the eigenbasis of the reference Hamiltonian, we show that each sees only part of the error, and that shifting the predicted orbital energies leaves the electron density exactly unchanged. The same analysis identifies a complete training signal: the cumulative local density of states (cumulative LDOS), the number of electrons at each point in space with energy below a given threshold. The cumulative LDOS is a single physical observable that contains the electron density as a special case, responds to every component of the error, determines the Hamiltonian uniquely, and yields gradients that do not vanish for large orbitalenergy errors. Fine-tuning three Hamiltonian networks on QH9 in this way, which we call FermiScope, reduces the HOMO-LUMO gap error without increasing the element-wise error. The gains carry over to out-of-distribution and molecular-dynamics splits, where the wavefunction-alignment loss helps less.