SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2201.11349 · 2022

Confidence May Cheat: Self-Training on Graph Neural Networks under Distribution Shift

arXiv · PDF · Open in the Atlas

Code that ran

4 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; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 0 failures of our instrument; 1 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/2201.11349.json · badge: /api/ran/2201.11349.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
bupt-gamma/dr-gst community (classifier label)
classifier basis not recorded on the link
4 ran · 1 no recorded run
FunctionStatusWhere it lives
Centroid_train Ran
ran on a synthesized input
bupt-gamma/dr-gst/baseline/utils_baseline.py
code served (permissive licence) · get_code("4521b5b0afa65281")
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 (4, 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

torch.manual_seed(0)

# Create small tensors for the function
batch_size = 2
feature_dim = 4
nclass = 3

# output: tensor of shape (batch_size, feature_dim)
output = torch.randn(batch_size, feature_dim)

# labels: tensor of class indices, shape (batch_size,)
# We need labels to have values in range [0, nclass)
labels = torch.tensor([0, 1])

# nclass: number of classes
nclass = 3

# device: CPU device
device = torch.device('cpu')

ARGS = {
    'output': output,
    'labels': labels,
    'nclass': nclass,
    '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 (4, 3) — shape (4, 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
generate_mask Ran
ran on a synthesized input
bupt-gamma/dr-gst/utils.py
code served (permissive licence) · get_code("44e0c4604dfd69e9")
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 2, 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 tempfile
import os

torch.manual_seed(0)

# Create temporary directory structure with mock mask files
temp_dir = tempfile.mkdtemp()
data_dir = os.path.join(temp_dir, 'data', 'test_dataset')
os.makedirs(data_dir, exist_ok=True)

# Create mock mask files with sample indices
labelrate = 0.1
train_indices = "0\n1\n2"
val_indices = "3\n4"
test_indices = "5"

with open(os.path.join(data_dir, f'train{labelrate}.txt'), 'w') as f:
    f.write(train_indices)
with open(os.path.join(data_dir, f'val{labelrate}.txt'), 'w') as f:
    f.write(val_indices)
with open(os.path.join(data_dir, f'test{labelrate}.txt'), 'w') as f:
    f.write(test_indices)

# Create labels tensor with 6 elements to match the indices in mask files
labels = torch.tensor([0, 1, 2, 3, 4, 5])

ARGS = {
    'dataset': 'test_dataset',
    'labels': labels,
    'labelrate': labelrate,
    'os_path': os.path.join(temp_dir, 'data', '..').replace('data/..', 'data').rsplit('data', 1)[0]
}
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 tuple, ndim 2, 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_trainmask Ran
ran on a synthesized input
bupt-gamma/dr-gst/utils.py
code served (permissive licence) · get_code("cef3f411794449d9")
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 1, dtype family float, shape (10,) 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 random

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

# Create small tensors for the masks
n_node = 10
nclass = 3
labelrate = 2

# Create boolean masks
train_mask = torch.zeros(n_node, dtype=torch.bool)
train_mask[:7] = True  # 7 nodes in training set

val_mask = torch.zeros(n_node, dtype=torch.bool)
val_mask[7:8] = True  # 1 node in validation set

test_mask = torch.zeros(n_node, dtype=torch.bool)
test_mask[8:] = True  # 2 nodes in test set

# Create labels - class assignments for each node
labels = torch.tensor([0, 1, 2, 0, 1, 2, 0, 1, 2, 1], dtype=torch.long)

ARGS = {
    "train_mask": train_mask,
    "val_mask": val_mask,
    "test_mask": test_mask,
    "n_node": n_node,
    "nclass": nclass,
    "labels": labels,
    "labelrate": labelrate
}
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 1, dtype family float, shape (10,) — shape (10,) 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
negative_sampling Ran
ran on a synthesized input
bupt-gamma/dr-gst/baseline/utils_baseline.py
code served (permissive licence) · get_code("8371f7a6764d0d56")
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 2, 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 torch
import random

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

# Create a small adjacency matrix (sparse format)
# 4 nodes, represented as a sparse tensor
adj_indices = torch.tensor([[0, 1, 2, 3], [1, 2, 3, 0]])
adj_values = torch.tensor([1.0, 1.0, 1.0, 1.0])
adj = torch.sparse_coo_tensor(adj_indices, adj_values, (4, 4))

# Create idx_train: a boolean tensor indicating which nodes are in training set
# Let's say nodes 0, 1, 2 are in training (3 training samples)
idx_train = torch.tensor([True, True, True, False])

# Create args with required attributes
class Args:
    def __init__(self):
        self.n_positive = 2  # sample 2 positive indices from training set
        self.n_negative_per_positive = 1  # sample 1 negative per positive

args = Args()

ARGS = {
    'idx_train': idx_train,
    'args': args,
    'adj': adj
}
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 tuple, ndim 2, dtype family int — 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_pseudo_label_after_aligning Not yet run
unverified (harvested, no recorded run)
bupt-gamma/dr-gst/baseline/utils_baseline.py
code served (permissive licence) · get_code("2c0f252948d55152")
How it ran

no invocation recorded.

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, 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 5 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-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 Convolutional Networks (GCNs) have recently attracted vast interest and achieved state-of-the-art performance on graphs, but its success could typically hinge on careful training with amounts of expensive and time-consuming labeled data. To alleviate labeled data scarcity, self-training methods have been widely adopted on graphs by labeling high-confidence unlabeled nodes and then adding them to the training step. In this line, we empirically make a thorough study for current self-training methods on graphs. Surprisingly, we find that high-confidence unlabeled nodes are not always useful, and even introduce the distribution shift issue between the original labeled dataset and the augmented dataset by self-training, severely hindering the capability of self-training on graphs. To this end, in this paper, we propose a novel Distribution Recovered Graph Self-Training framework (DR-GST), which could recover the distribution of the original labeled dataset. Specifically, we first prove the equality of loss function in self-training framework under the distribution shift case and the population distribution if each pseudo-labeled node is weighted by a proper coefficient. Considering the intractability of the coefficient, we then propose to replace the coefficient with the information gain after observing the same changing trend between them, where information gain is respectively estimated via both dropout variational inference and dropedge variational inference in DR-GST. However, such a weighted loss function will enlarge the impact of incorrect pseudo labels. As a result, we apply the loss correction method to improve the quality of pseudo labels. Both our theoretical analysis and extensive experiments on five benchmark datasets demonstrate the effectiveness of the proposed DR-GST, as well as each well-designed component in DR-GST.

For agents

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

get_harvested_code_for_paper("2201.11349")
get_code_for_paper("2201.11349")
have("2201.11349")

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

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

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

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

Connect an agent — have() is free.