Does GNN Pretraining Help Molecular Representation?

Ruoxi Sun, Hanjun Dai, Adams Wei Yu

In the world of Natural Language Processing and Computer Vision, "pretrain then fine-tune" is the undisputed law of the land. We take a massive model, let it read the internet or look at millions of photos, and then teach it a specific task. Naturally, researchers in drug discovery hoped to replicate this success with Graph Neural Networks (GNNs) for molecules.

However, a recent paper from Google Research throws a bucket of cold water on this enthusiasm. The authors ask a pointed question: Does GNN pretraining actually help molecular representation? Their findings suggest that the answer is often "not as much as we thought."

TL;DR

While the AI community has claimed several successes in self-supervised pretraining for molecules, this study finds that these gains are often statistically insignificant or disappear when compared against strong baselines. The paper reveals that simple hand-crafted features and rigorous hyperparameter tuning often matter more than the pretraining task itself.

What Problem Does This Paper Address?

Labeling biomedical data is a nightmare—it’s slow, expensive, and requires expert chemists. To bypass this, researchers have been pretraining GNNs on millions of unlabeled molecules (using "self-supervised" tasks like predicting a masked atom) before fine-tuning them on small, labeled datasets for tasks like toxicity prediction.

While many papers claim "state-of-the-art" results using this paradigm, the authors of this study noticed a problem: these results are hard to reproduce, and the "gains" often depend heavily on specific experimental setups. They set out to perform a massive, systematic "stress test" to see if pretraining provides a robust, unconditional advantage or if we’ve been fooling ourselves with noisy metrics.

Methods

The authors conducted a thorough ablation study, isolating every variable in the GNN pipeline:

Overview of the ablation study pipeline
  • Pretraining Objectives: They tested four popular flavors: Masking (predicting hidden atoms), Context Prediction (predicting local neighborhoods), Motif Prediction (detecting functional groups like benzene rings), and Contrastive Learning (matching different views of the same molecule).
  • Supervised Pretraining: They also tested using labeled data from the ChEMBL database as an intermediate step.
  • GNN Architectures: They primarily used GIN (Graph Isomorphism Network) and GraphSage.
  • Input Features: They compared "Basic" features (just atom type and bonds) vs. "Rich" features (adding chemical properties like aromaticity and ring membership).
  • Data Splitting: They looked at how the model performs when the test set is split randomly versus a "Scaffold Split," which forces the model to generalize to entirely new molecular structures.

Datasets

  • Pretraining:
    • ZINC15: 2 million molecules (the standard benchmark).
  • SAVI: A staggering 1 billion molecules. This is the first time a dataset of this scale has been used to test GNN pretraining effectiveness.
  • ChEMBL: 500k molecules with 1,310 labels for supervised pretraining.
  • Downstream Evaluation: Five benchmarks from MoleculeNet (BBBP, BACE, TOX21, TOXCAST, SIDER).

Key Insights and Ideas

  • The "Easy Task" Trap: The authors found that models reach 90%+ accuracy on pretraining tasks (like predicting a masked atom) almost instantly. Unlike NLP, where predicting the next word is a deep, complex challenge, predicting an atom in a molecule is often "too easy" because of chemical valence rules. The model learns the "grammar" of chemistry quickly but fails to learn the "semantics" needed for drug discovery.
  • Features > Pretraining: One of the most surprising findings was that adding "Rich" hand-crafted chemical features to a model with no pretraining often outperformed a "Basic" model that had been pretrained on millions of molecules.
  • The Hyperparameter Shadow: The study showed that the choice of learning rate and the number of training repeats can have a larger impact on the final score than the choice of pretraining task. In many cases, "pretraining gains" reported in other papers might just be the result of lucky hyperparameter configurations.
  • Scale Doesn't Solve Everything: Moving from 2 million molecules (ZINC15) to 1 billion (SAVI)—a 500x increase—resulted in almost no significant improvement. This suggests that current GNN pretraining methods don't scale the way Large Language Models do.

Key Results

Performance comparison of self-supervised pretraining methods vs. no pretraining
  • Self-Supervised Pretraining (SSP): As shown in the results above, in many settings, SSP alone provided no statistically significant advantage over a model trained from scratch. The average gains across multiple downstream tasks were negligible or even negative (e.g., in contrastive learning).
  • Supervised Pretraining: This was the only method that consistently helped, likely because the pretraining labels (from ChEMBL) were closely aligned with the downstream tasks (toxicity/bio-activity).
  • Scaffold Splits: Pretraining showed more benefit when models were forced to generalize to new molecular scaffolds, but the overall performance was still lower than when using rich features on balanced splits.

Limitations and Future Work

The authors acknowledge several boundaries to their study:

  1. Small Molecules Only: The findings are specific to small molecule drug discovery and might not apply to large protein graphs or social networks.
  2. 2D vs. 3D: The study focused on 2D graph representations. They suggest that incorporating 3D spatial information (conformations) might be necessary to make pretraining more effective.
  3. Architecture Limits: They used 1-WL GNNs (like GIN). It is possible that more expressive architectures (like Graph Transformers) might benefit more from massive datasets like SAVI.

The Bottom Line: If you're building a molecular GNN today, don't assume a pretrained model is a silver bullet. You might get more "bang for your buck" by refining your input features and rigorously tuning your hyperparameters.

Summary updated

BibTeX
@inproceedings{sun2022does,
  author = {Ruoxi Sun and Hanjun Dai and Adams Wei Yu},
  title = {{Does GNN Pretraining Help Molecular Representation?}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=uytgM9N0vlR},
}
Figure