3D Infomax improves GNNs for Molecular Property Prediction

Hannes Stärk, Dominique Beaini, Gabriele Corso, Prudencio Tossou, Christian Dallago, Stephan Günnemann, Pietro Liò

TL;DR

This paper introduces "3D Infomax," a novel self-supervised pre-training method for Graph Neural Networks (GNNs) that enables them to infer implicit 3D molecular geometry from 2D molecular graphs. This approach significantly improves molecular property prediction accuracy, particularly for quantum mechanical properties, and demonstrates strong generalization across diverse molecular datasets.

What Problem Does This Paper Address?

Predicting molecular properties is crucial for fields like drug discovery and materials science. While incorporating 3D molecular structures into GNNs boosts prediction accuracy, obtaining these 3D structures is computationally expensive and infeasible for the massive datasets common in real-world applications. Existing methods for generating 3D conformations are too slow, and purely 2D GNNs miss out on vital geometric information. This paper tackles the challenge of leveraging 3D structural information for molecular property prediction without requiring explicit 3D coordinates during the prediction phase.

Methods

The core innovation is "3D Infomax," a self-supervised pre-training strategy. It involves training a GNN (the "2D Net") to maximize the mutual information between its learned representation of a 2D molecular graph and a representation generated by a separate GNN (the "3D Net") that processes the molecule's 3D conformers. Essentially, the 2D GNN learns to embed latent 3D information from the 2D graph structure. After pre-training, the weights of this 2D GNN are transferred and fine-tuned for downstream tasks where only 2D information is available. The 3D network uses a specific architecture that encodes pairwise atomic distances using sine and cosine functions to capture high-frequency variations, and then applies a message-passing network. The method also explores using multiple conformers of a molecule as additional positive pairs during contrastive learning to further enhance representation learning.

Datasets

Pre-training Datasets: * QM9: Contains 134k small organic molecules with 3D coordinates for one low-energy conformer and 12 quantum mechanical properties. * GEOM-Drugs: Includes 304k realistically-sized molecules with multiple 3D conformers and ensemble Gibbs free energy. * QMugs: Features 665k drug-like molecules with three diverse conformers and conformer-specific quantum mechanical properties.

Fine-tuning Datasets: A variety of datasets are used, including subsets of QM9 and GEOM-Drugs for quantum mechanical properties, and several non-quantum property datasets from MoleculeNet and OGB (e.g., ESOL, Lipo, FreeSolv, HIV, BACE, BBBP, Tox21, ToxCast, SIDER, ClinTox). For fine-tuning, 3D information is deliberately ignored to simulate real-world scenarios.

Key Insights and Ideas

  • Implicit 3D Reasoning: The most significant insight is that a GNN can learn to "reason" about 3D molecular geometry from only 2D graph information through targeted self-supervised pre-training. This bypasses the need for computationally expensive 3D structure generation during inference.
  • Generalization Across Molecular Spaces: The learned representations are remarkably transferable. 3D Infomax shows substantial improvements even when pre-training and fine-tuning datasets involve molecules of vastly different sizes and chemical spaces, suggesting the learned geometric understanding is fundamental.
  • Value of Multiple Conformers: Incorporating information from multiple low-energy conformers during pre-training provides significant benefits, especially for QMugs, highlighting that a single conformer may not fully capture a molecule's dynamic nature.
  • Contrastive Learning for Geometry: The paper demonstrates the effectiveness of contrastive learning, specifically maximizing mutual information, as a principled way to teach a GNN about spatial relationships.

Key Results

  • Significant MAE Reduction: 3D Infomax achieved an average of 22% Mean Absolute Error (MAE) reduction on QM9 quantum mechanical properties compared to a randomly initialized baseline.
  • Superior to Baselines: It consistently outperformed other pre-training methods like GraphCL and specialized 3D pre-training baselines (DisPred, ConfGen) across various datasets.
  • Strong Generalization: Pre-training on GEOM-Drugs and QMugs improved QM9 predictions by 19% and 18% respectively, despite QM9 molecules being much smaller.
  • Fast Inference: After pre-training, the GNN retains its standard inference speed, as it only requires a single forward pass on the 2D graph.
  • Effective 3D Network Design: The proposed 3D network architecture, particularly the use of sine/cosine mappings for pairwise distances, proved crucial for effective representation learning.

Limitations and Future Work

  • Chirality: The current 3D network architecture is invariant to reflection, meaning it cannot distinguish chiral molecules. While this is not evaluated in the current experiments, it could be relevant for certain applications.
  • Comparison to Ground Truth: While 3D Infomax significantly improves performance without explicit 3D data, it doesn't always reach the accuracy of 3D GNNs that use expensive, ground-truth 3D conformers. This gap suggests room for further improvement, especially for conformer-specific properties.
  • Pre-training 3D GNNs: The authors suggest that pre-training 3D GNNs themselves (e.g., SMP) using their 3D Infomax setup could be a promising future direction to further improve performance on tasks requiring accurate 3D information.
  • Computational Cost of Multiple Conformers: Using a large number of conformers with the current contrastive learning setup can become computationally prohibitive due to batch size limitations.
  • Abstract Tasks: Improvements on highly abstract tasks like predicting clinical test outcomes were less pronounced compared to tasks directly related to molecular mechanics (e.g., solubility, lipophilicity).

Summary updated

Abstract

Molecular property prediction is one of the fastest-growing applications of deep learning with critical real-world impacts. Including 3D molecular structure as input to learned models improves their performance for many molecular tasks. However, this information is infeasible to compute at the scale required by several real-world applications. We propose pre-training a model to reason about the geometry of molecules given only their 2D molecular graphs. Using methods from self-supervised learning, we maximize the mutual information between 3D summary vectors and the representations of a Graph Neural Network (GNN) such that they contain latent 3D information. During fine-tuning on molecules with unknown geometry, the GNN still generates implicit 3D information and can use it to improve downstream tasks. We show that 3D pre-training provides significant improvements for a wide range of properties, such as a 22% average MAE reduction on eight quantum mechanical properties. Moreover, the learned representations can be effectively transferred between datasets in different molecular spaces.
BibTeX
@inproceedings{stark2022d,
  author = {Hannes Stärk and Dominique Beaini and Gabriele Corso and Prudencio Tossou and Christian Dallago and Stephan Günnemann and Pietro Liò},
  title = {{3D Infomax improves GNNs for Molecular Property Prediction}},
  booktitle = {International Conference on Machine Learning},
  year = {2022},
  url = {https://openreview.net/forum?id=FiWaNVPaJon},
}
Figure