Prediction of mass spectra using large chemical language models and verification of adaptability in data-scarce domains

S Satoki Muto (The University of Tokyo , Bunkyo, Tokyo 113-8654,) A Akiko Kumada (The University of Tokyo , Bunkyo, Tokyo 113-8654,) M Masahiro Sato (The University of Tokyo , Bunkyo, Tokyo 113-8654,)

Abstract

Machine learning methods for predicting the electron ionization mass spectra from molecular structures have shown promise for environmental chemical identification, but their performance under domain-specific data scarcity remains poorly understood. We systematically compare a conventional multilayer perceptron model (NEIMS) with a Transformer-based chemical foundation model (MolFormer-XL) for the electron ionization mass spectrometry spectrum prediction under controlled few-shot conditions. Using fluorine-containing molecules as a broader proxy domain, including a PFAS-like subset, motivated by the practical challenge of detecting novel fluorinated contaminants with limited reference data, we vary the number of domain-specific training examples from 5 to 175 while maintaining fixed validation and test sets. Across all few-shot conditions and three of four evaluation metrics (weighted cosine similarity, intensity-weighted precision, and top-10 precision), MolFormer-XL consistently outperforms NEIMS, while intensity-weighted recall remains comparable between the two models. The largest performance gaps are observed in extreme data-scarcity regimes. These results demonstrate that MolFormer-XL, which combines pre-trained molecular representations with a Transformer-based architecture and learned SMILES embeddings, provides a promising approach for transfer under severe domain-specific data scarcity in environmental mass spectrometry.

Article Details

Volume / Issue Vol. 129, Issue 5
Published August 03, 2026
ISSN 0003-6951
Publisher American Institute of Physics

Journal Info

Applied Physics Letters

American Institute of Physics

ISSN: 0003-6951 Physical Sciences

Authors (3)

S

Satoki Muto

The University of Tokyo , Bunkyo, Tokyo 113-8654,

A

Akiko Kumada

The University of Tokyo , Bunkyo, Tokyo 113-8654,

M

Masahiro Sato

The University of Tokyo , Bunkyo, Tokyo 113-8654,