A Function-Centric Graph Neural Network Approach for Predicting Electron Densities

Manuel V. Klockow, Marc K. Ickler, Peter Lippmann, Fred A. HamprechtICLR 2026

Abstract

The Basis Overlap Architecture (BOA) is a novel equivariant graph neural network designed to predict molecular electron densities with state-of-the-art accuracy. By treating internal neural features as mathematical functions and utilizing basis function overlap matrices for message passing, BOA achieves remarkable generalization. It successfully predicts the electronic structure of molecules containing up to 200 atoms after being trained exclusively on molecules with 9 or fewer heavy atoms.

Introduction

In the realm of quantum chemistry, Kohn-Sham Density Functional Theory (KS-DFT) serves as the "gold standard" for calculating the properties of molecules and materials. However, KS-DFT is computationally expensive, often consuming a massive portion of global supercomputing resources. To accelerate these calculations, researchers are developing machine learning surrogates.

A major challenge for these surrogates is accurately representing the electron density—the physical "cloud" of electrons surrounding a molecule. Previous models typically took one of two paths:

  1. Grid-based: Predicting density on a 3D grid, which is incredibly memory-intensive and scales poorly.
  2. Basis-based: Predicting coefficients for a set of fixed functions (basis functions) centered on atoms. While more efficient, this approach often struggles to capture the complex density between atoms unless "virtual" nodes are manually added to the graph.

The authors of this paper sought a method to achieve the accuracy of complex physical simulations combined with the efficiency and scalability of graph neural networks (GNNs).

Methods: The Basis Overlap Architecture (BOA)

The Basis Overlap Architecture (BOA) overview, detailing the network structure, message passing, and molecular graph representation.

The authors introduce the Basis Overlap Architecture (BOA). Its design is "function-centric," meaning it doesn't just treat data as abstract vectors; rather, it treats internal features as coefficients of functions in a specific basis.

Key innovations of BOA include:

  • Quadratic Expansion: Instead of a simple linear combination of functions, BOA represents density as a quadratic expansion. This naturally places the "centers" of the predicted density between atoms (where bonds are located), mimicking how real quantum mechanics (density matrices) works without the need to add artificial "virtual nodes."
  • Basis Overlap Message Passing: This is the core novelty. When one atom "talks" to another in the GNN, the message is transformed from the sender's coordinate basis to the receiver's basis using an overlap matrix. This ensures the model "understands" the geometric relationship between atoms through the lens of their overlapping electronic orbitals.
  • Equivariance: The model employs spherical harmonics to ensure that if a molecule is rotated, the predicted electron density rotates perfectly in tandem.
  • Radial Correction: While it uses standard Gaussian-type orbitals (GTOs) as a starting point, the model learns a small correction factor for the radial part of these functions to better fit the complex density data.

Datasets

The model was rigorously evaluated on several established benchmarks:

  • QM9 (VASP & PySCF versions): A dataset of approximately 134,000 small organic molecules. The authors tested against two different "ground truth" versions calculated by different quantum chemistry software packages.
  • MD Dataset: Molecular dynamics trajectories for small molecules such as ethanol, benzene, and malonaldehyde.
  • QMugs: A dataset containing much larger molecules (up to ~200 atoms), used specifically to test how well the model generalizes to unseen chemical scales.

Key Insights and Ideas

  • Geometry via Overlap: The most profound insight is that the overlap of basis functions serves as a powerful inductive bias. By forcing the GNN to communicate via these overlaps, the model inherently respects the underlying physics of how atoms interact.
  • The Power of Quadratic Forms: Ablation studies demonstrated that the quadratic expansion was nearly twice as accurate as a standard linear expansion. It allows the model to represent the electron "glue" between atoms much more effectively.
  • Less is More for Generalization: Surprisingly, the authors found that to predict huge molecules using a model trained on tiny ones, they needed to reduce the message-passing cutoff distance. Limiting the "field of view" prevented the model from being confused by large-scale structural differences it hadn't seen during training, allowing it to focus on local chemical environments that remain consistent across scales.

Key Results

  • New State-of-the-Art: BOA outperformed all previous models on the QM9 datasets, achieving a Normalized Mean Absolute Error (NMAE) of 0.116% (PySCF) and 0.134% (VASP).
  • Zero-Shot Scaling: A model trained only on molecules with up to 9 heavy atoms successfully predicted the density of molecules with 200 atoms with almost no loss in accuracy.
  • DFT Acceleration: Using BOA's predicted density as a "starting guess" for traditional KS-DFT calculations reduced the number of iterations required to reach a solution by 35%.
  • Efficiency Trade-off: While BOA is about 2x slower than some recent "lightweight" models (like SCDP), it is significantly more accurate. The authors showed that users can "steer" this trade-off by simply choosing smaller or larger basis sets.

Limitations and Future Work

While highly successful, the authors acknowledge a few areas for future development:

  • Chemical Diversity: The current tests focused on small organic molecules (H, C, N, O, F). Expanding this to the entire periodic table (e.g., transition metals) would require a more unified basis set approach.
  • Fixed Exponents: Currently, the "width" of the basis functions is fixed. Future versions could allow the model to learn these exponents dynamically for even greater flexibility.
  • Parameter Scaling: The model currently uses separate parameters for each atom type, which might become unwieldy as more elements are added. Moving toward a more universal, element-agnostic representation is a likely next step.

Summary updated

BibTeX
@inproceedings{klockow2026function,
  author = {Manuel V. Klockow and Marc K. Ickler and Peter Lippmann and Fred A. Hamprecht},
  title = {{A Function-Centric Graph Neural Network Approach for Predicting Electron Densities}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=HDdkFjFEZd},
}
Figure