Papers › Strategies for Pre-training Graph Neural Networks

Strategies for Pre-training Graph Neural Networks

29 May 2019ICLR 2020 1arXiv:1905.12265archive 2025-07-28

Weihua Hu, Bowen Liu, Joseph Gomes, Marinka Zitnik, Percy Liang, Vijay Pande, Jure Leskovec

Many applications of machine learning require a model to make accurate pre-dictions on test examples that are distributionally different from training ones, while task-specific labels are scarce during training. An effective approach to this challenge is to pre-train a model on related tasks where data is abundant, and then fine-tune it on a downstream task of interest. While pre-training has been effective in many language and vision domains, it remains an open question how to effectively use pre-training on graph datasets. In this paper, we develop a new strategy and self-supervised methods for pre-training Graph Neural Networks (GNNs). The key to the success of our strategy is to pre-train an expressive GNN at the level of individual nodes as well as entire graphs so that the GNN can learn useful local and global representations simultaneously. We systematically study pre-training on multiple graph classification datasets. We find that naive strategies, which pre-train GNNs at the level of either entire graphs or individual nodes, give limited improvement and can even lead to negative transfer on many downstream tasks. In contrast, our strategy avoids negative transfer and improves generalization significantly across downstream tasks, leading up to 9.4% absolute improvements in ROC-AUC over non-pre-trained models and achieving state-of-the-art performance for molecular property prediction and protein function prediction.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="1905.12265")

Code

Syntology Ran 10 of 14 code samples harvested from 3 repositories linked to this paper; 4 have no recorded run. Of those that ran: 3 ran · honoured contract; 4 ran · our draft was wrong; 3 ran with no contract checked.

By repository: official repository: 8 samples from 1 repository, 4 ran; community (archive-listed): 6 samples from 2 repositories, 6 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

snap-stanford/pretrain-gnns officialmentioned on GitHubpytorchMIT report
Wenlin-Chen/ADKF-IFT mentioned on GitHubpytorchNOASSERTION report
fransou/is-meta-learning-necessary mentioned on GitHubpytorch report
gnn4dr/DRKG mentioned on GitHubpytorchApache-2.0 report
hld67890/prml2020_pj mentioned on GitHubpytorch report
jacquesboitreaud/DeepFRED mentioned on GitHubpytorch report
jacquesboitreaud/rna_ne mentioned on GitHubpytorch report
maplightrx/maplight-tdc mentioned on GitHubMIT report
microsoft/fs-mol mentioned on GitHubpytorchNOASSERTION report
snap-stanford/pretrain-gnns mentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

14 samples harvested; 10 ran; 3 honoured the contract we drafted; 4 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

3ran · honoured contract
4ran · our draft was wrong
3ran
4unverified

Licence: 2 of the 14 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 3 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

compute_accuracy snap-stanford/pretrain-gnns/bio/pretrain_masking.py official repository ran · honoured contract MIT (permissive) · 1d31c46fec1fe3d1 · report
cycle_index snap-stanford/pretrain-gnns/bio/pretrain_contextpred.py official repository ran · honoured contract MIT (permissive) · b822dd00427403bf · report
eval snap-stanford/pretrain-gnns/bio/finetune.py official repository ran MIT (permissive) · 17ef9103436a92bf · report
pool_func snap-stanford/pretrain-gnns/bio/pretrain_contextpred.py official repository ran MIT (permissive) · 7164f5ee51907055 · report
eval snap-stanford/pretrain-gnns/chem/pretrain_supervised.py official repository unverified MIT (permissive) · 9e5655ddc71338f6 · report
train snap-stanford/pretrain-gnns/bio/pretrain_contextpred.py official repository unverified MIT (permissive) · 4a6a649883d9c960 · report
train snap-stanford/pretrain-gnns/bio/pretrain_deepgraphinfomax.py official repository unverified MIT (permissive) · 72b72fdcfbe3d398 · report
train snap-stanford/pretrain-gnns/bio/pretrain_edgepred.py official repository unverified MIT (permissive) · b59818bdda2f75f5 · report
ExtractSubstructureContextPair leffff/any-domain-pretrain-gnns/modules/util.py community (archive-listed) ran MIT (permissive) · bbcb70f28827b5eb · report
draw_rec jacquesboitreaud/DeepFRED/model.py community (archive-listed) ran · our draft was wrong no licence file found · pointer only · 222d4809f4d05157 · report
graph_data_obj_to_nx_simple leffff/any-domain-pretrain-gnns/modules/util.py community (archive-listed) ran · honoured contract MIT (permissive) · 287484b87212f47d · report
nx_to_graph_data_obj_simple leffff/any-domain-pretrain-gnns/modules/util.py community (archive-listed) ran · our draft was wrong MIT (permissive) · 1aa34efbfaf5d9ec · report
pretrainLoss jacquesboitreaud/DeepFRED/model.py community (archive-listed) ran · our draft was wrong fingerprinted no licence file found · pointer only · 3ea05514e649e301 · report
reset_idxes leffff/any-domain-pretrain-gnns/modules/util.py community (archive-listed) ran · our draft was wrong MIT (permissive) · 6203c137185fa051 · report

Tasks

Graph ClassificationMolecular Property PredictionOpen-Ended Question AnsweringProperty PredictionProtein Function PredictionRepresentation Learning

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Drug Discovery BACE ContextPred AUC 0.845 #5 of 6 Archive leaderboard report
Drug Discovery BBBP ContextPred AUC 0.687 #4 of 4 Archive leaderboard report
Drug Discovery HIV dataset ContextPred AUC 0.799 #4 of 5 Archive leaderboard report
Drug Discovery MUV ContextPred AUC 0.813 #4 of 5 Archive leaderboard report
Drug Discovery SIDER ContextPred AUC 0.627 #4 of 4 Archive leaderboard report
Drug Discovery Tox21 ContextPred AUC 0.781 #9 of 11 Archive leaderboard report
Drug Discovery ToxCast ContextPred AUC 0.657 #5 of 5 Archive leaderboard report
Drug Discovery clintox ContextPred AUC 0.726 #4 of 4 Archive leaderboard report
Molecular Property Prediction BACE PretrainGNN ROC-AUC 84.5 #5 of 20 Archive leaderboard report
Molecular Property Prediction BBBP PretrainGNN ROC-AUC 68.7 #24 of 29 Archive leaderboard report
Molecular Property Prediction FreeSolv PretrainGNN RMSE 2.764 #21 of 22 Archive leaderboard report
Molecular Property Prediction Lipophilicity PretrainGNN RMSE 0.739 #6 of 13 Archive leaderboard report
Molecular Property Prediction QM7 PretrainGNN MAE 113.2 #8 of 8 Archive leaderboard report
Molecular Property Prediction QM8 PretrainGNN MAE 0.0200 #4 of 8 Archive leaderboard report
Molecular Property Prediction QM9 PretrainGNN MAE 0.00922 #4 of 8 Archive leaderboard report
Molecular Property Prediction SIDER PretrainGNN ROC-AUC 62.7 #14 of 19 Archive leaderboard report
Molecular Property Prediction Tox21 PretrainGNN ROC-AUC 78.1 #8 of 20 Archive leaderboard report
Molecular Property Prediction ToxCast PretrainGNN ROC-AUC 65.7 #5 of 8 Archive leaderboard report
Molecular Property Prediction clintox PretrainGNN ROC-AUC 72.6 #17 of 20 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections