How a spectrum becomes a molecule

The methods

What has anyone ever built to go from spectrum to structure, and where does each one fail?

Fingerprint prediction, in-silico fragmentation, de novo generation, foundation models, and the failure modes.

The queen's digest

5/5 workers reported · Tue Oct 06 2026 20:00:00 GMT-0400 (Eastern Daylight Time)

TL;DR (5 bullets a chief of staff would read)

  • Every CASMI26 entry above ~0.1 MRR is spectrum → predicted substructure fingerprint → rank mass-matched COCONUT candidates. CSI:FingerID/SIRIUS is a licensed web service unusable offline; MIST (MIT) runs but scores ~10–15 % hit@1 on the honest MassSpecGym split. Fingerprint choice is second-order (four variants within 0.007 LB); ranker, pool and leak control decide the score.
  • Published benchmark numbers are mostly untrustworthy: the June-2026 MassSpecGym audit found problems in ≥17 of 26 papers; one "state-of-the-art" retrieval fell 82 % → 7 % hit@1 when a canonicalisation shortcut was removed; a spectrum-blind baseline (PubChem order) scores 49.98 %. Honest formula-free retrieval tops out ~27 % hit@1.
  • Orthogonal engines combine; look-alikes do not. CASMI 2016's six-method consensus beat every single entry (Top-10 166/208 vs 131/208), but in simulation rank-averaging two scorers loses to the better one alone once errors are ≥ 0.3 correlated. Sum calibrated log-odds (+0.03–0.06 MRR@25 simulated), weight by predicted class (+0.02–0.03), and pair a fragmenter/forward model with the fingerprint model.
  • De novo generation jumped 0 % → 18–24 % exact match on MassSpecGym (2025–26: FRIGID, DualLGD, MS-GPT), but only given the true formula and [M+H]+. A slot-filler for the ~45 % of hidden molecules that never reach the top-25 — hundredths of MRR, not a primary.
  • Our local validation will lie unless rebuilt: all 250 enveda-np-examples structures also sit in public libraries, the visible test is verbatim train, 29 % of timsTOF train rows are dimer adducts the test never has, and a 400-molecule MRR has s.e. ≈ 0.02. Adopt the failure-modes worker's three-stratum, analog-excluded protocol before tuning anything.

New concrete facts (numbered; each with file + source count; mark confidence)

  1. CSI:FingerID's "modified Platt" already multiplies per-bit sensitivity/specificity; the 2018 Bayesian tree models bit correlation; each bought 1.5–3 pp vs 0.1–0.2 MRR from pool choices. Nobody conditions bits on compound class. — fingerprint_prediction_*.md, ~20 sources. High.
  2. Public CASMI26 FPNet weights leak: 0.94 Class-2 MRR on seen structures vs 0.477 held-out; PubChem isomers drop Class-2 MRR 0.52 → 0.35. — fingerprint file (GitHub write-ups). Medium.
  3. Fragmenters alone: MetFrag 24/208 Top-1 at CASMI 2016, but on the 87 challenges in nobody's training set MetFrag+CFM (13) matched CSI:IOKR (16) and CSI:FID (13). — insilico_fragmentation_*.md. High.
  4. Costs: MetFrag CL ≈ 0.02–0.1 CPU-s/candidate; CFM-ID 4 5–11 CPU-s/molecule (precompute off-platform); ICEBERG 2 46.4 and GLACIER 368.7 spectra/s on 2×A5000. — insilico file. Medium.
  5. No in-silico tool models timsTOF CE: MetFrag/MAGMa/MS-FINDER/SCARF/ICEBERG 1 take none; CFM-ID fixed 10/20/40 eV; MassFormer NCE FT/HCD only; ICEBERG 2/GLACIER absolute eV. MS-FINDER ignores intensities. — insilico file. High.
  6. De novo on MassSpecGym (true formula, [M+H]+): DiffMS 2.3 %, FRIGID 18.3 %, DualLGD 23.9 %, MS-GPT 23.9/28.7 % top-1/10; weights 1–3 GB, 0.93–7 s/spectrum. A Kaggle team's "in-DB?" gate showed no signal (42.8 % vs 59.4 % base rate). — denovo_generation_*.md. Medium.
  7. DreaMS (116 M params, ≤700 M GNPS spectra, MIT, HF weights) is the only open spectral foundation model; audited MassSpecGym retrieval 6.7 % hit@1. PRISM has no weights, code or preprint. — foundation_models_*.md. High.
  8. Simulation (400 × 1,000 candidates, MIST/JESTR-calibrated): rank-averaging loses at ρ ≥ 0.3; independence-assuming combiners stop helping at ρ ≈ 0.6. — foundation file §B, *_lr_sim.py. Ordering robust, magnitudes low.
  9. Isomer blindness: hesperidin/neohesperidin and naringin/isonaringin give "no intra-pairs difference in the UV-Vis and MS/MS spectra" (PMC2722651); a dedicated glycoside-position classifier tops at 84.7 % (PMC11644359). — failure_modes_*.md, 21 sources. High.
  10. Formula error: SIRIUS single-spectrum < 10 % below m/z 300 but > 50 % toward 800; MIST-CF 50.5 % top-1; MIST hit@1 halves (51.45 → 26.64 %) on predicted formulas. — failure-modes file. Medium-high.
  11. CE/instrument shift (library search): 95.1–98.4 % sensitivity within 20–50 eV vs < 81 % (QqTOF 5–10 eV) and 21–61 % (Orbitrap NCE > 90); cross-instrument 88.0/91.5 % vs 99.5/99.7 % self (PMC6359582, PMC9400100). No cross-instrument or timsTOF number exists for any learned model. — failure-modes file. High.
  12. Local audit of train.parquet: np-examples 0 exclusive (RIKEN 246, GNPS 233); enveda-180 adducts 51 % [M+H]+, 16 % [2M+Na]+, 8 % [2M+H]+ vs test 79 % [M+H]+, 16 % [M-H]-, no dimers; 2,538 structures measured on both timsTOF and other instruments; 1,612 InChIKey14 with multiple SMILES; a per-spectrum split puts ~94 % of structures on both sides. — failure-modes file (own script). High.
  13. Split inflation: NN-baseline Jaccard 0.895 (random) vs 0.263 (scaffold); MIST R@1 67.75 % (simulator saw test) vs 53.76 % clean; padding-mask bug +21 points. — failure-modes + foundation files (arXiv 2606.19624, 2610.02249). Medium-high.

Forced analogies — what the cross-domain lens produced (keep the duds too, say why they died)

  • Bit = lab test (fingerprint worker): partially holds, productive. SIRIUS already does naive-Bayes with per-bit sens/spec; nobody calibrates per class. Idea: class-conditional LR rescoring over NPClassifier classes, success ≥ 0.02 Class-2 MRR in glycosides. Breaks for near-identical isomers and nested fingerprints (ECFP4 ⊂ ECFP6) that double-count.
  • Cheap screen → confirmatory test (fragmenter worker): partially holds. Pool-size effect is literally a base-rate effect. Died on conditional independence: fingerprint and fragmenter errors share the spectrum. The needed LR table (explained intensity, true vs decoy, timsTOF NPs) is unpublished — one-week protocol written.
  • Diagnosis of exclusion (de novo worker): mostly dud. The in-DB gate had no measurable signal, so hard switching dies; slot-filling and the GLMR-style anchor re-rank survive.
  • Likelihood ratios vs averaging (foundation worker): holds with a limit. Breaks at ρ ≥ 0.6, where only a jointly fitted model helps.
  • Spectrum bias (failure-modes worker): holds best. 0.445 local vs 0.063 LB is validation on the derivation cohort. Produced the spectrum-bias audit: per-cell MRR by class × adduct × n-CE × mass tercile, paired bootstrap, standardised to the hidden case-mix; accept a gain only if sign-consistent in ≥ 70 % of weighted cells. Breaks for isomers: one patient, several identical diseases — output a prior-ordered tie.
  • q7's line-up lens and my simulation independently reach "no cascade by ranks".

Contradictions within my subdomain

  • CSI:FingerID "best" (CASMI 2016) vs "weak" (Chau 2025): candidate DB, formula input and training overlap, not the method.
  • ESP claims MIST was top at CASMI 2022; the organisers' table lacks MIST — misattribution.
  • Consensus helped at CASMI 2016 yet rank-averaging hurts in simulation: orthogonal engines vs correlated ones.
  • Merged multi-CE is native for ICEBERG/SCARF/FraGNNet, yet library search loses 8–12 points on CE mismatch; no fingerprint-model ablation exists.

Gotchas for the modeler (what could silently fool us)

  1. Spectrum-blind baselines score high (PubChem order 49.98 %; pool-provenance flags "0.94 on a task that honestly scores 0.55"). Report one next to every model.
  2. Holding out np-examples while their public spectra stay in train is a library-hit test. Remove all spectra of held-out structures plus MCES < 10 / Tanimoto ≥ 0.7 analogs.
  3. Canonicalisation mismatch (82.41 → 6.70 %); the scorer key disagrees with naive InChIKey14 on 10.44 % of COCONUT.
  4. Silent preprocessing failures: CE strings "20 V"/"30%" → NaN logits for 1,212/2,499 queries; MIST padding-mask bug also in DiffMS — run single-spectrum inference checks.
  5. Formula knowledge lifts random 0.43 → 12.98 % on MassSpecGym, but 70.8 % of ±10 ppm COCONUT candidates share a formula — formula-first buys less here.
  6. Train is 29 % dimer adducts absent from test; resample batches to the test adduct × n-CE mix.
  7. Noise: 400-molecule s.e. ≈ 0.02; seed ±0.01; gains < 2 paired s.e. (≈ 0.01 on 2,000 queries) are noise. Platt/COSMIC scores are not probabilities.
  8. Licensing: data CC BY-NC 4.0; 3DMolMS CC BY-NC-SA; FRIGID unresolved.

Questions for other queens (name the queen)

  • q1_instrument_physics (posted in physics_x_methods): effective CE distribution of merged timsTOF spectra and a map to QTOF 10/20/40 eV / Orbitrap NCE; timsTOF relative-intensity noise floor; any physics separating sugar-linkage isomers?
  • q6_candidate_space_retrieval: recall@25 of the ±10 ppm COCONUT ∪ train pool on an analog-excluded NP hold-out — every method is capped by it (≈ 0.55 at LB 0.417).
  • q2_data_forensics: per-ingest_lib intensity floors; do collision_energy_orig strings parse for all 1,154,969 timsTOF rows?
  • q7_compute_execution: can ICEBERG 2.1/GLACIER and MS-GPT weights be packaged as Kaggle datasets within disk/9 h limits? Negative-adduct coverage and T4 throughput?
  • q8_serendipity: candidate-conditional IDF must use structure-level fragment explanations, not neutral-loss formulas (reply posted).

Layman sentences — 3 sentences a non-scientist could repeat about my subdomain

  1. Every serious method guesses which chemical building blocks are present from the spectrum, then ranks database molecules of the right weight by how many of those blocks they contain.
  2. Published accuracy numbers are mostly inflated by leaks — a 2026 audit found most papers on the main benchmark had evaluation problems, one "best" method dropping from 82 % to 7 % — so we trust only numbers measured on molecules the model never saw a relative of.
  3. Combining methods helps only when they fail in different ways, and their evidence must be added like independent medical test results, not by averaging their rankings.

Gaps I could not fill

  • Unreachable full texts: MS2DeepScore 2.0, MIST preprint, "spurious evaluations" preprint, CSI:FingerID PNAS 2015 — cited at abstract level.
  • No published timsTOF evaluation of any ML method and no single-CE → merged ablation for fingerprint models; both measurable in hours on our 2,538 paired structures (P-inst) — my subdomain's highest-value experiment.
  • Fragmenter explained-intensity LR table on timsTOF NPs: unpublished; protocol in insilico file §6.
  • SIRIUS 6's exact bit set; Dührkop's CASMI 2022 configuration; de novo numbers not re-evaluated under MassSpecGym v1.5 (upper bounds).