Source-linked AI summary
Electronic Density versus Geometry for Machine-Learned Molecular Absorption Spectra
Siddharth Dhanpal, Peter Elliott, Paolo Emilio Trevisanutto, Alin M. Elena, Gilberto Teobaldi
TL;DR
LR-TDDFT absorption spectra are computationally demanding, limiting routine calculations across large molecular sets. The paper compares density-based CNNs with geometry-based graph models for predicting full spectra and finds stronger validation performance from the density representation.
Problem
LR-TDDFT is often the computational bottleneck when many excited states, broad spectral windows, or large candidate sets are needed.
Source: INTRODUCTION · p. 1Method
The study compares 3D CNNs that map volumetric ground-state electron densities to spectra with graph neural networks that use molecular geometry.
Source: INTRODUCTION · p. 2, Three-dimensional convolutional neural… · p. 5Results
The density-based CNN reaches validation correlation 0.9926 versus 0.9795 for the best graph model, reducing residual decorrelation by approximately 64%.
Source: CONCLUSIONS · p. 12Takeaways & Limitations
Among the models considered, electron density provides the strongest empirical performance for normalized-spectrum prediction.
Source: CONCLUSIONS · p. 13The conventional 3D CNN is not intrinsically rotationally invariant, so results demonstrate predictive value within the dataset’s orientation convention rather than complete rotational robustness.
Source: CONCLUSIONS · p. 13
Abstract
from arXiv · showhide
Molecular optical absorption spectroscopy provides a direct probe of electronic structure and is widely used for molecular identification, interpretation of photophysical behaviour, and planning of spectroscopy experiments. Calculating the absorption spectra using first-principle excited-state methods, however, is computationally demanding, at least compared to ground-state calculations, which limits their routine application across large molecular sets. Machine-learning (ML) surrogates can reduce this cost and allow rapid spectral prediction. However, their performance depends strongly on how molecular information is represented. Here, we compare using the ground-state electron density versus the molecular geometry as inputs to a ML model for predicting absorption spectra, for a training set of 6874 molecules selected from the QM7 dataset. For each of these molecules, the density was calculated using density functional theory (DFT) and the absorption spectrum was calculated using linear-response (LR) time-dependent DFT (TDDFT). Utilizing the ground-state density as the input to the ML model is motivated by the Hohenberg-Kohn and Runge-Gross theorems, and the fact that the ground-state density encodes information about bonding, charge localisation, and electronic delocalisation. Hence, it may be a more judicious starting point for the ML model compared to the geometry, as it effectively decouples the chemistry of the ground-state. The question we test is whether the benefits of using the density outweigh the (notprohibitive) penalty of requiring an additional single-point DFT calculation for the density. We find that the density-based convolutional neural network achieves a validation correlation of 0.9926, compared with 0.9795 for the best geometry-based graph model, reducing the residual decorrelation, by approximately 64%.
INTRODUCTION
LR-TDDFT spectra are costly to compute at scale, motivating fast machine-learning surrogates. This study compares ground-state electron density and molecular geometry as inputs for predicting broadened absorption spectra.
INTRODUCTION
- LR-TDDFT is often the computational bottleneck, especially when many excited states, broad spectral windows, or candidate molecules are required.Fast surrogates could help screen molecules before more expensive calculations and support spectroscopy planning.Source: INTRODUCTION · p. 1
- Ground-state density is physically motivated because it determines ground-state observables, while its real-space distribution encodes the electronic environment from which optical response emerges.The authors note that care is needed for certain hypersensitive properties.Source: INTRODUCTION · p. 2
- The study compares 3D convolutional networks using volumetric ground-state densities with graph neural networks using molecular geometries to predict broadened absorption spectra.The geometry models include SchNet-like, directional message-passing, and equivariant architectures.Source: INTRODUCTION · p. 2
Study overview and prediction tasks
- The dataset contains 6,874 converged molecular calculations, and common calculations and splits enable a direct comparison of geometry and density representations.The comparison tests whether the preferred representation depends on the target observable.Source: Study overview and prediction tasks · pp. 2–3
Electronic-structure dataset construction
The study builds electronic-structure data from QM7 geometries and obtains ground-state densities by solving the Kohn–Sham DFT problem.
Source molecular structures
- The study selects 6,874 QM7 molecules composed of H, C, N, and O, with up to seven non-hydrogen atoms, and generates densities and spectra for them.QM7 supplies the geometries, not the volumetric densities or LR-TDDFT spectra used in this work.Source: Source molecular structures · p. 3
- The source molecular orientation is retained consistently when generating density inputs, with no molecules assigned different orientations across data subsets.This preserves a consistent orientation convention for the data.Source: Source molecular structures · p. 3
Ground-state density-functional theory
- Ground-state density is obtained by solving the Kohn–Sham equation; for closed-shell molecules, each orbital is doubly occupied and the density sum has N/2 terms.The Kohn–Sham potential combines external, Hartree, and exchange-correlation contributions, with an approximation required for the unknown exchange-correlation functional.Source: Ground-state density-functional theory · p. 3
Linear-Response TDDFT absorption spectra
The reference absorption spectra are computed with LR-TDDFT and broadened for comparison, using a common calculation protocol and a restricted spectral window.
Linear-Response TDDFT absorption spectra
- The absorption spectrum is calculated with the Casida equation of LR-TDDFT, whose transitions pair occupied and empty DFT eigenstates.The exchange-correlation kernel is assumed frequency independent under the adiabatic approximation.Source: Linear-Response TDDFT absorption spectra · p. 3
- Oscillator strengths from the Casida calculation form the dipole strength function, which is broadened with a Lorentzian using Γ = 150 meV.The absorption spectrum is proportional to the dipole strength function.Source: Linear-Response TDDFT absorption spectra · p. 3
Calculation details
- The calculations use LDA and retain the QM7 geometries; machine learning uses the first 900 spectral bins, spanning approximately 0–12.2 eV.DFT and TDDFT were run in Octopus with a 0.15 Å grid spacing.Source: Calculation details · pp. 3–4
- Above the roughly 6–8 eV ionization threshold, computed transitions are discretized continuum states whose positions depend on box size, so the reference spectra are not converged experimental vacuum-UV predictions.The common protocol nevertheless provides a consistent density-to-spectrum mapping for comparing representations.Source: Calculation details · p. 4
Molecular representations and preprocessing
The study contrasts low-cost geometry inputs with volumetric electron densities and predicts normalized spectral shape on a fixed frequency grid.
Atomic geometry
- Geometry models use atomic numbers and nuclear coordinates, with graphs built dynamically from interatomic distances and model-specific cutoffs.These inputs require no electronic information beyond molecular structure and are the lowest-cost representation considered.Source: Atomic geometry · p. 4
Volumetric electron density
- The density CNN maps a ground-state electron-density cube to a normalized spectrum over L bins, retaining spatial density on a common Cartesian grid.Densities are centered, zero-padded to fixed-size tensors, and retain the orientation inherited from the QM7 geometry.Source: Figure 1 · p. 4, Volumetric electron density · pp. 4–5
Spectral targets and normalisation
- The primary target is the unit-normalized spectral shape, which captures the distribution of intensity across the energy window without letting total intensity dominate training.Separate experiments regress the normalization constant α to recover predictions on the original intensity scale.Source: Spectral targets and normalisation · p. 5
Choice of neural architectures
The models compare geometry-only graph inputs with a density-based CNN, which learns the mapping from ground-state density to absorption spectra. Their shared spectrum output representation is intended to make performance differences reflect the learned representations and architectures.
Choice of neural architectures
- Geometry graph models use atomic species and coordinates for screening before an electronic-structure calculation, while the density CNN predicts spectra from a ground-state density.The density CNN requires a ground-state DFT calculation, placing it between geometry-only machine learning and explicit LR-TDDFT.Source: Choice of neural architectures · p. 5
- SchNet, DimeNet++, and MACE provide a hierarchy from distance-based features to angular and higher-order equivariant geometric information.The comparison tests whether more expressive geometry-based representations can recover information present explicitly in the density.Source: Choice of neural architectures · p. 5
Neural-network architectures
- All model families use 900 output logits followed by Softmax, producing non-negative, unit-normalised spectra.The shared output representation keeps spectral normalisation consistent across model families.Source: Neural-network architectures · p. 5
Three-dimensional convolutional neural network
The density CNN processes the regular-grid electron density with spatially shared 3D convolutions. The comparison also includes distance-based SchNet and directional DimeNet++ graph architectures.
Three-dimensional convolutional neural network
- A 3D CNN processes the Cartesian-grid electron density with shared filters that detect local patterns and combine them across larger spatial regions.It retains the volumetric input rather than first reducing it to a predetermined set of electronic descriptors.Source: Three-dimensional convolutional neural… · p. 5
- The CNN prediction head flattens final feature maps to retain learned spatial arrangement, while its layer count, kernel size, filter count, and dropout were varied during tuning.Retained configurations are reported with the corresponding results table.Source: Three-dimensional convolutional neural… · pp. 5–6
SchNet
- SchNet uses distance-based continuous-filter convolutions over interatomic distances to test inference from radial structural information without explicit angular features.An attention-enhanced readout variant combines mean, sum, maximum, and attention-weighted graph pooling.Source: SchNet · p. 6
- SchNet starts from atomic-number embeddings, updates atom features using neighbors within a cutoff, then aggregates them into a molecular embedding for spectral prediction.The conventional graph-level readout was also compared with the attention-enhanced multi-pooling variant.Source: SchNet · p. 6
DimeNet++
- DimeNet++ adds radial and angular basis functions through directional message passing, addressing the lack of explicit angular distinctions in distance-only representations.It tests whether angular information improves prediction relative to SchNet while reducing the computational cost of DimeNet.Source: DimeNet++ · p. 6
MACE
MACE tests whether symmetry-aware higher-body geometric features can narrow the difference between geometry-based and density-based prediction. The loss functions compare spectral distributions, pointwise errors, and frequency-axis displacement.
MACE
- MACE combines equivariant message passing with atomic cluster expansion to propagate scalar, vector, and higher-order tensor features.It tests whether symmetry-aware and higher-body geometric information can reduce the difference between geometry- and density-based prediction.Source: MACE · p. 6
- MACE hidden features encode channel count, angular order, and inversion parity, and only rotationally invariant molecular features reach the scalar spectrum head.Molecular features are aggregated permutation-invariantly; the search varied interaction depth, channel multiplicities, dropout, and angular order.Source: MACE · p. 6
Loss functions
- Because spectra are non-negative unit-normalised vectors, the study evaluates distributional and pointwise objectives, with MAE or MSE used for scalar targets.Scalar targets include gap quantities and the spectral normalisation constant.Source: Loss functions · pp. 6–7
- The evaluated spectral losses include KL divergence and symmetric, bounded Jensen–Shannon divergence; a small positive constant inside logarithms avoids instability at zero-valued bins.The passages identify these losses but do not provide further comparative outcomes.Source: Loss functions · p. 6
- Pointwise MAE and MSE measure binwise errors, while cosine loss measures global vector direction and Pearson-correlation loss evaluates correlation across frequency bins.Source: Loss functions · p. 7
- The Wasserstein-1 loss accounts for spectral-weight displacement along the frequency axis and is reported in frequency-bin units unless multiplied by the frequency spacing.Multiplication by ∆ω converts the value to corresponding frequency units.Source: Loss functions · p. 7
Training protocol and hyperparameter selection
The dataset was divided into training and validation subsets at the molecule level, using the same indices for all models. Hyperparameter selection and comparative results use the validation subset, with model-family-specific search spaces.
Training protocol and hyperparameter selection
- A fixed-seed molecule-level split assigned 85% of molecules to training and 15% to validation, using identical indices across model families.No molecular structure appears in both subsets, and all architecture comparisons use the same validation set.Source: Training protocol and hyperparameter… · p. 7
- No separate test partition was introduced, so reported comparisons are validation performance rather than independent test-set estimates.The validation subset was used for hyperparameter selection and comparative results.Source: Training protocol and hyperparameter… · p. 7
- Within each model family, optimisation and validation procedures were held fixed across hyperparameter trials, while search variables differed by architecture.Searches covered CNN depth and filters, graph-model dimensions and interactions, and MACE irreducible representations and angular order.Source: Training protocol and hyperparameter… · p. 7
Evaluation metrics
The section evaluates normalized 900-bin absorption spectra with complementary metrics and compares graph-based and density-based models. The density CNN achieves the strongest reported performance, while graph models provide strong baselines.
Evaluation metrics
- The 900-bin Softmax spectrum is assessed with correlation for shape, MAE for pointwise error, KL/JS for distributional agreement, and Wasserstein for spectral-mass displacement.Multiple metrics capture distinct failure modes, and category analyses compare molecules with versus without specified chemical features.Source: Evaluation metrics · pp. 7–8, Prediction of normalized absorption… · p. 8
Prediction of normalized absorption spectra
- 0.9795 validation correlation and 1.36 × 10−4 validation MAE are achieved by the best SchNet model, with DimeNet++ giving comparable performance.Across graph-model sweeps, Wasserstein-trained SchNet runs have substantially lower correlations than runs using KL, JS, L1, or cosine losses.Source: Prediction of normalized absorption… · p. 8, Table I · p. 9
- 0.979475 is the best MACE validation correlation, and adding interaction blocks beyond two does not improve performance.The scalar-only control reaches 0.978 correlation, indicating a small measurable benefit from vector equivariant features.Source: Prediction of normalized absorption… · p. 8, Table II · p. 9
- CNN predictions reproduce dominant features, broad shapes, and relative intensities, while weak peaks and subtle local structure remain less accurate.For two closely related molecules, the model preserves a relative peak-amplitude change near 0.3 a.u.Source: Prediction of normalized absorption… · pp. 9–10
- 0.979338 validation correlation and 1.38 × 10−4 MAE are reported for JS-trained MACE, while Wasserstein training yields 0.826412 correlation despite the lowest W1 value.The comparison supports distributional objectives for Softmax-normalized spectra.Source: Prediction of normalized absorption… · p. 8, Table III · p. 10
- 0.9926 validation correlation, 7.14 × 10−5 validation MAE, and 6.66 × 10−6 mean validation KL divergence are reported for the best CNN configuration.It reduces residual decorrelation from approximately 2.0 × 10−2 for the best graph models to 7.4 × 10−3.Source: Prediction of normalized absorption… · p. 8, Table IV · p. 10
Prediction of the spectral normalisation constant
The model predicts the spectral normalisation constant separately from the unit-normalised spectral shape, enabling reconstruction of the original-intensity spectrum. Validation results show strong agreement, with a modest tendency to underestimate the constant.
Prediction of the spectral normalisation constant
- α represents integrated spectral weight over the 900 bins from 0–0.45 a.u., not total oscillator strength across the complete excitation spectrum.The constant is defined over the selected frequency window.Source: Prediction of the spectral… · pp. 10–11
- R2 = 0.9628 on the validation set for predicting the spectral normalisation constant, with residuals showing a slight tendency toward underestimation.The underestimation is noted particularly toward the upper end of the reference-value range.Source: Prediction of the spectral… · p. 11, Figure 5 · p. 11
- Predicting α separately allows the original-intensity spectrum to be reconstructed from the predicted unit-normalised spectrum, and α is related to valence-density normalisation through the Thomas-Reiche-Kuhn sum rule.Because the frequency window is restricted, α is not exactly determined by that relation.Source: Prediction of the spectral… · pp. 10–11
Dependence on chemical categories
The category analysis compares median spectral correlations for molecules with and without each chemical category. Correlations remain high, with generally small differences between groups.
Dependence on chemical categories
- The difference plot reports the true-group minus false-group change in median Pearson correlation; positive values indicate higher correlation when a category is present.Annotations give the sample counts as ntrue/nfalse.Source: Figure 6 · p. 12
- Category-wise plots compare median Pearson correlation for molecules where each category is absent or present, with higher values indicating better spectral agreement.The annotations show the number of molecules in each group.Source: Figure 7 · p. 12, Dependence on chemical categories · p. 12
- Median Pearson correlations remain high across major bonding and functional-group categories, with most present-versus-absent differences around 0.001–0.002.These differences correspond to roughly 0.1–0.2 percentage points.Source: Dependence on chemical categories · p. 12
CONCLUSIONS
The density-based 3D-CNN gives the strongest overall performance for normalised full-spectrum prediction, while requiring more computational resources than graph models. The conclusions also identify orientation sensitivity as a limitation and point to rotation-aware or multimodal approaches as future directions.
CONCLUSIONS
- The density-based 3D-CNN achieves validation correlation 0.9926, validation MAE 7.14 × 10−5, and mean validation KL divergence 6.66×10−6 for normalised full-spectrum prediction.Against the best graph model, it reduces residual decorrelation from 0.0205 to 0.0074, about 64%, and reduces spectral MAE by approximately a factor of two.Source: CONCLUSIONS · p. 12
- SchNet, DimeNet++, and MACE provide strong geometry-based baselines; KL and JS losses give the best balanced performance for Softmax-normalised spectra.Direct Wasserstein optimisation lowers the Wasserstein metric but does not give the best correlation or pointwise agreement.Source: CONCLUSIONS · pp. 12–13
- The density-based CNN requires longer training and greater inference resources than graph models, although inference remains on the millisecond timescale once the density is available.Its larger three-dimensional grids account for the added processing requirements.Source: CONCLUSIONS · p. 12
- The density is a physically motivated intermediate representation because it encodes bonding, charge localisation, delocalisation, and local electronic environments relevant to optical response.The density must be computed first, but this is typically less demanding than explicit excited-state or time-dependent response calculations.Source: CONCLUSIONS · pp. 12–13
- The CNN captures dominant peaks, broad profiles, and relative intensity changes, while errors concentrate in weak peaks, shoulders, and fine-scale structure.Most chemical-category differences are about 0.1–0.2 percentage points, with larger shifts for aromatic and other electronically distinctive groups.Source: CONCLUSIONS · p. 13
- A conventional 3D-CNN is not intrinsically rotationally invariant, so predictions can depend on density-grid orientation; rotation-aware architectures are proposed as a possible remedy.The conclusions also suggest density-and-geometry multimodal models to address fine structure, rare subgroups, rotational robustness, and uncertainty calibration.Source: CONCLUSIONS · p. 13