TasksSotADatasetsPapersMethodsSubmitAbout
Papers With Code 2

A community resource for machine learning research: papers, code, benchmarks, and state-of-the-art results.

Explore

Notable BenchmarksAll SotADatasetsPapersMethods

Community

Submit ResultsAbout

Data sourced from the PWC Archive (CC-BY-SA 4.0). Built by the community, for the community.

Papers/Nested Graph Neural Networks

Nested Graph Neural Networks

Muhan Zhang, Pan Li

2021-10-25NeurIPS 2021 12Graph ClassificationGraph Property Prediction
PaperPDFCodeCode(official)

Abstract

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.

Results

TaskDatasetMetricValueModel
Graph Property Predictionogbg-molpcbaNumber of params44187480Nested GIN+virtual node (ensemble)

Related Papers

Density-aware Walks for Coordinated Campaign Detection2025-06-16Positional Encoding meets Persistent Homology on Graphs2025-06-06Weisfeiler and Leman Follow the Arrow of Time: Expressive Power of Message Passing in Temporal Event Graphs2025-05-30Improving the Effective Receptive Field of Message-Passing Neural Networks2025-05-29Graph Positional Autoencoders as Self-supervised Learners2025-05-29Message-Passing State-Space Models: Improving Graph Learning with Modern Sequence Modeling2025-05-24Graph Style Transfer for Counterfactual Explainability2025-05-23Scalable Graph Generative Modeling via Substructure Sequences2025-05-22