InstaNovo-FM: a foundation model for tandem mass spectra
InstaNovo-FM is an encoder-only transformer trained to reconstruct masked regions of MS/MS spectra without ever seeing a peptide sequence label. It was pretrained on 1.63 billion spectra from 92 public PRIDE submissions spanning 72 organisms.
Every existing proteomics model is trained for one supervised task. This one is not trained for any, which is why the first three tabs are possible at all: you can run its pretraining objective, identify spectra without a sequence database, and reuse its frozen 768-dimensional representation for whatever you like. Sequencing is in the last tab, because it is the one thing here that is not unique.
This is the pretraining objective itself, run live. Hide peaks in a spectrum and the model predicts which cell of a 0.2 Da grid each one belongs to, using only the peaks around it. A de novo model has no way to answer this question, because it emits sequences, not spectra.
Two things to be clear about. A hidden peak is not erased: the encoder replaces it with its true m/z blurred by Gaussian noise of σ = 10 Da plus a learned "masked" bias, and keeps its true intensity. And because peaks arrive sorted by m/z, the model also knows a hidden peak lies between its nearest still-visible neighbours. Its job is to sharpen all of that into one 0.2 Da bin, so the baseline it is measured against uses the same two hints.
Hidden peaks
Step 2: explain one reconstruction
Every peak the model could still see is deleted in turn and the reconstruction re-run, so what comes out is the evidence the model needed, not merely what it attended to. The mass gap to each peak that mattered is then matched against residue masses, isotope spacings and neutral losses, which is arithmetic the model was never taught.
The manuscript's Fig. 4 is what loads by default, so reproducing it takes three button presses and no setup. The spectrum is TGVELGKPTHFTVNAK, HCD on a Q Exactive at precursor charge 3+, and step 1 is already set to hide peaks 91, 92: its y5 ion at 532.308 m/z together with the isotope co-masked alongside it. Press Step 1, then Explain it here, then Step 3 below. The peak that matters is y6 at 679.379, one phenylalanine step of 147.07 Da away, which is the ladder neighbour the figure reports.
To score the model over many spectra instead, load one of the other example files and switch to a masking mode that hides more than one chosen peak.
Lists only the peaks that step 1 actually hid, so run it first.
Reading the lower panel: it has one entry for every peak that was deleted. A grey dot on the zero line means deleting that peak changed nothing, so it carried no evidence. A green bar means the correct bin became less likely, and the bar's height is how much probability it lost. A single tall green bar in a field of grey dots means the model was leaning on one specific peak, and the label says which chemical relationship connects the two. Probability on the correct bin is used rather than added error because a rich spectrum carries redundant evidence: deleting one peak of a hundred rarely moves the answer out of the right bin, but it still shows in how strongly the model backs it.
Peaks the answer depended on
Step 3: the three views of Fig. 4A
Panel A of the manuscript's Fig. 4 draws one spectrum three times, and the three together say more than any one of them. Ion type comes from matching the known peptide, so it is ground truth and owes nothing to the model. Attribution is integrated gradients against a zero-intensity baseline, the same quantity the paper plots, and says what the reconstruction drew on. Confidence is what the model thinks it knows about every peak, hidden or not.
Reading down a column is how you separate "the model used the fragment ladder" from "the model happened to be right". On the bundled Fig. 4 spectrum the most attributed peak is the y ion at 679.379, which is the ladder neighbour the figure reports.
The figure's remaining panels follow underneath. B lays the same attribution along the peptide backbone, b ions above and y ions below, so you can see where in the sequence the evidence sits. C sums it by how each peak relates to the hidden one. D plots it against intensity, which is the figure's check that the model is not merely following the tallest peaks. E is a Lorenz curve showing how few peaks carry most of the attribution.
Search by representation, not by sequence. Embed a set of already-identified spectra as anchors, embed your unassigned spectra as queries, and transfer the identity of the nearest anchor. The peptide never has to be in a local FASTA file; it only has to have been observed and identified somewhere.
This is how unassigned spectra get rescued. On a held-out project the model never saw during pretraining, the paper reports rescued matches at embedding similarity ≥ 0.998 confirmed by raw-spectrum cosine of 0.96 to 0.996 and 59 to 78% peak alignment.
Candidate transfers
Check one match against the raw spectra
One encoder, any spectrum, no labels. Each spectrum becomes a unit-length 768-dimensional vector you can cluster, index, probe or feed to a downstream model.
In the paper these vectors separate by fragmentation method at the coarsest scale, then by instrument, then by labelling chemistry and peptide identity: an entire hierarchy that emerges without any of those labels at training time. A linear probe on frozen embeddings reaches macro-F1 0.855 for fragmentation method and detects phosphorylation at AUROC 0.988.
Upload several files and colour by source file to see the run-level version: whole runs acquired under different conditions separate with no peptide identifications at all. Note that source file is as close as this interface gets to acquisition mode. An MGF carries no field for fragmentation method or acquisition, so those cannot be offered as colourings; each bundled example file happens to be a single run, which makes source file a stand-in for it here but not in general.
Most similar pairs (full 768-d space)
The encoder above emits vectors, not peptides. instanovo-fm-denovo-v0.1.0 is that same
encoder with an InstaNovo decoder attached and fine-tuned for sequencing.
This tab is here for completeness, being the one capability on this Space that other de novo models also have. Its interest is what it says about pretraining: the frozen-encoder variant, with no encoder fine-tuning at all, retains about 85% of this model's peptide recall. For the full sequencing workflow with InstaNovo+ refinement, use the InstaNovo Space.
Capped at 128 spectra per run to stay inside the ZeroGPU allocation.
Predictions
The model
| Checkpoint | instanovo-fm-v0.1.0 (89.5M parameters) |
| Architecture | encoder-only transformer, 12 layers, 12 heads, d=768 |
| Pretraining objective | masked peak reconstruction, as hierarchical classification over a 0.2 Da m/z grid |
| Masking | Thompson-span with isotope co-masking, ~30% fragment-group budget |
| Corpus | 1,625,276,573 MS/MS scans; 184.6M PSMs at 1% FDR; 92 PRIDE projects, 72 organisms |
| Peptide labels used in pretraining | none, at any stage |
| Spectrum embedding | mean of final-layer peak-token states, L2-normalised |
| Sequencer | instanovo-fm-denovo-v0.1.0, the same encoder plus an InstaNovo decoder |
Why an unsupervised objective matters
Sequence labels come from database searches on well-characterised organisms. A model pretrained on them concentrates its capacity on the part of proteome space that existing databases already cover. Training without labels avoids that bias and makes the ~99% of archived spectra that carry no annotation usable as training signal.
What this Space does not tell you
- Nothing here is FDR-controlled. Reconstruction accuracy, retrieval candidates and de novo predictions are all model hypotheses. For calibrated confidence and q-values, use Winnow.
- The retrieval demo splits one file into anchors and queries when you do not supply a query file. That split is not peptide-disjoint and its recall is optimistic.
- Small uploads show the peptide-level end of the embedding hierarchy. The fragmentation-method and instrument structure in the paper needs tens of thousands of spectra from varied acquisitions to become visible.
- A hidden peak keeps a ±10 Da blurred position and its true intensity, so reconstruction is a sharpening task, not prediction from nothing.
The bundled data
| file | source | what it is |
|---|---|---|
glyco_nglycopeptides.mgf |
PRIDE PXD025859 | 150 spectra from an intact N-glycopeptide run, charges 2 to 4, HCD at CE 20 and 33 |
lcfm_dia_human.mgf |
MassIVE MSV000090792 | 150 spectra from a human single-cell DIA run on an Orbitrap |
retrieval_library.mgf |
nine-species benchmark | 270 tryptic DDA spectra, 30 peptides with replicates |
ninespecies_queries.mgf |
same benchmark | 20 further spectra of peptides the file above contains, sharing no spectrum with it, for tab 2's two-file mode |
instanovo_sample_spectrum.mgf |
InstaNovo repo | the single spectrum of IAHYNKR used by the walkthrough above |
The first two are subsets of public raw data reprocessed through our FragPipe pipeline, trimmed to the 200 most intense peaks per spectrum, which loses nothing the model sees because the encoder keeps 200 peaks anyway. Their peptide labels are that pipeline's output, not the depositors'. Cite the original accessions if you use them.
One provenance note on the glycopeptide file, since it is easy to trip over. It
comes from the run deposited as ShenJ_Drosophila_C18_MAX_IGP_CE20_33_Run1, and
every protein it identifies is Drosophila melanogaster. PXD025859 spans several
organisms (35 mouse runs, 15 bovine and 3 Drosophila in our reprocessing), and the
ProteomeXchange organism list for the project happens to omit Drosophila, so the
accession page alone will not tell you which organism a given run is.
Links
- InstaNovo-FM on GitHub
instanovo-fmon PyPI:pip install instanovo-fm==0.1.0- Getting-started notebook
- InstaNovo Space for de novo sequencing with InstaNovo+ refinement
Citation
Learning from tandem mass spectra at scale with a self-supervised foundation model for proteomics, bioRxiv, 3 September 2026. doi:10.64898/2026.09.03.747733
Running on ZeroGPU, which is free but rate-limited per user. Uploads are capped at 2000 spectra for embedding tasks and 128 for sequencing, so please test with small files.