SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1810.00826 · ICLR · 2018

How Powerful are Graph Neural Networks?

Weihua Hu, Jure Leskovec, Keyulu Xu, Stefanie Jegelka

arXiv · PDF · Open in the Atlas

Code that ran

6 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 0 failures of our instrument; 4 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1810.00826.json · badge: /api/ran/1810.00826.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
gospodima/extended-simgnn community (classifier label)
classifier basis not recorded on the link
3 ran · 0 no recorded run
weihua916/powerful-gnns marked official in Papers with Code
Papers with Code archive
2 ran · 0 no recorded run
egyptdj/graph-neural-mapping community
Papers with Code archive
1 ran · 1 no recorded run
PurdueMINDS/RelationalPooling community
Papers with Code archive
0 ran · 3 no recorded run
FunctionStatusWhere it lives
Discriminator Ran
ran on a synthesized input
egyptdj/graph-neural-mapping/models/graphcnn.py
pointer only (licence: GPL-3.0) · get_code("6e6181d4f831ff7a")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, egyptdj/graph-neural-mapping, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

GraphCNN Ran
ran on a synthesized input · constructed an object; no result was computed
weihua916/powerful-gnns/models/graphcnn.py
code served (permissive licence) · get_code("201255c60d21f681")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, GraphCNN: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Stand-in Graph class to represent graph structure
class Graph:
    def __init__(self, num_nodes, num_edges):
        self.g = list(range(num_nodes))  # node list
        self.neighbors = [[] for _ in range(num_nodes)]
        # Create some simple neighbor connections
        for i in range(num_nodes - 1):
            self.neighbors[i].append(i + 1)
        self.max_neighbor = max([len(n) for n in self.neighbors]) if self.neighbors else 1
        # edge_mat: 2 x num_edges tensor for adjacency
        edges = []
        for i in range(num_nodes - 1):
            edges.append([i, i + 1])
        if edges:
            self.edge_mat = torch.LongTensor(edges).t()
        else:
            self.edge_mat = torch.LongTensor(2, 0)

# Create sample batch of graphs
batch_graph = [
    Graph(num_nodes=3, num_edges=2),
    Graph(num_nodes=4, num_edges=3)
]

# Define arguments for GraphCNN
ARGS = {
    'num_layers': 3,                          # number of layers including input
    'num_mlp_layers': 2,                      # number of MLP layers excluding input
    'input_dim': 4,                           # input feature dimension
    'hidden_dim': 8,                          # hidden dimension
    'output_dim': 2,                          # output classes
    'final_dropout': 0.5,                     # dropout ratio
    'learn_eps': True,                        # learn epsilon parameter
    'graph_pooling_type': 'mean',             # pooling type for graph aggregation
    'neighbor_pooling_type': 'mean',          # pooling type for neighbor aggregation
    'device': torch.device('cpu')             # CPU device
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type GraphCNN — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GraphCNN output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
MLP Ran
ran on a synthesized input · constructed an object; no result was computed
weihua916/powerful-gnns/models/graphcnn.py
code served (permissive licence) · get_code("315335a707b61ec4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, MLP: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "num_layers": 3,
    "input_dim": 4,
    "hidden_dim": 8,
    "output_dim": 2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MLP — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MLP output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
calculate_prec_at_k Ran
ran on a synthesized input
gospodima/extended-simgnn/src/utils.py
code served (permissive licence) · get_code("c3ce89e1da779042")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Read the function to understand what it expects:
# - k: integer for top-k parameter
# - prediction: numpy array that supports .argsort()
# - target: numpy array that supports .argsort(), .sum(), indexing with integer

# Create small numpy arrays with distinct sizes
np.random.seed(0)

k = 3
prediction = np.array([0.9, 0.2, 0.8, 0.1, 0.7])  # 5 elements, scores
target = np.array([1, 0, 1, 0, 1])  # 5 elements, binary targets

ARGS = {
    "k": k,
    "prediction": prediction,
    "target": target
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
calculate_ranking_correlation Ran
ran on a synthesized input
gospodima/extended-simgnn/src/utils.py
code served (permissive licence) · get_code("1697183cb2ca07d3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
from scipy.stats import spearmanr

def rank_corr_function(x, y):
    """Stand-in ranking correlation function that returns an object with .correlation attribute"""
    return spearmanr(x, y)

# Create small numpy arrays for prediction and target
np.random.seed(0)
prediction = np.array([3.2, 1.5, 4.1, 2.8])
target = np.array([3.0, 1.8, 4.2, 2.5])

ARGS = {
    "rank_corr_function": rank_corr_function,
    "prediction": prediction,
    "target": target,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
denormalize_sim_score Ran
ran on a synthesized input
gospodima/extended-simgnn/src/utils.py
code served (permissive licence) · get_code("47f530d7cd2a3985")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import math

# Define minimal graph classes that satisfy the function's needs
class Graph:
    def __init__(self, num_nodes):
        self.num_nodes = num_nodes

# Create two graphs with different node counts for distinct dimensions
g1 = Graph(num_nodes=5)
g2 = Graph(num_nodes=7)

# Create a valid similarity score (must be positive for log to work)
# Using a value between 0 and 1, which is typical for similarity scores
sim_score = 0.5

ARGS = {
    "g1": g1,
    "g2": g2,
    "sim_score": sim_score
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
GIN_InfoMaxReg Not yet run
unverified (harvested, no recorded run)
egyptdj/graph-neural-mapping/models/graphcnn.py
pointer only (licence: GPL-3.0) · get_code("7a017149093e4cd2")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, egyptdj/graph-neural-mapping, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

GinMultiGraph Not yet run
unverified (harvested, no recorded run)
PurdueMINDS/RelationalPooling/GIN/GIN_model.py
pointer only (licence: NONE) · get_code("c36f76cf05961797")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, PurdueMINDS/RelationalPooling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

GinParent Not yet run
unverified (harvested, no recorded run)
PurdueMINDS/RelationalPooling/GIN/GIN_model.py
pointer only (licence: NONE) · get_code("c29df0a91a98fef7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, PurdueMINDS/RelationalPooling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

MLP Not yet run
unverified (harvested, no recorded run)
PurdueMINDS/RelationalPooling/GIN/GIN_model.py
pointer only (licence: NONE) · get_code("a514a7e4552016d2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, PurdueMINDS/RelationalPooling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 10 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Graph Neural Networks (GNNs) are an effective framework for representation learning of graphs. GNNs follow a neighborhood aggregation scheme, where the representation vector of a node is computed by recursively aggregating and transforming representation vectors of its neighboring nodes. Many GNN variants have been proposed and have achieved state-of-the-art results on both node and graph classification tasks. However, despite GNNs revolutionizing graph representation learning, there is limited understanding of their representational properties and limitations. Here, we present a theoretical framework for analyzing the expressive power of GNNs to capture different graph structures. Our results characterize the discriminative power of popular GNN variants, such as Graph Convolutional Networks and GraphSAGE, and show that they cannot learn to distinguish certain simple graph structures. We then develop a simple architecture that is provably the most expressive among the class of GNNs and is as powerful as the Weisfeiler-Lehman graph isomorphism test. We empirically validate our theoretical findings on a number of graph classification benchmarks, and demonstrate that our model achieves state-of-the-art performance. * Equal contribution. † Work partially performed while in Tokyo, visiting Prof. Ken-ichi Kawarabayashi. ‡ Work partially performed while at RIKEN AIP and University of Tokyo.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("1810.00826")
get_code_for_paper("1810.00826")
have("1810.00826")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/1810.00826.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/1810.00826.svg)](https://syntology.ai/paper/1810.00826)

Connect an agent — have() is free.