Text-guided Diffusion Model for 3D Molecule Generation

Yanchen Luo, Junfeng Fang, Sihang Li, Zhiyuan Liu, Jiancan Wu, An Zhang, Wenjie Du, Xiang Wang · DOI

Abstract

Traditional generative models for 3D molecular structures often rely on rigid numerical property constraints, limiting their flexibility in complex design scenarios. We present TextSMOG, a text-guided small molecule generation approach that utilizes a 3D diffusion model. By integrating natural language prompts with an equivariant diffusion framework, TextSMOG allows researchers to specify structural motifs and functional behaviors through intuitive textual descriptions. Our results on the QM9 and PubChem datasets demonstrate that TextSMOG achieves superior property accuracy and multi-condition satisfaction compared to existing state-of-the-art models, while maintaining high chemical validity and novelty.

Introduction

In drug discovery and materials science, de novo molecule generation is a critical challenge. Conventional models typically condition generation on scalar values, such as a specific dipole moment. However, chemists often conceptualize molecules through structural motifs and complex biological behaviors that are better described in natural language. For instance, requesting "an aromatic compound with small HOMO-LUMO gaps and a carboxyl group" is more intuitive than providing a list of numerical targets. TextSMOG addresses this gap by providing a universal interface where high-dimensional textual signals guide the 3D diffusion process.

Methods

TextSMOG integrates three core components to bridge the gap between human language and geometric chemistry:

  1. Multi-modal Conversion: A text encoder (BERT) and a molecular graph encoder (GIN) translate a textual prompt $P$ into a Reference Geometry $c_P$. This geometry serves as a structural blueprint derived from the text.
  2. Equivariant Diffusion Model (EDM): The framework utilizes a pre-trained EDM to ensure generated 3D structures are physically sensible and invariant to rotations or translations in 3D space.
  3. Iterative Latent Variable Refinement (ILVR): During the denoising process, the reference geometry "pulls" atoms toward the text-specified structure, while the EDM "pushes" them into chemically stable positions. This "pull and push" dynamic allows for complex conditioning without extensive re-training.
Overview of the TextSMOG architecture, illustrating the conversion of textual prompts into a reference geometry that guides the equivariant diffusion process.

Results

The model was evaluated using the QM9 benchmark and a curated subset of PubChem annotations. TextSMOG demonstrated significant improvements over baselines such as EDM and EEGSDE.

Property Accuracy and Multi-Conditioning

On the QM9 dataset, TextSMOG achieved lower Mean Absolute Error (MAE) across five of six key quantum properties, including heat capacity ($C_v$) and polarizability ($\alpha$). Notably, the model excels in multi-condition scenarios where it must simultaneously satisfy multiple property requirements, outperforming existing methods in balancing competing constraints.

Comparison of Mean Absolute Error (MAE) for various quantum properties across different models. TextSMOG (blue) consistently shows lower error rates compared to EDM and EEGSDE baselines.

Stability and Novelty

TextSMOG maintains high chemical validity, with atom stability reaching approximately 98%. Furthermore, it exhibits increased "novelty" in generated molecules, suggesting a more effective exploration of the chemical space compared to traditional property-conditioned models. Qualitative results further confirm the model's ability to generate complex structures like polycyclic heteroarenes directly from text excerpts.

Discussion and Conclusion

TextSMOG represents a significant advancement in molecular design by enabling natural language as a high-dimensional conditioning signal. While challenges remain regarding data scarcity for high-quality text-3D conformation pairs and the sampling speed of diffusion models, the "pull and push" dynamics of ILVR provide a robust framework for zero-shot generalization. Future work will focus on scaling dataset quality and optimizing sampling efficiency to facilitate rapid, real-world drug discovery.

Summary updated

BibTeX
@misc{luo2024text,
  author = {Yanchen Luo and Junfeng Fang and Sihang Li and Zhiyuan Liu and Jiancan Wu and An Zhang and Wenjie Du and Xiang Wang},
  title = {{Text-guided Diffusion Model for 3D Molecule Generation}},
  year = {2024},
  eprint = {2410.03803},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.03803},
}
Figure