3D-MolT5: Towards Unified 3D Molecule-Text Modeling with 3D Molecular Tokenization

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

Abstract

The integration of molecule and language has garnered increasing attention in molecular science. Recent advancements in Language Models (LMs) have demonstrated potential for the comprehensive modeling of molecule and language. However, existing works exhibit notable limitations. Most existing works overlook the modeling of 3D information, which is crucial for understanding molecular structures and also functions. While some attempts have been made to leverage external structure encoding modules to inject the 3D molecular information into LMs, there exist obvious difficulties that hinder the integration of molecular structure and language text, such as modality alignment and separate tuning. To bridge this gap, we propose 3D-MolT5, a unified framework designed to model both 1D molecular sequence and 3D molecular structure. The key innovation lies in our methodology for mapping fine-grained 3D substructure representations (based on 3D molecular fingerprints) to a specialized 3D token vocabulary for 3D-MolT5. This 3D structure token vocabulary enables the seamless combination of 1D sequence and 3D structure representations in a tokenized format, allowing 3D-MolT5 to encode molecular sequence (SELFIES), molecular structure, and text sequences within a unified architecture. Alongside, we further introduce 1D and 3D joint pre-training to enhance the model's comprehension of these diverse modalities in a joint representation space and better generalize to various tasks for our foundation model. Through instruction tuning on multiple downstream datasets, our proposed 3D-MolT5 shows superior performance than existing methods in molecular property prediction, molecule captioning, and text-based molecule generation tasks.

Introduction

While Large Language Models (LLMs) have become proficient at processing molecules via 1D strings like SMILES or SELFIES, they remain largely disconnected from the 3D spatial reality of chemistry. A molecule’s function is often dictated by its geometric shape—how it twists, folds, and fits into biological targets. Existing attempts to bridge this gap typically involve "plugging in" external 3D encoders (such as Graph Neural Networks) into language models. However, this approach often results in a "modality gap," where the language model struggles to align continuous geometric features with discrete text tokens, leading to poor cross-modal interaction.

Methodology: 3D Molecular Tokenization

The core innovation of 3D-MolT5 is treating 3D structure as a native language. Instead of feeding raw 3D coordinates into the model, we introduce a 3D molecular tokenization method based on the Extended 3D Fingerprint (E3FP) algorithm.

  1. Tokenization: E3FP identifies local 3D substructures around each atom, which are then hashed into discrete "3D tokens."
  2. Atomic Alignment: Since most 1D SELFIES tokens represent specific atoms, we directly map 3D tokens to their corresponding 1D tokens. By summing the embeddings of these two modalities, we create a single, unified representation for each atom.
  3. Unified Architecture: Using a T5 (Text-to-Text Transfer Transformer) backbone, the model is naturally suited for translating between 1D strings, 3D tokens, and natural language.
The 3D-MolT5 framework unifies 1D SELFIES, 3D structures, and natural language through joint pre-training tasks including denoising and cross-modal translation.

Multi-task Pre-training

To force the model to learn deep relationships between modalities, 3D-MolT5 is pre-trained on five distinct tasks: 1D Denoising, 1D + 3D Joint Denoising, 3D-to-1D Translation, 3D-to-Text generation, and Text-to-1D generation. This joint pre-training ensures the model develops a robust internal representation space that spans chemical structures and textual descriptions.

Experimental Results

3D-MolT5 was evaluated across a variety of benchmarks, demonstrating significant improvements over previous state-of-the-art (SOTA) models.

Molecular Property Prediction

On the PubChemQC dataset, 3D-MolT5 achieved a 70% improvement in Mean Absolute Error (MAE) for electronic properties like the HOMO-LUMO gap compared to the previous SOTA, 3D-MoLM. This highlights the critical importance of 3D structural information for predicting physical and electronic characteristics that 1D strings cannot fully capture.

Performance comparison on molecular property prediction benchmarks. 3D-MolT5 demonstrates significant improvements, particularly in 3D-dependent electronic properties like HOMO and LUMO.

Molecule Captioning and Generation

The model significantly outperformed Llama2-7B and other specialized models in generating accurate textual descriptions of molecules (Molecule Captioning). This suggests that the unified tokenization allows the model to "understand" the relationship between a molecule's physical shape and its chemical nomenclature more effectively than models relying solely on 1D data.

Conclusion

3D-MolT5 represents a significant step toward unified molecular modeling. By discretizing 3D structures into a token vocabulary, we bypass the modality alignment issues that plague hybrid encoder-decoder architectures. While the current hashing process is irreversible—meaning the model cannot yet generate 3D coordinates from scratch—the framework provides a powerful foundation for molecular property prediction and text-based chemical discovery. Future work will focus on incorporating decoders capable of reconstructing 3D geometry for true de novo molecular design.

Summary updated

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