TL;DR
CoRe-Gen addresses a critical "train-test gap" in de novo molecular structure generation from mass spectrometry, where decoders trained on perfect molecular fingerprints fail when fed noisy, predicted ones at deployment. By combining synthetic-spectrum pretraining, noise-matching corruption, and chemistry-aware decoding, CoRe-Gen sets a new state-of-the-art on the NPLIB1 benchmark while running up to 80x faster than diffusion-based alternatives.
What Problem Does This Paper Address?
Identifying the chemical structure of an unknown molecule from its tandem mass spectrum (MS/MS) is a foundational challenge in metabolomics and drug discovery. While retrieval methods match spectra against existing databases, they fail when encountering entirely new, de novo molecules.
To generate novel structures, a popular paradigm splits the task into two steps:
- Translate the spectrum into a molecular fingerprint (a binary vector indicating the presence of specific chemical substructures).
- Decode this fingerprint into a complete molecular string or graph.
However, a glaring issue arises at deployment: while the decoder is trained on clean, "oracle" fingerprints, it must operate on noisy, error-prone fingerprints predicted by the spectrum encoder. This condition mismatch causes structured false-positives and false-negatives to propagate downstream, leading to chemically impossible or wildly inaccurate molecular structures.
Methods
The authors introduce CoRe-Gen, a condition-centric framework designed to handle imperfect fingerprints through three main pillars:
- Improving the Condition (Encoder Pretraining): Real-world paired spectrum-molecule data is scarce and highly long-tailed; rare substructures rarely get trained. CoRe-Gen pretrains its spectrum encoder on massive simulated datasets. Even though simulated spectra have a domain gap, they provide enough coarse chemical evidence to drastically improve the encoder's fingerprint predictions.
- Matching the Condition (Corruption-Aware Decoder Pretraining): Instead of training the decoder on pristine fingerprints, the authors introduce a frequency-aware corruption strategy. Because rare fingerprint bits are harder to predict than common ones, they group bits into frequency buckets and selectively flip them during training to mimic realistic deployment noise.
- Exploiting the Condition (Structure-Aware Decoding): To prevent the autoregressive decoder from spiraling out of control when given a noisy fingerprint, CoRe-Gen injects lightweight chemical priors:
- Compositional SELFIES Embeddings: Breaks down molecular tokens into sub-components (atoms, bonds) so the model shares structural regularities.
- Auxiliary Structural Supervision: Adds training losses that penalize the model if its global counts (like number of rings or double bonds) mismatch the target.
- Rule-Aware Logit Masking: Dynamically blocks the model from generating elements not present in the target molecular formula or violating chemical valency rules.
Datasets
- Encoder Pretraining: A simulated multimodal spectroscopy dataset containing ~790K valid organic molecules, each paired with five types of in-silico MS/MS spectra (generated via CFM-ID 4.0, ICEBERG, and SCARF).
- Decoder Pretraining: A 2.8M fingerprint-molecule corpus compiled from public chemical collections (DSSTox, HMDB, COCONUT, and MOSES).
- Finetuning & Evaluation: Evaluated on two standard benchmarks: NPLIB1 (natural products) and MassSpecGym (a challenging, diverse crowdsourced benchmark).
Key Insights and Ideas
- Synthetic Data is Better for Intermediate Targets: While simulated spectra are often too low-fidelity for direct end-to-end molecular generation, they are highly effective for learning coarse, redundant intermediate targets like molecular fingerprints.
- Uniform Noise is an Oversimplification: Modeling fingerprint corruption uniformly misses the reality of neural network behavior. Rare chemical substructures suffer from much lower prediction precision than common ones. Accounting for this bucket-wise frequency bias is what makes the decoder truly robust.
- Autoregressive Models Can Be Tamed: Sequence-to-sequence models are often criticized in chemistry for generating invalid structures due to local error accumulation. CoRe-Gen proves that you don't need slow, complex graph-generation architectures to fix this; lightweight token factorization and logit masking preserve sequence efficiency while enforcing chemical validity.
Key Results
CoRe-Gen achieves substantial performance leaps on standard benchmarks while maintaining a massive speed advantage:
- NPLIB1 Benchmark SOTA: CoRe-Gen achieved a 19.54% Top-1 exact-match accuracy, more than doubling the performance of the previous best model, DiffMS (8.34%). Its Top-10 accuracy reached 29.92%.
- MassSpecGym Benchmark: CoRe-Gen delivered the best structural similarity scores, leading in Maximum Common Edge Subgraph (MCES) metrics (15.19 at Top-1).
- 80x Speedup: Generating 100 candidate molecules per spectrum took CoRe-Gen roughly 2 seconds on a single RTX 4090 GPU, compared to 29 seconds for MADGEN and 160 seconds for the diffusion-based DiffMS.
Limitations and Future Work
Despite the breakthroughs, the encoder remains the primary bottleneck for perfect molecular reconstruction. The authors include an ablation experiment using Ground Truth (GT) fingerprints, which skyrockets the Top-1 accuracy to 82.91%. This massive headroom indicates that the decoder is now highly capable, but future progress in the field will heavily rely on building more accurate spectrum encoders and developing tighter, condition-aligned pretraining strategies to bridge the remaining gap.
Summary updated