MS2MetGAN: Latent-space adversarial training for metabolite-spectrum matching in MS/MS database search
Authors: Meng Tsai, Alexzander Dwyer, Estelle Nuckels, Yingfeng Wang
Organizations: Department of Computer Science and Engineering, University of Tennessee at Chattanooga, 615 McCallie Ave, Chattanooga, 37403, Tennessee, United States. · Department of Natural Sciences, Middle Georgia State University, 100 University Pkwy, Macon, 31206, Georgia, United States.
Database search is a widely used approach for identifying metabolites from tandem mass spectra (MS/MS). In this strategy, an experimental spectrum is matched against a user-specified database of candidate metabolites, and candidates are ranked such that true metabolite-spectrum matches receive the highest scores. Machine-learning methods have been widely incorporated into database-search-based identification tools and have substantially improved performance. To further improve identification accuracy, we propose a new framework for generating negative training samples. The framework first uses autoencoders to learn latent representations of metabolite structures and MS/MS spectra, thereby recasting metabolite-spectrum matching as matching between latent vectors. It then uses a GAN to generate latent vectors of decoy metabolites and constructs decoy metabolite-spectrum matches as negative samples for training. Experimental results show that our tool, MS2MetGAN, achieves better overall performance than existing metabolite identification methods.
Figures & tables
Figure 1: Overview of the method. MS/MS spectra and metabolite structures are encoded into latent spectrum vectors and latent metabolite vectors by a spectrum autoencoder and a structure autoencoder, respectively. The generative adversarial network (GAN) comprises a generator and a discriminator. The generator produces synthetic latent metabolite vectors conditioned on latent spectrum vectors, whereas the discriminator assigns a true-likeness score to each latent metabolite–spectrum match (MSM), distinguishing true MSMs from decoy MSMs formed by pairing synthetic metabolite latents with the corresponding spectrum latents. These scores are then used to rank metabolite candidates.
MIDAS
SF-Matching
MAGMa+
CSI:FingerID
CFM-ID
CASMI2016SP
90.98%
99.18%
54.92%
59.84%
69.67%
CASMI2017SP
88.10%
83.33%
59.52%
64.29%
61.90%
CASMI2016FP
85.04%
98.16%
57.22%
86.88%
66.40%
CASMI2017FP
67.12%
61.64%
51.37%
30.82%
42.47%
CASMI2022P
68.94%
58.39%
54.04%
77.64%
65.84%
GNPS-S
54.92%
44.04%
30.57%
34.72%
8.29%
Table 1: Identification accuracies of baseline tools and MS2MetGAN for database searching against MetaCyc (bold indicates the highest accuracy)
MIDAS
SF-Matching
MAGMa+
CSI:FingerID
CFM-ID
CASMI2016SP
54.92%
98.36%
32.79%
58.20%
61.48%
CASMI2017SP
57.14%
80.95%
30.95%
69.05%
45.24%
CASMI2016FP
54.59%
95.28%
33.07%
83.99%
57.48%
CASMI2017FP
39.73%
60.27%
27.40%
31.51%
42.47%
CASMI2022P
42.86%
34.16%
29.81%
29.19%
34.78%
GNPS-S
40.42%
64.77%
16.58%
34.72%
72.02%
Table 2: Identification accuracies of baseline tools and MS2MetGAN for database searching against isomer decoys (bold indicates the highest accuracy)
MIDAS
SF-Matching
MAGMa+
CSI:FingerID
MetaCyc Database
66.67%
55.56%
88.89%
77.78%
Isomer Decoys
88.89%
66.67%
100.00%
100.00%
CFM-ID
MetFrag
CMSSP
CSU-MS2
MetaCyc Database
88.89%
88.89%
55.56%
88.89%
Isomer Decoys
100.00%
88.89%
77.78%
100.00%
Table 3: Percentage of test datasets on which MS2MetGAN outperforms baseline tools in pairwise comparisons
GAN-0
GAN-1
GAN-2
GAN-3
GAN-4
CASMI2016SP
80.33%
49.18%
65.57%
61.48%
67.21%
CASMI2017SP
52.38%
33.33%
61.90%
61.90%
57.14%
CASMI2016FP
91.08%
43.04%
72.97%
65.35%
72.44%
CASMI2017FP
100.00%
52.74%
72.60%
69.18%
67.12%
CASMI2022P
33.54%
47.83%
33.54%
35.40%
34.78%
GNPS-S
98.96%
43.01%
67.36%
55.44%
62.18%
Table 4: Identification accuracies of discriminators during training for database searching against MetaCyc (GAN-0 is trained using structural isomers from PubChem as negative samples, and GAN-9 corresponds to MS2MetGAN)
GAN-0
GAN-1
GAN-2
GAN-3
GAN-4
CASMI2016SP
89.34%
55.74%
57.38%
68.85%
77.05%
CASMI2017SP
76.19%
16.67%
19.05%
64.29%
59.52%
CASMI2016FP
92.91%
60.10%
62.99%
67.19%
78.74%
CASMI2017FP
100.00%
45.21%
45.89%
72.60%
76.71%
CASMI2022P
19.88%
34.16%
22.36%
27.33%
32.30%
GNPS-S
82.90%
37.82%
39.90%
52.85%
63.73%
Table 5: Identification accuracies of discriminators during training for database searching against isomer decoys (GAN-0 is trained using structural isomers from PubChem as negative samples, and GAN-9 corresponds to MS2MetGAN)
Appendix figures & tables36 assets
Supplementary material from the paper’s appendix.
Appendix
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
111
37
324
98
111
rank 2
5
1
27
7
24
rank 3
3
0
12
9
9
rank 4
0
1
3
9
6
rank 5
0
1
3
6
1
Appendix
Table S1: Distribution of the true-compound rank in MIDAS database searches against MetaCyc across benchmark spectra datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
121
35
374
90
94
rank 2
0
4
1
20
30
rank 3
0
0
3
8
18
rank 4
0
1
0
5
5
rank 5
0
2
1
6
4
Appendix
Table S2: Distribution of the true-compound rank in SF-Matching database searches against MetaCyc across benchmark spectra datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
67
25
218
75
87
rank 2
10
5
40
17
25
rank 3
2
2
12
7
14
rank 4
1
0
2
4
8
rank 5
1
0
13
3
3
Appendix
Table S3: Distribution of the true-compound rank in MAGMA+ database searches against MetaCyc across benchmark spectra datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
73
27
331
45
125
rank 2
0
2
32
14
11
rank 3
0
2
3
17
4
rank 4
0
0
3
4
3
rank 5
0
1
1
5
1
Appendix
Table S4: Distribution of the true-compound rank in CSI:FingerID database searches against MetaCyc across benchmark spectra datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
85
26
253
62
106
rank 2
14
5
53
28
28
rank 3
6
3
27
12
6
rank 4
6
2
17
10
6
rank 5
4
1
8
9
5
Appendix
Table S5: Distribution of the true-compound rank in CFM-ID database searches against MetaCyc across benchmark spectra datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
52
11
129
26
105
rank 2
14
2
44
7
25
rank 3
4
5
18
10
12
rank 4
4
4
12
8
6
rank 5
5
2
11
4
2
Appendix
Table S6: Distribution of the true-compound rank in MetFrag database searches against MetaCyc across benchmark spectra datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
108
39
324
110
72
rank 2
10
0
29
10
25
rank 3
0
1
5
6
8
rank 4
0
1
7
0
9
rank 5
1
0
5
1
4
Appendix
Table S7: Distribution of the true-compound rank in CMSSP database searches against MetaCyc across benchmark spectra datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
32
23
93
44
67
rank 2
20
7
56
31
27
rank 3
10
4
43
12
15
rank 4
11
3
32
10
11
rank 5
4
0
27
15
11
Appendix
Table S8: Distribution of the true-compound rank in CSU-MS2 database searches against MetaCyc across benchmark spectra datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
100
37
326
120
61
rank 2
0
0
0
1
21
rank 3
0
0
0
0
24
rank 4
0
0
0
0
8
rank 5
0
0
0
0
13
Appendix
Table S9: Distribution of the true-compound rank in MS2MetGAN database searches against MetaCyc across benchmark spectra datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
67
24
208
58
69
rank 2
16
4
39
17
12
rank 3
8
5
28
12
8
rank 4
3
1
13
10
10
rank 5
6
0
23
6
9
Appendix
Table S10: Distribution of the true-compound rank in MIDAS database searches against isomer decoys across benchmark spectra datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
120
34
363
88
55
rank 2
0
4
9
12
15
rank 3
0
1
3
7
12
rank 4
1
1
2
4
6
rank 5
0
1
1
4
6
Appendix
Table S11: Distribution of the true-compound rank in SF-Matching database searches against isomer decoys across benchmark spectra datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
40
13
126
40
48
rank 2
14
4
46
12
12
rank 3
6
5
25
15
10
rank 4
6
0
18
7
9
rank 5
1
1
18
6
7
Appendix
Table S12: Distribution of the true-compound rank in MAGMA+ database searches against isomer decoys across benchmark spectra datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
71
29
320
46
47
rank 2
1
0
13
4
12
rank 3
0
0
3
1
5
rank 4
0
0
3
1
5
rank 5
0
0
0
2
4
Appendix
Table S13: Distribution of the true-compound rank in CSI:FingerID database searches against isomer decoys across benchmark spectra datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
75
19
219
62
56
rank 2
10
7
33
20
14
rank 3
8
2
25
6
6
rank 4
4
0
17
3
6
rank 5
7
1
11
6
5
Appendix
Table S14: Distribution of the true-compound rank in CFM-ID database searches against isomer decoys across benchmark spectra datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
63
13
194
71
62
rank 2
13
0
49
16
21
rank 3
11
2
32
12
13
rank 4
1
2
16
10
11
rank 5
2
1
17
7
5
Appendix
Table S15: Distribution of the true-compound rank in MetFrag database searches against isomer decoys across benchmark spectra datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
109
25
342
117
39
rank 2
7
15
18
6
27
rank 3
0
2
7
7
11
rank 4
1
0
2
2
8
rank 5
1
0
2
3
3
Appendix
Table S16: Distribution of the true-compound rank in CMSSP database searches against isomer decoys across benchmark spectra datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
9
7
29
30
19
rank 2
13
2
21
7
7
rank 3
7
4
21
7
14
rank 4
7
5
21
12
6
rank 5
3
3
19
8
12
Appendix
Table S17: Distribution of the true-compound rank in CSU-MS2 database searches against isomer decoys across benchmark spectra datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
105
38
333
126
61
rank 2
1
1
1
2
13
rank 3
2
0
2
0
9
rank 4
0
0
1
0
8
rank 5
2
0
5
0
4
Appendix
Table S18: Distribution of the true-compound rank in MS2MetGAN database searches against isomer decoys across benchmark spectra datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
98
22
347
146
54
rank 2
0
0
0
0
30
rank 3
0
0
1
0
18
rank 4
0
0
3
0
10
rank 5
1
0
1
0
15
Appendix
Table S19: Distribution of the true-compound rank in GAN-0 database searches against MetaCyc across benchmark spectral datasets (GAN-0 is trained using structural isomers from PubChem as negative samples)
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
60
14
164
77
77
rank 2
2
0
11
2
22
rank 3
0
0
2
1
21
rank 4
2
0
2
0
5
rank 5
0
0
0
1
7
Appendix
Table S20: Distribution of the true-compound rank in GAN-1 database searches against MetaCyc across benchmark spectral datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
80
26
278
106
54
rank 2
0
0
3
0
29
rank 3
0
0
1
0
18
rank 4
0
1
1
1
10
rank 5
0
0
1
0
19
Appendix
Table S21: Distribution of the true-compound rank in GAN-2 database searches against MetaCyc across benchmark spectral datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
75
26
249
101
57
rank 2
1
0
1
0
28
rank 3
0
0
1
0
21
rank 4
0
0
1
1
17
rank 5
0
0
1
0
6
Appendix
Table S22: Distribution of the true-compound rank in GAN-3 database searches against MetaCyc across benchmark spectral datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
82
24
276
98
56
rank 2
1
0
1
0
28
rank 3
0
0
0
0
21
rank 4
0
0
1
1
18
rank 5
0
0
2
0
7
Appendix
Table S23: Distribution of the true-compound rank in GAN-4 database searches against MetaCyc across benchmark spectral datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
91
35
308
107
68
rank 2
0
0
1
0
28
rank 3
0
0
0
1
25
rank 4
0
0
0
0
5
rank 5
0
0
0
1
7
Appendix
Table S24: Distribution of the true-compound rank in GAN-5 database searches against MetaCyc across benchmark spectral datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
91
29
313
111
56
rank 2
0
0
3
1
27
rank 3
1
0
2
0
22
rank 4
1
0
1
0
13
rank 5
1
0
2
1
12
Appendix
Table S25: Distribution of the true-compound rank in GAN-6 database searches against MetaCyc across benchmark spectral datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
99
37
327
119
60
rank 2
0
0
0
0
24
rank 3
0
0
0
0
25
rank 4
0
0
0
0
6
rank 5
0
0
0
0
12
Appendix
Table S26: Distribution of the true-compound rank in GAN-7 database searches against MetaCyc across benchmark spectral datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
91
34
312
117
58
rank 2
0
0
0
2
24
rank 3
2
0
6
0
23
rank 4
1
0
0
0
9
rank 5
2
0
2
0
1
Appendix
Table S27: Distribution of the true-compound rank in GAN-8 database searches against MetaCyc across benchmark spectral datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
109
32
354
146
32
rank 2
1
1
5
0
11
rank 3
1
1
3
0
8
rank 4
0
1
2
0
6
rank 5
2
1
2
0
5
Appendix
Table S28: Distribution of the true-compound rank in GAN-0 database searches against isomer decoys across benchmark spectral datasets (GAN-0 is trained using structural isomers from PubChem as negative samples)
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
68
7
229
66
55
rank 2
4
1
14
7
4
rank 3
3
4
1
6
5
rank 4
3
2
1
5
5
rank 5
3
0
6
1
3
Appendix
Table S29: Distribution of the true-compound rank in GAN-1 database searches against isomer decoys across benchmark spectral datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
70
8
240
67
36
rank 2
3
1
6
7
1
rank 3
2
1
6
1
10
rank 4
1
1
5
3
6
rank 5
0
0
6
0
4
Appendix
Table S30: Distribution of the true-compound rank in GAN-2 database searches against isomer decoys across benchmark spectral datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
84
27
256
106
44
rank 2
1
0
7
6
11
rank 3
1
1
3
2
5
rank 4
1
0
4
1
7
rank 5
2
0
7
0
6
Appendix
Table S31: Distribution of the true-compound rank in GAN-3 database searches against isomer decoys across benchmark spectral datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
94
25
300
112
52
rank 2
3
2
9
2
16
rank 3
2
0
4
1
10
rank 4
1
0
6
3
5
rank 5
2
1
8
1
6
Appendix
Table S32: Distribution of the true-compound rank in GAN-4 database searches against isomer decoys across benchmark spectral datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
96
35
312
114
50
rank 2
3
2
3
3
8
rank 3
0
0
1
3
5
rank 4
1
0
3
0
10
rank 5
1
0
2
2
4
Appendix
Table S33: Distribution of the true-compound rank in GAN-5 database searches against isomer decoys across benchmark spectral datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
114
40
313
135
58
rank 2
0
0
2
2
16
rank 3
0
0
2
1
4
rank 4
0
0
2
0
6
rank 5
1
0
4
0
8
Appendix
Table S34: Distribution of the true-compound rank in GAN-6 database searches against isomer decoys across benchmark spectral datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
105
39
336
125
63
rank 2
0
0
0
1
15
rank 3
0
0
0
2
12
rank 4
0
0
0
0
7
rank 5
0
0
0
0
2
Appendix
Table S35: Distribution of the true-compound rank in GAN-7 database searches against isomer decoys across benchmark spectral datasets
CASMI2016SP
CASMI2017SP
CASMI2016FP
CASMI2017FP
CASMI2022P
total
122
42
381
146
161
rank 1
103
36
333
129
60
rank 2
2
1
4
4
17
rank 3
1
0
2
1
8
rank 4
0
0
0
0
5
rank 5
1
0
4
0
4
Appendix
Table S36: Distribution of the true-compound rank in GAN-8 database searches against isomer decoys across benchmark spectral datasets
Mass spectrometry measures ion mass-to-charge patterns to identify and quantify molecules, with AI linking spectra to structures, peptides, and biological signals.
Accurately identifying metabolites i.e. small molecules from mass spectrometry data remains a core challenge in metabolomics, with broad applications in drug discovery, environmental analysis, and clinical research. We address the Molecule Retrieval task, which consists in recovering the chemical structure of a metabolite from its MS/MS spectrum given a set of candidate molecules. While the recent release of benchmark datasets such as MassSpecGym and Spectraverse has considerably accelerated the development of novel machine learning approaches, the complexity of data preprocessing pipelines and the lack of unified implementations make methods and results difficult to reproduce and compare. We make three contributions. First, we propose a unified framework encompassing recent approaches based on representation alignment and contrastive learning. Second, we introduce MSAlign, inspired by multimodal alignment in vision-language models, which learns a shared representation space by aligning two frozen foundation models (DreaMS for mass spectra and ChemBERTa for molecules) through lightweight MLP projections trained with a candidate-based contrastive objective. MSAlign is simple to implement, fast to train and consistently outperforms existing approaches across all benchmarks. Third, we investigate a long-standing evaluation problem: data splitting strategies in molecule retrieval implicitly trade off data leakage against domain shift. We formalize this tension by introducing a quantitative measure of distribution shift, and use it to evaluate splitting strategies in existing benchmarks. All datasets, splits, candidate sets, and a unified implementation of MSAlign and baselines are publicly released to support reproducible research.
Paul Krzakala, Gabriel Melo, Camille Lançon +4
LTCI, Télécom Paris & CMAP, Ecole Polytechnique, Institut Polytechnique de Paris · LTCI, Télécom Paris, Institut Polytechnique de Paris · CEA, INRAE, MetaboHUB, Université Paris-Saclay +1
Mass spectrometry (MS) stands as a cornerstone analytical technique for molecular identification, yet de novo structure elucidation from spectra remains challenging due to the combinatorial complexity of chemical space and the inherent ambiguity of spectral fragmentation patterns. Recent deep learning approaches, including autoregressive sequence models, scaffold-based methods, and graph diffusion models, have made progress. However, diffusion-based generation for this task remains computationally demanding. Meanwhile, discrete flow matching, which has shown strong performance for graph generation, has not yet been explored for spectrum-conditioned structure elucidation. In this work, we introduce FlowMS, the first discrete flow matching framework for spectrum-conditioned de novo molecular generation. FlowMS generates molecular graphs through iterative refinement in probability space, enforcing chemical formula constraints while conditioning on spectral embeddings from a pretrained formula transformer encoder. Notably, it achieves state-of-the-art performance on 5 out of 6 metrics on the NPLIB1 benchmark: 9.15% top-1 accuracy (9.7% relative improvement over DiffMS) and 7.96 top-10 MCES (4.2% improvement over MS-BART). We also visualize the generated molecules, which further demonstrate that FlowMS produces structurally plausible candidates closely resembling ground truth structures. These results establish discrete flow matching as a promising paradigm for mass spectrometry-based structure elucidation in metabolomics and natural product discovery.
Molecular structure elucidation from tandem mass spectra (MS/MS) is a central inverse problem in analytical chemistry. Most existing approaches to MS/MS identification remain tied to reference libraries or predefined candidate sets, whereas de novo methods aim to generate structures directly from spectra. A common de novo route predicts a molecular fingerprint from the spectrum and then decodes structures from it, enabling decoder pretraining on large molecule-only corpora. However, this paradigm creates a training-inference mismatch: the decoder is trained on oracle fingerprints computed from molecules, but at inference it is queried with a noisy spectrum-induced fingerprint posterior that is typically collapsed to a single thresholded fingerprint. We introduce MS-GPT, which recasts fingerprint-mediated de novo elucidation as spectrum-induced posterior querying of a conditional molecule-language model. MS-GPT conditions a molecule-language model on fingerprints and formulas, then converts the spectrum-induced posterior into a band of fingerprint queries near the oracle-fingerprint manifold through active-bit density calibration. Candidates sampled across this band are pooled and ranked by generation-frequency consensus. A lightweight LoRA adapter further mitigates domain-specific posterior bias while preserving the pretrained molecular prior. On NPLIB1 and MassSpecGym, MS-GPT sets a new state of the art, reaching Top-1/Top-10 exact-match accuracy of 29.8%/41.1% and 23.9%/28.7%, respectively. Candidate-pool scaling shows that efficient autoregressive molecular generation continues to improve recall with a little additional inference cost. The source code and model checkpoints are available at https://github.com/VIKI623/MS-GPT.
Xin Zhao, Yumin Liu, Zhuo Li +5
MoE Key Lab of Artificial Intelligence, AI Institute, School of Computer Science, Shanghai Jiao Tong University, Shanghai, China · Instrumental Analysis Center, Shanghai Jiao Tong University, Shanghai, China · ByteDance Inc., Beijing, China +1