FRIGID: Scaling Diffusion-Based Molecular Generation from Mass Spectra at Training and Inference Time

Montgomery Bohde, Hongxuan Liu, Mrunali Manjrekar, Magdalena Lederbauer, Shuiwang Ji, Runzhong Wang, Connor W. Coley

Identifying unknown small molecules from tandem mass spectrometry (MS/MS) data is akin to reconstructing a shattered glass vase from its shards. Chemists fragment a molecule, measure the masses of the pieces, and attempt to deduce the original structure. While artificial intelligence has advanced this field of structural elucidation, existing models often rely on database lookups—which fail for novel molecules—or struggle to correct minor structural errors that invalidate a prediction.

To address this, researchers have introduced FRIGID (Fragment Refinement via ICEBERG-Guided Inference Diffusion), a framework that scales molecular generation at both training and inference time. By effectively giving the AI a mechanism to verify and correct its own outputs, FRIGID significantly advances the state of the art in de novo molecular discovery.

The Bottlenecks in Structural Elucidation

Current computational tools for MS/MS analysis face two primary bottlenecks:

  1. The Coverage Gap: Retrieval-based methods cannot identify molecules absent from existing databases. If a researcher discovers a truly novel compound, these methods inherently fail.
  2. The Fragility of De Novo Models: Generative models that build molecules from scratch are often computationally slow and prone to "hallucinations." A single misplaced atom or bond can render a predicted structure chemically invalid or entirely inconsistent with the experimental spectrum. Furthermore, these models have historically struggled to scale effectively with increased data or compute.

The FRIGID Approach: Scaling Training and Inference

FRIGID overcomes these limitations through a two-pronged scaling strategy that leverages both massive pre-training and iterative self-correction.

Training-Time Scaling via Diffusion Language Models

Instead of relying on computationally expensive graph representations, FRIGID utilizes a Diffusion Language Model (DLM). It represents molecules using SAFE sequences—a linearized, fragment-based string format. This architectural shift allows the model to be pre-trained on up to a billion unlabeled structures, learning the fundamental "grammar" of chemistry before it ever processes a mass spectrum.

Inference-Time Scaling via Iterative Refinement

The framework's most significant innovation is its refinement loop, guided by a forward fragmentation model called ICEBERG. This loop enforces cycle consistency between the generated molecule and the experimental data:

  • FRIGID generates a candidate molecule based on the MS/MS spectrum, determined chemical formulae, and intermediate fingerprint representations.
  • ICEBERG simulates the expected mass spectrum for that candidate structure.
  • The system compares the simulated spectrum against the actual experimental data.
  • If the simulation contains fragments that do not exist in the real spectrum, FRIGID identifies the "hallucinated" atoms, masks them out, and prompts the diffusion model to regenerate those specific parts.

Key Findings and Performance

The researchers evaluated FRIGID on two primary benchmarks: NPLIB1 (a standard natural products dataset) and MassSpecGym (a challenging benchmark testing out-of-distribution performance).

  • Unprecedented Accuracy: On NPLIB1, FRIGID achieved a 25.03% Top-1 accuracy, nearly tripling the performance of the previous state-of-the-art (~8.3%). On the more difficult MassSpecGym benchmark, it reached 18.29% Top-1 accuracy, a 70% relative improvement over prior methods.
  • Log-Linear Scaling: The study demonstrates that structural elucidation follows a scaling law similar to Large Language Models (LLMs). Allocating more "thinking time" (refinement rounds) during inference yields predictable, log-linear gains in accuracy.
  • Computational Efficiency: Because it operates as a language-based diffusion model rather than a graph-based one, FRIGID processes a spectrum in approximately 6.58 seconds. This is roughly 20 times faster than previous graph-diffusion models like DiffMS, making iterative refinement practical for real-world workflows.

Limitations and Future Directions

While FRIGID represents a major leap forward, the authors note a few limitations. The model currently relies on an upstream tool (MIST) to predict intermediate molecular fingerprints; poor initial fingerprint predictions can hinder the refinement loop. Additionally, the ICEBERG forward model is primarily based on 2D fragments, meaning it cannot easily distinguish between stereoisomers (molecules with identical atoms but different 3D arrangements).

Finally, the current system assumes the chemical formula is known in advance. Developing a fully end-to-end system that robustly handles formula uncertainty and incorporates 3D spatial information remains a promising direction for future research in de novo structural elucidation.

Summary updated

BibTeX
@inproceedings{bohde2026frigid,
  author = {Montgomery Bohde and Hongxuan Liu and Mrunali Manjrekar and Magdalena Lederbauer and Shuiwang Ji and Runzhong Wang and Connor W. Coley},
  title = {{FRIGID: Scaling Diffusion-Based Molecular Generation from Mass Spectra at Training and Inference Time}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=wTgx7b2D9r},
}
Figure