Skip to content

Spec2Mol

Summary

Spec2Mol is presented as the first approach to generate candidate molecular structures directly from mass spectra without relying solely on database retrieval, addressing the "unknown unknowns" problem: structure-elucidation methods that match spectra to reference libraries or predict a fingerprint for database lookup both fail on molecules absent from any structural database. Inspired by Speech2Text architectures, Spec2Mol pairs a spectrum encoder with a SMILES decoder pre-trained on a large corpus of unlabeled molecules, so it can propose structures de novo rather than only retrieve known ones [1].

Architecture

  • Decoder pre-training: an autoencoder (AE) is first pre-trained purely on chemical structures (independent of any spectra) to reconstruct SMILES sequences, learning a general-purpose molecular embedding space. On the NIST molecule set this pre-trained AE reconstructed SMILES with 93.3% exact-match accuracy (94.95% on its own held-out test set), confirming it captures the diversity of drug/metabolite-like chemical space.
  • Spectrum encoder training: an encoder is then trained to map MS/MS spectra (represented as vectors of fragment intensities, using up to four spectra per molecule from different experimental conditions) into the same embedding space the pre-trained AE already learned from structures — i.e., the encoder is trained to match spectra embeddings to structure embeddings rather than being trained jointly with the decoder from scratch.
  • Generation strategies: candidate structures are produced either directly (decoding the spectrum embedding through the pre-trained decoder) or indirectly (finding the nearest molecule embeddings from the pre-training corpus and decoding those). Combining both strategies performed best, though the indirect strategy contributed more on its own.

Evaluation

Because a spectrum may be compatible with more than one plausible structure, evaluation focused on whether generated structures capture key molecular features of the true (NIST) reference structure rather than requiring an exact match:

  • Physicochemical accuracy: generated structures' molecular weight and elemental composition tracked the reference closely — expected, since precursor mass is directly observable from the spectrum and structures were ranked by molecular-weight proximity.
  • Structural similarity: measured via Morgan fingerprint cosine similarity and maximum common substructure (MCS ratio, Tanimoto, overlap coefficient) between generated and reference structures, evaluated both at maximum (best of top predictions) and average (across all predictions) level.
  • Exact reconstruction: the exact reference structure was recovered for only ~7% of test cases, with correct molecular formula recovered for ~39.3%, underscoring that Spec2Mol is best understood as proposing structurally plausible candidates rather than reliably solving structure elucidation outright.
  • Effect of missing input spectra: performance was fairly robust to having 3 of 4 expected spectra available (correct-molecule rate actually highest at 15.2% with only 3 spectra, likely confounded by those cases skewing toward smaller/shorter molecules), but degraded when only 1–2 spectra were available (correct formula rate falling to 20.5% with a single spectrum).

Significance

Spec2Mol is cited by later template-guided generative methods (e.g., MetGenX) as the representative "spectrum-to-structure" de novo generation baseline — encoding a query spectrum and generating structure directly, in contrast to approaches that first retrieve structurally similar templates to guide generation.

Availability

Source code: github.com/KavrakiLab/Spec2Mol.

See Also

  • MetGenX — a later template-guided generative method that reframes spectrum-to-structure generation as structure-to-structure generation, citing Spec2Mol as the representative direct spectrum-to-structure baseline.
  • Small-Molecule Structure Elucidation — the broader task Spec2Mol addresses via a two-step fingerprint-prediction-and-retrieval alternative pipeline.

Citations

[1] Litsa, E.E., Chenthamarakshan, V., Das, P., & Kavraki, L.E. (2023). An end-to-end deep learning framework for translating mass spectra to de-novo molecules. Communications Chemistry, 6, 132.