arXiv:2610.03444physics.chem-phOct 2026

Manuscript Offprint

arXiv:2610.03444

Electronic Density versus Geometry for Machine-Learned Molecular Absorption Spectra

Siddharth Dhanpal, Peter Elliott, Paolo Emilio Trevisanutto, Alin M. Elena, Gilberto Teobaldi

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

S. Dhanpal, 1^{1} P. Elliott, 1^{1} P. E. Trevisanutto, 2^{2} A. M. Elena, 2^{2} and G. Teobaldi 1^{1}

1^{1}Scientific Computing Department, Science and Technology Facilities Council, Rutherford Appleton Laboratory, Didcot OX11 0QX, United Kingdom.

2^{2}Scientific Computing Department, Science and Technology Facilities Council, Daresbury Laboratory, Warrington, WA4 4AD, United Kingdom.

(Dated: October 5, 2026)

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, which can help laboratory users screen candidate molecules, select experimentally relevant energy windows, and compare alternative molecular assignments. 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

The interaction of light with molecules is one of the most direct probes of electronic structure. Optical absorption spectra encode the excitation energies, oscillator strengths, charge redistribution, and selection rules associated with the response of the electronic system to an external electromagnetic perturbation. In this sense, an electronic absorption spectrum is not only a fingerprint for chemical identification, but also a compact representation of bonding, conjugation, charge-transfer character, frontier-orbital structure, and the local electronic environment. Reliable computation and interpretation of such spectra is therefore central to molecular spectroscopy, photochemistry, materials discovery, and the design of chromophores, dyes, emitters, sensors, and photoactive molecules.

The standard first-principles route to molecular absorption spectra is based on density-functional workflows, where one first solves a ground-state Kohn–Sham density-functional theory (DFT) problem, obtaining orbitals, eigenvalues, and the ground-state electron density [1, 2]. Excited-state information is then obtained through a linear-response (LR) time-dependent density-functional theory (TDDFT) [3–9]. These calculations yield excitation energies and oscillator strengths, which are typically broadened using a prescribed line-shape function in order to compare to experimental spectra. TDDFT offers a useful compromise between quantum-chemical accuracy and computational cost, and it remains a workhorse method for UV–visible spectroscopy. Nevertheless, despite favorable scaling compared to other excited-state methods, the LR-TDDFT step is often the computational bottleneck: it involves solving a large eigenvalue-eigenvector problem in the space of single-particle transitions (or inverting a large matrix when solving a Dyson-like equation for periodic systems[6, 7]). This cost becomes particularly restrictive when many excited states, broad spectral windows, or large numbers of candidate molecules are required [10, 11].

Fast computation of spectra and electronic gaps would therefore have immediate practical value. In high-throughput molecular screening, a rapid surrogate can be used to identify candidates with target absorption windows before more expensive TDDFT or higher-level calculations are performed. In experimental spectroscopy, predicted spectra can assist the assignment of peaks, guide the selection of pump and probe wavelengths, and support the interpretation of gas-phase and condensed-phase measurements. This is especially relevant for large experimental facilities where beam time is limited and where theory is used to plan or interpret measurements.

[12].

Machine learning has become a powerful route for constructing such surrogates. Early molecular machine-learning work demonstrated that quantum properties of organic molecules could be learned across chemical compound space from nuclear charges and Cartesian coordinates [13]. The development of benchmark datasets such as MoleculeNet and QM9 further established molecular property prediction as a central task in scientific machine learning [14, 15]. Modern atomistic neural networks then introduced increasingly expressive representations of molecular geometry. SchNet used continuous-filter convolutions to learn smooth atomistic representations directly from nuclear coordinates [16]; DimeNet and DimeNet++ incorporated angular information through directional message passing [17, 18]; and equivariant models such as NequIP and MACE showed that enforcing Euclidean symmetry at the architecture level can substantially improve data efficiency and accuracy for atomistic modelling [19, 20]. These models have made geometry-based graph neural networks a natural baseline for molecular quantum-property prediction.

The extension of machine learning from ground-state scalar properties to excited states and spectra[21–33] is more recent, but rapidly developing. For example, SchNarc combined SchNet-like representations with excited-state dynamics workflows and was subsequently used to predict quantities needed for Vis-UV absorption spectra [34, 35]. Models have also been shown to predict X-ray absorption spectra with near first-principles fidelity [36–38]. Other work has argued that purely geometric descriptors are often insufficient for spectroscopic prediction and that low-cost electronic descriptors inspired by TDDFT can substantially improve supervised absorption-spectrum models [39].

This motivates the use of the electron density as an input representation. The electron density has a key status in electronic-structure theory due to the Hohenberg–Kohn theorem, which establishes that the ground-state electron density determines the external potential, up to an additive constant, and hence the electronic Hamiltonian and all ground-state observables [1]. This also includes the ground-state absorption spectrum as all ingredients to the equations of LR-TDDFT depend only on the ground-state density.

This provides a strong physical motivation for using the ground-state density as an input variable, since its real-space distribution encodes information about the electronic environment from which the optical response emerges, although care must be taken for certain hypersensitive properties[40].

A density-based machine-learning model does not replace quantum chemistry end to end, since the ground-state density must still be computed. The aim is to retain the cheaper ground-state DFT step while replacing the more expensive density-to-response calculation with a learned surrogate. This places the model at a physically meaningful intermediate stage, where spectra are learned from an electronic field rather than only from atom types and nuclear coordinates. This viewpoint is supported by density-centred machine learning, where electron densities have been predicted in condensed-phase systems and used to recover downstream electronic properties [41, 42]. Related work has shown that density responses can also provide field responses, polarizabilities, and Raman observables [43]. More broadly, OMol25 and response-aware models such as MACE-Field, MACE-MDP, and MACE-POLAR-1 reflect a growing move toward models that include electronic response, long-range electrostatics, polarizability, and density-like information beyond local nuclear geometry [44–47].

In this work, we investigate this representation question directly. We study machine-learning models for a related molecular electronic-structure task: prediction of the full broadened absorption spectrum on a fixed frequency grid. We compare two broad classes of representation. The first uses volumetric ground-state electron densities processed by three-dimensional convolutional neural networks. The second uses atom-centred molecular geometries processed by graph neural networks, including SchNet-like, directional message-passing, and equivariant architectures.