Molecule Joint Auto-Encoding: Trajectory Pretraining with 2D and 3D Diffusion

weitao Du, Jiujiu Chen, Xuecang Zhang, Zhi-Ming Ma, Shengchao Liu

Abstract

In AI-driven drug discovery, representing the complex relationship between a molecule's 2D topological graph and its 3D geometric conformation remains a significant challenge. We present MoleculeJAE (Molecule Joint Auto-Encoding), a novel pretraining framework that unifies generative and contrastive learning by fitting the trajectories of a diffusion process. By utilizing Stochastic Differential Equations (SDEs) to generate data augmentations, MoleculeJAE employs an equivariant encoder to jointly model 2D and 3D representations. Our approach introduces a trajectory-based contrastive loss alongside a reconstructive score-matching objective to capture robust molecular features. MoleculeJAE achieves state-of-the-art performance on 15 out of 20 tasks across the QM9 and MD17 benchmarks, demonstrating superior capability in molecular property and force prediction.

Introduction

The effectiveness of molecular machine learning is often limited by how models represent geometry. Molecules are not static 2D entities; they are dynamic 3D structures (conformers) governed by physical symmetries. Existing self-supervised learning (SSL) methods typically bifurcate into generative approaches, which focus on data reconstruction, and contrastive approaches, which focus on distinguishing between augmented views. While diffusion models have set new standards for 3D molecule generation, their application to representation learning—specifically for capturing the interplay between 2D bonds and 3D shapes—has remained under-explored. MoleculeJAE addresses this gap by treating the diffusion process as a principled framework for joint representation learning.

Methodology

Trajectory Construction via Diffusion

MoleculeJAE utilizes the forward process of a diffusion model as a mathematically grounded method for data augmentation. Using Stochastic Differential Equations (SDEs), the framework defines a path that gradually introduces noise to both 2D bond types and 3D atomic positions. This process creates a "trajectory" from the ground-truth molecule to a state of pure noise, providing a continuous spectrum of augmented views for the model to learn from.

Joint Auto-Encoding Architecture

Unlike standard diffusion models that operate solely on noised inputs, MoleculeJAE adopts a conditional auto-encoding structure. It features an equivariant encoder that takes the clean, ground-truth molecule as a reference to guide the denoising of its noised counterparts. To ensure the model respects physical laws, the architecture utilizes Equivariant Graph Neural Networks (GNNs), maintaining SE(3) symmetry—meaning the learned representations remain invariant to rotations or translations in 3D space.

Dual Learning Objectives

The framework is optimized through two primary objectives:

  1. Reconstructive Task: Utilizing score matching, the model learns to reverse the noise added during the forward process, effectively capturing the marginal distribution of the molecular data.
  2. Contrastive Task: The authors introduce "trajectory contrastive regularization." This objective ensures the model recognizes the inherent correlation between a specific molecule and its various noised states along the diffusion path. This prevents the representation from degrading as noise levels increase, anchoring the latent features to the original molecular identity.

Experimental Setup

Datasets

  • Pretraining: The model was pretrained on the PCQM4Mv2 dataset, which contains 3.4 million molecules, each provided with both 2D topology and 3D geometry.
  • Downstream Evaluation:
    • QM9: 12 tasks focused on quantum mechanical properties, such as energy levels and dipole moments.
  • MD17: 8 tasks focused on predicting the forces acting on atoms during molecular dynamics simulations.
  • GEOM: Used to assess the model's generative capabilities for 2D and 3D structures.

Results and Discussion

MoleculeJAE demonstrated significant improvements over 12 competitive baselines, including established methods like GraphMVP and GeoSSL.

Performance Highlights

  • State-of-the-Art Accuracy: The model achieved SOTA results on 15 out of 20 tasks across the QM9 and MD17 benchmarks.
  • Physical Property Prediction: MoleculeJAE was exceptionally effective at predicting internal energies ($U, U_0$) and enthalpy ($H$) on QM9. Furthermore, it outperformed all baselines on 6 out of 8 force-prediction tasks in MD17, highlighting its precision in modeling atomic interactions.
  • Ablation Studies: Results indicated that the contrastive loss term was critical for success. Even with a small weight ($\lambda_2 = 0.01$), the inclusion of trajectory contrastive regularization significantly improved performance over models using reconstruction alone.

Conclusion and Future Work

MoleculeJAE successfully unifies generative denoising with contrastive learning through a trajectory-based diffusion framework. While the current implementation faces some computational complexity due to the numerical marginalization of the joint distribution, it establishes a powerful new paradigm for molecular SSL. Future research may focus on parameterizing the diffusion trajectories to allow the model to learn optimal augmentation strategies or applying the framework to more advanced backbone architectures like equivariant transformers.

Summary updated

BibTeX
@inproceedings{du2023molecule,
  author = {weitao Du and Jiujiu Chen and Xuecang Zhang and Zhi-Ming Ma and Shengchao Liu},
  title = {{Molecule Joint Auto-Encoding: Trajectory Pretraining with 2D and 3D Diffusion}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=xzmaFfw6oh},
}
Figure