MSAlign: Aligning Molecular and Mass Spectra Foundation Models for Metabolite Identification
Paul Krzakala, Gabriel Melo, Camille Lançon, Charlotte Laclau, Rémi Flamary, Etienne A Thévenot, Florence d'Alché-Buc
NeurIPS page · Open on the map
Category: AI for Molecules, Materials & Genomics › Molecular and Spectral Data Integration · Type: new method · Keywords: molecular representation, mass spectrometry, contrastive learning, benchmark evaluation, metabolite identification
Areas: Evaluation & Benchmarks › Multidisciplinary Model Benchmarks › Biomolecular Benchmarks; AI for Science › Molecular Systems Modeling › Molecular Property Prediction
Summary
MSAlign aligns molecular and mass spectra foundation models for metabolite identification, providing a unified framework and improved performance on benchmarks.
Explained to a 5-year-old
Scientists want to know which tiny molecules are present in a sample of chemicals. They have two helpers: one that reads the picture of the molecules and another that reads the picture of the mass-spectrometry data. By making these helpers talk to each other, they can match the molecule picture with the data picture. This makes it easier to find the right molecule quickly and without confusing steps. The new method also helps researchers compare their results fairly.
Explained to a 5-year-old, longer
In chemistry, a metabolite is a tiny molecule that living things make or use. To find out which molecule is present, scientists look at a picture called a mass-spectrometry spectrum. They also have pictures of possible molecules that could match the spectrum. The challenge is to pick the right molecule from many possibilities. Recent methods try to do this, but they often use different steps and are hard to compare. This paper creates a simple, unified way to line up the two kinds of pictures. It uses two already-trained models: one that understands spectra and one that understands molecules. By adding a small bridge between them, the models learn to point to the same thing. The bridge is trained so that matching pairs of spectrum and molecule get close together, while wrong pairs stay apart. This makes the system fast to train and works well on several existing tests. The authors also study how the data is split for testing, showing a trade-off between leaking information and changing the difficulty. All the code, data, and test splits are made public so other scientists can repeat the work and improve it.
For a technical reader
The paper addresses the molecule retrieval problem in metabolomics, where the goal is to map an MS/MS spectrum to its underlying chemical structure from a candidate set. It proposes a unified framework that leverages representation alignment and contrastive learning to jointly embed spectral and molecular representations. The core idea is to align two frozen foundation models-one for spectra (e.g., DreaMS) and one for molecules (e.g., ChemBERTa)-using lightweight MLP projectors trained with a candidate-based contrastive loss. The approach simplifies implementation, accelerates training, and consistently outperforms existing baselines across benchmark datasets such as MassSpecGym and Spectraverse. Additionally, the authors formalize the trade-off between data leakage and domain shift in benchmark splits and release a quantitative shift metric, datasets, and code to promote reproducible evaluation.
Problem
Identifying metabolites from mass spectrometry data, specifically retrieving the chemical structure of a metabolite given its MS/MS spectrum among candidate molecules, remains challenging. Existing methods often rely on complex preprocessing pipelines and lack unified implementations, making reproduction and comparison difficult.
Method
The approach uses representation alignment and contrastive learning to learn a shared embedding space between mass spectra and molecular representations. It aligns two frozen foundation models (a mass spectra model and a molecular language model) via lightweight projection layers trained with a candidate-based contrastive objective. This yields a simple, fast-to-train framework that can be easily reproduced.
Results
The approach consistently outperforms existing methods on all benchmark datasets and achieves state-of-the-art performance across the evaluated tasks.
Contributions
A unified framework that integrates recent representation alignment and contrastive learning methods, and a new alignment technique that leverages frozen foundation models with lightweight projections trained via a candidate-based contrastive objective. Additionally, the work formalizes the trade-off between data leakage and domain shift in benchmark splitting and provides a quantitative measure to evaluate splitting strategies.
Practical relevance
The work enables more reliable metabolite identification for drug discovery, environmental monitoring, and clinical studies while providing reproducible benchmarks and code.
Research questions this paper is counted under
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction