Mass Spectrum Annotation
Develop AI models that match molecular fragmentation patterns to chemical structures, enabling the identification of unknown small molecules.
-
Fragment the ion

Tandem mass spectrometry breaks a precursor ion into fragments.
-
Read the spectrum

Peaks record signal intensity by mass-to-charge ratio.
-
Retrieval outputs
- Ranked candidates
- Candidates ordered by their match to the spectrum

- Top candidate
- The highlighted structure ranks first.
Results
Score breakdown
The Task
What is Mass Spectrometry?
Identifying unknown molecules is important in drug discovery, metabolomics, and environmental chemistry. Tandem mass spectrometry (MS/MS) selects an ionized molecule, breaks it into fragments, and measures the mass-to-charge ratios (m/z) of the fragment ions.
In the resulting spectrum, a peak's position indicates the fragment ion's mass-to-charge ratio. Its intensity shows the relative signal from ions at that position. Different structures can produce different patterns of peaks, giving clues about the original molecule.
-
Precursor ion
The instrument selects a charged molecule.
-
Fragmentation
Collisions can break bonds and produce smaller ions.
-
Mass spectrum
Relative intensity m/z
Peak position shows m/z. Height shows relative intensity.
Retrieving Molecular Structures from Spectra
A spectrum contains peaks. For peak , is its mass-to-charge ratio and is its relative intensity. The benchmark also provides a set of up to 256 candidate molecules. Each candidate is supplied as a SMILES string that describes its atoms and bonds.
The model assigns each candidate a compatibility score and sorts the candidates from highest to lowest score:
Structurally similar molecules can produce nearly identical spectra. Instrument settings and collision energy can also change the fragmentation pattern of the same molecule.
What the Agent Develops
The agent develops one molecular retrieval system. It can infer molecular features from the measured spectrum, predict a spectrum for each candidate, or combine the two approaches in a shared ranking system.
Fourier-DeepSets[1] is an example of the first approach. GLACIER[2] exemplifies the second. These methods provide references while the agent can choose its own representations, architecture, training objectives, and ranking method.
One trained system must handle all test queries independently. Published pretrained weights and test-answer lookups are excluded.
Data & Prediction Tasks
Training Data
MassSpecGym v1.5[1] pairs experimental MS/MS spectra with known structures. Each spectrum includes measured peak positions and intensities, information about the precursor ion, and any available acquisition metadata, such as instrument type and collision energy.
| Split | Spectra | Unique 2D structures |
|---|---|---|
| Training | 194,119 | 22,746 |
| Validation | 19,429 | 3,185 |
| Test | 17,556 | 2,998 |
| Total | 231,104 | 28,929 |
The dataset splits are disjoint by molecular structure, so the true molecules in the test set are absent from training. The benchmark also provides 2,333,485 optional ICEBERG-based simulated spectra[4] after filtering overlaps with held-out structures and removing invalid molecular structures.
Molecular Retrieval Task
Each test query contains one experimental MS/MS spectrum, the available acquisition metadata, and up to 256 mass-compatible candidate molecules. The correct identity is withheld from the model. The output must include every candidate ID exactly once:
Here, is the ID of the highest-ranked candidate.
Evaluation
Molecular Retrieval Accuracy
The evaluator compares each candidate ranking with the known molecule for its experimental spectrum.
| Metric | What it measures |
|---|---|
| Hit@1 | Fraction of spectra where the correct molecule ranks first |
| Hit@5 / Hit@20 | Fraction with the correct molecule among the top 5 or top 20 candidates |
| MCES@1 | Maximum common edge subgraph distance between the top-ranked and correct molecules. A lower value means fewer differences in their bond structure. |
- 1. Molecule ATop prediction
- 2. Molecule BCorrect molecule
- 3. Molecule C
- …More candidates
- Hit@1
- 0 · Miss
- Hit@5
- 1 · Hit
- Hit@20
- 1 · Hit
The two molecules share a ring but differ in their branches, giving a nonzero structural distance.
Overall Scoring
The primary score is Hit@1 across all 17,556 test spectra. If is the highest-ranked molecule and is the true molecule, the score counts exact top-ranked matches:
Here, is the number of test queries. A score of 1 means the correct molecule ranks first for every spectrum. Hit@1 can also be expressed on a 0–100 scale. Hit@5, Hit@20, and MCES@1 are separate diagnostics.
References
- [1] Bushuiev, R. et al. MassSpecGym: A benchmark for the discovery and identification of molecules. NeurIPS (2024). Dataset.
- [2] Wang, R.-X., Wang, R. & Coley, C. W. GLACIER: Rethinking Mass Spectrum Prediction as an Object Detection Problem. NeurIPS (2026).
- [3] Goldman, S., Wohlwend, J., Stražar, M. et al. Annotating metabolite mass spectra with domain-inspired chemical formula transformers. Nature Machine Intelligence (2023).
- [4] Goldman, S., Bradshaw, J., Xin, J. & Coley, C. W. Prefix-Tree Decoding for Predicting Mass Spectra from Molecules. NeurIPS (2023).