Transferable Mass Spectrum Prediction via Reference-Guided Test-time Specialization
Organizations: The Hong Kong University of Science and Technology (Guangzhou) · The University of Hong Kong · South China University of Technology · Hong Kong Polytechnic University · Jinan University · The Hong Kong University of Science and Technology
Abstract
Tandem mass spectrum prediction supports compound identification across metabolomics, natural-product discovery, and environmental analysis. However, pretrained predictors often degrade under shifts in chemical space and acquisition conditions, while retraining domain-specific models from scratch is costly. We introduce SPARC, a retrieval-guided test-time specialization framework that adapts a pretrained predictor using a spectral reference library without accessing test-query spectra. For each target query, SPARC retrieves chemically related reference spectra to recalibrate fragment intensities within the learned fragmentation space. During Transfer, SPARC combines reference-guided spectral adaptation with reliability-aware consistency, using reconstruction behavior on retrieved spectra to selectively preserve trustworthy predictions during continual specialization. Across MassSpecGym, NPLIB1 and application-specific GNPS libraries, SPARC improves spectral prediction under multiple transfer settings. These results establish retrieval-guided test-time specialization as a practical strategy for extending pretrained MS/MS predictors to specific chemical and acquisition domains, with continual test-time training providing further refinement during deployment.
Figures & tables
| Method Entropy MSE EntSim CosSim MSG MSG-MNa (MSG initialized) NEIMS 4.150 14.461 0.072 0.072 GrAFF-MS 4.134 15.822 0.075 0.071 FIORA 3.015 1.020 0.063 0.071 Iceberg–MSG 3.461 1.242 0.180 0.280 Iceberg–MNa 2.485 1.006 0.262 0.348 SPARC (val) 2.715 0.895 0.274 0.370 SPARC -TTT 2.923 0.882 0.284 0.376 Iceberg(tent) 2.077 1.183 0.229 0.290 Iceberg(cotta) 3.419 1.189 0.191 0.288 | Method Entropy MSE EntSim CosSim MSG NPLIB1 (MSG initialized) NEIMS 3.568 20.246 0.392 0.363 GrAFF-MS 3.396 21.170 0.330 0.280 FIORA 1.900 1.317 0.369 0.412 Iceberg-MSG 3.586 1.269 0.470 0.517 Iceberg-NPLIB1 3.516 1.217 0.521 0.586 SPARC (val) 3.112 1.063 0.559 0.630 SPARC –TTT 3.128 1.041 0.575 0.650 Iceberg(tent) 3.052 1.252 0.490 0.517 Iceberg(cotta) 3.560 1.245 0.472 0.518 |
| Method Entropy MSE EntSim CosSim MSG M+H (MSG initialized) NEIMS 3.982 16.180 0.184 0.162 GrAFF-MS 3.756 16.713 0.169 0.137 FIORA 1.742 0.917 0.434 0.460 Iceberg–MSG 3.477 0.853 0.462 0.529 SPARC (val) 2.866 0.907 0.494 0.532 SPARC –TTT 2.794 0.880 0.505 0.547 | Method Entropy MSE EntSim CosSim NPLIB1 (NPLIB1 initialized) NEIMS 3.349 20.652 0.324 0.280 GrAFF-MS 3.521 19.689 0.384 0.362 FIORA 1.596 1.237 0.419 0.484 Iceberg-NPLIB1 3.516 1.217 0.521 0.586 SPARC (val) 2.925 1.107 0.559 0.616 SPARC –TTT 2.944 1.092 0.565 0.628 |
| DoA | 3HAA | ECG | GNPS-A/B | SC-FDA | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Method | MSE | EntSim | Cos | MSE | EntSim | Cos | MSE | EntSim | Cos | MSE | EntSim | Cos | MSE | EntSim | Cos |
| NEIMS | 19.90 | 0.198 | 0.127 | 12.84 | 0.386 | 0.382 | 34.33 | 0.184 | 0.145 | 18.05 | 0.409 | 0.242 | 14.75 | 0.148 | 0.110 |
| GrAFF-MS | 19.98 | 0.149 | 0.084 | 15.23 | 0.238 | 0.173 | 34.49 | 0.145 | 0.117 | 19.84 | 0.324 | 0.179 | 15.57 | 0.157 | 0.107 |
| FIORA | 1.078 | 0.427 | 0.458 | 0.935 | 0.395 | 0.397 | 2.836 | 0.140 | 0.117 | 1.009 | 0.393 | 0.488 | 0.893 | 0.362 | 0.405 |
| Iceberg | 1.057 | 0.415 | 0.483 | 0.904 | 0.490 | 0.509 | 2.621 | 0.178 | 0.223 | 0.960 | 0.504 | 0.511 | 0.925 | 0.322 | 0.379 |
| SPARC | 1.058 | 0.482 | 0.509 | 0.901 | 0.508 | 0.514 | 2.654 | 0.205 | 0.246 | 0.919 | 0.534 | 0.569 | 0.839 | 0.389 | 0.435 |
| Method | MSE | EntSim | CosSim |
|---|---|---|---|
| -similarity-based support retrieval | 0.9859 | 0.2595 | 0.3441 |
| -support-calibrated bin confidence | 0.8889 | 0.2637 | 0.3514 |
| -stochastic restoration | 0.8840 | 0.2720 | 0.3692 |
| -per-query rollback | 0.8977 | 0.2656 | 0.3631 |
| SPARC | 0.8804 | 0.2742 | 0.3755 |