Auditing two-stage MS/MS molecular retrieval on MassSpecGym v1.5: Reranking gains, candidate priors and spectrum dependence
Organizations: 1Independent Researcher. · Department of Chemistry, Zhejiang University, Hangzhou, Zhejiang 310058, China. · 3*ZJU-UIUC Institute, Zhejiang University, Haining, Zhejiang 314400, China.
Abstract
Two-stage retrieval of molecular structures from tandem mass spectra (MS/MS) can benefit from candidate reranking, but benchmark gains may also reflect candidate priors, replicate spectra, precursor mass, and training-set coverage. We audit a two-stage retrieval system on the official MassSpecGym v1.5 split (17,556 test spectra). A data-safe DreaMS encoder and composite molecular fingerprints provide an initial shortlist; a support-gated reranker combines pair scores, candidate-relative peak coverage, and mass-feasibility features. The final system achieves 31.05% Recall@1, a 10.05-point gain over its Stage 1 ensemble, while preserving its 72.62% Recall@20. Replacing the query spectrum with one from a different molecule matched on adduct and precursor mass reduces Recall@1 by 9.0 points (15.3 points under molecule-balanced weighting); nevertheless, a training-mean spectrum retains 13.75% Recall@1, indicating substantial spectrum-independent signal. Mass-feasibility features improve Recall@1 beyond score and coverage controls, while learned peak-fragment similarities do not outperform constant coverage. Errors cluster by molecule, and removing close training neighbours causes a large decline in Stage 1 shortlist recall among initially well-covered molecules. We conclude that candidate-relative mass-feasibility evidence improves front-rank retrieval and spectrum dependence, but does not establish learned structural discrimination or eliminate candidate priors. Evaluation should separately assess shortlist reachability, spectrum dependence, and molecule-level generalization.
Figures & tables
| Measurement | Definition |
|---|---|
| Peak matching | |
| Matched peak count | |
| Matched peak fraction | |
| Fragment feasibility | |
| Log feasible-edge count | |
| Proposals per matched peak | |
| Method | R@1 | R@5 | R@20 | MRR | Bal. R@1 |
|---|---|---|---|---|---|
| Single model (seed mean) | |||||
| SCCF | 19.10 | 45.01 | 69.23 | 31.88 | 13.37 |
| MSAlign | 23.88 | 50.18 | 74.56 | 36.53 | 17.75 |
| EmbCos | 15.59 | 32.19 | 54.10 | 24.46 | 13.11 |
| Three-seed mean-logit ensemble | |||||
| SCCF (Stage 1 ensemble) | 21.01 | 49.20 | 72.62 | 34.51 | 15.45 |
| Configuration | R@1 | R@5 | MRR | Bal. R@1 |
|---|---|---|---|---|
| Stage 1 ensemble (SCCF) | 21.01 | 49.20 | 34.51 | 15.45 |
| Top-5 shortlist | ||||
| Pair reranker | 23.00 | 49.20 | 35.97 | 16.95 |
| Pair + coverage | 23.88 | 49.20 | 36.74 | 18.09 |
| Coverage 2 control | 24.85 | 49.20 | 37.47 | 19.47 |
| Score-only tree | 26.77 | 49.20 | 38.57 | 21.81 |
| Method | ICC(1) | All wrong | Null all wrong | Mixed | Oracle gain |
|---|---|---|---|---|---|
| SCCF (Stage 1 ensemble) | 0.74 | 64.0 | 18.8 | 24.8 | 12.5 |
| MSAlign (seeds) | 0.70–0.73 | 57.9–61.4 | 15.0–16.1 | 28.6–33.6 | 14.8–18.8 |
| EmbCos (seeds) | 0.48–0.52 | 63.0–64.3 | 25.3–27.3 | 32.7–34.1 | 20.0–22.0 |
| Support-gated feasibility reranker (final) | 0.64 | 47.2 | 9.5 | 38.1 | 21.6 |
| Comparison | Query-weighted | Balanced |
|---|---|---|
| EmbCos SCCF (single models) | [ , ] | [ , 0.68] |
| SCCF Morgan-only, validation | [ , 0.60] | |
| SCCF Morgan-only R@20, validation | [2.28, 4.31] | |
| Final MSAlign ensemble † | [1.16, 10.53] | [8.59, 11.38] |
| Final top-20 feasibility, R@5 | [ , 0.10] | [ , ] |
| Candidate-only baseline (absolute) | 7.87 | 3.31 |
| Method | Without | With prior | Gain |
|---|---|---|---|
| SCCF (Stage 1 ensemble) | 21.01 | 33.08 | [10.19, 14.12] |
| MSAlign ensemble | 24.64 | 35.60 | [9.42, 12.58] |
| EmbCos ensemble | 18.40 | 27.49 | [6.89, 11.09] |
| Support-gated feasibility reranker (final) | 31.05 | 37.88 | [5.64, 8.07] |
| Mass prior alone | – | 8.11 |
| Test | Setting | Result |
|---|---|---|
| Learned peak–fragment similarity vs constant coverage | Validation, top-5 | vs ; 99.1% identical rankings |
| Candidate-listwise + local loss vs local loss only | OOF cohort | [ , 0.05] |
| Candidate descriptors added to feasibility features | OOF cohort | [ , 1.08] |
| Feasibility vs score-only tree, same formula and equal coverage | Validation, 531 queries | [ , 1.38] |
| Four feature-group ablations vs full feature set | Validation | no improvement |
Appendix figures & tables30 assets
Supplementary material from the paper’s appendix.
Appendix
| Model | R@1 | R@5 | R@20 |
|---|---|---|---|
| ICEBERG 2.0 | 63.95 | 83.83 | 92.56 |
| GLACIER, without CF | 69.69 | 86.58 | 93.34 |
| GLACIER, with CF | 69.95 | 86.47 | 93.52 |
| Scope | Spectrum rows | Missing CE | Missing (%) |
|---|---|---|---|
| Whole dataset | 231,104 | 109,358 | 47.32 |
| Official train | 194,119 | 92,510 | 47.66 |
| Official validation | 19,429 | 9,454 | 48.66 |
| Method | R@1 | R@5 | R@20 | MRR | Bal. R@1 |
|---|---|---|---|---|---|
| SCCF, single model (seed mean) | 19.1027 | 45.0103 | 69.2318 | 31.8829 | 13.3749 |
| MSAlign, single model (seed mean) | 23.8788 | 50.1794 | 74.5595 | 36.5332 | 17.7523 |
| EmbCos, single model (seed mean) | 15.5894 | 32.1865 | 54.1045 | 24.4580 | 13.1113 |
| Stage 1 ensemble (SCCF) | 21.0071 | 49.1969 | 72.6247 | 34.5131 | 15.4480 |
| Top-5 pair reranker | 23.0007 | 49.1969 | 72.6247 | 35.9747 | 16.9499 |
| Top-5 pair + coverage | 23.8836 | 49.1969 | 72.6247 | 36.7394 | 18.0950 |
| Method | R@1 | R@5 | R@20 | MRR |
|---|---|---|---|---|
| SCCF, single model (seed mean) | 13.3749 | 34.7748 | 63.0499 | 24.5128 |
| MSAlign, single model (seed mean) | 17.7523 | 43.2904 | 69.5568 | 30.2163 |
| EmbCos, single model (seed mean) | 13.1113 | 29.5014 | 51.5794 | 21.9898 |
| Stage 1 ensemble (SCCF) | 15.4480 | 38.4939 | 67.6850 | 27.2272 |
| Top-5 pair reranker | 16.9499 | 38.4939 | 67.6850 | 28.4185 |
| Top-5 pair + coverage | 18.0950 | 38.4939 | 67.6850 | 29.4470 |
| Method | Estimand | R@1 | R@5 | R@20 | MRR |
|---|---|---|---|---|---|
| SCCF | Query | ||||
| Balanced | |||||
| MSAlign | Query | ||||
| Balanced | |||||
| EmbCos | Query | ||||
| Balanced |
| Method | Seed | Estimand | R@1 | R@5 | R@20 | MRR |
|---|---|---|---|---|---|---|
| SCCF | 20260621 | Query | 17.4812 | 43.9508 | 68.6204 | 30.6336 |
| Balanced | 13.4009 | 34.8705 | 62.6982 | 24.5432 | ||
| SCCF | 20260622 | Query | 20.1014 | 45.6482 | 69.2641 | 32.6474 |
| Balanced | 13.3775 | 34.8090 | 62.6407 | 24.4685 | ||
| SCCF | 20260623 | Query | 19.7254 | 45.4318 | 69.8109 | 32.3678 |
| Balanced | 13.3463 | 34.6449 | 63.8109 | 24.5266 |
| Input / population | Queries | Estimand | R@1 | R@5 | R@20 | MRR |
|---|---|---|---|---|---|---|
| Real spectra | 17556 | Query | 31.0549 | 58.6580 | 72.6247 | 43.7938 |
| Balanced | 29.0541 | 54.5679 | 67.6850 | 40.9329 | ||
| Zero spectrum | 17556 | Query | 2.7911 | 11.0333 | 43.7116 | 9.2731 |
| Balanced | 1.7439 | 8.1935 | 31.3745 | 6.9965 | ||
| Training-mean spectrum | 17556 | Query | 13.7503 | 31.2258 | 50.2563 | 23.1161 |
| Balanced | 4.1846 | 12.9558 | 33.1565 | 10.2303 |
| Method | Real | Wrong | Zero | Train mean | Real wrong | |
|---|---|---|---|---|---|---|
| Query | Balanced | |||||
| SCCF (Stage 1 ensemble) † | 14.84 | 12.72 | 6.04 | 10.60 | 2.07–2.17 | 5.00–5.13 ∗ |
| MSAlign ensemble † | 24.06 | 20.63 | 10.49 | 18.02 | 3.39–3.50 ∗ | 7.81–7.98 ∗ |
| EmbCos ensemble † | 18.30 | 9.87 | 7.53 | 0.69 | 8.27–8.52 | 3.53–3.58 ∗ |
| Support-gated feasibility reranker (final) | 22.79 | 13.78 | 2.23 | 9.06 | 8.96–9.06 ∗ | 15.22–15.38 ∗ |
| Contrast | Estimand | Metric | 95% interval | |
|---|---|---|---|---|
| Final minus Top-20 feasibility reranker | Query | R@1 | +0.6892 | [+0.4485, +0.9500] |
| R@5 | -0.0911 | [-0.2878, +0.1019] | ||
| R@20 | +0.0000 | [+0.0000, +0.0000] | ||
| MRR | +0.4544 | [+0.2891, +0.6449] | ||
| Balanced | R@1 | +0.9965 | [+0.7035, +1.3091] | |
| R@5 | -0.4353 | [-0.7179, -0.1755] |
| Contrast | Estimand | Metric | 95% interval | |
|---|---|---|---|---|
| Real minus zero spectrum | Query | R@1 | +28.2638 | [+25.3530, +31.3117] |
| R@5 | +47.6247 | [+42.9608, +52.3210] | ||
| R@20 | +28.9132 | [+24.7990, +33.4660] | ||
| MRR | +34.5207 | [+31.7274, +37.3837] | ||
| Balanced | R@1 | +27.3102 | [+25.8348, +28.7763] | |
| R@5 | +46.3744 | [+44.6925, +48.0663] |
| Stage 1 | Final | |||||||
|---|---|---|---|---|---|---|---|---|
| Stratum | Groups | R@1 | R@20 | R@1 | R@5 | MRR | Bal. R@1 | |
| proximity | ||||||||
| 78 | 29 | 3.85 | 35.90 | 15.38 | 32.05 | 23.76 | 12.13 | |
| [0.60,0.70) | 3332 | 843 | 6.48 | 46.55 | 17.77 | 36.13 | 26.74 | 19.38 |
| [0.70,0.80) | 6742 | 1459 | 9.82 | 64.79 | 22.31 | 47.78 | 34.50 | 26.84 |
| [0.80,0.90) | 5100 | 562 | 38.88 | 93.12 | 46.24 | 78.76 | 60.65 | 44.55 |
| Method and metric | Spearman correlation |
|---|---|
| Stage 1 ensemble R@20 | 0.3849 |
| Stage 1 ensemble R@1 | 0.3291 |
| Final system R@1 | 0.2532 |
| Pass / proposal-cache state | Mean | Median | P90 | P95 |
|---|---|---|---|---|
| 1, partly populated | 393.53 | 347.63 | 672.89 | 833.38 |
| 2, repeated-query access | 33.07 | 36.10 | 39.60 | 40.64 |
| 3, repeated-query access | 32.80 | 35.73 | 39.09 | 40.49 |
| Method | Query-weighted MCES | Balanced MCES |
|---|---|---|
| SCCF, single model (seed mean) | 17.9272 | 19.6247 |
| MSAlign, single model (seed mean) | 15.9703 | 17.3485 |
| EmbCos, single model (seed mean) | 20.1854 | 20.5638 |
| Stage 1 ensemble (SCCF) | 17.3173 | 18.9903 |
| Top-5 pair reranker | 16.5784 | 18.2568 |
| Top-5 pair + coverage | 16.3510 | 17.9364 |
| Configuration | Evaluated setting | Finding and scope |
|---|---|---|
| Old-space recovery | Old-author weights transferred to canonical v1.5 molecular strings | Molecule-only, spectrum-only, low-learning-rate joint and distillation recipes did not restore retrieval. This is an alignment-migration failure, not evidence that released GLMR ignored spectra. |
| Frozen token adapter / naive last-block tuning | Historical formula-group split, ordinary DreaMS, matched Stage 1 baselines | Tested readouts and naive last-block adaptation did not clear matched retrieval gates. This does not bound a new objective or candidate-conditioned encoder. |
| Unweighted in-batch negatives | Historical 2k/2k formula-group pilot, mass cap256 | Adding valid batch ground truths at equal weight damaged early ranking despite false-negative masking. Weighting and curriculum were not established. |
| Fixed hard/random negatives | Historical 20k formula-group setup, mass cap256 | The fixed 50% hard fraction reduced R@1/MRR relative to random negatives. No general rejection of hard-negative curricula follows. |
| True dual latent | Historical frozen DreaMS/ChemBERTa pilot; , , , cap128 | Mean–max interaction remained below the global anchor despite Stage 1 KL. The anchor used cap256, so this is not a matched-cap method comparison. |
| Fragment-GINE | Historical formula-group split after full-training coverage expansion, ordinary DreaMS, natural top-5, bounded holdout | No R@1 increment over the same-budget continued Fragment-v2 control; the declared effect gate failed. The development-exposed pilot does not reject other graph/proposal supervision. |
| Method | Query and candidate inputs | Query GT formula | Split / candidate protocol | Evaluated here? |
|---|---|---|---|---|
| SCCF / final system | Data-safe DreaMS and SCCF; Stage 2 uses query peaks, precursor/adduct and candidate fragments | No | Official v1.5 train/validation/test; mass candidates, cap 256 | Yes; proposed system and matched controls |
| MSAlign [ 8 ] | Data-safe DreaMS, frozen MolDeBERTa, CE and adduct encodings | No in our mass track | Same official v1.5 partitions/pools; released single-model MCES configuration | Yes; adapted and trained |
| EmbCos [ 8 ] | Binned MS/MS and binary Morgan fingerprints; no explicit metadata | No | Same official v1.5 partitions/pools; released EmbCos recipe | Yes; adapted and trained |
| MIST, MassSpecGym audit [ 7 , 9 ] | Formula-annotated peaks and fingerprint prediction | Oracle or predicted formula, depending on variant | Published MassSpecGym mass/formula protocols; formula source must be stated | No matched rerun |
| MVP, primary FormSpec [ 16 ] | Formula-annotated single/consensus spectra; molecular graphs and fingerprints | Yes for reported FormSpec peak annotation | Published MassSpecGym MCES split; mass/formula candidate tracks | No matched rerun |
| FLARE, reported benchmark [ 3 ] | Subformula-annotated peaks, known parent formula/adduct and molecular node embeddings | Known parent formula in reported preprocessing | Published MassSpecGym MCES split; mass/formula candidate tracks | No matched rerun |
| Configuration | R@1 | R@5 | R@20 | MRR | Bal. R@1 |
| SCCF, single model (seed mean) | 20.81 | 45.39 | 71.22 | 32.78 | 13.79 |
| MSAlign, single model (seed mean) | 25.50 | 51.64 | 77.69 | 38.09 | 19.16 |
| EmbCos, single model (seed mean) | 13.35 | 30.11 | 52.62 | 22.38 | 12.91 |
| Stage 1 ensemble (SCCF) | 22.84 | 48.56 | 75.38 | 35.20 | 15.62 |
| Top-5 pair reranker | 23.69 | 48.56 | 75.38 | 35.82 | 17.42 |
| Top-5 pair + coverage | 24.71 | 48.56 | 75.38 | 36.71 | 18.69 |
| Configuration | R@1 | R@5 | MRR |
|---|---|---|---|
| Top-20 pair reranker | 23.66 | 49.33 | 36.03 |
| Top-20 pair + coverage | 24.95 | 51.95 | 37.66 |
| Top-20 coverage 2 control | 26.18 | 54.29 | 39.25 |
| Top-20 score-only tree | 28.03 | 55.55 | 40.72 |
| Top-20 feasibility reranker | 30.62 | 57.50 | 43.00 |
| Metric | Seed 21 | Seed 22 | Seed 23 | Mean | Train mean | Zero |
|---|---|---|---|---|---|---|
| R@1 | 21.16 | 20.49 | 20.78 | 20.81 0.34 | 13.88 0.13 | 5.96 3.45 |
| R@5 | 46.50 | 45.55 | 44.12 | 45.39 1.20 | 31.16 0.61 | 17.10 8.22 |
| R@20 | 72.11 | 71.92 | 69.62 | 71.22 1.39 | 51.99 0.55 | 37.17 8.45 |
| MRR | 33.29 | 32.67 | 32.39 | 32.78 0.46 | 22.63 0.27 | 12.92 5.10 |
| Bal. R@1 | 13.76 | 13.64 | 13.95 | 13.79 0.15 | 4.96 0.14 | 3.16 0.94 |
| Molecule target | R@1 | R@5 | R@20 | MRR |
|---|---|---|---|---|
| ChemBERTa-MLM mean | 23.18 | 48.14 | 69.80 | 35.09 |
| ChemBERTa-MTR mean | 25.36 | 50.72 | 71.12 | 37.32 |
| Binary chiral Morgan r2 | 40.52 | 64.89 | 81.53 | 52.04 |
| Count Morgan r2 + atom pair | 41.04 | 68.58 | 83.53 | 53.77 |
| Morgan r2 + path + MACCS | 42.65 | 67.62 | 82.56 | 53.96 |
| Four-block composite, r3 | 45.12 | 70.23 | 84.32 | 56.71 |
| Training arm | R@1 | R@5 | R@20 | MRR |
|---|---|---|---|---|
| Original 20,000-spectrum control | 45.58 | 70.80 | 85.49 | 57.19 |
| Full coverage, molecule-balanced | 49.37 | 74.62 | 88.81 | 60.61 |
| Full coverage, all rows | 51.62 | 74.92 | 88.30 | 62.28 |
| Stratifier | Fifth | Groups | Spectra | Real | Wrong | Real wrong |
|---|---|---|---|---|---|---|
| Training proximity | Lowest | 78 | 307 | 5.56 | 0.29 | 5.27 |
| Training proximity | Highest | 78 | 1005 | 18.39 | 16.41 | 1.98 |
| Donor–target similarity | Lowest | 77 | 231 | 10.06 | 0.79 | 9.27 |
| Donor–target similarity | Highest | 79 | 904 | 21.42 | 23.00 |
| Method | Real | Wrong | Zero | Train mean | Query uplift | Balanced uplift |
|---|---|---|---|---|---|---|
| SCCF (Stage 1 ensemble) | 15.08 | 12.36 | 3.20 | 7.29 | 2.65–2.78 ∗ | 5.44–5.68 ∗ |
| MSAlign ensemble | 17.31 | 13.63 | 7.75 | 11.28 | 3.62–3.71 ∗ | 7.44–7.74 ∗ |
| EmbCos ensemble | 9.15 | 6.15 | 1.86 | 0.19 | 2.93–3.09 ∗ | 5.89–5.99 ∗ |
| Support-gated feasibility reranker (final) | 21.35 | 13.09 | 3.81 | 7.89 | 8.21–8.31 ∗ | 15.27–15.39 ∗ |
| Proximity | Queries | Connectivities | Stage 1 R@1 | Stage 1 R@20 | Final R@1 |
|---|---|---|---|---|---|
| 236 | 34 | 5.93 | 19.92 | 8.90 | |
| 3286 | 810 | 6.15 | 41.08 | 14.52 | |
| 6746 | 1510 | 14.04 | 70.92 | 27.35 | |
| 5012 | 636 | 36.21 | 92.12 | 45.19 | |
| 4149 | 227 | 35.19 | 92.75 | 36.11 |
| Cohort | Metric | Full train | Targeted removal | Random removal |
|---|---|---|---|---|
| A (200) | R@20 | 93.14 | 62.04 | 91.02 |
| A (200) | R@1 | 31.53 | 4.94 | 29.55 |
| B-clean (2,691) | R@20 | 61.46 | 61.98 | 61.10 |
| B-clean (2,691) | R@1 | 13.12 | 14.00 | 14.23 |
| B-spill (293) | R@20 | 89.95 | 66.16 | 89.41 |
| B-spill (293) | R@1 | 39.09 | 10.15 | 37.21 |
| Split | Stratum | Queries / conn. | Stage 1 ens. | MSAlign | MSAlign ens. | Final |
|---|---|---|---|---|---|---|
| Validation | CE present | 9,975 / 2,370 | 10.99 (11.20) | 14.76 (15.01) | 16.58 (16.69) | 24.55 (26.78) |
| Validation | CE missing | 9,454 / 1,080 | 35.35 (27.18) | 36.83 (28.67) | 38.41 (30.04) | 38.68 (36.99) |
| Test | CE present | 10,162 / 2,339 | 13.70 (12.45) | 15.30 (15.03) | 16.57 (16.35) | 26.52 (28.03) |
| Test | CE missing | 7,394 / 894 | 31.05 (25.39) | 35.66 (25.41) | 35.73 (26.90) | 37.29 (32.39) |
| Cap | Mean proposals | Peak recall | Intensity recall | Retention |
|---|---|---|---|---|
| 32 | 31.40 | 15.89 | 24.25 | 69.79 |
| 64 | 57.34 | 23.01 | 31.31 | 90.09 |
| 128 | 78.44 | 26.47 | 34.40 | 98.99 |
| Untruncated | – | 26.88 | 34.75 | 100.00 |
| Configuration | R@1 | MRR |
|---|---|---|
| SCCF + coverage | 52.26 | 63.23 |
| Coverage 2 | 53.83 | 64.25 |
| Coverage + local loss only | 53.93 | 64.28 |
| Coverage + listwise + 0.1 local loss | 53.78 | 64.23 |
| Tree, 10 score features | 54.96 | 64.92 |
| Tree, 36 features | 56.67 | 65.99 |
| Space | C10 | C25 | Ord. | |
|---|---|---|---|---|
| Raw Morgan-r2 | 63.68 | 67.19 | 67.94 | 0.4095 |
| Raw SCCF | 64.48 | 69.19 | 70.34 | 0.4267 |
| Raw MolDeBERTa | 55.45 | 58.01 | 65.10 | 0.4595 |
| MSAlign seed 20260621 | 58.57 | 59.80 | 75.97 | 0.5767 |
| MSAlign seed 20260622 | 58.00 | 59.69 | 75.63 | 0.5814 |
| MSAlign seed 20260623 | 56.75 | 58.91 | 75.29 | 0.5892 |
| Method | Params | Time | Storage |
|---|---|---|---|
| SCCF | 19.24 | 71.12 | 27.76 |
| MSAlign | 13.79 | 101.27 | 18.57 |
| EmbCos | 13.71 | 18.95 | 3.44 |
Mass Spectrometry
Mass spectrometry measures ion mass-to-charge patterns to identify and quantify molecules, with AI linking spectra to structures, peptides, and biological signals.
See all 41 papers