Organizations: School of Computer Science, University of Birmingham · School of Chemistry, University of Birmingham · State Key Laboratory of Precision and Intelligent Chemistry, University of Science and Technology of China
Infrared (IR) spectroscopy, a type of vibrational spectroscopy, is widely used for molecular structure determination and provides critical structural information for chemists. However, existing approaches for recovering molecular structures from IR spectra typically rely on one-dimensional SMILES strings or two-dimensional molecular graphs, which fail to capture the intricate relationship between spectral features and three-dimensional molecular geometry. Recent advances in diffusion models have greatly enhanced the ability to generate molecular structures in 3D space. Yet, no existing model has explored the distribution of 3D molecular geometries corresponding to a single IR spectrum. In this work, we introduce IR-GeoDiff, a latent diffusion model that recovers 3D molecular geometries from IR spectra by integrating spectral information into both node and edge representations of molecular structures. We evaluate IR-GeoDiff from both spectral and structural perspectives, demonstrating its ability to recover the molecular distribution corresponding to a given IR spectrum. Furthermore, an attention-based analysis reveals that the model is able to focus on characteristic functional group regions in IR spectra, qualitatively consistent with common chemical interpretation practices.
Figures & tables
Figure 1: Overview of the proposed IR-GeoDiff . A : Spectral features S are extracted by a Transformer-based spectral classifier τθ . B : The encoder Eϕ maps molecular geometries into a latent representation zx , which is perturbed through a forward diffusion process and denoised by an equivariant network ϵθ conditioned on the spectral features which are injected into node and edge representations via cross-attention. Finally, the decoder Dδ reconstructs the 3D geometry from the denoised latent representation.
Method
simg
maxsimg
molacc (%)
SIS
max SIS
SIS *
EDM [ Hoogeboom et al., 2022 ]
0.278
0.624
19.03
0.411
0.681
0.432
GEOLDM [ Xu et al., 2022 ]
0.355
0.779
44.47
0.464
0.780
0.494
GFMDiff [ Xu et al., 2024 ]
0.364
0.778
44.37
0.482
0.791
0.517
EDM-variant
0.501
0.938
81.07
0.576
0.879
0.619
GEOLDM-variant
0.539
0.950
84.27
0.588
0.897
0.630
ours w/o edge ca
0.630
0.977
91.90
0.638
0.929
0.680
Table 1: Comparison with baseline models and ablation variants models on QM9S dataset. edge ca : cross-attention between edge features and functional group features; atom ca : cross-attention between atomic node features and IR spectral features.
Figure 2: Examples of molecules sampled under IR spectral conditions. For spectra, orange curves denote input IR spectra; purple curves denote spectra of sampled molecules. For atoms, hydrogen: white Latent Diffusion-Based 3D Molecular Recovery from Vibrational Spectra, carbon: gray , oxygen: red , nitrogen: blue .
Method
simg
maxsimg
molacc (%)
SIS
max SIS
SIS *
EDM-variant
0.354
0.820
64.17
0.329
0.581
0.405
GEOLDM-variant
0.551
0.924
82.83
0.409
0.641
0.532
ours
0.657
0.958
90.70
0.464
0.659
0.607
Table 2: Comparison with EDM and GEOLDM variant models on QMe14S dataset.
Figure 3: Visualisation of cross-attention between spectral features and molecular structure representations. A : Spectral–edge cross-attention highlighting functional-group-specific vibrational signatures. B : Spectral–atom cross-attention revealing associations between characteristic peaks and non-carbon heavy atoms. C : Spectral–atom cross-attention emphasising the carbon backbone.
Figure 4: A: 2D histogram showing the joint distribution of simg and SIS, computed over 1,000 test spectra, with 50 sampled molecules per spectrum. B: Box plots of simg grouped by SIS ranges. C: Examples with high simg but low SIS. D: Examples of molecules with high SIS but low simg . For spectra, orange curves denote input IR spectra; purple curves denote spectra of sampled molecules. For atoms, hydrogen: white Latent Diffusion-Based 3D Molecular Recovery from Vibrational Spectra, carbon: gray , oxygen: red , nitrogen: blue .
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
Figure A1: Convergence of the mean Spectral Information Similarity (SIS) as the number of test IR spectra increases. The shaded region indicates the 95% confidence interval of the mean SIS. The curve stabilises after approximately 200 spectra, supporting the use of this subset for efficient and reliable evaluation. The result is based on one full sampling run (50,000 molecules in total).
Figure A2: Examples of molecular geometries (hydrogen: white Latent Diffusion-Based 3D Molecular Recovery from Vibrational Spectra, carbon: gray , oxygen: red , nitrogen: blue , fluorine: yellow ) from the QM9S dataset that are inconsistent with their provided SMILES strings. The left column shows 3D geometries, the middle column displays the corresponding SMILES from QM9S, and the right column shows the SMILES reconstructed by our method based on the 3D coordinates. All SMILES reconstructed by our method are consistent with the corresponding molecular geometries. (Molecular graphs converted from SMILES representations are provided, below each SMILES, for easier comparison.)
Figure A3: Distribution of molecular sizes (number of atoms). Left : QM9S, QMe14S, and the QMe14S subset. Middle : QM9S vs. QM9S test set. Right : QMe14S subset vs. QMe14S test set.
Functional groups
SMARTS
Count
Accuracy
F-1
alkane
[CX4;H3,H2,H1]
123361
1.000
1.000
alkene
[CX3]=[CX3]
16382
0.994
0.977
alkyne
[CX2]#[CX2]
16976
0.998
0.992
amine
[NX3;!$(NC=O)]
38933
0.998
0.997
imine
[NX2]=[CX3]
15683
0.998
0.993
nitrile
[NX1]#[CX2]
16356
0.998
0.990
Appendix
Table A1: 20 SMARTS representations of functional groups and their occurrence in QM9S dataset and classification performance of our spectral classifier evaluated by Accuracy and F-1 Score.
Functional groups
SMARTS
Count
Accuracy
F-1
alkane
[CX4;H3,H2,H1]
158130
0.988
0.992
alkene
[CX3]=[CX3]
25795
0.976
0.940
enamine
[CX3]=CX3
2786
0.989
0.738
alkyne
[CX2]#[CX2]
18678
0.996
0.956
amine
[NX3;!$(NC=O)]
50406
0.984
0.968
imine
[NX2]=[CX3]
19815
0.976
0.862
Appendix
Table A2: 26 SMARTS representations of functional groups and their occurrence in QMe14S dataset and classification performance of our spectral classifier evaluated by Accuracy and F-1 Score.
After AE training (Å 2 )
After DM training (Å 2 )
MSE (test set)
3 × 10 -4
6 × 10 -6
Appendix
Table A3: Autoencoder Reconstruction Performance
Method
simg
maxsimg
Molacc (%)
SIS
max SIS
SIS *
ours
0.666 ± 0.001
0.987 ± 0.002
95.3 ± 0.6
0.675 ± 0.001
0.947 ± 0.004
0.718 ± 0.001
Appendix
Table A4: Evaluation of IR-GeoDiff trained on QM9S dataset over three repeated sampling runs. We report the mean and standard deviation for chemical graph similarity ( simg ), Spectral Information Similarity (SIS), SIS * , and molecular accuracy.
Figure A4: Effect of the number of samples per input spectrum on model performance, reporting molecular accuracy (mol acc), average graph similarity ( simg ), and maximum graph similarity ( maxsimg ) across different sampling times.
Method
Dataset
Validity(%)
Stability(%)
Connectivity(%)
EDM [ Hoogeboom et al., 2022 ]
QM9S
99.04
71.05
97.81
GEOLDM [ Xu et al., 2023 ]
99.08
78.81
98.67
GFMDiff [ Xu et al., 2024 ]
99.38
81.54
98.09
EDM-variant
97.92
89.48
97.46
GEOLDM-variant
97.17
84.19
96.10
ours
98.53 ± 0.10
92.47 ± 0.20
98.35 ± 0.10
Appendix
Table A5: Comparison with baseline models on validity, stability, and connectivity.
Figure A5: Spectral–atom cross-attention emphasizing the hydrogen atoms.
Figure A6: Attention map and quantum mechanical vibrational analysis. Left : Cross-attention scores from the model between spectral features and edge features. (For atoms, hydrogen: white Latent Diffusion-Based 3D Molecular Recovery from Vibrational Spectra, carbon: gray , oxygen: red , nitrogen: blue .) Right : Gaussian 16 vibrational analysis output. The displacement vectors (x, y, z) indicate atomic movements in each vibrational mode.
State Key Laboratory of AI Safety, Institute of Computing Technology, Chinese Academy of Sciences, China · University of Chinese Academy of Sciences, China