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.
Inferring molecular structures from infrared (IR) spectra is a fundamental yet challenging problem. A key difficulty is that an IR spectrum provides limited structural information: different molecules may share similar functional groups and local vibrational patterns, leading to highly similar spectral responses. Thus, even when an observed spectrum has a unique underlying structure, reconstructing it from the spectrum remains ambiguous. Existing IR-to-molecule models usually generate a ranked set of candidate molecules, but this set is largely determined by the model's learned generation preference and may not fully capture the structures that best satisfy the observed spectral constraints. To address this limitation, we propose SpecCal, a training-free candidate calibration framework for IR-to-molecule prediction. SpecCal operates on the candidate outputs of existing base models and improves the prediction set by re-ranking current candidates while introducing additional structurally plausible alternatives guided by spectral consistency. The framework is plug-and-play and model-agnostic, requiring no parameter updates for integration with diverse base models. Experiments on multiple benchmarks show that SpecCal consistently improves top-k reconstruction at both SMILES and scaffold levels across different base models. Further analyses demonstrate that calibrating candidate sets under spectral ambiguity provides a practical way to improve molecular reconstruction from IR spectra. The code is available at: https://anonymous.4open.science/r/SpecCal-B18A.
Yixuan Chen, Bo Liu, Yusen Tan +3
College of Computer Science and Technology, Jilin University · School of Mathematics, Jilin University · Information Hub, HKUST(GZ) +3
Infrared (IR) spectra provide characteristic signals of molecular structure, which are often interpreted by experts via functional-group identification or library matching, making the process time-consuming and ambiguous. Recent machine learning methods have made progress in molecular structure elucidation using molecular formulas and IR spectra. However, these models often infer unreasonable candidate molecular structures, including top-ranked predictions. More specifically, the molecular formula implied by a candidate structure often fails to match the input molecular formula, and the candidate's theoretical IR spectrum is often inconsistent with the observed IR spectrum. To address these issues, we propose Formula- and IR-Matched Preference Optimization (FIRMPO), a general and plug-and-play chemical feedback-driven preference optimization framework for molecular structure elucidation. FIRMPO incorporates chemical feedback as preference signals based on exact molecular formula matching and IR spectral consistency to guide reasonable structure predictions. Unlike generic preference optimization methods, FIRMPO is tailored to molecular structure elucidation while remaining model-agnostic, enabling it to be readily integrated with different structure prediction models in this class. This encourages models to prioritize structures that satisfy the chemical feedback, leading to a substantial improvement in the accuracy of top-ranked predictions. Extensive experiments on three widely used IR datasets show that FIRMPO significantly improves molecular structure elucidation accuracy over existing baselines.
Yusen Tan, Hongyu Zhan, Hai-tao Yu +3
The Hong Kong University of Science and Technology (Guangzhou) · Westlake University · University of Science and Technology of China +1
Elucidating molecular structures from spectra is a foundational problem in chemical and materials characterization, yet remains challenging due to spectral ambiguity and the vast molecular space. Although recent diffusion-based generators show strong promise for spectra-conditioned elucidation, existing methods struggle to learn robust spectra-structure relationships from limited paired data when relying solely on global spectral representation. Moreover, the repeated full sampling inference strategy incurs substantial computation overhead. To address these limitations, we propose MAST, a Motif-Augmented diffusion framework with Search Tree, for joint 2D-3D spectroscopic molecular structure elucidation. MAST introduces explicit, interpretable motif priors as intermediate evidences throughout denoising, reducing conditional ambiguity and facilitating spectra-conditioned optimization. We further cast diffusion sampling as reward-guided tree search to prioritize high-reward denoising trajectories, yielding a compact set of spectra-consistent candidates under limited budgets. On the QM9S multi-spectra benchmark, MAST achieves 94.89% exact recovery and improves 3D fidelity, while preserving high chemical validity and stability. Code is available at https://github.com/Jia040223/MAST.
Chenghao Jia, Mengdi Liu, Hong Chang +2
State Key Laboratory of AI Safety, Institute of Computing Technology, Chinese Academy of Sciences, China · University of Chinese Academy of Sciences, China