SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · aaai_20664 · AAAI · 2022

Adaptive Kernel Graph Neural Network

Liang Zhao, Jianan Zhao, Mingxuan Ju, Yanfang Ye, Shifu Hou, Yujie Fan

Open in the Atlas

Code that ran

5 of 5 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 0 no recorded run), measured 2026-11-22; 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/aaai_20664.json · badge: /api/ran/aaai_20664.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
jumxglhf/AKGNN canonical (classifier label)
classifier basis: census
5 ran · 0 no recorded run
FunctionStatusWhere it lives
calculate_degree Ran
ran; our contract draft was wrong, not the code
jumxglhf/AKGNN/utils_pygcn.py
code served (permissive licence) · get_code("94cc3fbc04dbff1a")
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 dia_matrix. 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 numpy as np
import scipy.sparse as sp

# Create a small sparse matrix
# The function calculates row sums and creates a diagonal matrix from them
# A sparse matrix works well here - let's create a 4x3 sparse matrix
row_indices = np.array([0, 1, 2, 3, 0, 2])
col_indices = np.array([0, 1, 2, 0, 2, 1])
data = np.array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0])
mx = sp.csr_matrix((data, (row_indices, col_indices)), shape=(4, 3))

ARGS = {
    "mx": mx
}
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 dia_matrix — a dia_matrix output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dia_matrix 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
encode_onehot Ran
ran; our contract draft was wrong, not the code
jumxglhf/AKGNN/utils.py
code served (permissive licence) · get_code("3ab88254add4c192")
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 ndarray, ndim 2, dtype family int, shape (6, 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 numpy as np

# The function encode_onehot takes labels as input
# labels should be an array-like of class labels (integers, strings, etc.)
# The function creates a one-hot encoding mapping for unique classes

# Create sample labels with multiple distinct classes
labels = np.array([0, 1, 2, 1, 0, 2], dtype=int)

ARGS = {
    "labels": labels
}
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 ndarray, ndim 2, dtype family int, shape (6, 3) — shape (6, 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
load_data Ran
ran; our contract draft was wrong, not the code
jumxglhf/AKGNN/utils.py
code served (permissive licence) · get_code("43a8c0adebcb268c")
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. 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 numpy as np
import scipy.sparse as sp
import sys
import pickle as pkl
import networkx as nx
import tempfile
import os

torch.manual_seed(0)
np.random.seed(0)

# Create temporary directory and mock data files
tmpdir = tempfile.mkdtemp()
os.makedirs(os.path.join(tmpdir, 'data'), exist_ok=True)

# Create mock dataset files
dataset_str = 'cora'
data_dir = os.path.join(tmpdir, 'data')

# Mock features and labels
n_nodes = 100
n_features = 10
n_classes = 7

# x: training features (60 nodes)
x = sp.csr_matrix(np.random.rand(60, n_features))
with open(os.path.join(data_dir, f'ind.{dataset_str}.x'), 'wb') as f:
    pkl.dump(x, f)

# y: training labels (60 nodes)
y = np.zeros((60, n_classes))
y[np.arange(60), np.random.randint(0, n_classes, 60)] = 1
with open(os.path.join(data_dir, f'ind.{dataset_str}.y'), 'wb') as f:
    pkl.dump(y, f)

# tx: test features (10 nodes)
tx = sp.csr_matrix(np.random.rand(10, n_features))
with open(os.path.join(data_dir, f'ind.{dataset_str}.tx'), 'wb') as f:
    pkl.dump(tx, f)

# ty: test labels (10 nodes)
ty = np.zeros((10, n_classes))
ty[np.arange(10), np.random.randint(0, n_classes, 10)] = 1
with open(os.path.join(data_dir, f'ind.{dataset_str}.ty'), 'wb') as f:
    pkl.dump(ty, f)

# allx: all training features (70 nodes)
allx = sp.csr_matrix(np.random.rand(70, n_features))
with open(os.path.join(data_dir, f'ind.{dataset_str}.allx'), 'wb') as f:
    pkl.dump(allx, f)

# ally: all training labels (70 nodes)
ally = np.zeros((70, n_classes))
ally[np.arange(70), np.random.randint(0, n_classes, 70)] = 1
with open(os.path.join(data_dir, f'ind.{dataset_str}.ally'), 'wb') as f:
    pkl.dump(ally, f)

# graph: adjacency dict
graph = {i: [np.random.randint(0, n_nodes) for _ in range(3)] for i in range(n_nodes)}
with open(os.path.join(data_dir, f'ind.{dataset_str}.graph'), 'wb') as f:
    pkl.dump(graph, f)

# test index file
test_idx_reorder = np.arange(70, 80)
with open(os.path.join(data_dir, f'ind.{dataset_str}.test.index'), 'w') as f:
    for idx in test_idx_reorder:
        f.write(f'{idx}\n')

# Change to temp directory so relative paths work
original_cwd = os.getcwd()
os.chdir(tmpdir)

ARGS = {
    'dataset_str': dataset_str,
    'seed': 0,
    'nodes_per_class': 20
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, numpy, scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
load_data Ran
ran; our contract draft was wrong, not the code
jumxglhf/AKGNN/utils_pygcn.py
code served (permissive licence) · get_code("9a35209e7105505b")
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. 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 numpy as np
import scipy.sparse as sp
import torch
import tempfile
import os

torch.manual_seed(0)

# Create temporary directory and mock dataset files
temp_dir = tempfile.mkdtemp()

# Create mock .content file
# Format: node_id feature1 feature2 ... featureN label
content_data = []
num_nodes = 10
num_features = 5
labels_set = ['label_a', 'label_b', 'label_c']

for i in range(num_nodes):
    node_id = i
    features = ' '.join([str(np.random.rand()) for _ in range(num_features)])
    label = labels_set[i % len(labels_set)]
    content_data.append(f"{node_id} {features} {label}")

content_file = os.path.join(temp_dir, 'test.content')
with open(content_file, 'w') as f:
    f.write('\n'.join(content_data))

# Create mock .cites file
# Format: source_node target_node
cites_data = []
edges = [
    (0, 1), (1, 2), (2, 3), (3, 4),
    (4, 5), (5, 6), (6, 7), (7, 8),
    (8, 9), (9, 0)
]
for src, tgt in edges:
    cites_data.append(f"{src} {tgt}")

cites_file = os.path.join(temp_dir, 'test.cites')
with open(cites_file, 'w') as f:
    f.write('\n'.join(cites_data))

ARGS = {
    'path': temp_dir + '/',
    'dataset': 'test'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
parse_index_file Ran
ran, honoured the contract we drafted
jumxglhf/AKGNN/utils.py
code served (permissive licence) · get_code("5c3fa9402a9405bc")
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) and returned list, ndim 1, dtype family int; 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 tempfile
import os

# Create a temporary file with index data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write("0\n")
temp_file.write("1\n")
temp_file.write("5\n")
temp_file.write("3\n")
temp_file.close()

ARGS = {
    "filename": temp_file.name
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family int — a list 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

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 2 later) and 0 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.

FunctionAlso present inEarliest-datedOthers named
parse_index_file 53 other papers
31 dated earlier, 13 later, 9 same year, order not determinable · 1 only as an assembly brick
1603.08861 (2016-03)
Revisiting Semi-Supervised Learning with Graph Embeddings
1611.07308 (2016-11)
Variational Graph Auto-Encoders
1710.10568 (2017-10)
Stochastic Training of Graph Convolutional Networks with Variance Reduction
and 50 more not named here
encode_onehot 12 other papers
8 dated earlier, 3 later, 1 same year, order not determinable
1609.02907 (2016-09)
Semi-Supervised Classification with Graph Convolutional Networks
1710.10903 (2017-10)
Graph Attention Networks
1803.03735 (2018-03)
Attention-based Graph Neural Network for Semi-supervised Learning
and 9 more not named here
calculate_degree 1 other paper
1 dated earlier
2112.04575 (2021-12)
Adaptive Kernel Graph Neural Network
load_data 1 other paper
1 dated earlier
2112.04575 (2021-12)
Adaptive Kernel Graph Neural Network
load_data 1 other paper
1 dated earlier
2112.04575 (2021-12)
Adaptive Kernel Graph Neural Network

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-22.

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) have demonstrated great success in representation learning for graph-structured data. The layer-wise graph convolution in GNNs is shown to be powerful at capturing graph topology. During this process, GNNs are usually guided by pre-defined kernels such as Laplacian matrix, adjacency matrix, or their variants. However, the adoptions of pre-defined kernels may restrain the generalities to different graphs: mismatch between graph and kernel would entail sub-optimal performance. For example, GNNs that focus on low-frequency information may not achieve satisfactory performance when high-frequency information is significant for the graphs, and vice versa. To solve this problem, in this paper, we propose a novel framework -i.e., namely Adaptive Kernel Graph Neural Network (AKGNN)which learns to adapt to the optimal graph kernel in a unified manner at the first attempt. In the proposed AKGNN, we first design a data-driven graph kernel learning mechanism, which adaptively modulates the balance between all-pass and lowpass filters by modifying the maximal eigenvalue of the graph Laplacian. Through this process, AKGNN learns the optimal threshold between high and low frequency signals to relieve the generality problem. Later, we further reduce the number of parameters by a parameterization trick and enhance the expressive power by a global readout function. Extensive experiments are conducted on acknowledged benchmark datasets and promising results demonstrate the outstanding performance of our proposed AKGNN by comparison with state-of-the-art GNNs. The source code is publicly available at: https://github.com/jumxglhf/AKGNN.

For agents

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

get_harvested_code_for_paper("aaai_20664")
get_code_for_paper("aaai_20664")
have("aaai_20664")

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

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

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

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

Connect an agent — have() is free.