Molecular formula identification from tandem mass spectra at 88.3% top-1 accuracy, more than 10x faster than fragmentation-tree search.
Most of the chemical signal in an untargeted metabolomics run is never identified. Spectra that match no reference library entry — the "dark matter" of small-molecule analysis — have to be characterized from first principles, and the molecular formula is the first and most constraining step in that chain: get it right and structure elucidation has a bounded search space; get it wrong and everything downstream is wrong too. The two established tools approach this differently. SIRIUS works top-down, enumerating candidates from isotope patterns and scoring each with a fragmentation tree; BUDDY works bottom-up, restricting candidates to formulas explainable from a reference library. Both slow sharply as precursor mass grows, because the candidate space expands exponentially, and both use only a fraction of the peaks in a spectrum.
FIDDLE (Formula IDentification from tandem mass spectra by Deep LEarning) was developed by Yuhui Hong, Sujun Li, Yuzhen Ye, and Haixu Tang at the Luddy School of Informatics, Computing, and Engineering at Indiana University. It replaces combinatorial enumeration with direct regression: a neural network reads the whole binned spectrum and predicts an atom-count vector, a refinement step nudges that prediction into formulas consistent with the precursor mass, and a second network scores the survivors. The candidate list an analyst has to consider shrinks to at most five formulas by default.
msfiddle command-line tool on PyPI and a hosted demo.Each spectrum is binned into a fixed-resolution vector — a maximum m/z of 1500 Da at 0.2 Da resolution yields length 7500 — and encoded by stacked blocks of dilated convolutions with large kernels (sizes 45 down to 35, dilation factors 1, 2, 4, 8, 8, 8), giving an effective receptive field of 1153 bins so that relationships between distant fragment ions are captured directly. Block outputs across channel sizes 32, 32, 64, 128, 256, and 512 are concatenated and globally pooled into a 1024-dimensional embedding, then combined with experimental conditions through linear layers to yield condition-independent features. Decoders predict the formula alongside auxiliary targets — atom number, molecular mass, and H/C ratio — as multi-task regularization.
Training used more than 38,000 molecules and over 1 million MS/MS spectra from Q-TOF and Orbitrap instruments. FIDDLE reached top-1 and top-5 accuracies of 88.3% and 93.6%, exceeding SIRIUS and BUDDY by over 10% while running more than 10 times faster. On external metabolomics datasets it achieved top-5 accuracies of 75.1% in positive ion mode and 66.2% in negative mode, rising to 80.0% and 73.8% when its predictions are combined with those two tools.
Formula identification is the gate through which unknown compounds pass in untargeted metabolomics, natural product discovery, exposomics, and environmental screening. FIDDLE is aimed at analysts working through spectra that returned no library hit, where the alternative is either an expensive tree search or no answer at all, and its speed makes it practical to run across an entire acquisition rather than a hand-picked subset.
Published in Nature Communications after preprinting on bioRxiv, FIDDLE shows that a learned representation of the full spectrum can displace combinatorial search on a task long assumed to require it. The code is Apache-2.0 licensed with four pretrained checkpoints released for Q-TOF and Orbitrap data, and the separate msfiddle package lowers the barrier to running it. Two constraints are worth stating plainly: the model predicts a formula, not a structure, so it constrains rather than completes identification; and several of the spectral libraries it was trained on, notably NIST20 and NIST23, are commercial products that cannot be redistributed, so exact reproduction of the training corpus requires purchased data.
Papers that recently cited this model.
The most-cited papers that cite this model.
Providers that host FIDDLE for inference, fine-tuning, or weight download.
No providers recorded yet. Browse all providers
Not enough data