# MolSpecFlow: Modality-Incomplete Molecular--Spectral Learning for MS/MS

*Yu Wang, Fan Yang, Kaikun Xu, Li Hao, Li Yuan, Jun Zhu, Jingjie Zhang, Zhenchao Tang, Yatao Bian, Cheng Chang, Jianhua Yao*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/149866) · [Open on the map](../papers.html#p149866)

Category: [AI for Molecules, Materials & Genomics](../pcat/8.md) › [Molecular and Spectral Data Integration](../pgroup/528.md) · Type: new method · Keywords: modality-incomplete learning, MS/MS annotation, molecular-spectral inference, mask-conditioned flow, tandem mass spectra

## Summary
MolSpecFlow is a mask-conditioned heterogeneous flow framework that jointly models molecules, spectra, and fingerprints as coupled components of a shared molecular-spectral state, enabling MS/MS annotation under modality-incomplete data.

## Explained to a 5-year-old
In chemistry, scientists make pictures of tiny molecules called spectra. Sometimes they only have part of the picture, like just the molecule or just the spectrum. This new method helps put those pieces together to guess what the molecule looks like. It works like a puzzle where missing pieces are marked, and it can guess new molecules, find matching spectra, or create new spectra. This helps scientists discover new chemicals faster.

## Explained to a 5-year-old, longer
In untargeted metabolomics, researchers generate many tandem mass spectra, which are like fingerprints of tiny molecules. Each spectrum only shows part of the information about the molecule, and sometimes scientists only have the molecule structure without its spectrum, or vice versa. This mismatch makes it hard to match spectra to the correct molecules. The paper introduces a way to handle these incomplete pieces by treating molecules, spectra, and fingerprints as different parts of a shared puzzle. It uses masks to indicate which parts are present in each example, allowing the model to focus on what is available. The model can perform three tasks: guess a new molecule from a spectrum, retrieve a molecule when given its spectrum, or simulate a spectrum from a known molecule. It combines a transformer that understands both molecular and spectral data with a flow-based process that smoothly moves between them. Additionally, it regularizes the predictions using expected mass and molecular formula information. Experiments show that training on incomplete data improves performance across all three tasks. The approach also works well when transferred to new, unseen data. This helps scientists identify more metabolites accurately and efficiently. Overall, the method makes it easier to piece together chemical information even when only partial data is available.

## For a technical reader
MolSpecFlow is a mask-conditioned heterogeneous flow framework that jointly models molecules, spectra, and fingerprints as coupled components of a shared molecular-spectral state. It leverages a shared Mol-Spec Transformer to encode both discrete molecular tokens and continuous spectral representations, while hybrid discrete-continuous flow dynamics propagate information through the state. Availability masks indicate which modalities are present in each training example, and observation masks control conditioning or generation for tasks such as de novo annotation, molecular retrieval, and spectrum simulation. The model is trained with expected mass/formula regularization to keep soft molecular token distributions chemically plausible. Experiments show consistent gains from modality-incomplete pretraining, multi-interface reuse, and external de novo transfer, demonstrating its effectiveness for MS/MS annotation.

## Problem
Assigning tandem mass spectra to molecular structures is challenging because each spectrum provides only a partial, instrument-dependent observation, and fully paired molecule-spectrum data are scarce, with many examples containing only molecular or only spectral information.

## Method
The approach represents molecules, spectra, and fingerprints as coupled components of a shared molecular-spectral state, using availability and observation masks to handle missing modalities. It employs a shared Mol-Spec Transformer, hybrid discrete-continuous flow dynamics, and expected mass/formula regularization over soft molecular token distributions.

## Results
The experiments demonstrate consistent improvements from modality-incomplete pretraining, multi-interface reuse, and external de novo transfer.

## Contributions
The paper introduces a unified framework for modality-incomplete molecular-spectral inference, a mask-conditioned heterogeneous flow formulation, and shows the benefits of multi-interface reuse and de novo transfer.

## Research questions this paper is counted under

- [How can we infer molecular structures from tandem mass spectrometry data?](../q/533.md)

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](../feedback/?on=p/149866)
