SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.18765 · NeurIPS · 2023

Rethinking Semi-Supervised Imbalanced Node Classification from Bias-Variance Decomposition

Zengfeng Huang, Liang Yan, Shengzhong Zhang, Chen Yang, Gengchen Wei

arXiv · PDF · Open in the Atlas

Code that ran

10 of 11 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, 2 violated it and 0 have no contract verdict; 7 failures of our instrument; 1 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/2310.18765.json · badge: /api/ran/2310.18765.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
yanliang3612/revar canonical (classifier label)
classifier basis: census
10 ran · 1 no recorded run
FunctionStatusWhere it lives
classcenter Ran
ran; our contract draft was wrong, not the code
yanliang3612/revar/src/classcenter.py
code served (permissive licence) · get_code("763b720bcd81d46e")
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

torch.manual_seed(0)

num_classes = 3
batch_size = 6
embedding_dim = 4

# Create anchor and positive representations
anchor_representation = torch.randn(batch_size, embedding_dim)
positive_representation = torch.randn(batch_size, embedding_dim)

# Create labels (class indices for each sample)
labels = torch.tensor([0, 0, 1, 1, 2, 2])

# Create train mask (boolean mask indicating which samples are in training set)
train_mask = torch.tensor([True, True, True, True, True, True])

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

ARGS = {
    'num_classes': num_classes,
    'anchor_representation': anchor_representation,
    'positive_representation': positive_representation,
    'labels': labels,
    'train_mask': train_mask,
    '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 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
compute_accuracy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yanliang3612/revar/src/utils.py
code served (permissive licence) · get_code("9152905367d843e7")
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 numpy as np

torch.manual_seed(0)

# Create small tensors for predictions and labels
# predictions: shape (6,) - 6 samples with class predictions
# labels: shape (6,) - 6 ground truth labels
predictions = torch.tensor([0, 1, 1, 0, 1, 0], dtype=torch.long)
labels = torch.tensor([0, 1, 0, 0, 1, 1], dtype=torch.long)

# Create masks for train, val, test splits
# Each mask is a boolean tensor indicating which samples belong to that split
train_mask = torch.tensor([True, True, False, False, False, False])
val_mask = torch.tensor([False, False, True, True, False, False])
test_mask = torch.tensor([False, False, False, False, True, True])

ARGS = {
    'predictions': predictions,
    'labels': labels,
    'train_mask': train_mask,
    'val_mask': val_mask,
    'test_mask': test_mask
}
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
config2string Ran
ran; our contract draft was wrong, not the code
yanliang3612/revar/src/utils.py
code served (permissive licence) · get_code("66a0df4ab6362faf")
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 str. 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

class SimpleArgs:
    """Stand-in args object with various attribute types."""
    def __init__(self):
        self.learning_rate = 0.001
        self.batch_size = 32
        self.epochs = 10
        self.model_name = "resnet50"
        self.use_dropout = True
        self.regularization = 0.0001
        self.optimizer = "adam"
        self.disabled_feature = False
        self.another_disabled = False
        self.seed = 42
        self.momentum = 0.9

args_obj = SimpleArgs()

ARGS = {
    'args': args_obj
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
data_mask Ran
ran, violated the contract we drafted
yanliang3612/revar/src/data.py
code served (permissive licence) · get_code("cad9ca0ca2f41597")
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 3, 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

torch.manual_seed(0)

class MockData:
    def __init__(self, y, imb_ratio):
        self.y = y
        self.imb_ratio = imb_ratio

# Create a small labels tensor with 2 classes, 6 samples
labels = torch.tensor([0, 0, 0, 1, 1, 1])

data = MockData(
    y=labels,
    imb_ratio=20
)

ARGS = {
    'data': data
}
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 3, 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
data_mask_csrandom Ran
ran, violated the contract we drafted
yanliang3612/revar/src/data.py
code served (permissive licence) · get_code("4208b454d230cfda")
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 3, 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
from torch import Tensor

torch.manual_seed(0)

# Create a small stand-in data object with a y attribute
class Data:
    def __init__(self, y):
        self.y = y

# Create labels tensor with 15 classes (matching the train_counts length in gen_masks_csrandom)
# We need at least enough samples per class to satisfy the train/val split requirements
# train_counts goes up to 41 for class 13, plus val_per_class=30, so we need ~71 samples for that class
# Let's create 100 total samples distributed across 15 classes
labels = torch.tensor([
    0, 0, 0, 1, 1, 2, 2, 2, 3, 3,
    4, 4, 4, 4, 5, 5, 5, 6, 6, 7,
    7, 7, 7, 8, 8, 8, 9, 10, 10, 10,
    10, 11, 11, 11, 11, 12, 12, 12, 13, 13,
    13, 13, 13, 14, 14, 14, 0, 1, 2, 3,
    4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
    0, 0, 1, 1, 2, 2, 3, 3, 4, 4,
    5, 5, 6, 6, 7, 7, 8, 8, 9, 9,
    10, 10, 11, 11, 12, 12, 13, 13, 14, 14,
    0, 1, 2, 3, 4, 5, 6, 7, 8, 9
], dtype=torch.long)

data = Data(y=labels)

ARGS = {
    "data": data
}
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 3, 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
get_graph_drop_transform Ran
ran; our contract draft was wrong, not the code
yanliang3612/revar/src/transform.py
code served (permissive licence) · get_code("ea120e13a23eaa4c")
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 Compose. 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
from torch_geometric.data import Data

torch.manual_seed(0)

# Create a minimal Data object that the transforms will operate on
node_features = torch.randn(2, 4)  # 2 nodes, 4 features
edge_index = torch.tensor([[0, 1, 1, 0], [1, 0, 0, 1]], dtype=torch.long)  # 4 edges
edge_attr = torch.randn(4, 3)  # 4 edges, 3 attributes per edge

data = Data(x=node_features, edge_index=edge_index, edge_attr=edge_attr)

ARGS = {
    'drop_edge_p': 0.3,
    'drop_feat_p': 0.2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torch_geometric — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose 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
make_label_dict Ran
ran; our contract draft was wrong, not the code
yanliang3612/revar/src/sampling.py
code served (permissive licence) · get_code("00519b2173066752")
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 defaultdict. 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
from collections import defaultdict

torch.manual_seed(0)

# Create targets tensor - class labels for each node
# Using small values to represent class indices
targets = torch.tensor([0, 1, 0, 2, 1])

# Create mask tensor - boolean mask indicating which nodes are labeled
# Same length as targets, True where we have labels
mask = torch.tensor([True, False, True, True, False])

ARGS = {
    "targets": targets,
    "mask": mask
}
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 defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict 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
make_labels_matrix Ran
ran, honoured the contract we drafted
yanliang3612/revar/src/sampling.py
code served (permissive licence) · get_code("373be3b2bfdee273")
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 (8, 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

torch.manual_seed(0)

ARGS = {
    "batch_size": 2,
    "num_classes": 4,
    "device": torch.device("cpu"),
}
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 (8, 4) — shape (8, 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
supconloss Ran
ran; our contract draft was wrong, not the code
yanliang3612/revar/src/supconloss.py
code served (permissive licence) · get_code("bb981e0b29ff63e1")
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 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 torch.nn.functional as F

torch.manual_seed(0)

# Create small tensors for anchor and positive representations
# Shape: (batch_size, embedding_dim) = (6, 4)
anchor_rep = torch.randn(6, 4)
positive_rep = torch.randn(6, 4)

# Create a mask tensor (boolean) indicating which samples are labeled
# Shape: (batch_size,) = (6,)
mask = torch.tensor([True, True, True, False, False, False])

# Create labels tensor for labeled samples
# Shape: (batch_size,) = (6,)
# Labels are 0, 1, or 2 for num_classes=3
labels = torch.tensor([0, 1, 2, 0, 1, 2])

# Number of classes
num_classes = 3

ARGS = {
    "anchor_rep": anchor_rep,
    "positive_rep": positive_rep,
    "mask": mask,
    "labels": labels,
    "num_classes": num_classes,
}
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 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
supconloss2 Ran
ran; our contract draft was wrong, not the code
yanliang3612/revar/src/supconloss.py
code served (permissive licence) · get_code("b5fbe4f251aa9ff0")
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 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 torch.nn.functional as F

torch.manual_seed(0)

# Create tiny tensors for anchor and positive representations
# Shape: (batch_size, embedding_dim)
batch_size = 2
embedding_dim = 4

anchor_rep = torch.randn(batch_size, embedding_dim)
positive_rep = torch.randn(batch_size, embedding_dim)

# Create a mask tensor (boolean, same length as batch)
# True means labeled, False means unlabeled
mask = torch.tensor([True, False])

# Create labels tensor for the labeled samples
# num_classes = 3, so labels should be in range [0, 2]
labels = torch.tensor([0, 1])

# Number of classes
num_classes = 3

ARGS = {
    'anchor_rep': anchor_rep,
    'positive_rep': positive_rep,
    'mask': mask,
    'labels': labels,
    'num_classes': num_classes
}
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 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
data_mask_computersrandom Not yet run
unverified (harvested, no recorded run)
yanliang3612/revar/src/data.py
code served (permissive licence) · get_code("aa9b2429b01f7c94")
How it ran

no invocation recorded.

Also present in other papers' code

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

This paper introduces a new approach to address the issue of class imbalance in graph neural networks (GNNs) for learning on graph-structured data. Our approach integrates imbalanced node classification and Bias-Variance Decomposition, establishing a theoretical framework that closely relates data imbalance to model variance. We also leverage graph augmentation technique to estimate the variance, and design a regularization term to alleviate the impact of imbalance. Exhaustive tests are conducted on multiple benchmarks, including naturally imbalanced datasets and public-split class-imbalanced datasets, demonstrating that our approach outperforms state-of-the-art methods in various imbalanced scenarios. This work provides a novel theoretical perspective for addressing the problem of imbalanced node classification in GNNs.

For agents

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

get_harvested_code_for_paper("2310.18765")
get_code_for_paper("2310.18765")
have("2310.18765")

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

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

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

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

Connect an agent — have() is free.