Datasets:
MS2 Peptide-Replicate-Retrieval Benchmark
A benchmark for evaluating spectrum-embedding models for tandem mass spectrometry (MS2). It is a set of real experimental MS2 spectra, each labelled with the peptide it was identified as (a peptide-spectrum match, PSM), pooled so that every peptide is represented by many replicate acquisitions. The task: does an embedding map replicate spectra of the same peptide close together?
- 15,649 spectra
- 1,000 unique
peptide/chargelabels (≈ 15 replicate spectra per label) - precursor charges 1–5
Why this exists
Spectrum-embedding models compress an MS2 spectrum into a single dense vector so that spectra can be clustered, deduplicated, or searched by nearest-neighbour instead of by exhaustive spectral matching. The quality that matters for those uses is replicate retrieval: two acquisitions of the same peptide should land near each other in embedding space. This set isolates that property — many labelled replicates per peptide — so embeddings can be compared with the same three metrics regardless of how they were produced.
Metrics
Given one L2-normalised vector per spectrum, with peptide/charge as the label:
| metric | definition |
|---|---|
| Hit@1 | leave-one-out: fraction of spectra whose nearest (cosine) neighbour shares the same label |
| MAP | mean average precision of that same leave-one-out ranking |
| PairF1 | pairwise F1 of a spherical k-means clustering (k = #labels) against the ground-truth labels |
A reference implementation of all three (matching denominators, singleton
handling, and spherical-k-means details) lives in msdelta/replicate_retrieval.py
in the model repo.
Schema
Each parquet row is one spectrum:
| column | type | notes |
|---|---|---|
dataset_id |
string | source acquisition/dataset id |
spectrum_number |
int32 | scan index within the source |
peptide |
string | identified peptide sequence (label, with charge) |
charge |
int16 | precursor charge (1–5) |
score |
float | identification score |
appearance_count |
int32 | # replicate acquisitions of this peptide |
ret_time |
float | retention time |
precursor |
float | observed precursor m/z |
mz |
list<float> | peak m/z values |
intensity |
list<float> | peak intensities (same length as mz) |
The label used by the benchmark is f"{peptide}/{charge}".
Usage
from datasets import load_dataset
ds = load_dataset("<your-username>/ms2-peptide-replicate-retrieval", split="test")
print(ds[0]["peptide"], ds[0]["charge"], len(ds[0]["mz"]))
- Downloads last month
- 385