Bi-modal Variational Autoencoders for Metabolite Identification Using Tandem Mass Spectrometry

Svetlana Kutuzova, Christian Igel, Mads Eggert Nielsen, Douglas McCloskeybioRxiv 2021 · DOI

Abstract

A grand challenge of analytical chemistry is the identification of unknown molecules based on tandem mass spectrometry (MS/MS) spectra. Current metabolite annotation approaches are often manual or partially automated, and commonly rely on a spectral database to search from or train machine learning classifiers on. Unfortunately, spectral databases are often instrument specific and incomplete due to the limited availability of compound standards or a molecular database, which limits the ability of methods utilizing them to predict novel molecule structures. We describe a generative modeling approach that can leverage the vast amount of unpaired and/or unlabeled molecule structures and MS/MS spectra to learn general rules for synthesizing molecule structures and MS/MS spectra. The approach is based on recent work using semi-supervised deep variational autoencoders to learn joint latent representations of multiple and complex modalities. We show that adding molecule structures with no spectra to the training set improves the prediction quality on spectra from a structure disjoint dataset of new molecules, which is not possible using bi-modal supervised approaches. The described methodology provides a demonstration and framework for how recent advances in semi-supervised machine learning can be applied to overcome bottlenecks in missing annotations and noisy data to tackle unaddressed problems in the life sciences where large volumes of data are available.

Introduction

Identifying unknown molecules from tandem mass spectrometry (MS/MS) spectra remains a grand challenge in analytical chemistry. MS/MS works by fragmenting molecules and measuring the mass of the resulting pieces, creating a "spectral fingerprint." However, identifying the original structure from these fragments is difficult, with only ~2% of metabolites typically identified, leaving a vast "metabolomics dark matter." The primary bottleneck is the scarcity of paired data—known structures with corresponding spectra. While spectral databases are limited and instrument-specific, molecular databases contain millions of "unpaired" structures. Traditional supervised models cannot leverage this unpaired data, limiting their ability to generalize to novel molecules.

Methods

The authors propose a Semi-supervised Variational Autoencoder (SVAE) designed to learn a joint latent representation of molecular structures and MS/MS spectra. Unlike standard VAEs, this bi-modal approach handles two input types: molecular structures (represented as SMILES strings or fingerprints) and MS/MS spectra.

Overview of the SVAE and JMVAE architectures (A) and examples of bidirectional reconstructions (B).

The SVAE utilizes a Product of Experts (PoE) approach, enabling semi-supervised learning from both paired (spectrum + molecule) and unpaired (molecule only) data. This allows the model to leverage approximately 2 million biomolecules from the SIRIUS dataset alongside ~36,000 paired MS/MS spectra from MoNA and NIST libraries. The architecture was compared against the Joint Multi-modal VAE (JMVAE) to evaluate reconstruction and cross-modal prediction performance.

Results

A key finding is that incorporating 2 million unpaired molecules significantly improves the model's ability to predict structures from spectra. The SVAE essentially learns the "grammar" of chemical space, which enhances its spectral translations. In spectrum-to-molecule tasks, the semi-supervised SVAE achieved a mean fingerprint similarity of 0.185, a notable improvement over the 0.131 achieved by the supervised version.

The model is the first in the field to demonstrate bidirectionality, successfully generating candidate molecules from spectra (identification) and synthetic spectra from molecules (in-silico library generation). In benchmarking against the CASMI 2017 challenge, the bi-modal VAEs performed comparably to top-tier specialized methods, despite being a more flexible generative framework. Furthermore, the model demonstrated latent coherence by grouping chemically similar lipids and their corresponding spectra together in the latent space.

Discussion and Future Work

While promising, the model faces challenges with the complexity of SMILES strings, where minor character errors can lead to invalid chemical structures. Future work aims to transition from string-based representations to graph-based models (nodes and edges) to ensure higher chemical validity. Additionally, the authors propose incorporating instrument parameters (e.g., collision energy) as a third modality to account for spectral variability across different laboratory settings. This framework demonstrates how semi-supervised machine learning can overcome data bottlenecks to address fundamental problems in the life sciences.

Summary updated

Abstract

Abstract A grand challenge of analytical chemistry is the identification of unknown molecules based on tandem mass spectrometry (MS/MS) spectra. Current metabolite annotation approaches are often manual or partially automated, and commonly rely on a spectral database to search from or train machine learning classifiers on. Unfortunately, spectral databases are often instrument specific and incomplete due to the limited availability of compound standards or a molecular database, which limits the ability of methods utilizing them to predict novel molecule structures. We describe a generative modeling approach that can leverage the vast amount of unpaired and/or unlabeled molecule structures and MS/MS spectra to learn general rules for synthesizing molecule structures and MS/MS spectra. The approach is based on recent work using semi-supervised deep variational autoencoders to learn joint latent representations of multiple and complex modalities. We show that adding molecule structures with no spectra to the training set improves the prediction quality on spectra from a structure disjoint dataset of new molecules, which is not possible using bi-modal supervised approaches. The described methodology provides a demonstration and framework for how recent advances in semi-supervised machine learning can be applied to overcome bottlenecks in missing annotations and noisy data to tackle unaddressed problems in the life sciences where large volumes of data are available.
BibTeX
@misc{kutuzova2021bi,
  author = {Svetlana Kutuzova and Christian Igel and Mads Eggert Nielsen and Douglas McCloskey},
  title = {{Bi-modal Variational Autoencoders for Metabolite Identification Using Tandem Mass Spectrometry}},
  year = {2021},
  doi = {10.1101/2021.08.03.454944},
  howpublished = {bioRxiv},
}
Figure