Prediction of mass spectra using large chemical language models and verification of adaptability in data-scarce domains
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.
Authors
- Masahiro Sato (ORCID: https://orcid.org/0000-0001-9606-1104)
- Akiko Kumada (ORCID: https://orcid.org/0000-0002-9278-7319)
- 里樹 武藤
Institutions
- Bunkyo University (JP)
- The University of Tokyo (JP)
Publication Details
- Journal
- Applied Physics Letters
- Published
- 2026-08-03
- DOI
- https://doi.org/10.1063/5.0326955
- Primary Topic
- Mass Spectrometry Techniques and Applications
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- New Energy and Industrial Technology Development Organization
- Japan Society for the Promotion of Science