Manuscript Offprint

arXiv:2610.37979

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

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

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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.

autonlab/msms-retrieval

1 Introduction

Tandem mass spectrometry (MS/MS) identifies a small molecule by fragmenting it and measuring the resulting fragment ions. Retrieval casts identification as ranking candidate structures against a query spectrum [5]. To overcome the small size of spectral libraries, Bushuiev et al. [6] developed a spectrum foundation model, DreaMS, pretrained on millions of unlabeled spectra, which Krzakala et al. [30] subsequently proposed to align with a molecule foundation model by learning a projection into a shared embedding space.

This rationale is borrowed from vision–language, where aligning frozen unimodal encoders rivals joint pretraining [67, 52]. More broadly, it echoes the Platonic Representation Hypothesis [24]. Kalia et al. [25] state outright that molecules and their spectra are “views of the same data.” These parallels motivate a closer examination of the assumptions behind transferring frozen-encoder alignment to molecule–spectrum retrieval, and of where those assumptions may break down.

Contributions. We audit this pipeline on MassSpecGym with spectrum encoders retrained free of test-fold contamination. (i) Satisfying the common assumptions is difficult in practice; frozen alignment instead relies on separability and metric compatibility ( §2§2). (ii) We introduce MS-JEPA, a cross-condition predictive spectrum encoder, and prove that such objectives fix molecular identity without fixing the metric ( §3§3). (iii) Measured, the two properties come apart: MS-JEPA separates molecules most strongly, yet retrieves worst when frozen ( §4§4). (iv) The candidate objective rewards a spectrum-independent prior over the benchmark's decoys, which a spectrum-blind control isolates

40th Conference on Neural Information Processing Systems (NeurIPS 2026). Workshop: Representations for the Physical Sciences Workshop.

(§5). (v) End-to-end training makes spectrum pretraining nearly irrelevant, while simulated spectra of 5.9M molecules double a fresh encoder's MRR (§6).

References (61)

  • Hsu, Q. Xu, A. Babu, J. Gu, and M. Auli
  • DiffMS: Diffusion generation of molecules conditioned on mass spectra
  • How well can we predict mass spectra from structures? Benchmarking competitive fragmentation modeling for metabolite identification on untrained tandem mass spectra
  • Bridges-2: A platform for rapidly-evolving and data intensive research
  • Liu, J. Rousu, W. Bittremieux, H. Röst, T. D. Mak, S. Hassoun, F. Huber, J. J. J. van der Hooft, M. A. Stravs, S. Böcker, J. Sivic, and T. Pluskal
  • Self-supervised learning of molecular representations from millions of tandem mass spectra using DreaMS
  • FLARE: Fine-grained Learning for Alignment of spectra-molecule REpresentation enhances metabolite annotation
  • ChemBERTa: Large-scale self-supervised pretraining for molecular property prediction (opens arXiv in a new tab)
  • Tandem mass spectrometry approaches for recognition of isomeric compounds mixtures
  • Vision transformers need registers
  • Searching molecular structure databases with tandem mass spectra using CSI:FingerID
  • Self-supervised learning of Split Invariant Equivariant representations
  • seq-JEPA: Autoregressive predictive learning of invariant-equivariant world models
  • Benchmarking MS/MS featurization strategies for machine learning-driven metabolite structure annotation
  • Annotating metabolite mass spectra with domain-inspired chemical formula transformers
  • Generating molecular fragmentation graphs with autoregressive neural networks
  • EPA’s DSSTox database: History of development of a curated chemistry resource supporting computational toxicology research
  • Confronting spurious evaluations of computational methods in small molecule mass spectrometry
  • Momentum contrast for unsupervised visual representation learning
  • Reusability report: Annotating metabolite mass spectra with domain-inspired chemical formula transformers
  • Deep networks with stochastic depth
  • Spec2Vec: Improved mass spectral similarity scoring through learning of structural relationships
  • MS2DeepScore: a novel deep learning similarity measure to compare tandem mass spectra
  • Position: The Platonic Representation Hypothesis
  • JESTR: Joint Embedding Space Technique for Ranking candidate molecules for the annotation of untargeted metabolomics data
  • MiniMol: A parameter-efficient foundation model for molecular learning (opens arXiv in a new tab)
  • Back into Plato’s Cave: Examining cross-modal representational convergence at scale (opens arXiv in a new tab)
  • Similarity of neural network representations revisited
  • Coverage bias in small molecule machine learning
  • MSAlign: Aligning molecule and mass spectra foundation models for metabolite identification (opens arXiv in a new tab)
  • Fine-tuning can distort pretrained features and underperform out-of-distribution
  • Closing the modality gap for mixed modality search
  • Spectral entropy outperforms MS/MS dot product similarity for small-molecule compound identification
  • Mind the gap: Understanding the modality gap in multi-modal contrastive representation learning
  • MassSpecGym in the wild: Uncovering and correcting evaluation pitfalls in AI-driven molecule discovery (opens arXiv in a new tab)
  • Challenging common assumptions in the unsupervised learning of disentangled representations
  • Efficiently predicting high resolution mass spectra with graph neural networks
  • FiLM: Visual reasoning with a general conditioning layer
  • Molecular Sets (MOSES): A benchmarking platform for molecular generation models
  • On variational bounds of mutual information
  • Learning transferable visual models from natural language supervision
  • Large-scale chemical language representations capture molecular structure and properties
  • Shared Geometry As A Rosetta Stone: Cross-Modal Alignment Without Paired Data
  • An open-source family of large encoder-decoder foundation models for chemistry
  • COCONUT online: Collection of Open Natural Products database
  • Understanding the emergence of multimodal representation alignment
  • Domain randomization for transferring deep neural networks from simulation to the real world
  • Going deeper with image transformers
  • Representation Learning with Contrastive Predictive Coding
  • Data-efficient multimodal fusion on a single GPU. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 27239–27251, 2024
  • CFM-ID 4.0: More accurate ESI-MS/MS spectral prediction and compound identification
  • Weng, D. L. Plata, C. B. Clish, and C. W. Coley
  • MADGEN: Mass-spec attends to de novo molecular generation
  • HMDB 5.0: the Human Metabolome Database for 2022
  • CSU-MS $^{2}$: A contrastive learning framework for cross-modal compound identification from MS/MS spectra to molecular structures
  • Reconstruction vs. generation: Taming optimization dilemma in latent diffusion models
  • Tandem mass spectrum prediction for small molecules using graph transformers
  • FraGNNet: A deep probabilistic model for tandem mass spectrum prediction
  • Anisotropic modality align (opens arXiv in a new tab)
  • Modality gap-driven subspace alignment training paradigm for multimodal large language models (opens arXiv in a new tab)
  • MSBERT: Embedding tandem mass spectra into chemically rational space by mask learning and contrastive learning