Spectrum and molecule encoders do not align well for molecule identification

Separability Is Not Alignability: Representations for Spectrum-to-Molecule Retrieval

Machine Learning

Summary

It is hard to identify small molecules just from their mass spectra because there isn’t enough paired data linking spectra to molecules. The authors tested if separately trained encoders for spectra and molecules could be aligned to solve this problem, like some AI models do for images and text. They found the alignment is not straightforward because the ways these encoders learn do not guarantee a meaningful comparison across molecules. Instead, simulated data that mimics spectra helps more than just relying on pretrained encoders. So, the main takeaway is that simply combining separate representations of spectra and molecules doesn’t solve molecule identification.

What this means in practice

Authors

Karol Musielinski, Fanurs C. E. Teh, Takahiko Koyama, Artur Dubrawski

Abstract

Identifying a small molecule from its tandem mass spectrum is limited by paired data. Foundation models offer a way around this scarcity: pretrain a spectrum encoder on unlabeled spectra and a molecule encoder on a large corpus of structures, then align the two frozen representations, as in vision-language and as the Platonic Representation Hypothesis suggests. We audit this route on MassSpecGym with spectrum encoders retrained free of test-fold contamination. Alignment needs a metric relating distinct molecules, but the objectives that produce spectrum encoders never see molecular structure: we prove that some predictive objectives fix molecular identity without fixing that metric. Moreover, we find that a candidate-based objective rewards a spectrum-independent prior over the benchmark's decoys, which we isolate. What ultimately addresses data scarcity is not architectural: simulated spectra surpass frozen geometry.