SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.06586 · 2021

Breaking the Limit of Graph Neural Networks by Improving the Assortativity of Graphs with Local Mixing Patterns

arXiv · PDF · Open in the Atlas

Code that ran

6 of 12 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 5 have no contract verdict; 1 failure of our instrument; 6 no recorded run), measured 2026-11-22; 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/2106.06586.json · badge: /api/ran/2106.06586.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
susheels/gnns-and-local-assortativity canonical (classifier label)
classifier basis: census
6 ran · 6 no recorded run
FunctionStatusWhere it lives
check_rm Ran
ran on a synthesized input
susheels/gnns-and-local-assortativity/datasets/bgp.py
code served (permissive licence) · get_code("f6a38e82cb7bacde")
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 bool, 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 torch
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - neighbors_set: iterated over with "for node in neighbors_set"
# - unlabeled_nodes: checked with "if node not in unlabeled_nodes"
# Both appear to be collections that support iteration and membership testing

# Create a simple case where check_rm returns True
# (all nodes in neighbors_set are in unlabeled_nodes)
neighbors_set = {1, 2, 3}
unlabeled_nodes = {1, 2, 3, 4, 5}

ARGS = {
    "neighbors_set": neighbors_set,
    "unlabeled_nodes": unlabeled_nodes
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, 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
chooseNeighbor Ran
ran on a synthesized input
susheels/gnns-and-local-assortativity/struc_sim/algorithms.py
code served (permissive licence) · get_code("a031777e4ebeff8a")
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 numpy as np

np.random.seed(0)

# Create a simple graph structure
# graphs[layer][v] = list of neighbors for node v at layer
graphs = {
    0: {
        0: [10, 11, 12],
        1: [20, 21],
        2: [30, 31, 32, 33]
    },
    1: {
        0: [100, 101],
        1: [200, 201, 202],
        2: [300]
    }
}

# alias_method_j stores the alias table J for each node at each layer
# J[kk] contains the alias index to jump to
alias_method_j = {
    0: {
        0: np.array([0, 1, 2]),
        1: np.array([0, 1]),
        2: np.array([1, 2, 0, 1])
    },
    1: {
        0: np.array([0, 1]),
        1: np.array([1, 2, 0]),
        2: np.array([0])
    }
}

# alias_method_q stores the probabilities q for each node at each layer
# q[kk] is the acceptance probability for index kk
alias_method_q = {
    0: {
        0: np.array([0.6, 0.8, 0.5]),
        1: np.array([0.7, 0.4]),
        2: np.array([0.9, 0.3, 0.6, 0.8])
    },
    1: {
        0: np.array([0.5, 0.9]),
        1: np.array([0.6, 0.7, 0.4]),
        2: np.array([0.8])
    }
}

v = 0
layer = 0

ARGS = {
    "v": v,
    "graphs": graphs,
    "alias_method_j": alias_method_j,
    "alias_method_q": alias_method_q,
    "layer": layer
}
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 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
convert_ndarray Ran
ran on a synthesized input
susheels/gnns-and-local-assortativity/datasets/bgp.py
code served (permissive licence) · get_code("7984390414b770ba")
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 1, dtype family int, shape (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 numpy as np

def convert_ndarray(x):
    y = list(range(len(x)))
    for k, v in x.items():
        y[int(k)] = v
    return np.array(y)

# Construct a dict with string keys that can be converted to integers
# The function creates a list of length len(x), then populates it by iterating
# over the dict items, converting keys to integers and using them as indices
x_dict = {
    "0": 100,
    "1": 200,
    "2": 300,
    "3": 400
}

ARGS = {
    "x": x_dict
}
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 1, dtype family int, shape (4,) — shape (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
filter_rels Ran
ran; our contract draft was wrong, not the code
susheels/gnns-and-local-assortativity/exp.py
code served (permissive licence) · get_code("5e3663ee66aeb1d8")
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 MockData. 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 copy

torch.manual_seed(0)

class MockData:
    def __init__(self):
        self.edge_index = torch.tensor([[0, 1, 0, 1], [1, 0, 0, 1]], dtype=torch.long)
        self.edge_weight = torch.tensor([0.5, 0.7, 0.3, 0.9], dtype=torch.float32)
        self.edge_color = torch.tensor([1, 2, 3, 2], dtype=torch.long)

data = MockData()
r = 2

ARGS = {
    "data": data,
    "r": r,
}
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 MockData — a MockData output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockData 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_degrees Ran
ran on a synthesized input
susheels/gnns-and-local-assortativity/datasets/airports.py
code served (permissive licence) · get_code("a093c2a5cfaf259d")
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 1, dtype family int, shape (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 networkx as nx
import numpy as np

# Create a small graph
G = nx.Graph()
G.add_edges_from([(0, 1), (1, 2), (2, 0), (2, 3)])

ARGS = {
    "G": G
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (4,) — shape (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
rm_useless Ran
ran on a synthesized input
susheels/gnns-and-local-assortativity/datasets/bgp.py
code served (permissive licence) · get_code("4102c2d70e0e526f")
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 networkx as nx
import numpy as np

# Create a small graph with some nodes
G = nx.Graph()
G.add_edges_from([(0, 1), (1, 2), (2, 3), (3, 4), (4, 5)])

# Create feature matrix: 6 nodes, 4 features each
feats = np.random.randn(6, 4)

# Create class map: 6 nodes, 3 classes
class_map = np.array([0, 1, 2, 0, 1, 2], dtype=np.int32)

# Define which nodes are unlabeled (to be removed)
unlabeled_nodes = [3, 4]

# Number of layers parameter
num_layers = 2

ARGS = {
    'G': G,
    'feats': feats,
    'class_map': class_map,
    'unlabeled_nodes': unlabeled_nodes,
    'num_layers': num_layers
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, numpy — 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
build_multigraph_from_layers Not yet run
unverified (harvested, no recorded run)
susheels/gnns-and-local-assortativity/build_multigraph.py
code served (permissive licence) · get_code("5d28fa208f6b62a9")
How it ran

no invocation recorded.

exec_ramdom_walks_for_chunck Not yet run
unverified (harvested, no recorded run)
susheels/gnns-and-local-assortativity/struc_sim/algorithms.py
code served (permissive licence) · get_code("e2522114d54ff7a8")
How it ran

no invocation recorded.

exec_random_walk Not yet run
unverified (harvested, no recorded run)
susheels/gnns-and-local-assortativity/struc_sim/algorithms.py
code served (permissive licence) · get_code("686c85e304c59420")
How it ran

no invocation recorded.

getCompactDegreeLists Not yet run
unverified (harvested, no recorded run)
susheels/gnns-and-local-assortativity/struc_sim/algorithms_distances.py
code served (permissive licence) · get_code("be0549eb08da272a")
How it ran

no invocation recorded.

getCompactDegreeListsVertices Not yet run
unverified (harvested, no recorded run)
susheels/gnns-and-local-assortativity/struc_sim/algorithms_distances.py
code served (permissive licence) · get_code("0dfca563e6da5c5a")
How it ran

no invocation recorded.

getDegreeListsVertices Not yet run
unverified (harvested, no recorded run)
susheels/gnns-and-local-assortativity/struc_sim/algorithms_distances.py
code served (permissive licence) · get_code("4ae621b1fc59fd88")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 6 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 6 later) and 6 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
filter_rels 2 other papers
2 later
2308.09517 (2023-08)
Transitivity-Preserving Graph Representation Learning for Bridging Local Connectivity and Role-based Similarity
2412.15589 (2024-12)
Pre-training Graph Neural Networks on Molecules by Using Subgraph-Conditioned Graph Information Bottleneck
build_multigraph_from_layers 1 other paper
1 later
2601.11135 (2026-01)
Context-aware Graph Causality Inference for Few-Shot Molecular Property Prediction
check_rm 1 other paper
1 later
2308.09517 (2023-08)
Transitivity-Preserving Graph Representation Learning for Bridging Local Connectivity and Role-based Similarity
convert_ndarray 1 other paper
1 later
2308.09517 (2023-08)
Transitivity-Preserving Graph Representation Learning for Bridging Local Connectivity and Role-based Similarity
get_degrees 1 other paper
1 later
2308.09517 (2023-08)
Transitivity-Preserving Graph Representation Learning for Bridging Local Connectivity and Role-based Similarity
rm_useless 1 other paper
1 later
2308.09517 (2023-08)
Transitivity-Preserving Graph Representation Learning for Bridging Local Connectivity and Role-based Similarity

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 achieved tremendous success on multiple graph-based learning tasks by fusing network structure and node features. Modern GNN models are built upon iterative aggregation of neighbor's/proximity features by message passing. Its prediction performance has been shown to be strongly bounded by assortative mixing in the graph, a key property wherein nodes with similar attributes mix/connect with each other. We observe that real world networks exhibit heterogeneous or diverse mixing patterns and the conventional global measurement of assortativity, such as global assortativity coefficient, may not be a representative statistic in quantifying this mixing. We adopt a generalized concept, node-level assortativity, one that is based at the node level to better represent the diverse patterns and accurately quantify the learnability of GNNs. We find that the prediction performance of a wide range of GNN models is highly correlated with the node level assortativity. To break this limit, in this work, we focus on transforming the input graph into a computation graph which contains both proximity and structural information as distinct type of edges. The resulted multi-relational graph has an enhanced level of assortativity and, more importantly, preserves rich information from the original graph. We then propose to run GNNs on this computation graph and show that adaptively choosing between structure and proximity leads to improved performance under diverse mixing. Empirically, we show the benefits of adopting our transformation framework for semi-supervised node classification task on a variety of real world graph learning benchmarks.

For agents

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

get_harvested_code_for_paper("2106.06586")
get_code_for_paper("2106.06586")
have("2106.06586")

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

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

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

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

Connect an agent — have() is free.