A large-scale foundation model enables simulation-to-real adaptation for nuclear magnetic resonance-based molecular structure analysis

Chen Yang, Zheng Fang, Hanyu Sun, Fanjie Xu, Hongxin Xiang, Hanyu Gao, Xiangxiang Zeng, Yuqiang Li, Xiaojian Wang, Jun XiaarXiv 2026

TL;DR

UltraNMR is a 120-million-parameter foundation model designed to bridge the "simulation-to-real" gap in nuclear magnetic resonance (NMR) spectroscopy. Trained on 158 million paired simulated spectra using domain-inspired pre-training objectives, it achieves state-of-the-art performance on experimental downstream tasks like molecular structure elucidation and functional group prediction. The model's practical utility was highlighted by successfully identifying two previously unknown natural products from traditional Chinese herbal medicines.

What Problem Does This Paper Address?

Nuclear Magnetic Resonance (NMR) spectroscopy is one of the most powerful tools available for determining the 3D structures of small molecules. However, manually interpreting NMR spectra is a slow, painstaking process that requires deep expert knowledge.

While deep learning offers a path toward automation, it faces a massive bottleneck: data scarcity. High-quality, experimentally verified NMR datasets are incredibly small (on the order of millions of spectra), which is a drop in the bucket compared to the vastness of chemical space (estimated at over $10^{60}$ possible small molecules).

To circumvent this, researchers often turn to simulated NMR data, which can be generated efficiently at scale. However, models trained purely on simulations typically fail when applied to real-world data due to the simulation-to-real gap—differences caused by experimental noise, solvent effects, and systematic simulation offsets.

Overview of the UltraNMR framework and the simulation-to-real challenge.

Methods

The authors introduce UltraNMR, a large transformer-based encoder model (16 layers, 120 million parameters) that treats continuous chemical shifts as tokens. To handle continuous data within a transformer architecture, they employ a modified Fourier feature mapping to decompose chemical shifts into sine and cosine frequencies, capturing fine-grained spectral details.

The core innovation lies in UltraNMR’s multi-stage, domain-specific pre-training objectives:

  1. Masked Chemical Shift Prediction via Ordinal Regression: Instead of standard regression (which is overly sensitive to noise) or standard classification (which ignores physical ordering), the authors discretize chemical shifts into ordered bins. They use Gaussian soft labels to enforce a distance-aware penalty, making the model robust to systematic simulation-to-real offsets.
  2. Proton-Carbon Correlation Prediction: Inspired by 2D Heteronuclear Single Quantum Coherence (HSQC) spectroscopy, this objective uses an InfoNCE-style contrastive loss to explicitly teach the model which protons are directly bonded to which carbons at the atomic level.
  3. Molecular Fingerprint Supervision: The model aligns its latent spectral embeddings with Morgan molecular fingerprints, ensuring that structurally similar molecules map closely together in the embedding space.
  4. Isomer Contrastive Learning: In a second pre-training stage, the model is trained on a curated dataset of isomers (molecules with identical molecular formulas but different structures) to sharpen its sensitivity to subtle structural nuances.
UltraNMR architecture and its domain-inspired pre-training objectives.

Datasets

  • Pre-training Dataset: A massive collection of 158 million paired simulated $^1$H and $^{13}$C NMR spectra. This includes 106 million spectra from the SimNMR-PubChem database (simulated via the deep-learning tool NMRNet) and 45 million spectra simulated using physics-based Density Functional Theory (DFT) via Gaussian software.
  • Downstream Evaluation Datasets:
  • NMRGym: The largest public experimental NMR benchmark, containing roughly 270K paired experimental spectra.
  • NMRShiftDB: A public, experimentally assigned NMR database used to test the model's generalization capabilities.

Key Insights and Ideas

  • The Power of Ordinal Regression: Standard regression models often overfit to the exact values of simulated data. By switching to ordinal regression with soft Gaussian labels, UltraNMR learns the topology and shielding gradients of chemical environments rather than just memorizing exact peak positions.
  • Implicit 2D Learning from 1D Inputs: Even though UltraNMR processes 1D spectra ($^1$H and $^{13}$C), the HSQC-inspired correlation loss forces the model to implicitly reconstruct 2D structural connectivity, bypassing the need for expensive 2D NMR data during initial inference.
  • Structure-Aware Latent Space: Traditional spectral library searches rely on raw peak-to-peak matching, which can fail if a solvent shifts the peaks. UltraNMR maps spectra into a continuous, chemically meaningful latent space where distance correlates directly with structural similarity (e.g., clustering fatty acids, halogens, and carbohydrates logically).

Key Results

UltraNMR consistently outperformed existing task-specific baselines and traditional methods across all evaluated tasks:

  • Functional Group Identification: On the NMRGym benchmark, UltraNMR achieved an overall accuracy of 50.20%, comfortably beating the previous best method, XGBoost (45.68%).
  • De Novo Structure Elucidation: When predicting SMILES strings directly from spectra on a challenging scaffold-based dataset split, UltraNMR achieved a 40-fold increase in Top-1 accuracy compared to a baseline model trained from scratch without simulation pre-training.
  • Real-World Discovery: The authors used UltraNMR to successfully elucidate the structures of two previously unknown natural products isolated from Chinese herbal medicines: Hypoglycin N (a diterpene) and Magdiligol G (a lignan).
Downstream performance metrics for functional group identification and de novo structure elucidation.

Limitations and Future Work

Despite its strong performance, UltraNMR currently focuses exclusively on one-dimensional ($^1$H and $^{13}$C) spectra. In practical laboratory settings, chemists rely heavily on multi-dimensional NMR experiments (like COSY, HMBC, and NOESY) to resolve complex stereochemical configurations and challenging isomers.

Additionally, the model still struggles to identify molecules with highly unique or rare structural scaffolds that were underrepresented in the training libraries. The authors note that future iterations will look to integrate multi-dimensional spectroscopic data, incorporate uncertainty estimation, and implement iterative candidate generation loops to improve real-world reliability.

Summary updated

BibTeX
@misc{yang2026large,
  author = {Chen Yang and Zheng Fang and Hanyu Sun and Fanjie Xu and Hongxin Xiang and Hanyu Gao and Xiangxiang Zeng and Yuqiang Li and Xiaojian Wang and Jun Xia},
  title = {{A large-scale foundation model enables simulation-to-real adaptation for nuclear magnetic resonance-based molecular structure analysis}},
  year = {2026},
  eprint = {2606.20756},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.20756},
}
Figure