Title: MS-BART: Unified Modeling of Mass Spectra and Molecules for Structure Elucidation
Venue: NeurIPS 2025
Accepted: yes
Keywords: AI4Science

Language Model

Metabolomics

MS/MS spectra
Abstract: Mass spectrometry (MS) plays a critical role in molecular identification, significantly advancing scientific discovery. However, structure elucidation from MS data remains challenging due to the scarcity of annotated spectra. While large-scale pretraining has proven effective in addressing data scarcity in other domains, applying this paradigm to mass spectrometry is hindered by the complexity and heterogeneity of raw spectral signals.
To address this, we propose MS-BART, a unified modeling framework that maps mass spectra and molecular structures into a shared token vocabulary, enabling cross-modal learning through large-scale pretraining on reliably computed fingerprint–molecule datasets. Multi-task pretraining objectives further enhance MS-BART's generalization by jointly optimizing denoising and translation task. The pretrained model is subsequently transferred to experimental spectra through finetuning on fingerprint predictions generated with MIST, a pre-trained spectral inference model, thereby enhancing robustness to real-world spectral variability. While finetuning alleviates the distributional difference, MS-BART still suffers molecular hallucination and requires further alignment. We therefore introduce a chemical feedback mechanism that guides the model toward generating molecules closer to the reference structure.
Extensive evaluations demonstrate that MS-BART achieves SOTA performance across 5/12 key metrics on MassSpecGym and NPLIB1 and is faster by one order of magnitude than competing diffusion-based methods, while comprehensive ablation studies systematically validate the model's effectiveness and robustness.
We provide the data and code at [https://github.com/OpenDFM/MS-BART](https://github.com/OpenDFM/MS-BART).

MS-BART: Unified Modeling of Mass Spectra and Molecules for Structure Elucidation

Abstract

Mass spectrometry (MS) plays a critical role in molecular identification, significantly advancing scientific discovery. However, structure elucidation from MS data remains challenging due to the scarcity of annotated spectra. While largescale pretraining has proven effective in addressing data scarcity in other domains, applying this paradigm to mass spectrometry is hindered by the complexity and heterogeneity of raw spectral signals. To address this, we propose MS-BART, a unified modeling framework that maps mass spectra and molecular structures into a shared token vocabulary, enabling cross-modal learning through large-scale pretraining on reliably computed fingerprint-molecule datasets. Multi-task pretraining objectives further enhance MS-BART's generalization by jointly optimizing denoising and translation task. The pretrained model is subsequently transferred to experimental spectra through finetuning on fingerprint predictions generated with MIST, a pre-trained spectral inference model, thereby enhancing robustness to real-world spectral variability. While finetuning alleviates the distributional difference, MS-BART still suffers molecular hallucination and requires further alignment. We therefore introduce a chemical feedback mechanism that guides the model toward generating molecules closer to the reference structure. Extensive evaluations demonstrate that MS-BART achieves SOTA performance across 5/12 key metrics on MassSpecGym and NPLIB1 and is faster by one order of magnitude than competing diffusion-based methods, while comprehensive ablation studies systematically validate the model's effectiveness and robustness. We provide the data and code at https://github.com/OpenDFM/MS-BART.

1 Introduction

Mass spectrometry is an analytical technique that measures the mass-to-charge ratio of ions, enabling the identification, quantification, and structural characterization of molecules. The identification of small molecules from mass spectrometry data represents a fundamental task in analytical chemistry, with broad applications across multiple domains, including drug discovery [1, 32, 39], environmental biochemistry [35], and materials science [21]. Recent advances in machine learning have enabled structure elucidation from mass spectra. Existing approaches can be broadly categorized into (1) retrieval-based methods and (2) de novo generative methods. Retrieval-based methods rely on matching query spectra against large annotated spectra databases. However, annotated experimental

55.0544

55.0545

58.0652

65.0386

65.0387

69.0696

69.0699

72.0444

72.0446

72.0807

72.0809

72.0811

82.0653

82.0655

86.0599

86.0601

86.0602

91.0543

100.0755

100.0756

100.0758

100.0759

103.0540

103.0541

117.0572

117.0573

118.0650

118.0651

118.0652

118.0653

128.0498

128.0500

128.0621

128.0622

128.0623

129.0699

129.0700

129.0701

145.0652

145.0654

146.0966

146.0968

155.0607

155.0608

155.0609

15.0

15.0

30.0

30.0

45.0

45.0

60.0

60.0

75.0

75.0

90.0

90.0

Collision Energy (eV)

0.0

0.2

0.4

0.6

0.8

1.0

Relative Intensity

spectra are scarce and costly to obtain [3]. In addition, these methods are inherently limited to known molecules and cannot identify novel structures absent from reference databases. De novo generation methods learn to generate molecular structures directly from mass spectra, offering the potential to discover new compounds. However, these generative models [39, 45, 13, 29] are also bottlenecked by the limited availability of high-quality experimental spectra.

In other domains such as natural language processing (NLP) and computer vision (CV), a common strategy to overcome data scarcity is to pretrain models on large-scale unlabeled data and then finetune them on task-specific datasets [8, 28, 6, 20, 19]. A similar paradigm can also be observed in nuclear magnetic resonance (NMR) structure elucidation [48], where the model is first pretrained on 3.6 million unlabeled molecules and then fine-tuned directly on simulated and experimental NMR data. However, adapting this paradigm to mass spectrometry remains challenging due to the intrinsic complexity and heterogeneity of mass spectra. As illustrated in Fig. 1, spectra for the same molecule can vary substantially under different collision energies, adduct types, or instrument settings, and may even fluctuate slightly under identical experimental conditions. To address this variability, we propose using molecular fingerprints as an intermediate representation of mass spectra. Fingerprints are binary vectors that encode the presence of chemical substructures. Unlike raw spectra, they are invariant to experimental conditions and can be reliably computed from molecular structures using cheminformatics toolkits such as RDKit. This eliminates the need to simulate mass spectra under diverse experimental settings[34, 17], enabling scalable pretraining dataset construction.

Building on this insight, we propose MS-BART, a unified framework for molecular structure elucidation from mass spectrometry data, following the pretraining-finetuning-alignment paradigm widely used in NLP. We first construct a large-scale pretraining dataset consisting of fingerprint-molecule pairs, where molecular fingerprints are computed for 4 million unlabeled molecules using RDKit. Based on this dataset, we design multi-task pretraining objectives to facilitate cross-modal learning between molecular fingerprints and molecular structures. For finetuning, we incorporate experimental mass spectrometry data by using MIST [18] to predict fingerprints from spectra, conditioned on associated metadata and molecular formulas. As these predicted fingerprints are subject to dataset-specific noise and systematic biases, we finetune the pretrained model using the predicted fingerprints as input, thereby improving its adaptability to real-world experimental conditions. Finally, the generated structures are prone to molecular hallucinations [15], where outputs are chemically valid but deviate from the true molecules. To address this, we introduce an alignment step that incorporates chemical feedback by assigning higher probabilities to structures more similar to the ground truth. In summary, our main contributions are as follows:

To the best of our knowledge, we are the first to leverage language model for mass spectra structure elucidation by introducing a unified vocabulary and multi-task pretraining on a large corpus of fingerprint-molecule pairs.

We finetune the model on experimental data and incorporate chemical feedback to align the generative distribution with real-world structural preferences.

We validate our approach on two public benchmarks, achieving SOTA performance across 5/12 key metrics on MassSpecGym[7] and NPLIB1[10] and is faster by one order of magnitude than competing diffusion-based methods.

2 Related Work

Mass Spectra Modeling. Mass spectra are variable-length, discrete, two-dimensional data, which makes them inherently challenging to model. A basic approach involves padding the two-dimensional matrix to a fixed length and projecting it into an embedding space via a linear layer [45]. A more common strategy is spectral binning, which partitions spectra into fixed-width intervals (e.g., 0.1 Da) to yield fixed-size input vectors [38]. For example, ChemEmbed [14] limits molecular weights to 700 Da, encodes spectra into a 7000-dimensional vector using a bin size of 0.01, and applies a convolutional neural network (CNN) to predict 300-dimensional Mol2vec embeddings. Similarly, Spec2Mol [29] and MS2DeepScore [23] convert spectra into bit vectors and train 1D CNNs or Siamese networks [5] to learn meaningful spectral embeddings. While binning is simple, it suffers from sparsity and sensitivity to noise, limiting its ability to capture chemically meaningful patterns. To overcome this, some methods leverage molecular fingerprints as intermediate representations that encode chemical substructures more robustly. CSI:FingerID [11] predicts molecular fingerprints from tandem mass spectra using fragmentation trees and machine learning, achieving strong performance in metabolite identification. MSNovelist [41] builds on this by integrating predicted fingerprints into an encoder-decoder model for de novo structure generation. Inspired by these approaches, MS-BART adopts molecular fingerprints as a spectrum representation, enabling scalable pretraining while preserving chemical semantics.

Structure Elucidation from Mass Spectra. Two major paradigms dominate structure elucidation from mass spectra: library matching and de novo generation. Library matching formulates the task as an information retrieval problem [40], comparing query spectra against databases of experimental or simulated spectra. Methods such as Spec2Vec [22] and MSBERT [49] learn spectrum embeddings and perform retrieval over databases like GNPS [44]. Due to the scarcity of experimental spectra, some methods (e.g., CFM-ID [43], GRAFF-MS [34]) simulate spectra from known molecular databases (e.g., PubChem). However, the effectiveness of library matching is constrained by database coverage, spectrum quality, and experimental variation, limiting its utility for novel compounds. In contrast, de novo approaches generate molecular structures directly from spectra, bypassing the need for reference databases. Spec2Mol [29] draws inspiration from speech-to-text models, employing an encoder-decoder network to translate spectra into SMILES sequences. MADGEN [45] uses a two-stage framework: scaffold retrieval and scaffold-conditioned molecule generation. Spectra and scaffolds are embedded into a shared latent space using MLPs and GNNs, and RetroBridge [24] generates the final structure conditioned on both inputs. Other models, including MSNovelist [41] and MS2SMILES [30], use fingerprints predicted by SIRIUS [9] as inputs to sequence models for SMILES generation. MS2SMILES further improves atom-level resolution by jointly predicting heavy atoms and their associated hydrogens. DiffMS [4] adopts an implicit fingerprint representation by extracting the final embedding from the precursor peak in MIST [18] and then generates the target structure by discrete diffusion conditioned on the spectrum embedding and node features (derived from the given formula). Despite promising results, most existing methods treat spectra and molecular structures as separate modalities, which often leads to semantic mismatches and molecular hallucinations [15]. In contrast, MS-BART unifies their modeling through a shared vocabulary. By pretraining on large-scale spectral fingerprint-molecule pairs, MS-BART learns rich representations for both chemical structures and their spectral abstractions. Subsequent finetuning and alignment on experimental spectra further enhance the model's ability to generate accurate and chemically consistent predictions on real-world data.

3 Methodology

Our framework is illustrated in Fig. 2. Section 3.1 introduces a unified vocabulary for representing both mass spectra and molecules. Section 3.2 describes multi-task pretraining with reliably computed fingerprints. Section 3.3 finetunes the model on experimental spectra to adapt to real-world distributions, while Section 3.4 further aligns molecular generation through chemical feedback.

Framework

MS-BART

MS-BART

Generative

Probability

Similarity

Rank Loss

Cross-Entropy Loss

intensity

m/z

Pretrained MIST

Model Inference









Figure 2: Overview of the MS-BART framework. Square symbols represent unified tokens, where ■ denotes SELFIES tokens, ■ indicates fingerprint tokens, and ■ represents a special separator token between SELFIES and fingerprint tokens. The □ symbol signifies padding tokens. Masked tokens are represented by striped patterns ( ). The top row illustrates pretraining tasks utilizing reliably computed fingerprints (Computed by RDKit), designed to enable MS-BART to capture fundamental patterns in both fingerprint and SELFIES representations. Transfer learning is subsequently applied to experimental spectra through finetuning and alignment to enhance structure elucidation performance.

3.1 Mass Spectra and Molecular Representation

Mass Spectra Representation. Raw mass spectra consist of variable-length sets of peaks { P 1 , P 2 , . . . , P k } , where each peak P i = ( M i , I i ) represents a mass-to-charge ratio ( m/z ) and a corresponding intensity. Due to noise and variability in experimental spectra, learning from raw spectra directly is challenging. In tandem mass spectrometry, precursor ions undergo collisioninduced dissociation (CID), producing charged product ions and uncharged neutral loss fragments. These fragmentation patterns reflect structural information and correspond to chemical fragment encoded in molecular fingerprint bits. Prior work [11, 18, 2] has explored on predicting molecular fingerprints from spectra by leveraging fragmentation information. Following this, we represent each spectrum as a 4096-bit circular Morgan fingerprint FP ∈ { 0 , 1 } 4096 , where each bit indicates the presence of a specific substructure. For experimental data, we employ the pretrained MIST model [18] to predict molecular fingerprints FP from mass spectra, conditioned on the chemical formula. The output of MIST is a probability vector { p 0 , . . . , p 4095 } , where each p i indicates the predicted likelihood of the i -th fingerprint bit being active. To convert these probabilities into a binary fingerprint representation, we apply a threshold ϵ :

Each activated bit ( FP i = 1 ) is converted into a fingerprint token of the form <fp{i:04d}> (e.g., <fp0123> ), producing a token sequence suitable for language modeling. We also compute the fingerprints from unlabeled molecules using RDKit [27] and apply the same tokenization for subsequent pretraining.

Molecular Representation. SMILES [46] and SELFIES [25] are two widely used string-based molecular representations. While SMILES is compact and human-readable, it does not guarantee chemical validity. In contrast, SELFIES is designed to ensure that every valid string maps to a chemically feasible molecule. We adopt SELFIES in MS-BART for its robustness and validity guarantees. To ensure consistency and uniqueness, we use the canonical form of each SELFIES string. Following [15], we employ a vocabulary of 185 SELFIES tokens. Although this is significantly smaller than typical language model vocabularies, prior work [37] shows that compact chemical vocabularies are sufficient for effective molecular representation learning.

3.2 Unified Multi-Task Pretraining on Reliably Computed Fingerprints

Given the tokenization approach described above, we tokenize mass spectra and molecular sequences by MIST [18] and the aforementioned vocabulary, respectively. As illustrated in Fig. 2, we design three self-supervised denoising tasks for pretraining to recover masked spans, along with one crossmodal translation task to strengthen modality alignment. We pretrain MS-BART on a simulated dataset of 4 million fingerprint-molecule pairs. The molecules are provided by MassSpecGym [7] and are preprocessed by excluding those with an MCES distance of less than two from any molecule in the test fold. The pretraining framework comprises four tasks detailed as follows: (1) SELFIES Denoising ( ① ) . Randomly mask 30% of tokens in SELFIES sequence S = { s 1 , . . . , s l } with [MASK] token and recover original tokens. (2) Fingerprint-to-Molecule Translation ( ② ) . Generate SELFIES sequences conditioned on fingerprint tokens FP . (3) Hybrid Denoising ( ③ and ④ ) . Combine fingerprint tokens and masked SELFIES using separator <fps_sep> , with input order variants, [ FP, <fps_sep> , S masked ] and [ S masked , <fps_sep> , F P ] , predicting full SELFIES sequences from both modalities. All tasks follow a conditional generation paradigm optimized via cross-entropy loss:

where θ denotes the model parameters, X is the input sequence (e.g., masked SELFIES or fingerprints), y i is the i -th target token, and l is the target SELFIES length.

3.3 Finetuning on Experimental Spectra

After pretraining on the simulated fingerprint-molecule dataset, MS-BART is fine-tuned on experimental spectra to bridge the domain gap between computational and real-world data distributions. As shown in Fig. 2, the original mass spectra are tokenized into fingerprint tokens, and the model is also optimized through cross-entropy loss (Eq. 2) calculated between the target and predicted SELFIES tokens. This crucial step aims to learn the systematic bias introduced by the MIST [18] model and improve prediction performance.

3.4 Contrastive Alignment via Chemical Feedback

Following pretraining and dataset-specific fine-tuning, MS-BART acquires the capability to interpret molecular fingerprints and generate chemically plausible molecular structures. However, it remains susceptible to molecular hallucination [15], where generated molecules maintain chemical validity but exhibit limited consistency with original mass spectra or corresponding fingerprints. Specifically, the model may yield structures deviating substantially from true underlying molecular structures. To alleviate this hallucination and enhance performance, we propose aligning the model's probabilistic rankings of generated molecules with preference rankings derived from chemical contexts. In this paper, we define molecular preference through Tanimoto similarity, denoted as Ps ( · ) . Given a fingerprint FP , MS-BART generates n candidate molecules C = { S 1 , S 2 , · · · , S n } . The preference score for each candidate S i is calculated as Ps ( S i ) = Tan ( S i , S ) , where S represents the groundtruth molecular structure. Simultaneously, the model (parameterized by θ ) assigns a conditional log-probability estimate P θ ( S i ) to each candidate S i , given the input FP . Our objective is to establish consistency between the model's generative probabilities and Tanimoto similarity metrics. Specifically, for any candidate pair ( S i , S j ) , we expect:

To encourage MS-BART to assign higher probabilities to candidate molecules that are more structurally similar to the target molecule, we employ a contrastive rank loss [31, 15], defined as:

where γ ij = ( j -i ) ∗ γ denotes a margin scaled by the rank difference between candidates, γ is a hyperparameter. Additionally, we retain the token-level cross-entropy loss (Eq. 2) to preserve the

model's generative capability and the overall loss is defined as:

where α controls the weight of the rank loss. By jointly optimizing the token-level cross-entropy loss and the sequence-level contrastive rank loss on the same finetuning dataset, MS-BART can assign a balanced probability mass across the whole sequence. This optimization strategy elevates the probability of generating molecular structures that not only exhibit higher similarity to the target molecule but may also achieve exact matches.

4 Experiments

4.1 Datasets

We evaluate our MS-BART model on two widely used open-source benchmarks: NPLIB1 [10] and MassSpecGym [7], following prior works [4, 45]. NPLIB1 is a subset of the GNPS library, originally curated for training the CANOPUS model. Its name serves to distinguish the dataset from the associated tool. MassSpecGym is the largest publicly available dataset containing 231k high-quality mass spectra spanning 29k unique molecular structures. The dataset is partitioned into training, validation, and test sets based on the edit distance between molecular structures, facilitating robust evaluation. Although MADGEN [45] also reports performance on the NIST23 dataset, access to this resource is restricted due to its commercial licensing requirements.

4.2 Evaluation Metrics and Baselines

To evaluate the performance of our model, we employ the following metrics:

Topk accuracy: We measure the exact match between the predicted structure and the ground truth molecule by converting the generated molecule into a full InChIKey and comparing it with the gold InChIKey. Since MS fragmentation is largely insensitive to 3D stereochemistry, results based on 2D InChIKey are also reported in Appendix C.

Topk maximum Tanimoto similarity: This metric quantifies the structural similarity between molecules using molecular fingerprints. We compute fingerprints based on the Morgan algorithm [33] with a radius of 2 and a bit length of 2048 using RDKit.

Topk minimum MCES (maximum common edge subgraph): This metric measures the graph edit distance between molecules, reflecting the largest common substructure shared between the generated and ground-truth molecules [26].

We report the k = 1 , 10 metrics following previous works [4, 7, 45]. Meanwhile, DIFFMS samples 100 molecules for each spectrum and identifies the topk molecules based on frequency. To ensure a fair comparison, we sample 100 molecules and subsequently rank the generated molecules according to their distance from the given formula. Given two formula F 1 = { ( a 1 , n 1 ) , ( a 2 , n 2 ) , ..., ( a m , n m ) } and F 2 = { ( a 1 , m 1 ) , ( a 2 , m 2 ) , ..., ( a m , m k ) } , the distance is defined as:

n a , m a are the counts of atom a in F 1 and F 2 . If multiple molecules have the same distance, we sort them according to their estimated log-probability. After this re-ranking, we select the first k molecules as the topk predictions.

Baselines. MassSpecGym [7] establishes three baselines for molecular generation: random generation, a SMILES-based Transformer, and a SELFIES-based Transformer. Spec2Mol [29] is retrained on both the NPLIB1 and MassSpecGym datasets to enable fair comparison. MIST+MSNovelist modifies the original MSNovelist framework [41] by replacing CSI:FingerID [11] with MIST. In MIST+Neuraldecipher, molecules are encoded into CDDD representations [47], followed by reconstruction of the SMILES strings using a pretrained LSTM decoder. MADGEN [45] and DIFFMS [4] represent recent state-of-the-art approaches. MADGEN first retrieves molecular scaffolds, then generates complete structures using the RetroBridge model [24], conditioned on both spectra and scaffolds. DIFFMS also adopts MIST as the spectrum encoder and employs a Graph Transformer [12] as the diffusion decoder, with separate pretraining of encoder and decoder components.

4.3 Implementation

We adopt BART-BASE [28] as the backbone of MS-BART, initializing all parameters from scratch using a normal distribution. To convert MIST probabilities into binary fingerprints, we apply a threshold of ϵ = 0 . 2 for NPLIB1 and ϵ = 0 . 11 for MassSpecGym. Further details regarding this selection are provided in Appendix A. During pretraining, we set the maximum sequence length to 512 to accommodate simultaneous learning from both fingerprints and SELFIES. For finetuning and alignment, we fix the input and output token lengths to 256, as the fingerprint inputs and SELFIES outputs rarely exceed this length in practice. When aligning MS-BART with chemical feedback, we freeze the encoder following practices from prior work [16, 36], and update only the decoder. Additional training details are provided in Appendix B.

4.4 Main Results

Table 1 presents a comparison of overall performance, demonstrating that MS-BART outperforms most baseline methods and achieves SOTA performance across 5/12 key metrics on NPLIB1 and MassSpecGym. Notably, on NPLIB1, MS-BART performs the best across all similarity metrics, surpassing the second-best method by 19.16% (MCES) and 25.71% (Tanimoto similarity) in the Top-1 setting. Significant improvements are also observed in the Top-10 setting, further validating the effectiveness of MS-BART. The high absolute Tanimoto similarity values (close to or exceeding 0.5) suggest that MS-BART generates structurally similar molecules, which are particularly valuable to domain experts. However, the Top-1 and Top-10 accuracy do not surpass DiffMS [4], primarily because we have filtered out similar molecules in the pretraining data (Appendix B), whereas DiffMS only removes all NPLIB1 and MassSpecGym test and validation molecules from their pretraining dataset. Another recently proposed open-source dataset, MassSpecGym, presents a more challenging benchmark than NPLIB1, as NPLIB1 lacks a scaffold-based split, resulting in a test set containing molecules with high structural similarity (Tanimoto similarity > 0.85) to those in the training set [4, 7]. Meanwhile, MassSpecGym exhibits a more complex data composition due to the presence of [M+Na] + adducts. The Na + atom have a higher mass than H + atom, leading to more complex fragmentation patterns and consequently a data distribution that differs significantly from that of [M+H] + . Furthermore, the [M+Na] + data in the MassSpecGym training set is relatively scarce, constituting only 15.52% of the total samples. This class imbalance, combined with the distinct fragmentation behavior of [M+Na] + compared to [M+H] + , introduces additional noise and potential bias during model training. To avoid fragmentation pattern conflicts and preserve data consistency, we

Pretrain

Pretrain-FT

Pretrain-FT-Rank

0.00

0.05

0.10

0.15

0.20

0.25

0.30

0.35

0.40

0.18

0.22

0.23

0.21

0.27

0.28

Top-1

Top-10

Pretrain

Pretrain-FT

Pretrain-FT-Rank

0.0

0.2

0.4

0.6

0.8

1.0

1.2

1.4

1.6

Accuracy (%)

1.07

1.07

0.01

1.12

1.11

Top-1

Top-10

Pretrain

Pretrain-FT

Pretrain-FT-Rank

10

12

14

16

18

20

22

24

MCES Distance

23.32

17.17

16.47

21.67

15.51

15.12

Top-1

Top-10

filter out [M+Na] + adducts before fine-tuning and alignment, retaining only the dominant [M+H] + data. However, to ensure a fair and comprehensive evaluation, we retain the [M+Na] + adducts in the test set. The results show that MS-BART does not surpass DiffMS on most metrics, and the main reason is same as for NPLIB1. Excluding DiffMS, MS-BART also shows SOTA performance across all similarity metrics and demonstrates the robustness and effectiveness of MS-BART in handling diverse spectral patterns. Finally, we report the best possible performance of MS-BART if we use the gold fingerprint calculated from the true structure rather than predicting it with the pretrained MIST model. It is noteworthy that MS-BART can almost find the exact match or extremely similar candidates, proving the great potential of MS-BART and indicating that further work can be devoted to improving the performance of MIST model.

4.5 Unified Multi-Task Pretraining Enhances Cross-Modal Learning

Pretraining serves as the foundational phase and a critical step in training language models, enabling a broad understanding of linguistic features such as syntax, semantics, and context, which are essential for effective transfer learning. To investigate the role of multi-task pretraining in enhancing MSBART's comprehension of molecular fingerprints and SELFIES, we conduct ablation experiments, with results presented in Table 2. It is obvious that the model trained without pretraining exhibits relatively poor performance compared to its pretrained counterpart. Nevertheless, its accuracy remains above chance level and surpasses baseline methods that encode mass spectra directly, demonstrating the advantage of representing raw mass spectra as fingerprints and training with a unified vocabulary in an end-to-end style. Furthermore, we compare multi-task pretraining with single-task pretraining. Pretraining solely with the denoising task leads to performance degradation rather than improvement, primarily because the denoising task is not well aligned with structure elucidation. The substantial improvement observed in the fingerprint-to-molecule translation task further supports this finding. Moreover, the performance gain of MS-BART over single-task pretraining indicates that the denoising task remains beneficial, as it helps MS-BART develop a fundamental understanding of molecular

structures and contributes to the final performance. These results suggest that unified multi-task pretraining on unlabeled data promotes cross-modal interaction and alignment by enabling MSBART to learn a shared representation space across modalities.

4.6 MS-BART Mitigates Molecular Hallucination

The training paradigm of MS-BART consists of three steps. Fig. 3 illustrates the impact of these steps on the final performance in MassSpecGym, revealing two key findings. First, continued fine-tuning on the MassSpecGym training fold improves performance and mitigates molecular hallucination, particularly in terms of accuracy. For example, the "Pretrain" model achieves near-zero Top-1 and Top-10 accuracy scores of 0.00% and 0.01%, respectively, while the "Pretrain-FT" model improves these values to 1.07% and 1.12%. Moreover, aligning the model with chemical feedback based on Tanimoto similarity further reduces molecular hallucination. This alignment enables the generation of structurally more similar molecules, as evidenced by the improved Tanimoto similarity and the degraded MCES metric. Fig. 4 shows a randomly selected case from MassSpecGym where MS-BART effectively mitigates molecular hallucination.

Top-1

Top-2

Top-3

Top-4

Ground Truth

Tan. Sim: 0.13, MCES: 16.00

Tan. Sim: 0.14, MCES: 16.00

Tan. Sim: 0.13, MCES: 15.00

Tan. Sim: 0.14, MCES: 20.00

Top-1

Top-2

Top-3

Top-4

Ground Truth

Tan. Sim: 1.00, MCES: 0.00

Tan. Sim: 0.30, MCES: 15.00

Tan. Sim: 0.31, MCES: 15.00

Tan. Sim: 0.72, MCES: 3.00

Top-1

Top-2

Top-3

Top-4

Ground Truth

Tan. Sim: 1.00, MCES: 0.00

Tan.Sim: 0.78. MCES: 2.00

Tan. Sim: 0.75, MCES: 2.00

Tan. Sim: 0.45, MCES: 6.00

4.7 Sensitivity Analysis of Model Hyperparameters

MS-BART employs two key hyperparameters, the fingerprint generation threshold ϵ and the rank loss weight α . The fingerprint threshold determines how the MIST probability is converted into an active fingerprint, where different thresholds lead to distinct representations. The rank loss weight controls the influence of the token-level rank loss in guiding the alignment training. To comprehensively evaluate the impact of these two parameters, we experiment with different values of ϵ on MassSpecGym and α on NPLIB1 and present the results in Table 3. The results show no significant differences among the tested ϵ values, indicating that MS-BART is not sensitive to this parameter. Although ϵ = 0 . 11 achieves the best performance on the MassSpecGym validation set and is reported in Table 1 as the final result, the ablation results suggest that ϵ = 0 . 11 is not the best overall. This discrepancy is mainly due to the high difficulty of the MassSpecGym dataset and the distribution mismatch between its validation and test sets. A similar observation holds for α on NPLIB1. The model with α = 5 performs best in terms of Top-1 Tanimoto score on the validation set and is also reported as the final result. However, models with α = 1 and α = 3 also achieve competitive results on specific metrics. The variations across different configurations are minor, indicating that MS-BART is not highly sensitive to the rank loss weight.

4.8 Analysis of Decoding Hyperparameters

MS-BART employs beam-search multinomial sampling for structure prediction, governed by two key decoding hyperparameters while maintaining default values for other parameters. First, the temperature parameter [50, 42] regulates output randomness during inference, a factor known to substantially influence generation quality in typical language models. Interestingly, MS-BART's outputs demonstrate remarkable stability across temperature variations, which is likely attributable to the model's high confidence in next-token prediction gained through multi-task pretraining and its relatively small vocabulary size of 185. Detailed temperature analysis is provided in Appendix D. The second critical parameter, beam width, governs the search space breadth during decoding. We systematically evaluated MS-BART's performance on the complete MassSpecGym test fold using an NVIDIA A800-SXM480GB GPU, exploring beam widths from 10 to 100. As shown in Fig. 5, both Top-1 and Top-10 accuracies demonstrate consistent improvement with increasing beam width, while inference latency exhibits linear scaling. Notably, when tested on a common consumer-grade GPU like the RTX4090 with a beam width of 100, the average inference

20

40

60

80

100

Number of Beams

0.5

0.6

0.7

0.8

0.9

1.0

1.1

1.2

Accuracy (%)

0.62%

0.62%

0.91%

0.93%

1.03%

1.05%

1.07%

1.11%

1.07%

1.11%

Top-1 Accuracy

Top-10 Accuracy

Inference Time (s)

0.0

0.3

0.6

0.9

1.2

1.5

Average Inference Time Per Sample (s)

0.14

0.43

0.71

1.14

1.45

time per spectrum is about 3 seconds, which is 53x times faster than DiffMS's approximately 160 seconds and remains practically acceptable.

5 Conclusion

In this work, we propose MS-BART, a novel language model for mass spectra structure elucidation within a unified modeling framework. Specifically, we first represent mass spectra as fingerprints and tokenize both the fingerprints and molecular representations (SELFIES) using a unified vocabulary. Subsequently, MS-BART undergoes the standard pretraining-finetuning-alignment paradigm commonly employed in NLP, enabling the model to interpret spectral fingerprints and generate plausible molecular structures. Extensive experiments demonstrate that MS-BART achieves SOTA performance on two widely adopted benchmarks across 5/12 key metrics on MassSpecGym and NPLIB1 and is faster by one order of magnitude than competing diffusion-based method, while ablation studies further validate its effectiveness and robustness.

Acknowledgments and Disclosure of Funding

This work was supported by the National Science and Technology Major Project (2023ZD0120703), the China NSFC Projects (U23B2057, 62120106006, and 92370206), and Shanghai Municipal Science and Technology Projects (2021SHZDZX0102 and 25X010202846).

References

Ruedi Aebersold and Matthias Mann. Mass spectrometry-based proteomics. Nature , 422(6928):198-207, 2003.

Sadjad Fakouri Baygi and Dinesh Kumar Barupal. Idsl_mint: a deep learning framework to predict molecular fingerprints from mass spectra. Journal of Cheminformatics , 16(1):8, 2024.

Wout Bittremieux, Mingxun Wang, and Pieter C Dorrestein. The critical role that spectral libraries play in capturing the metabolomics community knowledge. Metabolomics , 18(12):94, 2022.

Montgomery Bohde, Mrunali Manjrekar, Runzhong Wang, Shuiwang Ji, and Connor W Coley. Diffms: Diffusion generation of molecules conditioned on mass spectra. arXiv preprint arXiv:2502.09571 , 2025.

Jane Bromley, Isabelle Guyon, Yann LeCun, Eduard Säckinger, and Roopak Shah. Signature verification using a" siamese" time delay neural network. Advances in neural information processing systems , 6, 1993.

Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. Advances in neural information processing systems , 33:1877-1901, 2020.

Roman Bushuiev, Anton Bushuiev, Niek de Jonge, Adamo Young, Fleming Kretschmer, Raman Samusevich, Janne Heirman, Fei Wang, Luke Zhang, Kai Dührkop, et al. Massspecgym: A benchmark for the discovery and identification of molecules. Advances in Neural Information Processing Systems , 37:110010-110027, 2024.

Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 conference of the North American chapter of the association for computational linguistics: human language technologies, volume 1 (long and short papers) , pages 4171-4186, 2019.

Kai Dührkop, Markus Fleischauer, Marcus Ludwig, Alexander A Aksenov, Alexey V Melnik, Marvin Meusel, Pieter C Dorrestein, Juho Rousu, and Sebastian Böcker. Sirius 4: a rapid tool for turning tandem mass spectra into metabolite structure information. Nature methods , 16(4):299-302, 2019.

Kai Dührkop, Louis-Félix Nothias, Markus Fleischauer, Raphael Reher, Marcus Ludwig, Martin A Hoffmann, Daniel Petras, William H Gerwick, Juho Rousu, Pieter C Dorrestein, et al. Systematic classification of unknown metabolites using high-resolution fragmentation mass spectra. Nature biotechnology , 39(4):462-471, 2021.

Kai Dührkop, Huibin Shen, Marvin Meusel, Juho Rousu, and Sebastian Böcker. Searching molecular structure databases with tandem mass spectra using csi: Fingerid. Proceedings of the National Academy of Sciences , 112(41):12580-12585, 2015.

Vijay Prakash Dwivedi and Xavier Bresson. A generalization of transformer networks to graphs. arXiv preprint arXiv:2012.09699 , 2020.

David Elser, Florian Huber, and Emmanuel Gaquerel. Mass2smiles: deep learning based fast prediction of structures and functional groups directly from high-resolution ms/ms spectra. bioRxiv , pages 2023-07, 2023.

Muhammad Faizan-Khan, Roger Giné, Josep M Badia, Maribel Pérez-Ribera, Alexandra Junza, Maria Vinaixa, Marta Sales-Pardo, Roger Guimerà, and Oscar Yanes. Chemembed: A deep learning framework for metabolite identification using enhanced ms/ms data and multidimensional molecular embeddings. bioRxiv , pages 2025-02, 2025.

Yin Fang, Ningyu Zhang, Zhuo Chen, Lingbing Guo, Xiaohui Fan, and Huajun Chen. Domainagnostic molecular generation with chemical feedback. In The Twelfth International Conference on Learning Representations .

Giacomo Frisoni, Paolo Italiani, Stefano Salvatori, and Gianluca Moro. Cogito ergo summ: abstractive summarization of biomedical papers via semantic parsing graphs and consistency rewards. In Proceedings of the AAAI conference on artificial intelligence , volume 37, pages 12781-12789, 2023.

Samuel Goldman, John Bradshaw, Jiayi Xin, and Connor Coley. Prefix-tree decoding for predicting mass spectra from molecules. Advances in neural information processing systems , 36:48548-48572, 2023.

Samuel Goldman, Jeremy Wohlwend, Martin Stražar, Guy Haroush, Ramnik J Xavier, and Connor W Coley. Annotating metabolite mass spectra with domain-inspired chemical formula transformers. Nature Machine Intelligence , 5(9):965-979, 2023.

Yang Han, Yiming Wang, Rui Wang, Lu Chen, and Kai Yu. Alignsum: Data pyramid hierarchical fine-tuning for aligning with human summarization preference. In Findings of the Association for Computational Linguistics: EMNLP 2024 , pages 8506-8522, 2024.

Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr Dollár, and Ross Girshick. Masked autoencoders are scalable vision learners. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition , pages 16000-16009, 2022.

Xiu Huang, Huihui Liu, Dawei Lu, Yue Lin, Jingfu Liu, Qian Liu, Zongxiu Nie, and Guibin Jiang. Mass spectrometry for multi-dimensional characterization of natural and synthetic materials at the nanoscale. Chemical Society Reviews , 50(8):5243-5280, 2021.

Florian Huber, Lars Ridder, Stefan Verhoeven, Jurriaan H. Spaaks, Faruk Diblen, Simon Rogers, and Justin J. J. van der Hooft. Spec2vec: Improved mass spectral similarity scoring through learning of structural relationships. PLoS Comput. Biol. , 17(2), 2021.

Florian Huber, Sven van der Burg, Justin JJ van der Hooft, and Lars Ridder. Ms2deepscore: a novel deep learning similarity measure to compare tandem mass spectra. Journal of cheminformatics , 13(1):84, 2021.

Ilia Igashov, Arne Schneuing, Marwin Segler, Michael M Bronstein, and Bruno Correia. Retrobridge: Modeling retrosynthesis with markov bridges. In The Twelfth International Conference on Learning Representations .

Mario Krenn, Florian Häse, AkshatKumar Nigam, Pascal Friederich, and Alan Aspuru-Guzik. Self-referencing embedded strings (selfies): A 100% robust molecular string representation. Machine Learning: Science and Technology , 1(4):045024, 2020.

Fleming Kretschmer, Jan Seipp, Marcus Ludwig, Gunnar W Klau, and Sebastian Böcker. Small molecule machine learning: All models are wrong, some may not even be useful. bioRxiv , pages 2023-03, 2023.

Greg Landrum. Rdkit documentation. Release , 1(1-79):4, 2013.

Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. Bart: Denoising sequence-to-sequence pretraining for natural language generation, translation, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics , page 7871. Association for Computational Linguistics, 2020.

Eleni E Litsa, Vijil Chenthamarakshan, Payel Das, and Lydia E Kavraki. An end-to-end deep learning framework for translating mass spectra to de-novo molecules. Communications Chemistry , 6(1):132, 2023.

Yanmin Liu, Xuan Zhang, Wei Zhao, Daming Zhu, and Xuefeng Cui. De novo molecular structure generation from mass spectra. In 2023 IEEE International Conference on Bioinformatics and Biomedicine (BIBM) , pages 373-378. IEEE, 2023.

Yixin Liu, Pengfei Liu, Dragomir Radev, and Graham Neubig. BRIO: Bringing order to abstractive summarization. In Smaranda Muresan, Preslav Nakov, and Aline Villavicencio, editors, Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) , pages 2890-2903, Dublin, Ireland, May 2022. Association for Computational Linguistics.

Felix Meissner, Jennifer Geddes-McAlister, Matthias Mann, and Marcus Bantscheff. The emerging role of mass spectrometry-based proteomics in drug discovery. Nature Reviews Drug Discovery , 21(9):637-654, 2022.

Harry L Morgan. The generation of a unique machine description for chemical structuresa technique developed at chemical abstracts service. Journal of chemical documentation , 5(2):107-113, 1965.

Michael Murphy, Stefanie Jegelka, Ernest Fraenkel, Tobias Kind, David Healey, and Thomas Butler. Efficiently predicting high resolution mass spectra with graph neural networks. In International Conference on Machine Learning , pages 25549-25562. PMLR, 2023.

Yolanda Picó and Damià Barceló. Pyrolysis gas chromatography-mass spectrometry in environmental analysis: Focus on organic matter and microplastics. TrAC Trends in Analytical Chemistry , 130:115964, 2020.

Alessandro Raganato and Jörg Tiedemann. An analysis of encoder representations in transformer-based machine translation. In Proceedings of the 2018 EMNLP workshop BlackboxNLP: analyzing and interpreting neural networks for NLP , pages 287-297, 2018.

Alexander Rives, Joshua Meier, Tom Sercu, Siddharth Goyal, Zeming Lin, Jason Liu, Demi Guo, Myle Ott, C Lawrence Zitnick, Jerry Ma, et al. Biological structure and function emerge from scaling unsupervised learning to 250 million protein sequences. Proceedings of the National Academy of Sciences , 118(15):e2016239118, 2021.

Khawla Seddiki, Philippe Saudemont, Frédéric Precioso, Nina Ogrinc, Maxence Wisztorski, Michel Salzet, Isabelle Fournier, and Arnaud Droit. Cumulative learning enables convolutional neural network representations for small mass spectrometry data classification. Nature communications , 11(1):5595, 2020.

Michael A Skinnider, Fei Wang, Daniel Pasin, Russell Greiner, Leonard J Foster, Petur W Dalsgaard, and David S Wishart. A deep generative model enables automated structure elucidation of novel psychoactive substances. Nature Machine Intelligence , 3(11):973-984, 2021.

Stephen Stein. Mass spectral reference libraries: an ever-expanding resource for chemical identification, 2012.

Michael A Stravs, Kai Dührkop, Sebastian Böcker, and Nicola Zamboni. Msnovelist: de novo structure generation from mass spectra. Nature Methods , 19(7):865-870, 2022.

Chi Wang, Xueqing Liu, and Ahmed Hassan Awadallah. Cost-effective hyperparameter optimization for large language model generation inference. In Aleksandra Faust, Roman Garnett, Colin White, Frank Hutter, and Jacob R. Gardner, editors, Proceedings of the Second International Conference on Automated Machine Learning , volume 224 of Proceedings of Machine Learning Research , pages 21/1-17. PMLR, 12-15 Nov 2023.

Fei Wang, Jaanus Liigand, Siyang Tian, David Arndt, Russell Greiner, and David S Wishart. Cfm-id 4.0: more accurate esi-ms/ms spectral prediction and compound identification. Analytical chemistry , 93(34):11692-11700, 2021.

Mingxun Wang, Jeremy J Carver, Vanessa V Phelan, Laura M Sanchez, Neha Garg, Yao Peng, Don Duy Nguyen, Jeramie Watrous, Clifford A Kapono, Tal Luzzatto-Knaan, et al. Sharing and community curation of mass spectrometry data with global natural products social molecular networking. Nature biotechnology , 34(8):828-837, 2016.

Yinkai Wang, Xiaohui Chen, Liping Liu, and Soha Hassoun. MADGEN: Mass-spec attends to de novo molecular generation. In The Thirteenth International Conference on Learning Representations , 2025.

David Weininger. Smiles, a chemical language and information system. 1. introduction to methodology and encoding rules. Journal of chemical information and computer sciences , 28(1):31-36, 1988.

Robin Winter, Floriane Montanari, Frank Noé, and Djork-Arné Clevert. Learning continuous and data-driven molecular descriptors by translating equivalent chemical representations. Chemical science , 10(6):1692-1701, 2019.

Lin Yao, Minjian Yang, Jianfei Song, Zhuo Yang, Hanyu Sun, Hui Shi, Xue Liu, Xiangyang Ji, Yafeng Deng, and Xiaojian Wang. Conditional molecular generation net enables automated structure elucidation based on 13c nmr spectra and prior knowledge. Analytical chemistry , 95(12):5393-5401, 2023.

Hailiang Zhang, Qiong Yang, Ting Xie, Yue Wang, Zhimin Zhang, and Hongmei Lu. Msbert: Embedding tandem mass spectra into chemically rational space by mask learning and contrastive learning. Analytical Chemistry , 96(42):16599-16608, 2024.

Yuqi Zhu, Jia Li, Ge Li, YunFei Zhao, Zhi Jin, and Hong Mei. Hot or cold? adaptive temperature sampling for code generation with large language models. In Proceedings of the AAAI Conference on Artificial Intelligence , volume 38, pages 437-445, 2024.

A Selection of the Probability Threshold ϵ

We selected the threshold value ϵ for NPLIB1 and MassSpecGym using different methods. Since NPLIB1 is known to be a much easier dataset, we chose its threshold empirically. After examining the probability distribution, we observed that most probabilities were smaller than 0.3. A large threshold could cause information loss, whereas a small threshold might introduce noise. Therefore, we selected ϵ = 0 . 2 to balance these factors, which resulted in excellent performance. For MassSpecGym, we trained MS-BARTusing ϵ values ranging from 0.1 to 0.2 in increments of 0.01. We then validated these on the validation set and selected the best threshold based on the highest Top-1 Tanimoto similarity. As shown in Table 4, the Top-1 Tanimoto similarity values for different thresholds were very close. We ultimately chose ϵ = 0 . 11 as the final threshold, although performance did not vary significantly across the different threshold values.

B MS-BART Training Details

Pretraining. Wepretrain MS-BART from scratch on a simulated dataset of 4M fingerprint-molecule pairs. This dataset was generated from a refined subset of the 4M unlabeled molecules provided by MassSpecGym [7]. The refinement process involved excluding any molecule with an MCES distance of less than two from any molecule in the MassSpecGym test fold. For the NPLIB1 dataset, we first evaluated the structural similarity between its test set and our pretraining data. As shown in Table 5, approximately 3% of the pretraining molecules were structurally similar to those in the NPLIB1 test set. To prevent data leakage, we further filtered the pretraining set to remove any molecules that were structurally similar or identical to those in the NPLIB1 test set. Specifically, we refined the

pretraining dataset by removing molecules with a maximum Tanimoto similarity greater than 0.5 to any molecule in the NPLIB1 test set.

The training was conducted on four NVIDIA A800-SXM4-80GB GPUs using bfloat16 precision. A per-device batch size of 96 and two gradient accumulation steps were employed, resulting in an effective total batch size of 768 across three training epochs. The optimization process adopted a cosine learning rate scheduler with a warm-up phase of 10,000 steps. The learning rate increased linearly from zero to a peak value of 6e-4 during warm-up and subsequently decayed following a cosine schedule to a minimum value of 1e-5. The entire multi-task pretraining process required approximately 34 hours to complete.

Finetuning. Fine-tuning is performed on a single NVIDIA A800-SXM4-80GB GPU using bfloat16 precision, with consistent parameter settings across both MassSpecGym and NPLIB1 datasets. We adopt a learning rate of 5e-5 combined with a warm-up phase covering 10% of total training steps. Each training iteration processes 128 samples per batch. For validation monitoring, we implement an early stopping criterion that evaluates model performance every 400 steps on MassSpecGym and every 200 steps on NPLIB1. Training terminates when the validation set's Top-1 Tanimoto similarity fails to improve for three consecutive evaluations.

Alignment Training. The alignment phase is more complex than pretraining and fine-tuning, requiring careful hyperparameter optimization. As specified in Table 6, we explore multiple configurations during this stage while maintaining a fixed batch size of 128 and bfloat16 precision on a single NVIDIA A800 GPU. The learning schedule includes a 10% warm-up ratio of total training steps. Validation frequency is set to 400-step intervals for MassSpecGym and 50-step intervals for NPLIB1. We extend the patience to five consecutive evaluations without improvement in Top-1 Tanimoto similarity before triggering early stopping. Final hyperparameter selection is determined by maximizing the validation set's Top-1 Tanimoto similarity.

C 2D InChIKey Based Accuracy

We evaluate the Top-1 and Top-10 accuracy based on 2D InChIKey matching and present the results in Table 7. On NPLIB1, the two calculation methods yield the same results. However, for MassSpecGym, the 2D InChIKey-based accuracy of MS-BART shows a slight improvement compared to evaluation with the full InChIKey because the 2D InChIKey uses only the first 14 characters, which do not include 3D stereochemistry. To maintain consistency with the DiffMS [4], we use the full InChIKey results as the final results.

D The Impact of Sampling Temperature on Model Performance

Table 8 presents the performance evaluation of MS-BART during decoding with varying temperature values on MassSpecGym. The results demonstrate that MS-BART's performance remains largely consistent across different temperature settings. This stability can be attributed to the model's high confidence in next-token predictions, which likely stems from its multi-task pretraining framework.

E Limitations

Our primary limitation lies in the reliance on the external MIST model [18] for predicting fingerprints from experimental spectra. The accuracy of these fingerprint predictions significantly impacts the overall performance. Future work may focus on fine-tuning the MIST model using task-specific datasets to improve prediction accuracy, or it could explore directly modeling the fragments from raw mass spectra. Another limitation is that the formula information is used only for re-ranking and not for training the model. However, these additional formulas definitely include important information and are very likely to boost the model's performance. We plan to explore effective ways to incorporate these informational hints into MS-BART in future work.

F Ethics Statement

All data used in this work are obtained from publicly available sources, including molecular structure datasets and mass spectrometry benchmarks such as NPLIB1 and MassSpecGym. We strictly follow the corresponding licenses and usage protocols. No modifications have been made to the original datasets beyond necessary preprocessing using standard cheminformatics tools (e.g., RDKit) to compute molecular fingerprints. No personal, private, or sensitive data are involved. The proposed model, MS-BART, is trained and evaluated solely for the task of molecular structure elucidation from mass spectrometry data. Our work does not involve human subjects, biometric data, or decisionmaking in socially sensitive applications. We do not foresee any immediate negative societal impact. On the contrary, improving molecular identification from mass spectrometry may benefit fields such as drug discovery, environmental chemistry, and materials science.

NeurIPS Paper Checklist

1. Claims

Question: Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?

Answer: [Yes]

Justification: [Abstract, Section 1]

Guidelines:

The answer NA means that the abstract and introduction do not include the claims made in the paper.

The abstract and/or introduction should clearly state the claims made, including the contributions made in the paper and important assumptions and limitations. A No or NA answer to this question will not be perceived well by the reviewers.

The claims made should match theoretical and experimental results, and reflect how much the results can be expected to generalize to other settings.

It is fine to include aspirational goals as motivation as long as it is clear that these goals are not attained by the paper.

2. Limitations

Question: Does the paper discuss the limitations of the work performed by the authors?

Answer: [Yes]

Justification: [Appendix E]

Guidelines:

The answer NA means that the paper has no limitation while the answer No means that the paper has limitations, but those are not discussed in the paper.

The authors are encouraged to create a separate "Limitations" section in their paper.

The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification, asymptotic approximations only holding locally). The authors should reflect on how these assumptions might be violated in practice and what the implications would be.

The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on a few datasets or with a few runs. In general, empirical results often depend on implicit assumptions, which should be articulated.

The authors should reflect on the factors that influence the performance of the approach. For example, a facial recognition algorithm may perform poorly when image resolution is low or images are taken in low lighting. Or a speech-to-text system might not be used reliably to provide closed captions for online lectures because it fails to handle technical jargon.

The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size.

If applicable, the authors should discuss possible limitations of their approach to address problems of privacy and fairness.

While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren't acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an important role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations.

3. Theory assumptions and proofs

Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?

Answer: [NA]

Justification: [The paper does not include theoretical results]

Guidelines:

The answer NA means that the paper does not include theoretical results.

All the theorems, formulas, and proofs in the paper should be numbered and crossreferenced.

All assumptions should be clearly stated or referenced in the statement of any theorems.

The proofs can either appear in the main paper or the supplemental material, but if they appear in the supplemental material, the authors are encouraged to provide a short proof sketch to provide intuition.

Inversely, any informal proof provided in the core of the paper should be complemented by formal proofs provided in appendix or supplemental material.

Theorems and Lemmas that the proof relies upon should be properly referenced.

4. Experimental result reproducibility

Question: Does the paper fully disclose all the information needed to reproduce the main experimental results of the paper to the extent that it affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?

Answer: [Yes]

Justification: [Section 4.14.3, Appendix B]

Guidelines:

The answer NA means that the paper does not include experiments.

If the paper includes experiments, a No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not.

If the contribution is a dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable.

Depending on the contribution, reproducibility can be accomplished in various ways. For example, if the contribution is a novel architecture, describing the architecture fully might suffice, or if the contribution is a specific model and empirical evaluation, it may be necessary to either make it possible for others to replicate the model with the same dataset, or provide access to the model. In general. releasing code and data is often one good way to accomplish this, but reproducibility can also be provided via detailed instructions for how to replicate the results, access to a hosted model (e.g., in the case of a large language model), releasing of a model checkpoint, or other means that are appropriate to the research performed.

While NeurIPS does not require releasing code, the conference does require all submissions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example

(a) If the contribution is primarily a new algorithm, the paper should make it clear how to reproduce that algorithm.

(b) If the contribution is primarily a new model architecture, the paper should describe the architecture clearly and fully.

(c) If the contribution is a new model (e.g., a large language model), then there should either be a way to access this model for reproducing the results or a way to reproduce the model (e.g., with an open-source dataset or instructions for how to construct the dataset).

(d) We recognize that reproducibility may be tricky in some cases, in which case authors are welcome to describe the particular way they provide for reproducibility. In the case of closed-source models, it may be that access to the model is limited in some way (e.g., to registered users), but it should be possible for other researchers to have some path to reproducing or verifying the results.

5. Open access to data and code

Question: Does the paper provide open access to the data and code, with sufficient instructions to faithfully reproduce the main experimental results, as described in supplemental material?

Answer: [Yes]

Justification: [Section 4.1, Anonymous code]

Guidelines:

The answer NA means that paper does not include experiments requiring code.

Please see the NeurIPS code and data submission guidelines ( https://nips.cc/ public/guides/CodeSubmissionPolicy ) for more details.

While we encourage the release of code and data, we understand that this might not be possible, so 'No' is an acceptable answer. Papers cannot be rejected simply for not including code, unless this is central to the contribution (e.g., for a new open-source benchmark).

The instructions should contain the exact command and environment needed to run to reproduce the results. See the NeurIPS code and data submission guidelines ( https: //nips.cc/public/guides/CodeSubmissionPolicy ) for more details.

The authors should provide instructions on data access and preparation, including how to access the raw data, preprocessed data, intermediate data, and generated data, etc.

The authors should provide scripts to reproduce all experimental results for the new proposed method and baselines. If only a subset of experiments are reproducible, they should state which ones are omitted from the script and why.

At submission time, to preserve anonymity, the authors should release anonymized versions (if applicable).

Providing as much information as possible in supplemental material (appended to the paper) is recommended, but including URLs to data and code is permitted.

6. Experimental setting/details

Question: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?

Answer: [Yes]

Justification: [Section 4.14.3, Appendix B]

Guidelines:

The answer NA means that the paper does not include experiments.

The experimental setting should be presented in the core of the paper to a level of detail that is necessary to appreciate the results and make sense of them.

The full details can be provided either with the code, in appendix, or as supplemental material.

7. Experiment statistical significance

Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?

Answer: [Yes]

Justification: [Appendix D]

Guidelines:

The answer NA means that the paper does not include experiments.

The authors should answer "Yes" if the results are accompanied by error bars, confidence intervals, or statistical significance tests, at least for the experiments that support the main claims of the paper.

The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall run with given experimental conditions).

The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.)

The assumptions made should be given (e.g., Normally distributed errors).

It should be clear whether the error bar is the standard deviation or the standard error of the mean.

It is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have a 96% CI, if the hypothesis of Normality of errors is not verified.

For asymmetric distributions, the authors should be careful not to show in tables or figures symmetric error bars that would yield results that are out of range (e.g. negative error rates).

If error bars are reported in tables or plots, The authors should explain in the text how they were calculated and reference the corresponding figures or tables in the text.

8. Experiments compute resources

Question: For each experiment, does the paper provide sufficient information on the computer resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?

Answer: [Yes]

Justification: [Section 4.8, Appendix B]

Guidelines:

The answer NA means that the paper does not include experiments.

The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage.

The paper should provide the amount of compute required for each of the individual experimental runs as well as estimate the total compute.

The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary or failed experiments that didn't make it into the paper).

9. Code of ethics

Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https://neurips.cc/public/EthicsGuidelines ?

Answer: [Yes]

Justification: [Appendix F]

Guidelines:

The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.

If the authors answer No, they should explain the special circumstances that require a deviation from the Code of Ethics.

The authors should make sure to preserve anonymity (e.g., if there is a special consideration due to laws or regulations in their jurisdiction).

10. Broader impacts

Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?

Answer: [Yes]

Justification: [Appendix F]

Guidelines:

The answer NA means that there is no societal impact of the work performed.

If the authors answer NA or No, they should explain why their work has no societal impact or why the paper does not address societal impact.

Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations.

The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is a direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to

generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster.

The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology.

If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML).

11. Safeguards

Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?

Answer: [Yes]

Justification: [Appendix F]

Guidelines:

The answer NA means that the paper poses no such risks.

Released models that have a high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters.

Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images.

We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make a best faith effort.

12. Licenses for existing assets

Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?

Answer: [Yes]

Justification: [Section 4.1]

Guidelines:

The answer NA means that the paper does not use existing assets.

The authors should cite the original paper that produced the code package or dataset.

The authors should state which version of the asset is used and, if possible, include a URL.

The name of the license (e.g., CC-BY 4.0) should be included for each asset.

For scraped data from a particular source (e.g., website), the copyright and terms of service of that source should be provided.

If assets are released, the license, copyright information, and terms of use in the package should be provided. For popular datasets, paperswithcode.com/datasets has curated licenses for some datasets. Their licensing guide can help determine the license of a dataset.

For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided.

If this information is not available online, the authors are encouraged to reach out to the asset's creators.

13. New assets

Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?

Answer: [Yes]

Justification: [We provide the model parameters.]

Guidelines:

The answer NA means that the paper does not release new assets.

Researchers should communicate the details of the dataset/code/model as part of their submissions via structured templates. This includes details about training, license, limitations, etc.

The paper should discuss whether and how consent was obtained from people whose asset is used.

At submission time, remember to anonymize your assets (if applicable). You can either create an anonymized URL or include an anonymized zip file.

14. Crowdsourcing and research with human subjects

Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well as details about compensation (if any)?

Answer: [NA]

Justification: [Our paper does not involve crowdsourcing experiments and research.]

Guidelines:

The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.

Including this information in the supplemental material is fine, but if the main contribution of the paper involves human subjects, then as much detail as possible should be included in the main paper.

According to the NeurIPS Code of Ethics, workers involved in data collection, curation, or other labor should be paid at least the minimum wage in the country of the data collector.

15. Institutional review board (IRB) approvals or equivalent for research with human subjects

Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?

Answer: [NA]

Justification: [NA]

Guidelines:

The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.

Depending on the country in which research is conducted, IRB approval (or equivalent) may be required for any human subjects research. If you obtained IRB approval, you should clearly state this in the paper.

We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors to adhere to the NeurIPS Code of Ethics and the guidelines for their institution.

For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review.

16. Declaration of LLM usage

Question: Does the paper describe the usage of LLMs if it is an important, original, or non-standard component of the core methods in this research? Note that if the LLM is used only for writing, editing, or formatting purposes and does not impact the core methodology, scientific rigorousness, or originality of the research, declaration is not required.

Answer: [NA]

Justification: [We use LLM for writing.] Guidelines:

The answer NA means that the core method development in this research does not involve LLMs as any important, original, or non-standard components.

Please refer to our LLM policy ( https://neurips.cc/Conferences/2025/ LLM ) for what should or should not be described.

Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper presents MS-BART — a BART-based model for predicting SELFIES-encoded molecular structures from Morgan fingerprints with the application to annotate tandem mass spectra. The method is trained in three stages:  \n(i) pretraining on SELFIES–fingerprint pairs from a dataset of molecular structures,  \n(ii) fine-tuning on a dataset of SELFIES–fingerprint pairs from a mass spectral library, where the fingerprints are predicted using a pretrained MIST model,  \n(iii) additional contrastive alignment based on Tanimoto similarities of sampled fingerprints to improve fingerprint prediction.\n\nThe method is overall solid and clearly presented. The authors also provide ablation studies and qualitative examples showing the benefits of multiple training stages and several pretraining tasks during stage (i). However, the experimental results have some issues.\n\nSTRENGTHS AND WEAKNESSES:\nBelow, I summarize the strengths of the paper, as well as, my major concerns and minor comments.\n## Strengths\n\n### Quality\n\nThe method is well structured and technically sound, with thoughtful integration of generative modeling, fingerprint conditioning, and contrastive learning. The three-stage training pipeline is clearly explained, and ablation studies support the benefit of each stage.\n### Clarity\n\nThe paper overal easy to follow. The description of the model architecture and training stages is well organized.\n\n### Significance\n\nThe task of molecular structure elucidation from tandem mass spectra is highly relevant to the metabolomics and computational chemistry communities. The proposed method addresses this problem with a combination of modern tools and training strategies that, if properly validated, could set a new performance baseline on public benchmarks.\n\n### Originality\n\nThe work is original in its integration of BART-based decoding with fingerprint supervision and contrastive alignment. While prior models have used generative approaches and fingerprint conditioning, this work offers a unified and scalable framework that extends current techniques.\n\n## Weaknesses\n\n### Major concerns\n\n- Current experimental results appear to suffer from data leakage:\n\n    - MassSpecGym. Could the authors clarify what data was used to train the MIST fingerprint predictor or what checkpoint was used for each benchmark (MassSpecGym and NPLIB1)? If MIST was trained on NPLIB1 data (i.e., using the checkpoint from the official repository), the reported results on MassSpecGym are not valid. In this case, MIST’s training data may contain entries from the MassSpecGym test folds, since both datasets include spectra from mass spectral libraries such as MoNA and GNPS. This would mean that test results on MassSpecGym are indirectly based on training the fingerprint predictor on the same data. Additionally, the InChIKey-based split of NPLIB1 can promote overfitting, further increasing the risk of data leakage. Suggestion: Please recompute the MassSpecGym results using a MIST model retrained on MassSpecGym or the pre-trained checkpoint available at https://zenodo.org/records/11580401.\n\n    - NPLIB1. The authors use the 4M dataset from MassSpecGym for model pretraining and show a clear benefit via ablation studies. They note that this dataset does not contain any molecules with MCES distance < 2 to any test molecules from MassSpecGym. However, this does not hold for NPLIB1. Suggestion: Please report experimental results on NPLIB1 with similar structures excluded from the pretraining data. This does not have to rely on computationally expensive MCES filtering; a Tanimoto-based filter would suffice. Without this, test fold results may be based on the same training examples up to a difference in the groundtruth and predicted fingerprints.\n\n- Top-k accuracy definition. The current definition of Top-k accuracy (Line 202) appears inconsistent with prior work, such as NPLIB1 and MassSpecGym, which use the first 14 characters of InChIKeys (i.e., 2D InChIKeys) for exact matching rather than SELFIES strings. Suggestion: Please recompute the metric using 2D InChIKeys to ensure consistency and comparability with prior studies.\n\n### Minor comments\n\n- Lines 3–6; Lines 37–38. Please note that there is a prior work applying large-scale pretraining on mass spectra. Please include these papers when discussing related works:  \n  - https://www.nature.com/articles/s41587-025-02663-3 (self-supervised pretraining in metabolomics)  \n  - https://www.nature.com/articles/s41592-022-01496-1 (contrastive pretraining in proteomics)\n\n- Line 69. Please clarify why mass spectra are described as discrete. Each peak corresponds to a 2D continuous data point (m/z, intensity).\n\n- Line 98. Typo: RetorBridge → RetroBridge\n\n- Line 102. Please mention that DiffMS uses the chemical formula as input. This is an important practical detail, as computing the formula is often computationally expensive.\n\n- Line 125. Please note that bits in hashed Morgan fingerprints are not associated with specific substructures.\n\n- Figure 2. In the caption, please clarify what is meant by “reliably computed fingerprints.” While MIST is a strong open-source fingerprint predictor, it is difficult to assess reliability without further explanation or supporting statistics.\n\n- Lines 143; 167; 316. I recommend explicitly stating that tokenization of mass spectra is done via MIST. As currently written, this could be misunderstood as simple spectrum binning or a similar procedure.\n\n- Line 181. Typo: loss[ → loss [\n\n- Line 186. Please explain what is meant by “MS-BART can assign a balanced probability mass across the whole sequence.” This statement is unclear.\n\n- Line 213. Please clarify why “generated molecules are not repeated.”\n\n- Lines 245–247. Please note that a Tanimoto threshold of >0.75 is generally interpreted as a “close match” in the literature.\n\n- Lines 253–258, 293–296, 307–308. Consider moving these details to “datasets” or “implementation” sections.\n\n- Line 283. Typo: train → trained\n\n- Line 290. Typo: slected → selected\n\n- Line 313. Please specify the number of parameters in the MS-BART model.\n\nQUESTIONS:\n- Would MS-BART have a state-of-the-art performance under corrected evaluation protocols? My current score is 3: Borderline reject. However, if the authors address my major concerns and demonstrate that the method indeed achieves state-of-the-art results, I will raise my score to 5: Accept.\n- MIST does not appear to have a particularly excellent performance on MassSpecGym. Can MS-BART effectively handle predicted fingerprints which may be low-quality?\n- Did the authors experiment with adding chemical formula tokens to the input/output sequence of MS-BART?\n\nLIMITATIONS:\nyes", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 4, "CLARITY": 3, "IMPACT": 3, "ORIGINALITY": 3, "DATE": "2025-06-19"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper proposes MS-BART, a novel cross-modal framework with a multitask training objective that jointly model mass spectra modality and molecular structure modality. To improve MS-BART robustness and generalizability, the authors propose a finetuning stage using experimental data generated by MIST, and further a chemical feedback mechanism. With extensive evaluation, MS-BART show state-of-the-art performance on structure prediction task.\n\nSTRENGTHS AND WEAKNESSES:\n**Quality**: The paper is generally of good quality with solid experiment and comparison with baselines, however, the following need further clarification:\n- Q1 in Section 4.3 implementation for binarizing MIST probability, is there any reason the authors choose threshold epsilon=0.2? Have the author evaluated the sensitivity of this threshold hyperparameter?\n- Q2 Could the author provide some error analysis by visualizing how MS-BART in failure case for each of the three stages generated molecule structure compared with the ground truth?\n- Q3 Could the author explain why in Figure 3 middle figure Top-1 accuracy decrease a bit (3.50 --> 3.46) from stage 2 to stage 3?\n- Q4 Given MS-BART's high confidence in next-token predictions as shown in Table 4, is it possible that the model overfit on MassSpecGym? The author \"pretrain MS-BART on a simulated dataset of 4 million fingerprint–molecule pairs\" from MassSpecGym and then evaluate the model on MassSpecGym. Is there some data leakage here or I am no understanding it correctly? It would be appreciated if the author could provide more details regarding how they created simulated dataset containing 4 million fingerprint-molecule pairs and how they ensure that there is no leakage for the test set.\n- Q5 In addition to Q4, suppose the author is doing a clean train validation and test split, they are encouraged to show the structure similarity (e.g. edit distance) between the simulated pre-training dataset, MassSpecGym train, validation and test  and NPLIB1 train, validation and test set.\n- Q6 Table 1 for baseline performance, have the author finetuned MIST on MassSpecGym? It is a bit concerning to see MIST+Neuraldeciper/MSNovelist has non-zero accuracy for NPLIB1 but zero accuracy on MassSpecGym.\n- Q7 It would be great if the author could analyze the model sensitivity of temperature before stage 3 Chemical Feedback to see how stage 3 influence model's confidence.\n- Q8 How sensitive is MS-BART to hyperparameter alpha in equation (5)?\n\n**Clarity**\nThe paper is very well-written. It is well-organized and make it very easy for the reader to follow.\n\n**Novelty & Significance**\nThe paper is the first work applying the pretrain-finetune-alignment paradigm from NLP into mass spectrometry data modeling. However, the model architecture used for each stage is not new, i.e., BART, MIST, and Tanimoto similarity. It is a well-designed application paper, and could be of interest for the computational mass spectrometry analysis, but not very novel in terms of methodology.\n\nQUESTIONS:\nI hope the authors could address Q1-Q8 I listed in Strengths And Weaknesses section. If the author could clarify my confusion in the experiment design and conduct some additional analysis to provide more insights, I will be happy to raise my score.\n\nLIMITATIONS:\nyes", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 4, "CLARITY": 4, "IMPACT": 3, "ORIGINALITY": 2, "DATE": "2025-06-29"}

comments: SUMMARY:
This paper introduces a method to translate tandem mass spectrometry data to molecules. The method operates on predicted fingerprint tokens derived from an off-the-shelf model and performs seq-to-seq translation of the fingerprint tokens to SELFIE tokens.
They perform 2 stages of training: unsupervised pre-training phase and supervised fine-tuning that additionally performs contrastive learning leveraging Tanimoto similarities.
At inference, they perform beam search to produce SELFIE tokens.

STRENGTHS AND WEAKNESSES:
**Strengths**
- The use of active fingerprints as tokens is an interesting and intuitive tokenization scheme.
- The contrastive alignment is a nice and intuitive idea to introduce chemical feedback into the model.
- The authors have shown impressive performance that outperforms existing generative methods on MassSpecGym and NPLIB1 datasets.
- Furthermore, they ablate the performance of pre-training and contrastive learning objectives.

**Weakness**
- The results sections lack comparisons to library matching methods discussed in the related works.
- The comparisons in Table 1, Table 2, and Figure 3 do not have error bars so it is tricky to determine if the ablations show statistically significant results.
- L283 typo "similar"

QUESTIONS:
I would like to understand how significant the results presented in this paper are.

- How well does the model perform on the variant of the MassSpecGym task that provides chemical formulas as input? Is the additional chemical formula information complementary to what the model learns?
- How does the method compare against library matching approaches?
- How statistically significant are the ablation and other results?

LIMITATIONS:
not discussed
TITLE: Official Review
CLARITY: 4
IMPACT: 3
ORIGINALITY: 3
DATE: 2025-07-02

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nMS-BART addresses the challenging task of inferring molecular structures from tandem mass spectra by recasting both spectra and molecules into a unified token language—spectra become sequences of 4,096-bit Morgan fingerprint tokens and molecules are encoded as SELFIES tokens—so that a single Transformer can learn cross-modal correspondences . It employs a three-stage training pipeline: multi-task pretraining on millions of simulated fingerprint–molecule pairs (combining denoising and translation objectives), finetuning on experimental spectra using MIST-predicted fingerprints to adapt to real-world noise, and a novel contrastive “chemical feedback” alignment loss that ranks generated candidates by Tanimoto similarity to the true structure to suppress hallucinations . When evaluated on the NPLIB1 and MassSpecGym benchmarks, MS-BART achieves state-of-the-art top-1 and top-10 accuracies while substantially reducing erroneous predictions, demonstrating that large-scale pretraining and feedback alignment can effectively bridge the gap between spectral data and molecular graphs .\n\nSTRENGTHS AND WEAKNESSES:\n## Strength\nBy tokenizing spectra as Morgan-fingerprint tokens and molecules as SELFIES, MS-BART brings two disparate modalities into a shared Transformer vocabulary, enabling end-to-end learning rather than separate feature engineering and model training.\n\n\n\nLeveraging 4 million simulated fingerprint–molecule pairs and combining denoising plus translation objectives helps the model learn robust spectral–structure correspondences before seeing scarce experimental data.\n\n\n\nMS-BART outperforms prior methods on both NPLIB1 and MassSpecGym in top-1 and top-10 accuracy, as well as in MCES andaverage Tanimoto metrics, demonstrating real-world value on public benchmarks.\n\n\n\nThe paper includes ablations showing the payoff of each stage (pretrain → finetune → align) and experiments on beam width and temperature, giving practitioners guidance on hyperparameter trade-offs.\n\n## Weakness\n\nFinetuning relies on MIST-predicted fingerprints; errors or biases in MIST could propagate through the model, but the paper does not quantify how fingerprint noise impacts downstream accuracy.\n\n\n\nThe unified Transformer and beam search may be resource-intensive; the paper reports relative decoding latency trends but lacks concrete runtime or memory benchmarks for real-time or large-scale deployments.\n\n\n\nThe ranking loss favors candidates with higher global Tanimoto scores, but that metric can be dominated by common substructures rather than spectral features. This may encourage the model to pick “average” molecules that share generic motifs with the ground truthrather than truly spectrally justified structures. \n\n\n\nSince the MADGEN has uploaded updated benchmark results, incorporating those into the evaluation would help readers understand MS-BART’s gains relative to the other model.\n\nQUESTIONS:\nTo what extent do errors in MIST-predicted fingerprints degrade downstream structure elucidation?\n\nDoes MS-BART generalize to spectra acquired under different collision energies, adduct types, or instrument platforms?\n\nLIMITATIONS:\nYes", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 4, "CLARITY": 3, "IMPACT": 4, "ORIGINALITY": 3, "DATE": "2025-07-03"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper proposes MS-BART, a unified modeling framework that represents both mass spectra and molecular structures using a shared vocabulary, enabling pretraining–finetuning–alignment in the style of large language models. The authors represent mass spectra via molecular fingerprints, then pretrain on 4M unlabeled fingerprint–molecule pairs, and finally adapt to experimental data using MIST-derived fingerprints and a contrastive alignment step based on Tanimoto similarity. The model demonstrates state-of-the-art performance on NPLIB1 and MassSpecGym benchmarks across most key metrics.\n\nSTRENGTHS AND WEAKNESSES:\n**Strengths**:\n- The paper addresses a timely and challenging problem: molecular structure elucidation from mass spectrometry data, where annotated spectra are scarce and modeling remains difficult.\n- The proposed MS-BART framework integrates ideas from large language models into the specific problem - structure elucidation from MS. The use of a shared vocabulary between mass spectra (via fingerprints) and molecules (via SELFIES) is conceptually elegant and enables a unified pretraining and generation paradigm.\n- The paper is generally well-organized and readable, with helpful visualizations (e.g., Figures 2–5), and includes detailed training and evaluation protocols in the appendix to support reproducibility.\n\n**Weaknesses**:\n- While the method includes three distinct pretraining tasks (SELFIES denoising, fingerprint-to-molecule translation, and hybrid denoising), the ablation study only compares “translation only” and “multi-task” training. It is unclear how each task individually contributes to final performance. More fine-grained ablation would help validate the design choices.\n- The components of the proposed framework—including fingerprint representations, masked sequence modeling, and rank-based alignment loss—are adapted from prior work. And similar methods have been applied to very closely related tasks, such as in “Conditional Molecular Generation Net Enables Automated Structure Elucidation Based on 13C NMR Spectra and Prior Knowledge”, which also uses a unified token vocabulary, similar pretraining tasks, and finetuning for structure elucidation. In this paper, the primary contribution seems to lie in adapting these methods to mass spectrometry, rather than introducing fundamentally new techniques. \n- Despite improved performance over prior models, the absolute accuracy remains low (e.g., top-1 accuracy < 4% on MassSpecGym), suggesting the method remains far from real-world application. This limits immediate practical applicability and calls for more discussion about failure cases, limitations, or downstream usage scenarios.\n- Minor typographical errors (e.g., “hallucaination”, “simliair”, “slected”).\n\nQUESTIONS:\n- **Pretraining Task Ablation**:\nThe paper mentions three pretraining tasks—SELFIES denoising, fingerprint-to-molecule translation, and hybrid denoising—but only compares \"translation only\" versus \"multi-task\" in the ablation study. Could you provide a detailed ablation study of each pretraining task individually to clarify their contributions to the final performance?\n- **Impact of MIST Fingerprint Predictions**:\nYour approach relies on MIST for generating fingerprints from experimental spectra. Can you discuss how inaccuracies in these predictions might affect the overall model performance, and whether there are plans to improve or replace MIST in future versions?\n- **Practical Applicability and Accuracy**:\nThe top-1 accuracy on the MassSpecGym dataset remains under 5%, which is still quite low. How do you envision the model being used in practical applications, and what steps will be taken to improve performance in real-world scenarios? Are there specific strategies to enhance accuracy?\n\nLIMITATIONS:\nYes, the authors have addressed the limitations, particularly with regard to the reliance on MIST for fingerprint predictions. However, it would be beneficial for the authors to more explicitly discuss how these limitations may affect the model's generalizability and any strategies they plan to implement to overcome these challenges.", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 4, "CLARITY": 3, "IMPACT": 2, "ORIGINALITY": 2, "DATE": "2025-07-06"}