Towards Reasonable Molecular Structure Elucidation from Infrared Spectroscopy with Chemical Feedback
Authors: Yusen Tan, Hongyu Zhan, Hai-tao Yu, Changxi Chi, Wenjie Du, Jun Xia
Organizations: The Hong Kong University of Science and Technology (Guangzhou) · Westlake University · University of Science and Technology of China · The Hong Kong University of Science and Technology
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.
Figures & tables
Figure 1: Illustration of a ranking failure in molecular structure elucidation from molecular formulas and IR spectra: although the correct structure appears at rank 8, higher-ranked predictions violate chemical feedback, showing (i) molecular formula mismatch or (ii) inconsistency between the theoretical and observed IR spectra.
Figure 2: Overview of the proposed method.
Dataset
Backbone
Variant
Molecule accuracy
Formula accuracy
IR spectrum similarity
Acc@1
Acc@5
Acc@10
AccF @1
AccF @5
AccF @10
Sim@1
Sim@5
Sim@10
QM9S
IRtoMol
Base
4.68
14.26
18.01
96.97
99.69
99.84
0.551
0.639
0.657
+FIRMPO
6.48
16.53
19.96
99.88
99.88
99.88
0.662
0.663
0.665
PatchIR
Base
0.28
1.28
2.43
99.84
99.94
99.95
0.197
0.249
0.271
+FIRMPO
0.29
1.29
2.43
99.95
99.95
99.95
0.270
0.271
0.271
IR-Bench
Base
2.35
12.32
22.65
98.75
99.94
99.98
0.199
0.251
0.270
Table 1: Overall performance of supervised IR-based structure elucidation backbones and their FIRMPO-optimized variants on QM9S [ 26 ] , IBM [ 3 ] , and NIST Chemistry WebBook [ 13 ] . We report top- k molecular accuracy (%), formula accuracy (%), and IR spectrum similarity. The best result for each metric within each dataset is highlighted in bold.
Figure 3: Case study on a NIST Chemistry WebBook molecule (SMILES: CCCCC(CC)CC(=O)O ) [ 13 ] , showing 2D depictions of the top-5 predicted candidate structures. Candidates matching the ground-truth structure are highlighted with green boxes.
Model
Molecule accuracy
Formula accuracy
IR spectrum similarity
Acc@1
Acc@5
Acc@10
AccF @1
AccF @5
AccF @10
Sim@1
Sim@5
Sim@10
IRtoMol
36.51
54.58
56.93
67.45
82.18
85.27
0.728
0.856
0.877
IRtoMol+FIRMPO w/o IR
41.38
56.31
57.05
86.88
86.88
86.88
0.755
0.873
0.887
IRtoMol+FIRMPO w/o Formula
52.97
56.56
57.05
68.81
83.54
86.39
0.761
0.877
0.887
IRtoMol+FIRMPO
55.94
56.93
57.05
86.88
86.88
86.88
0.762
0.879
0.888
Table 2: Ablation of preference signals on the NIST Chemistry WebBook dataset [ 13 ] , reporting top-1, top-5, and top-10 molecular accuracy (%), formula accuracy (%), and IR similarity. The best performance for each metric is in bold.
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 4: Top- 10 molecular accuracy (%) of IRtoMol+FIRMPO and IRtoMol+KPO on QM9S [ 26 ] , IBM [ 3 ] , and NIST Chemistry Webbook [ 13 ] .
Figure 5: Case study on a QM9S molecule (SMILES: C#CC1C2OC(=N)C12O ) [ 26 ] , showing 2D depictions of the top-5 predicted candidate structures.
Figure 6: Case study on a QM9S molecule (SMILES: N=C1Cn2nccc2O1 ) [ 26 ] , showing 2D depictions of the top-5 predicted candidate structures.
Figure 7: Case study on a IBM molecule (SMILES: Cc1nc(-c2cccnc2)cn1N(C)C(=O)OC(C)(C)C ) [ 3 ] , showing 2D depictions of the top-5 predicted candidate structures.
Figure 8: Case study on a IBM molecule (SMILES: COC(=O)CC1CC2COCC(C1)N2 ) [ 3 ] , showing 2D depictions of the top-5 predicted candidate structures.
Automated molecular structure elucidation from infrared (IR) spectroscopy data has seen significant advancements in recent years, but its broad applicability is limited by a reliance on pre-determined chemical formulas provided as auxiliary model inputs. This limits model predictions to isomer identification rather than full molecular structure prediction. Although transformer models have been shown to identify molecular isomers with high accuracy, their reliability for unconstrained structure elucidation is comparatively low and poorly understood. In this work, we propose and evaluate key modifications to the traditional encoder-decoder transformer. To better address the vast chemical space of the unconstrained problem, we implement a novel Mixture-of-Experts (MoE) decoder module that utilizes non-additive aggregation via linear-order statistics and the Choquet integral. We further modify the transformer to utilize these non-additive operators when aggregating spectral representations as well. Together with an auxiliary contrastive alignment loss term, these enhancements improve Top-K prediction accuracy by over 10 percentage points compared to baseline IR-only models. Through sub-structure fragment analysis of molecular predictions, we further confirm that infrared spectra encode the vast majority of relevant chemical information, implying that the higher performance of isomer-ranking models is largely due to underrepresented or overlapping absorption bands for molecules in the explored chemical space. Ultimately, by demonstrating the efficacy of automated molecular structure elucidation from measured IR spectra, this work serves to significantly broaden the utility of AI in analytical chemistry.
Ethan J. Mick, Campbell A. Sweet, Matthias J. Young +1
Electrical Engineering and Computer Science University of Missouri Columbia, MO 65211 · Chemical and Biomedical Engineering University of Missouri Columbia, MO 65211
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
Molecular structure elucidation from spectroscopic data is a long-standing challenge in Chemistry, traditionally requiring expert interpretation. We introduce NMIRacle, a two-stage generative framework that builds upon recent paradigms in AI-driven spectroscopy with minimal assumptions. In the first stage, NMIRacle learns to reconstruct molecular structures from count-aware fragment representations, capturing both fragment identities and their occurrences. In the second stage, a spectral encoder maps input spectra (IR, 1H-NMR, 13C-NMR) into a latent embedding used to condition the pre-trained generator, which is fine-tuned for direct spectra-to-molecule generation. This formulation bridges fragment-level chemical modeling with spectral evidence, yielding accurate molecular predictions. Empirical results demonstrate that NMIRacle outperforms existing baselines on molecular elucidation, while maintaining robust performance across increasing levels of molecular complexity.
Federico Ottomano, Yingzhen Li, Alex M. Ganose
Department of Chemistry, Imperial College London · Department of Computing, Imperial College London