Ground-state electron density as machine-learning input predicts molecular absorption spectra more accurately than molecular geometry
Related research and updatesSynopsis
Using 6874 molecules selected from the QM7 dataset, with ground-state densities computed by DFT and absorption spectra by linear-response TDDFT, this work compares a 3D convolutional neural network taking volumetric electron density as input against graph neural networks (SchNet, DimeNet++, MACE) taking atom-centred geometry as input for predicting normalized absorption spectra, finding that the density CNN achieves a validation correlation of 0.9926 versus 0.9795 for the best geometry-based graph model, reducing residual decorrelation by about two-thirds.
Figure 1: Schematic of the 3D-CNN model mapping an electron-density cube to a normalized spectrum over L L frequency bins via a Softmax output.
arXivInterpretation
On the normalized absorption-spectrum prediction task, the 3D CNN using ground-state electron density as input achieves a validation correlation of 0.9926 and validation MAE of 7.14e-05, outperforming the best geometry-based graph model (SchNet, validation correlation 0.9795, MAE 1.36e-04). Prior molecular-spectrum machine learning has largely relied on atom types and nuclear coordinates as geometric representations; this work directly compares density versus geometry inputs on the same dataset and molecular split, showing that the density representation is more accurate for spectral-shape prediction. Compared on a unified training/validation split of 6874 QM7 molecules, with all models using the same Softmax-normalized output and the same validation set; reported quantities are validation performance rather than independent test-set estimates.
Measured by residual decorrelation (1 minus correlation), the density CNN reduces the best graph model's residual decorrelation from approximately 0.0205 to 0.0074, removing nearly two-thirds of the remaining gap, while also reducing spectral MAE by approximately a factor of two. Because correlation is bounded above by one, the absolute improvement of about 0.013 appears modest, but the residual-decorrelation scale better reflects progress toward near-perfect spectral-shape agreement. Based on comparison of the best CNN configuration in Table 4 with the best graph-model configurations in Table 1, using validation correlation and MAE.
The training objective affects graph-model performance at least as strongly as architectural differences: KL, JS, L1, and cosine losses all yield high correlations, whereas SchNet runs trained directly on Wasserstein distance give substantially lower correlations (e.g., 0.8216, 0.6696, 0.7344). This work systematically compares distributional and pointwise loss functions, showing that KL and JS divergence provide the best balanced performance for Softmax-normalized spectra. Hyperparameter sweeps across loss functions in Tables 1 and 3, covering SchNet, DimeNet++, and MACE.
The density CNN remains robust across chemical categories (bond types, unsaturation, aromaticity, heteroatom content, rings, functional groups), with median correlation differences between molecules where each feature is present versus absent of only about 0.01–0.02 in most cases. This analysis indicates the model is not performing well only for a narrow subset of molecules but remains robust across diverse chemical environments. Based on median Pearson correlations stratified by chemical category on the validation set, with larger shifts observed for aromatic and other electronically distinctive groups.
Perspective
The results apply to small organic molecules composed of H, C, N, and O with up to seven non-hydrogen atoms from the QM7 dataset, over a spectral window of 0–12.2 eV (ultraviolet to part of the vacuum-ultraviolet), with reference spectra generated by linear-response TDDFT under adiabatic LDA. The density CNN requires a ground-state DFT calculation first, so it is not an end-to-end replacement for electronic-structure theory but replaces the more expensive density-to-response step; once the density is available, inference remains on the millisecond timescale. The framework could in principle extend to vibrational IR, Raman, and X-ray absorption spectra, and to spectra computed by other ab initio methods such as Bethe-Salpeter, ADC, or EOM-CC, and could be combined with graph representations in multimodal models.
The current density CNN uses a conventional Cartesian 3D convolution and is not intrinsically rotationally invariant, so predictions can depend on the orientation of the density grid; the results demonstrate predictive value within the dataset's orientation convention rather than complete rotational robustness. Above roughly 6–8 eV, part of the reference spectra corresponds to discretized continuum states whose positions depend on the simulation-box size, so they are not intended as converged predictions of experimental vacuum-UV absorption, though all spectra were computed with the same protocol, providing a consistent density-to-spectrum mapping. All reported quantities are validation performance; no independent test partition was introduced. Prediction errors for weak peaks, shoulders, and fine spectral structure remain open questions; mixture deconvolution, concentration effects, and time-dependent tautomer populations are not explicitly modeled.
