Skip to main content
Back to timeline
bioRxivSource publication:

No structure needed first: Spec2Function reads metabolite function straight from tandem mass spectra, lifting explainable cirrhosis peaks past one quarter

Synopsis

Untargeted metabolomics has long required structural identification before pathway analysis, and incomplete spectral libraries leave many differential peaks outside downstream interpretation. Spec2Function aligns tandem mass spectra with multi-aspect functional text curated from HMDB in a shared space through dual-encoder contrastive learning, so a query spectrum needs no prior structural annotation at inference, and retrieval-augmented generation then produces literature-grounded functional summaries. On liver cirrhosis and a 30-organ macaque aging dataset it covered spectra beyond structural annotation and returned functional modules comparable across species.

Source-provided article image: Deciphering the Biological Function of Tandem Mass Spectra Using a Dual-Modal Metabolite Language Model
Fig. 1 · bioRxiv · Page 6

Interpretation

Untargeted liquid chromatography-tandem mass spectrometry metabolomics can infer the biological function of metabolites directly from tandem mass spectra without structural annotation, instead of waiting for identification before pathway analysis. Conventional workflows first assign structures to peaks and then run pathway or functional analysis on the identified subset; incomplete libraries, structural isomers and instrument variation leave only a minority of peaks with confident annotations, and the rest become hard-to-interpret functional dark matter. Among 442 differential tandem mass spectra in a liver cirrhosis plasma dataset, the identification-dependent workflow assigned structures to only 113 (25.6%), whereas Spec2Function produced a functional landscape for all 442 and recovered known disturbances in hepatic lipid, sterol and cholesterol metabolism.

The approach places tandem mass spectra and natural-language descriptions of metabolite function into one vector space, so a spectrum can retrieve functional text directly. Two encoders handle the two modalities: a spectral encoder built on MSBERT turns normalized m/z and intensity sequences into a fixed-length vector, and a text encoder built on SPECTER encodes template-generated HMDB functional text into a vector of the same dimension. Contrastive training pulls matched spectrum-text pairs together and pushes mismatched pairs apart across 2,332,722 pairs; at inference, cosine similarity searches 2,515,806 functional embeddings in FemDB, and queries below a 0.65 threshold return insufficient evidence instead of a prediction.

Retrieved functional fragments and PubMed literature are passed to a large language model, which writes a sourced functional summary rather than describing the spectrum from scratch. Single-spectrum mode takes the most similar functional fragments and retrieves related literature; set-level mode first clusters spectral embeddings without supervision, treats each cluster as a functional module, and then integrates the modules into a global biological overview. On a temporal holdout that froze HMDB v4 training and retrieval resources and tested 673 metabolites newly added in v5 (7,153 positive-ion tandem mass spectra), Spec2Function reached a mean similarity of 0.723, above DeepSeek-V3 at 0.717, CSU-MS2 at 0.679, the random control at 0.666 and GNPS at 0.649.

Perspective

The demonstrated scope is positive-ion tandem mass spectra: an external validation set of 404 metabolites, 673 temporally held-out v5 metabolites, 27 pathways, four human biofluids, and two real datasets covering liver cirrhosis and a 30-tissue female macaque aging atlas; the authors position it as a complementary route that runs alongside structural identification and prioritizes biologically relevant signals rather than replacing identification.

The functional embedding and retrieval space is constrained by the coverage and quality of curated HMDB text, so understudied metabolites and chemical regions distant from the represented knowledge may lack support; the current implementation is limited to positive ions and is largely human-centric, and the authors do not assume equivalent performance for species-specific metabolomes; severe loss or distortion of informative fragments can reduce retrieval support and trigger abstention; and the language-model interpretation should be treated as an evidence-grounded functional hypothesis rather than a definitive mechanistic assignment.