SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2003.10477 · 2020

Distilling Knowledge from Graph Convolutional Networks

arXiv · PDF · Open in the Atlas

Code that ran

7 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 0 failures of our instrument; 0 no recorded run), measured 2026-11-21; 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/2003.10477.json · badge: /api/ran/2003.10477.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
ihollywhy/DistillGCN.PyTorch canonical (classifier label)
classifier basis: census
7 ran · 0 no recorded run
FunctionStatusWhere it lives
evaluate Ran
ran on a synthesized input
ihollywhy/DistillGCN.PyTorch/utils.py
code served (permissive licence) · get_code("adade861c08470cb")
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 tuple, ndim 1, 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 torch
import torch.nn as nn
import numpy as np
from sklearn.metrics import f1_score

torch.manual_seed(0)

# Build a minimal model that satisfies the function's usage
class MinimalGAT(nn.Module):
    def __init__(self):
        super().__init__()
        self.g = None
        self.gat_layers = nn.ModuleList([
            nn.Linear(4, 3),
            nn.Linear(3, 2)
        ])
        self.final = nn.Linear(2, 1)
    
    def forward(self, feats):
        x = feats
        for layer in self.gat_layers:
            x = layer(x)
        output = self.final(x)
        return output

# Create instances
model = MinimalGAT()

# feats: batch_size=2, feature_dim=4
feats = torch.randn(2, 4)

# subgraph: a minimal graph object (the function just assigns it)
class MinimalGraph:
    pass

subgraph = MinimalGraph()

# labels: batch_size=2, binary classification (shape 2, 1)
labels = torch.tensor([[1.0], [0.0]])

# loss function: binary cross entropy
loss_fcn = nn.BCEWithLogitsLoss()

ARGS = {
    "feats": feats,
    "model": model,
    "subgraph": subgraph,
    "labels": labels,
    "loss_fcn": loss_fcn
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
generate_label Ran
ran on a synthesized input
ihollywhy/DistillGCN.PyTorch/utils.py
code served (permissive licence) · get_code("74ef452085c20e34")
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 Tensor, ndim 2, dtype family float, shape (2, 3) 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 torch.nn as nn

torch.manual_seed(0)

# Create a minimal teacher model with gat_layers and forward method
class MinimalGATModel(nn.Module):
    def __init__(self, input_dim=4, output_dim=3):
        super().__init__()
        self.gat_layers = nn.ModuleList([
            nn.Linear(input_dim, output_dim),
            nn.Linear(output_dim, output_dim)
        ])
        self.g = None
    
    def forward(self, feats):
        x = feats
        for layer in self.gat_layers:
            x = layer(x)
        return x

# Create the teacher model
t_model = MinimalGATModel(input_dim=4, output_dim=3)

# Create a minimal subgraph (DGL graph or similar structure)
# For simplicity, we'll create a mock object with the minimal interface needed
class MockSubgraph:
    def __init__(self):
        self.num_nodes = 2
    
    def __repr__(self):
        return f"MockSubgraph(num_nodes={self.num_nodes})"

subgraph = MockSubgraph()

# Create feature tensor: shape (batch_size=2, feature_dim=4)
feats = torch.randn(2, 4)

# Device
device = torch.device('cpu')

ARGS = {
    't_model': t_model,
    'subgraph': subgraph,
    'feats': feats,
    'device': 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 Tensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) 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
get_discriminator Ran
ran on a synthesized input
ihollywhy/DistillGCN.PyTorch/discriminator_model.py
code served (permissive licence) · get_code("f529fb33becac8f2")
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 discriminator_model. 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)

# Create a small stand-in class for feat_info
class FeatInfo:
    def __init__(self):
        self.data = {
            't_feat': (0, 8)  # tuple with shape info, second element is feature dimension
        }
    
    def __getitem__(self, key):
        return self.data[key]

# Create args as a simple namespace/dict
class Args:
    pass

args = Args()

# Create feat_info with the required 't_feat' key
feat_info = FeatInfo()

ARGS = {
    'args': args,
    'feat_info': feat_info
}
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 discriminator_model — a discriminator_model output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a discriminator_model 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
get_transformer_model Ran
ran on a synthesized input
ihollywhy/DistillGCN.PyTorch/atransfor_model.py
code served (permissive licence) · get_code("92eacea3540f32fa")
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 transformer_model. 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)

# Create a simple feat_info dict with student and teacher feature dimensions
feat_info = {
    's_feat': [16],  # Student feature dimension
    't_feat': [32]   # Teacher feature dimension
}

# Create args (can be empty or minimal since the function doesn't use it)
args = {}

ARGS = {
    'args': args,
    'feat_info': feat_info
}
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 transformer_model — a transformer_model output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a transformer_model 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
loss_fn_kd Ran
ran on a synthesized input
ihollywhy/DistillGCN.PyTorch/auxilary_loss.py
code served (permissive licence) · get_code("c2088eb26db4bc18")
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 Tensor, ndim 2, dtype family float, shape (2, 4) 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 torch.nn as nn

torch.manual_seed(0)

# Create small tensors for logits (student) and logits_t (teacher)
# Both should be 2D: (batch_size, num_classes)
# Using batch=2, num_classes=4
logits = torch.randn(2, 4)
logits_t = torch.randn(2, 4)

# alpha and T are hyperparameters
alpha = 0.5
T = 10.0

ARGS = {
    "logits": logits,
    "logits_t": logits_t,
    "alpha": alpha,
    "T": T,
}
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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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
parameters Ran
ran on a synthesized input
ihollywhy/DistillGCN.PyTorch/plot_utils.py
code served (permissive licence) · get_code("eaa7e1b54e1cc490")
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 torch.nn as nn

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

model = SimpleModel()

ARGS = {
    "model": model
}
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
test_model Ran
ran on a synthesized input
ihollywhy/DistillGCN.PyTorch/utils.py
code served (permissive licence) · get_code("37a7a4358779ae46")
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 torch
import torch.nn as nn
import numpy as np
from sklearn.metrics import f1_score

torch.manual_seed(0)

# Build a minimal GAT-like model that has gat_layers attribute
class MinimalGATModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.gat_layers = nn.ModuleList([
            nn.Linear(4, 4),
            nn.Linear(4, 1)
        ])
        self.g = None
    
    def forward(self, feats):
        x = feats
        for layer in self.gat_layers[:-1]:
            x = layer(x)
            x = torch.relu(x)
        x = self.gat_layers[-1](x)
        x = torch.sigmoid(x)
        return x

# Create model instance
model = MinimalGATModel()

# Create a minimal subgraph (can be None or a simple object)
class MinimalGraph:
    pass

subgraph = MinimalGraph()

# Create loss function
loss_fcn = nn.BCELoss()

# Create test dataloader - list of (subgraph, feats, labels) tuples
# We need 2 batches with batch size 2
test_dataloader = []

# Batch 1
feats_1 = torch.randn(2, 4)  # 2 samples, 4 features
labels_1 = torch.randint(0, 2, (2, 1)).float()  # 2 binary labels
test_dataloader.append((subgraph, feats_1, labels_1))

# Batch 2
feats_2 = torch.randn(2, 4)  # 2 samples, 4 features
labels_2 = torch.randint(0, 2, (2, 1)).float()  # 2 binary labels
test_dataloader.append((subgraph, feats_2, labels_2))

# Device is CPU
device = 'cpu'

# Define arguments dict
ARGS = {
    'test_dataloader': test_dataloader,
    'model': model,
    'device': device,
    'loss_fcn': loss_fcn
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, torch — 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

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 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 7 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-21.

Repositories linked to this paper

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

Abstract

Existing knowledge distillation methods focus on convolutional neural networks (CNNs), where the input samples like images lie in a grid domain, and have largely overlooked graph convolutional networks (GCN) that handle non-grid data. In this paper, we propose to our best knowledge the first dedicated approach to distilling knowledge from a pre-trained GCN model. To enable the knowledge transfer from the teacher GCN to the student, we propose a local structure preserving module that explicitly accounts for the topological semantics of the teacher. In this module, the local structure information from both the teacher and the student are extracted as distributions, and hence minimizing the distance between these distributions enables topology-aware knowledge transfer from the teacher, yielding a compact yet high-performance student model. Moreover, the proposed approach is readily extendable to dynamic graph models, where the input graphs for the teacher and the student may differ. We evaluate the proposed method on two different datasets using GCN models of different architectures, and demonstrate that our method achieves the state-of-the-art knowledge distillation performance for GCN models. Code is publicly available at https://github.com/ihollywhy/DistillGCN.PyTorch.

For agents

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

get_harvested_code_for_paper("2003.10477")
get_code_for_paper("2003.10477")
have("2003.10477")

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

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

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

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

Connect an agent — have() is free.