MADGEN: Mass-Spec attends to De Novo Molecular generation

Authors: Yinkai Wang, Xiaohui Chen, Liping Liu, Soha Hassoun
Primary area: applications to physical sciences (physics, chemistry, biology, etc.)
Keywords: AI4Science, Biology Discovery, Metabolomics, MS/MS spectra

Abstract:
The annotation (assigning structural chemical identities) of MS/MS spectra remains a significant challenge due to the enormous molecular diversity in biological samples and the limited scope of reference databases.  Currently, the vast majority of spectral measurements remain in the "dark chemical space" without structural annotations.  To improve annotation, we propose MADGEN (Mass-spec Attends to De Novo Molecular GENeration), a scaffold-based method for de novo molecular structure generation guided by mass spectrometry data. MADGEN operates in two stages: scaffold retrieval and spectra-conditioned molecular generation starting with the scaffold. In the first stage, given an MS/MS spectrum, we formulate scaffold retrieval as a ranking problem and employ contrastive learning to align mass spectra with candidate molecular scaffolds. In the second stage, starting from the retrieved scaffold, we employ the MS/MS spectrum to guide an attention-based generative model to generate the final molecule. Our approach constrains the molecular generation search space, reducing its complexity and improving generation accuracy. We evaluate MADGEN on three datasets (NIST23, CANOPUS, and MassSpecGym) and  evaluate MADGEN's performance with a predictive scaffold retriever and with an oracle retriever. We demonstrate the effectiveness of using  attention to integrate spectral information throughout the generation process to achieve strong results with the oracle retriever.

Decision: accept (poster)
Reviewer scores: 6, 6, 6, 6

Reviews and discussion:
<thread>
creation date:
1730561000166

thread_type:
official_review

<thread_object>
creator: reviewer_hw4z

<content>
summary:
The paper presents MADGEN, a method for de novo molecular structure generation using MS/MS data to address challenges in spectral annotation. MADGEN operates in two stages: scaffold retrieval via contrastive learning and attention-based generation using the MS/MS spectrum. Evaluated on NIST23, CANOPUS, and MassSpecGym datasets, MADGEN shows strong performance, particularly with an oracle retriever, improving annotation by leveraging spectral data effectively.

strengths:
1. The task of de novo generation of molecular structure from mass spectrum is important and challenging.  However, the AI community has not paid enough attention to this task.       
2. The two-stage molecule structure generation method is novel.

weaknesses:
1. The authors have not compared with previous de novo molecular elucidation methods from MS such as MSNovelist [1], Spec2Mol [2], MIST [3], etc.
2. manuscript’s presentation requires significant improvement for publication readiness:
    (1) Line 14 - Line 50: Double quotation marks should be directional.            
    (2) Line 242 - Line 243: Why the word 'Following' is underlined?       
    (3) Why there is $T$ in Eq. (6)?              
    (4) \citep is used for parenthetical citations while \citet is used for textual citations, where the citation is part of the sentence. The authors are suggested to use these two commands appropriately to ensure clarity in their references and maintain consistency in citation formatting.             
    (5) Line 102: The “F” in “Generative Frameworks for molecular generation” should be lowercase.             
3. The code is not provided for reproducing the results.     

[1]. MSNovelist: de novo structure generation from mass spectra (Nature Methods)    
[2]. An end-to-end deep learning framework for translating mass spectra to de-novo molecules (Communications Chemistry)  
[3]  Annotating metabolite mass spectra with domain-inspired chemical formula transformers (Nature Machine Intelligence)

questions:
See the weakness above.
</content>
</thread_object>

</thread>
<thread>
creation date:
1730588698614

thread_type:
official_review

<thread_object>
creator: reviewer_rwgk

<content>
summary:
The paper introduces MADGEN, a framework for de novo molecular structure generation from mass spectrometry data. MADGEN employs a two-stage approach: first, it retrieves a molecular scaffold, and second, it completes the molecule conditioned on both the scaffold and the MS/MS spectra. Evaluated on datasets like NIST23, CANOPUS, and MassSpecGym, MADGEN effectively reduces search complexity and enhances accuracy.

strengths:
1. The two-stage approach of scaffold retrieval followed by scaffold-conditioned molecular generation presents a novel solution for de novo molecular structure prediction.
2. The paper is well-written and easy to follow.
3. The model is evaluated on multiple datasets, and a detailed ablation study is provided.

weaknesses:
1. The scaffold retrieval performance, especially when using a predictive retriever, remains relatively low (e.g., NIST23).
2. The discussion of baselines is unclear.

questions:
1. In Section 3.2.1, the authors state, “Since the atom set V can be directly inferred from the chemical formula.” However, it is unclear where the chemical formula is derived from. Could the authors clarify this, as in real-world scenarios, the input typically does not contain the chemical formula?
2. For the MassSpecGym dataset, what is the “best published state-of-the-art performance” referred to? Are there baseline performance metrics reported for the other two datasets as well?
</content>
</thread_object>

</thread>
<thread>
creation date:
1730641658087

thread_type:
official_review

<thread_object>
creator: reviewer_t2ej

<content>
summary:
This paper introduces MADGEN, a method for de novo molecular generation using mass spectrometry data. MADGEN simplifies the structure generation process by retrieving molecular scaffolds and building complete molecules upon them. The experimental results on three datasets demonstrate that MADGEN can effectively generate accurate molecular structures when the scaffold is known.

strengths:
- The use of scaffolds for simplifying molecular generation is a novel and effective strategy that reduces complexity.
- The paper is clear and easy to understand.

weaknesses:
- The method lacks a comparison with other baselines.

questions:
- I would appreciate it if you could include a comparison of MADGEN with other prediction methods.
</content>
</thread_object>

</thread>
<thread>
creation date:
1730682765806

thread_type:
official_review

<thread_object>
creator: reviewer_h3zi

<content>
summary:
This study presents MADGEN, a two-stage framework for generating molecular structures from MS/MS data. In the first stage, MADGEN retrieves a scaffold using either predictive retrieval or oracle retrieval. In predictive retrieval, MADGEN treats scaffold selection as a ranking task, using contrastive learning to align embeddings of mass spectra and scaffold candidates in a shared latent space, scoring each scaffold to identify the best match. Oracle retrieval, by contrast, directly uses RDKit to extract the correct scaffold from a molecular graph. In the second stage, starting from the retrieved scaffold, MADGEN generates the full molecular structure through a Markov bridge-based expansion, sequentially adding atoms and bonds with classifier-free guidance to integrate spectral information. Evaluations were performed on datasets NIST23, CANOPUS, and MassSpecGym, underscoring its potential in metabolomics and drug discovery applications.

strengths:
* The two-stage idea is interesting.
* The oracle retrieval method is more effective.

weaknesses:
* The SPA of the predictive retrieval is very low.
* The predictive retrieval approach yields poor molecule generation in Phase 2, where the generated structures fail to align with target properties, underscoring a critical limitation.
* The conditioning of molecular generation on mass spectrometry data is largely based on classifier-free guidance, a well-established technique. The novelty is not well articulated.

questions:
* How is the candidate scaffold pool determined for predictive retrieval? There can be a huge number of scaffold candidates.
* How does the contrast learning work for aligning the embeddings of mass spectra with their corresponding molecule? Some explanations are needed. 
* Regarding molecular generation in Phase 2, the absorbing transition matrix only applies to isolated atoms, strictly enforcing scaffold structure. Will such a hard constraint be problematic especially when the chosen scaffold is incorrect?
* Oracle retrieval requires both the MS/MS spectrum and the chemical formula (molecular graphs). If chemical formula is known, what are the remaining challenging in solving the molecular structures?
</content>
</thread_object>

</thread>
<thread>
creation date:
1732399215437

thread_type:
official_comment

<thread_object>
creator: authors

<content>
title:
General response

comment:
We thank all reviewers for your time in reviewing our submission and your valuable comments that help improve our work. We have made changes accordingly, which can be found in the updated draft as well as the individual response to each reviewer. Here we’d like to summarize the changes based on the suggestions. We further clarify the addressed task and motivation, and summarize the contribution(novelty and performance) of MADGEN.

## Changes

---
- **Including more baselines**: We added comparisons with additional state-of-the-art methods, including MSNovelist[1] and Spec2Mol[2], and provided detailed performance metrics (e.g., Top-1 accuracy, similarity, and MCES) across datasets. These comparisons highlight the consistent improvement of our method over existing techniques. **(per t2EJ, RWgk, HW4z)**
- **Improving Predictive retrieval performance on NIST23**: We identified and corrected a numerical issue in the NIST23 scaffold retrieval experiments, leading to improved results that are now included in the manuscript. **(per H3Zi, RWgk)**
- **Paper presentation**: We enhanced the clarity and readability of the manuscript by addressing all editorial suggestions, fixing typographical errors, and expanding explanations of our methodology and results. **(per HW4z)**
- **Code upload**: We provide the code implementation via https://anonymous.4open.science/r/abc-482F **(per HW4z)**

---

## Contributions

- **Task and motivation**: Mass spectra annotation is a critical task in fields such as metabolomics, drug discovery, and environmental analysis. Accurately annotating mass spectra enables researchers to identify molecular structures from spectral data, facilitating the discovery of novel compounds and the characterization of biochemical pathways. Despite its importance, the task remains highly challenging due to the vast chemical space, the ambiguity of molecular fragmentations, and the lack of annotated spectral databases for many compound classes. Scaffold retrieval plays a vital role in this process by narrowing down the candidate space and guiding downstream molecular generation tasks. By identifying the correct scaffold, our approach lays a strong foundation for generating plausible molecular structures, thereby advancing the broader goal of automating mass spectra annotation.

- **Novelty and performance**: MADGEN aims at the challenging task of mass spectra annotation, focusing specifically on scaffold retrieval as a key component. The primary innovation of our approach is the introduction of a two-stage generative retrieval framework, which separates scaffold retrieval (Stage 1) and scaffold-based molecular generation (Stage 2). This design allows us to explore architectural innovations for embedding alignment and spectrum-molecule interaction. While the overall accuracy for the task is low due to the inherent difficulty of mass spectra annotation, our method achieves significantly better performance compared to existing baselines, showcasing its effectiveness and potential in tackling this complex problem.
</content>
</thread_object>

</thread>
<thread>
creation date:
1733008444218

thread_type:
official_comment

<thread_object>
creator: authors

<content>
title:
Thanks for your time and feedbacks!

comment:
Dear Reviewers,

Thank you once again for taking the time to review our work and providing detailed comments and feedback.

During the rebuttal process, we have carefully addressed each of your points and hope that our responses have resolved your concerns. If there is anything that remains unclear or if you have further questions, we would be more than happy to discuss them.

As the discussion period is nearing its end, we kindly ask that you review our responses and let us know if they adequately address your concerns.

We sincerely appreciate your time and effort. Wishing you a wonderful day!

Best,
The Authors
</content>
</thread_object>

</thread>


Metareview:
metareview:
The paper introduces MADGEN, a two-stage framework for de novo molecular structure generation from MS/MS data, leveraging scaffold retrieval and attention-based molecular generation. It shows promise in metabolomics and drug discovery.

Strengths include the novel two-stage approach, effective use of scaffolds to simplify molecular generation, and strong performance with an oracle retriever.

The manuscript also requires improvement for publication readiness, and more clear discussion of baselines.

The decision to accept is based on the paper's novel approach to a significant challenge, strong performance in certain conditions, and potential impact on the field.