MassSpecGym: MS/MS benchmark for molecule discovery and identification
231,104 tandem mass spectra over 28,929 distinct molecules, the reference benchmark for predicting chemical structure from MS/MS. Published with Bushuiev et al., NeurIPS 2024 Datasets and Benchmarks, and revised as v1.5 in 2025 after the authors audited their own evaluation. Three tasks are defined on it: de novo structure generation, retrieval against a candidate pool, and spectrum simulation. The main table is one spectrum per row: mzs and intensities as comma-separated lists in a single cell, intensities normalized so the base peak is 1.0, alongside SMILES, the 14-character InChIKey skeleton, molecular and precursor formula, parent mass, precursor m/z, adduct, instrument type, collision energy, the official fold, and a simulation_challenge flag. Coverage is positive mode only and two adducts: [M+H]+ on 195,237 spectra and [M+Na]+ on 35,867. Instruments are Orbitrap 172,058 and QTOF 53,823, with 5,223 unlabelled. Spectra carry a median of 17 peaks and at most 299. The repository is 52.8 GB in total because the table ships with a large auxiliary tree: an MGF export, ClassyFire chemical ontology for 27,605 of the molecules, SIRIUS fragmentation trees one JSON per spectrum, a 2.25 GiB HDF5 holding the complete 603,103,815-entry condensed MCES distance matrix over 34,731 molecules, retrieval candidate pools filtered by mass and by formula, and pretraining molecule lists of 2.5M and 50M SMILES screened to Tanimoto below 0.7 against every test molecule. The official fold column is genuinely leakage-free, which is unusual and worth relying on: measured structural overlap between train, val and test is exactly zero on both canonical SMILES and InChIKey skeleton. That matters because the spectra are 8-to-1 redundant per molecule, so a naive random row split leaks heavily. Two versions of the main table ship side by side and differ only in how SMILES are standardized, which silently breaks joins against the auxiliary files; the archive card records which version keys which file. MIT licensed. Mounted read-only from the HuggingFace dataset repository, no mirror.
- Category
- Drug Discovery
- Provider
- Bushuiev et al. (Pluskal Lab, IOCB Prague)
- License
- mit
- DOI
- 10.48550/arXiv.2410.23326
- Hosted on
- Hugging Face, bucket roman-bushuiev/MassSpecGym, us
- Access
- Free and public. No account with the data provider is needed.
- Source
- https://proceedings.neurips.cc/paper_files/paper/2024/file/c6c31413d5c53b7d1c343c1498734b0f-Paper-Datasets_and_Benchmarks_Track.pdf
Data structure and loading code
Fields
identifier | string MassSpecGymID####### — unique ove |
mzs / intensities | string — comma-separated float lists ins |
smiles | string — THE COLUMN THAT DIFFERS BETWEEN |
inchikey | string, 14 characters in all 231,104 row |
formula / precursor_formula | string Hill notation — the neutral molec |
parent_mass / precursor_mz | float64 Da — neutral monoisotopic mass, |
adduct | string — positive mode only, exactly two |
instrument_type | string 'Orbitrap' (172,058) | 'QTOF' (53 |
collision_energy | float64 — NULL IN 109,358 ROWS (47.3%), |
fold | string 'train' (194,119) / 'val' (19,429 |
simulation_challenge | bool — 119,029 true / 112,075 false, and |
Load the data
# Mounted read-only at /mnt/archive.
# Read the TSV directly. Do NOT use load_dataset() — the repo exposes all
# 231,104 rows under a single split called "val", test fold included.
import pandas as pd
df = pd.read_csv('/mnt/archive/data/MassSpecGym1.5.tsv', sep='\t')
print(df.shape) # (231104, 14)
print(df.fold.value_counts().to_dict()) # train 194119, val 19429, test 17556
# The official split is structure-disjoint. Confirm it rather than trusting it:
g = {f: set(x.inchikey) for f, x in df.groupby('fold')}
print('train&test shared molecules:', len(g['train'] & g['test'])) # 0
# 231k spectra but only 28,929 molecules, so never split on rows.
print('distinct molecules:', df.inchikey.nunique())
# mzs and intensities are comma-separated lists inside one cell.
mz = [float(v) for v in df.mzs.iloc[0].split(',')]
ints = [float(v) for v in df.intensities.iloc[0].split(',')]
print(len(mz), 'peaks; base peak intensity =', max(ints)) # intensities are normalized to 1.0Written for a Scigantic notebook, where /mnt/archive is the mounted dataset.
Analyze this dataset without downloading it
On Scigantic, MassSpecGym: MS/MS benchmark for molecule discovery and identification opens in a hosted JupyterLab notebook with the data already mounted, so you can read files where they are stored instead of copying them first. Each notebook includes an AI assistant that can see the mounted files and write and run analysis code. Open the dataset page to launch a notebook, or browse the full catalog.
Related Drug Discovery datasets
- Data from: Analysis-ready datasets for insecticide resistance phenotype and genotype frequency in African malaria vectors
- Prioritizing New Inhibitors for TPD1 from a Library of Anthraquinone and Chalcone Derivatives
- Natural products structure database LOTUS supplemented with predicted 13C NMR chemical shifts
- OpenBind Zika Virus Blind Challenge Tutorial
- S61 | UJICCSLIB | Collision Cross Section (CCS) Library from UJI
- Biogen ADMET: Human Plasma Protein Binding (hPPB)
- Deep learning models for predicting Toxicity and Bioactivity of the chemical exposome: a case study for the Blood Exposome Database
- Datasets for practical model selection for prospective virtual screening