NExT-Mol: 3D Diffusion Meets 1D Language Modeling for 3D Molecule Generation

Zhiyuan Liu, Yanchen Luo, Han Huang, Enzhi Zhang, Sihang Li, Junfeng Fang, Yaorui Shi, Xiang Wang, Kenji Kawaguchi, Tat-Seng Chua

Introduction

Generating molecules that are both chemically valid and geometrically realistic is a fundamental challenge in computational chemistry. While 1D and 2D representations (such as SMILES strings) are abundant and robust, they lack the spatial information necessary for drug discovery and materials science. Conversely, 3D diffusion models excel at modeling spatial coordinates but frequently struggle to adhere to basic chemical rules, often producing structures with invalid valency or unstable geometries.

NExT-Mol addresses this "Goldilocks" problem by bridging the gap between large-scale 1D chemical language modeling and 3D geometric diffusion. By leveraging the massive disparity in available data—over 50 billion 1D sequences versus only a few million high-quality 3D conformers—NExT-Mol uses 1D chemical knowledge as a foundation for superior 3D molecule generation.

Methodology

NExT-Mol utilizes a two-step generative pipeline designed to maximize both chemical validity and geometric accuracy.

1. MoLlama: 1D Chemical Language Modeling

The first component is MoLlama, a 960M parameter decoder-only transformer based on the Llama-2 architecture. It was pretrained on 1.8 billion molecules from the ZINC15 and ZINC22 databases, totaling 90 billion tokens. To ensure absolute chemical validity, the model uses SELFIES (Self-Referencing Embedded Strings) instead of SMILES. SELFIES are mathematically guaranteed to represent 100% valid molecules, providing a robust starting point for the generation process.

2. Diffusion Molecule Transformer (DMT)

To translate 1D sequences into 3D structures, the authors introduced the Diffusion Molecule Transformer (DMT). Unlike traditional models that rely on lossy graph representations, DMT employs Relational Multi-Head Self-Attention (RMHA). This mechanism allows the model to explicitly incorporate 2D graph information—such as specific bonds and inter-atomic distances—directly into the 3D denoising process without sacrificing the scalability of the transformer architecture.

3. Cross-Modal Transfer Learning

The core innovation of NExT-Mol is the cross-modal projector. This component maps the hidden representations learned by MoLlama during its massive 1D pretraining phase into the DMT. This allows the 3D model to "inherit" complex chemical heuristics, such as functional group stability and scaffold patterns, which are difficult to learn from the limited 3D data alone.

Key Insights

  • The "Bitter Lesson" in Chemistry: NExT-Mol demonstrates that general-purpose, scalable architectures (Transformers) can outperform domain-specific inductive biases, such as built-in 3D equivariance, provided they are trained on sufficiently large datasets.
  • 1D Knowledge as a 3D Prior: The research proves that a model trained exclusively on 1D strings develops internal chemical heuristics that are highly transferable to 3D tasks. This is particularly evident when the model predicts the shapes of molecular scaffolds that were absent from the 3D training set.
  • Validity as a Foundation: By enforcing 100% chemical validity at the 1D stage, NExT-Mol avoids the distribution shift issues that plague pure 3D diffusion models, which often waste computational capacity learning to avoid physically impossible structures.

Experimental Results

NExT-Mol was evaluated across several benchmarks, including GEOM-DRUGS and QM9, demonstrating state-of-the-art performance:

  • De Novo Generation: On the GEOM-DRUGS dataset, NExT-Mol achieved a 26% relative improvement in 3D Fréchet ChemNet Distance (FCD), indicating a significantly higher distributional similarity to real-world molecules.
  • Conditional Generation: When generating molecules with specific quantum properties (e.g., dipole moment or HOMO-LUMO gap), the model showed a 13% average relative gain over previous state-of-the-art models like JODO.
  • Conformer Prediction: The DMT-L (Large) variant outperformed existing baselines such as MCF and GeoDiff, proving that relational attention effectively captures the nuances of molecular geometry.
  • Guaranteed Validity: Unlike many 3D diffusion baselines, NExT-Mol’s 1D-first approach ensures that every generated molecule is chemically plausible.

Limitations and Future Directions

Despite its success, NExT-Mol faces several challenges. The integration of a 960M parameter language model increases computational overhead, making training approximately 4x slower per epoch than training a standalone DMT. Additionally, the pair representation in DMT scales quadratically ($O(N^2)$) with the number of atoms, which may limit its application to very large proteins or polymers.

Future work will focus on transitioning from a causal decoder to a natively bi-directional encoder for better representation learning and extending the model to handle multi-modal inputs, such as generating molecules designed to bind within specific protein pockets.

Summary updated

BibTeX
@inproceedings{liu2025next,
  author = {Zhiyuan Liu and Yanchen Luo and Han Huang and Enzhi Zhang and Sihang Li and Junfeng Fang and Yaorui Shi and Xiang Wang and Kenji Kawaguchi and Tat-Seng Chua},
  title = {{NExT-Mol: 3D Diffusion Meets 1D Language Modeling for 3D Molecule Generation}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=p66a00KLWN},
}
Figure