Evaluating Self-Supervised Learning for Molecular Graph Embeddings

Hanchen Wang, Jean Kaddour, Shengchao Liu, Jian Tang, Joan Lasenby, Qi Liu

The "Black Box" Problem in Drug Discovery

In the realm of drug discovery, labeling molecules—such as determining a compound's toxicity or efficacy—is notoriously expensive and time-consuming. Graph Self-Supervised Learning (GSSL) offers a compelling workaround: training models on millions of unlabeled molecules to learn robust representations (embeddings) that can be fine-tuned for downstream tasks.

However, evaluating these models presents a significant "black box" challenge. Traditionally, GSSL models are judged based on their final performance on a handful of Molecular Property Prediction (MPP) tasks. This approach fails to reveal what the model actually learned. Did it capture deep chemical insights, or merely superficial graph statistics? Furthermore, the rankings of various GSSL methods often fluctuate depending on the dataset or evaluation protocol, making it difficult to pinpoint genuine state-of-the-art advancements.

Peeking Inside with MOLGRAPHEVAL

To address these inconsistencies, researchers have introduced MOLGRAPHEVAL, a comprehensive benchmarking suite designed to "peek inside" molecular graph embeddings. Instead of relying solely on final task accuracy, the framework employs a "probing" methodology. By freezing the pre-trained Graph Neural Network (GNN) and training simple linear probe models, researchers can extract and evaluate specific information encoded within the embeddings.

MOLGRAPHEVAL Pipeline

MOLGRAPHEVAL categorizes these probes into three distinct levels of molecular understanding:

  1. Generic Graph Properties: Assesses whether the embedding captures basic topological features, such as a node's degree, centrality, or the overall diameter of the molecule.
  2. Molecular Substructures: Evaluates the model's ability to detect critical chemical motifs, such as benzene rings, amides, or halogens.
  3. Embedding Space Properties: Analyzes the geometric distribution of the embeddings, focusing on Alignment (similar molecules having similar vectors), Uniformity (how well vectors spread across the feature space), and Dimensional Collapse (whether the model wastes embedding dimensions).

Experimental Setup

The study benchmarked nine popular GSSL methods (including GraphCL, JOAO, and GROVER) using a Graph Isomorphism Network (GIN) backbone. The models were pre-trained on the GEOM dataset (approximately 330,000 molecules) and evaluated on eight standard MoleculeNet datasets containing 678 binary prediction tasks. To ensure scalability, the benchmark was also extended to the 2M ZINC15 dataset.

Key Insights and Surprising Findings

Analyzing over 90,000 probe models yielded several unexpected insights into how GSSL methods process molecular data:

1. The "Random" Paradox

Surprisingly, a randomly initialized GNN often outperforms sophisticated GSSL methods at predicting local topological properties like node degree. This suggests that certain GSSL objectives might inadvertently "wash out" basic structural information in their pursuit of more abstract, task-invariant features.

2. Substructures are the Secret Sauce

There is a strong correlation between a model's ability to detect chemical substructures and its success in predicting downstream molecular properties. Contrastive GSSL methods—which compare different augmented "views" of a molecule—proved particularly dominant in capturing these critical motifs.

3. The Uniformity Myth

In domains like computer vision, a "uniform" distribution of embeddings is typically indicative of a healthy, well-optimized model. However, MOLGRAPHEVAL reveals that this does not necessarily hold true for molecular graphs.

Embedding Space Distributions

The researchers found that the model with the most uniform embedding space (InfoGraph) actually ranked poorly on downstream tasks. This suggests that chemical data inherently requires a more "clustered" latent space to accurately represent distinct molecular families and properties.

4. Hyperparameter Divergence

The optimal hyperparameter settings for a model used as a "fixed feature extractor" often diverge completely from the settings required for "fine-tuning." Consequently, researchers might be prematurely discarding highly effective pre-training methods simply because they were evaluated under the wrong protocol.

Overall Performance and Future Directions

While the "best" method varied significantly by dataset, every GSSL method tested provided a substantial performance boost over random initialization for property prediction. Contrastive-based methods like GraphCL, JOAO, and GraphMVP consistently achieved the best overall performance on MPP tasks. Furthermore, GSSL methods effectively combat "dimensional collapse," lifting the spectrum of the embeddings to utilize the available latent space much more effectively than random networks.

Limitations and Next Steps: The authors note that this study primarily focuses on the GIN backbone; exploring different architectures like Transformers or Graph Attention Networks (GATs) might yield different probing profiles. Additionally, while substructure awareness is clearly crucial, current methods do not explicitly optimize for it. Future work will likely focus on developing "geometry-aware" pretext tasks that can better capture the 3D spatial realities of molecules, bridging the gap between 2D graph representations and complex chemical properties.

Summary updated

BibTeX
@inproceedings{wang2023evaluating,
  author = {Hanchen Wang and Jean Kaddour and Shengchao Liu and Jian Tang and Joan Lasenby and Qi Liu},
  title = {{Evaluating Self-Supervised Learning for Molecular Graph Embeddings}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=pyhv4qYCEJ},
}
Figure