Papers › Nested Graph Neural Networks

Nested Graph Neural Networks

25 Oct 2021NeurIPS 2021 12arXiv:2110.13197archive 2025-07-28

Muhan Zhang, Pan Li

Graph neural network (GNN)'s success in graph classification is closely related to the Weisfeiler-Lehman (1-WL) algorithm. By iteratively aggregating neighboring node features to a center node, both 1-WL and GNN obtain a node representation that encodes a rooted subtree around the center node. These rooted subtree representations are then pooled into a single representation to represent the whole graph. However, rooted subtrees are of limited expressiveness to represent a non-tree graph. To address it, we propose Nested Graph Neural Networks (NGNNs). NGNN represents a graph with rooted subgraphs instead of rooted subtrees, so that two graphs sharing many identical subgraphs (rather than subtrees) tend to have similar representations. The key is to make each node representation encode a subgraph around it more than a subtree. To achieve this, NGNN extracts a local subgraph around each node and applies a base GNN to each subgraph to learn a subgraph representation. The whole-graph representation is then obtained by pooling these subgraph representations. We provide a rigorous theoretical analysis showing that NGNN is strictly more powerful than 1-WL. In particular, we proved that NGNN can discriminate almost all r-regular graphs, where 1-WL always fails. Moreover, unlike other more powerful GNNs, NGNN only introduces a constant-factor higher time complexity than standard GNNs. NGNN is a plug-and-play framework that can be combined with various base GNNs. We test NGNN with different base GNNs on several benchmark datasets. NGNN uniformly improves their performance and shows highly competitive performance on all datasets.

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="2110.13197")

Code

Syntology Ran 1 of 2 code samples harvested from 1 repository linked to this paper; 1 has no recorded run. Of those that ran: 1 ran with no contract checked.

By repository: official repository: 2 samples from 1 repository, 1 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

muhanzhang/nestedgnn officialmentioned in papermentioned on GitHubpytorchMIT report
muhanzhang/NestedGNN 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

2 samples harvested; 1 ran; 0 honoured the contract we drafted; 1 has no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran
1unverified

Licence: 0 of the 2 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 muhanzhang/nestedgnn. “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.

NestedGIN muhanzhang/nestedgnn/kernel/gin.py official repository ran MIT (permissive) · 637bd276b5a19890 · report
train muhanzhang/nestedgnn/run_ogb_mol.py official repository unverified MIT (permissive) · ec256b2c1848c0c8 · report

Tasks

Graph ClassificationGraph Neural NetworkGraph Property Prediction

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Graph Property Prediction ogbg-molhiv Nested GIN+virtual node (ens) Test ROC-AUC 0.7986 ± 0.0105 #20 of 43 Archive leaderboard report
Graph Property Prediction ogbg-molhiv Nested GIN+virtual node (ens) Validation ROC-AUC 0.8080 ± 0.0278 #20 of 43 Archive leaderboard report
Graph Property Prediction ogbg-molhiv Nested GIN+virtual node Test ROC-AUC 0.7834 ± 0.0186 #30 of 43 Archive leaderboard report
Graph Property Prediction ogbg-molhiv Nested GIN+virtual node Validation ROC-AUC 0.8317 ± 0.0199 #30 of 43 Archive leaderboard report
Graph Property Prediction ogbg-molpcba Nested GIN+virtual node (ensemble) Ext. data No #10 of 36 Archive leaderboard report
Graph Property Prediction ogbg-molpcba Nested GIN+virtual node (ensemble) Number of params 44187480 #10 of 36 Archive leaderboard report
Graph Property Prediction ogbg-molpcba Nested GIN+virtual node (ensemble) Test AP 0.3007 ± 0.0037 #10 of 36 Archive leaderboard report
Graph Property Prediction ogbg-molpcba Nested GIN+virtual node (ensemble) Validation AP 0.3059 ± 0.0056 #10 of 36 Archive leaderboard report
Graph Property Prediction ogbg-molpcba Nested GIN+virtual node (ens) Test AP 0.3007 ± 0.0037 #11 of 36 Archive leaderboard report
Graph Property Prediction ogbg-molpcba Nested GIN+virtual node (ens) Validation AP 0.3059 ± 0.0056 #11 of 36 Archive leaderboard report
Graph Property Prediction ogbg-molpcba Nested GIN+virtual node Test AP 0.2832 ± 0.0041 #26 of 36 Archive leaderboard report
Graph Property Prediction ogbg-molpcba Nested GIN+virtual node Validation AP 0.2915 ± 0.0035 #26 of 36 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.

Methods

Test

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