3D-MolT5: Leveraging Discrete Structural Information for Molecule-Text Modeling

Qizhi Pei, Rui Yan, Kaiyuan Gao, Jinhua Zhu, Lijun Wu

TL;DR

3D-MolT5 is a unified framework that integrates three-dimensional molecular structures directly into the token space of a T5 language model. By mapping 3D substructures to discrete tokens, the model achieves a massive 70% performance boost in 3D-dependent property prediction and sets new benchmarks for molecule-text tasks.

What Problem Does This Paper Address?

In the world of drug discovery and materials science, molecules are often represented as 1D strings (like SMILES or SELFIES) or 2D graphs. While these formats are useful and computationally lightweight, they ignore a fundamental truth: molecules are 3D objects. Their shape, orientation, and spatial arrangement—their stereochemistry—dictate how they interact and function in the real world.

Current Language Models (LMs) struggle to bridge the gap between natural language text and 3D molecular structures. Previous attempts usually "bolt on" an external 3D encoder to a pre-trained LM. This creates a "modality gap" where the 3D features and the text tokens do not speak the same language, leading to poor alignment and limited interaction during training. The authors of 3D-MolT5 set out to create a model where 3D information isn't an afterthought, but a native part of the model's vocabulary.

Methods

The core innovation of 3D-MolT5 is its 3D molecular tokenization strategy, which allows the model to process 3D structures, 1D sequences, and natural language text within the same unified T5 architecture.

1. Discrete 3D Tokens and Unified Vocabulary

Instead of feeding raw, continuous 3D coordinates into the model, the researchers utilized the Extended 3D Fingerprint (E3FP) algorithm. This method examines an atom and its neighbors within a specific 3D radius, hashing that local environment into a discrete identifier. These identifiers are then treated as "3D tokens" that share a vocabulary space with text and 1D sequence tokens.

3D molecular tokenization process mapping 3D substructures to discrete tokens over multiple iterations.

2. Atomic-Level Alignment

Because SELFIES tokens represent specific atoms, the model can align them perfectly with the corresponding 3D tokens. The architecture sums the 1D and 3D embeddings for each atom, creating a rich, multi-modal representation that captures both sequence and shape without unnecessarily lengthening the input context.

3. Multi-Task Pre-training

To force the model to understand the deep relationships between these modalities, it was pre-trained on five distinct tasks:

  • 1D Denoising: Filling in missing parts of molecular strings or text.
  • 1D + 3D Joint Denoising: Recovering masked 1D tokens using 3D context.
  • Cross-Modal Translation: Converting 3D tokens to 1D strings, 3D structures to text descriptions, and vice versa.
The multi-task pre-training framework of 3D-MolT5, illustrating various denoising and translation tasks across modalities.

Datasets

The researchers utilized a massive array of data for pre-training and evaluation to ensure robust generalization:

  • Pre-training: 50 million molecules from PubChem, 3.37 million 3D structures from PCQM4Mv2, and large-scale text corpora like C4 and PubMed abstracts.
  • Property Prediction: QM9 (quantum properties) and PubChemQC.
  • Molecule-Text Tasks: 3D-MoLM dataset (298k molecule-text pairs) and ChEBI-20 for text-to-molecule generation.
  • General Chemistry: MoleculeNet (for tasks like toxicity and binding) and USPTO-50k (for retrosynthesis).

Key Insights and Ideas

  • Discretization is the Key: By turning continuous 3D coordinates into discrete tokens, the authors bypassed the need for complex, specialized 3D neural network layers. This allowed them to leverage the proven power and scalability of standard Transformer architectures.
  • Summation over Concatenation: The paper found that summing 1D and 3D embeddings at the atom level is highly effective. It keeps the input sequence short (improving computational efficiency) while ensuring the model learns the direct link between an atom's identity and its position in space.
  • 3D Awareness Improves 1D Tasks: Interestingly, training with 3D information improved the model's performance even on tasks that only involve 1D sequences. This suggests that 3D-aware pre-training helps the model build a more robust, fundamental internal "understanding" of chemistry.

Key Results

  • Property Prediction: On the PubChemQC dataset, 3D-MolT5 achieved an improvement of nearly 70% in predicting the HOMO-LUMO gap (a critical quantum property) compared to the previous state-of-the-art, 3D-MoLM.
  • Molecule Captioning: The model significantly outperformed baselines in generating natural language descriptions of molecules, showing a much deeper grasp of how a molecule's structure relates to its function and properties.
  • Generalization: In a "Generalist" setup (using one unified model for many tasks), 3D-MolT5 remained dominant across MoleculeNet benchmarks and retrosynthesis tasks, proving it isn't just a specialist for 3D data but a strong foundational chemistry model.

Limitations and Future Work

  • Irreversible Hashing: The current tokenization process is a "one-way street." Because it uses hashing to create tokens, the model can understand 3D input, but it cannot yet generate precise 3D coordinates from scratch.
  • Information Loss: Any discretization process naturally loses some fine-grained geometric detail compared to continuous coordinate modeling.
  • Future Direction: The authors suggest that future versions could incorporate an external decoder to reconstruct continuous 3D structures from the model's discrete tokens, potentially enabling the model to "dream up" entirely new 3D drug candidates.

Summary updated

BibTeX
@inproceedings{pei2025d,
  author = {Qizhi Pei and Rui Yan and Kaiyuan Gao and Jinhua Zhu and Lijun Wu},
  title = {{3D-MolT5: Leveraging Discrete Structural Information for Molecule-Text Modeling}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=eGqQyTAbXC},
}
Figure