SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.10284 · ICML · 2026

Revisiting Positive Samples in Graph Contrastive Learning: From the Perspective of Message Passing

Di Jin, Jitao Zhao, Dongxiao He, Lianze Shan, Ningchong Wang, Cora Pubmed

arXiv · PDF · Open in the Atlas

Code that ran

16 of 26 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 10 failures of our instrument; 10 no recorded run), measured 2026-11-24; 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/2606.10284.json · badge: /api/ran/2606.10284.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
nerdslab/bgrl canonical (classifier label)
classifier basis: census
3 ran · 5 no recorded run
tengxiao1/GraphACL canonical (classifier label)
classifier basis: census
3 ran · 0 no recorded run
Namkyeong/AFGRL community
Papers with Code archive
3 ran · 2 no recorded run
sunisfighting/SIGNA community
Papers with Code archive
2 ran · 0 no recorded run
HanChen-HUST/CSGCL community
Papers with Code archive
1 ran · 1 no recorded run
CRIPAC-DIG/GRACE community
Papers with Code archive
1 ran · 0 no recorded run
hedongxiao-tju/SGRL community
Papers with Code archive
1 ran · 0 no recorded run
junxia97/ProGCL community
Papers with Code archive
1 ran · 0 no recorded run
CRIPAC-DIG/GCA community
Papers with Code archive
1 ran · 0 no recorded run
yifanQi98/HGRL community
Papers with Code archive
0 ran · 2 no recorded run
FunctionStatusWhere it lives
Encoder Ran
ran on a synthesized input · constructed an object; no result was computed
HanChen-HUST/CSGCL/src/model.py
code served (permissive licence) · get_code("bc9359990ebfb346")
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 an instance of its own class, Encoder: the run constructed the object and did not call it, so no result was computed. 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
from torch_geometric.nn import GCNConv

torch.manual_seed(0)

# Small stand-in activation function
def relu_activation(x):
    return torch.relu(x)

# Create tiny tensors for forward pass testing
in_channels = 4
out_channels = 3
num_nodes = 2
num_edges = 2

# Create a small node feature tensor (num_nodes x in_channels)
x = torch.randn(num_nodes, in_channels)

# Create edge index tensor (2 x num_edges)
edge_index = torch.tensor([[0, 1], [1, 0]], dtype=torch.long)

ARGS = {
    "in_channels": in_channels,
    "out_channels": out_channels,
    "activation": relu_activation,
    "base_model": GCNConv,
    "k": 2,
    "skip": False,
}
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 Encoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Encoder 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
Encoder Ran
ran on a synthesized input
Namkyeong/AFGRL/models/AFGRL.py
pointer only (licence: NONE) · get_code("6cdcdf73c5420ef9")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Namkyeong/AFGRL when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Model Ran
ran on a synthesized input
CRIPAC-DIG/GRACE/model.py
code served (permissive licence) · get_code("7a417a5d2e070843")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, 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 torch.nn as nn
import torch.nn.functional as F
from torch_geometric.nn import GCNConv

class Encoder(torch.nn.Module):

    def __init__(self, in_channels: int, out_channels: int, activation, base_model=GCNConv, k: int=2):
        super(Encoder, self).__init__()
        self.base_model = base_model
        assert k >= 2
        self.k = k
        self.conv = [base_model(in_channels, 2 * out_channels)]
        for _ in range(1, k - 1):
            self.conv.append(base_model(2 * out_channels, 2 * out_channels))
        self.conv.append(base_model(2 * out_channels, out_channels))
        self.conv = nn.ModuleList(self.conv)
        self.activation = activation

    def forward(self, x: torch.Tensor, edge_index: torch.Tensor):
        for i in range(self.k):
            x = self.activation(self.conv[i](x, edge_index))
        return x

class Model(torch.nn.Module):

    def __init__(self, encoder: Encoder, num_hidden: int, num_proj_hidden: int, tau: float=0.5):
        super(Model, self).__init__()
        self.encoder: Encoder = encoder
        self.tau: float = tau
        self.fc1 = torch.nn.Linear(num_hidden, num_proj_hidden)
        self.fc2 = torch.nn.Linear(num_proj_hidden, num_hidden)

    def forward(self, x: torch.Tensor, edge_index: torch.Tensor) -> torch.Tensor:
        return self.encoder(x, edge_index)

    def projection(self, z: torch.Tensor) -> torch.Tensor:
        z = F.elu(self.fc1(z))
        return self.fc2(z)

    def sim(self, z1: torch.Tensor, z2: torch.Tensor):
        z1 = F.normalize(z1)
        z2 = F.normalize(z2)
        return torch.mm(z1, z2.t())

    def semi_loss(self, z1: torch.Tensor, z2: torch.Tensor):
        f = lambda x: torch.exp(x / self.tau)
        refl_sim = f(self.sim(z1, z1))
        between_sim = f(self.sim(z1, z2))
        return -torch.log(between_sim.diag() / (refl_sim.sum(1) + between_sim.sum(1) - refl_sim.diag()))

    def batched_semi_loss(self, z1: torch.Tensor, z2: torch.Tensor, batch_size: int):
        device = z1.device
        num_nodes = z1.size(0)
        num_batches = (num_nodes - 1) // batch_size + 1
        f = lambda x: torch.exp(x / self.tau)
        indices = torch.arange(0, num_nodes).to(device)
        losses = []
        for i in range(num_batches):
            mask = indices[i * batch_size:(i + 1) * batch_size]
            refl_sim = f(self.sim(z1[mask], z1))
            between_sim = f(self.sim(z1[mask], z2))
            losses.append(-torch.log(between_sim[:, i * batch_size:(i + 1) * batch_size].diag() / (refl_sim.sum(1) + between_sim.sum(1) - refl_sim[:, i * batch_size:(i + 1) * batch_size].diag())))
        return torch.cat(losses)

    def loss(self, z1: torch.Tensor, z2: torch.Tensor, mean: bool=True, batch_size: int=0):
        h1 = self.projection(z1)
        h2 = self.projection(z2)
        if batch_size == 0:
            l1 = self.semi_loss(h1, h2)
            l2 = self.semi_loss(h2, h1)
        else:
            l1 = self.batched_semi_loss(h1, h2, batch_size)
            l2 = self.batched_semi_loss(h2, h1, batch_size)
        ret = (l1 + l2) * 0.5
        ret = ret.mean() if mean else ret.sum()
        return ret


# Create encoder
encoder = Encoder(
    in_channels=4,
    out_channels=8,
    activation=torch.nn.ReLU(),
    base_model=GCNConv,
    k=2
)

INIT_ARGS = {
    'encoder': encoder,
    'num_hidden': 8,
    'num_proj_hidden': 6,
    'tau': 0.5
}

# Create edge index for 2 nodes
edge_index = torch.tensor([[0, 1], [1, 0]], dtype=torch.long).t().contiguous()

ARGS = {
    'x': torch.randn(2, 4),
    'edge_index': edge_index
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 Tensor, ndim 2, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
Model Ran
ran on a synthesized input
sunisfighting/SIGNA/model.py
code served (permissive licence) · get_code("e2856339ea994286")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
import torch.nn.functional as F
from torch_geometric.utils import add_remaining_self_loops, to_torch_coo_tensor

def edgeindex2adj(edge_index, num_nodes):
    adj_shape = (num_nodes, num_nodes)
    edge_index = add_remaining_self_loops(edge_index, num_nodes=num_nodes)[0]
    adj = to_torch_coo_tensor(edge_index, size=adj_shape)
    return adj

class Model(torch.nn.Module):

    def __init__(self, encoder, args):
        super(Model, self).__init__()
        self.device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
        self.args = args
        self.encoder = encoder
        self.fc1 = torch.nn.Linear(args.dim_h, args.dim_p)
        self.activation = F.elu
        self.fc2 = torch.nn.Linear(args.dim_p, args.dim_h)
        self.EPS = torch.Tensor([1e-06]).to(self.device)

    def forward(self, x: torch.Tensor, edge_index: torch.Tensor) -> torch.Tensor:
        return self.encoder(x, edge_index)

    def projection(self, z: torch.Tensor) -> torch.Tensor:
        return self.fc2(self.activation(self.fc1(z)))

    def sim(self, z1: torch.Tensor, z2: torch.Tensor):
        return torch.mm(z1, z2.t())

    def loss(self, z: torch.Tensor, edge_index: torch.Tensor, batch_size: int=0, epoch: int=0):
        h = F.normalize(self.projection(z))
        if batch_size == 0:
            adj = edgeindex2adj(edge_index, h.shape[0]).to_dense()
            rec = (torch.mm(h, h.t()) + torch.Tensor([1.0]).to(self.device)) / 2
            loss = -((adj * torch.log(rec + self.EPS)).sum(1) / adj.sum(1) + ((1 - adj) * torch.log(1 - rec + self.EPS)).sum(1) / (1 - adj).sum(1))
        else:
            loss = self.batch_loss(h, edge_index, batch_size)
        ret = loss.mean()
        return ret

    def batch_loss(self, h: torch.Tensor, edge_index: torch.Tensor, batch_size: int=0):
        device = h.device
        num_nodes = h.size(0)
        num_batches = (num_nodes - 1) // batch_size + 1
        indices = torch.arange(0, num_nodes).to(device)
        adj = edgeindex2adj(edge_index, h.shape[0])
        losses = []
        for i in range(num_batches):
            mask = indices[i * batch_size:(i + 1) * batch_size]
            adj_b = adj.index_select(dim=0, index=mask).to_dense()
            rec_b = (torch.mm(h[mask], h.t()) + torch.Tensor([1.0]).to(self.device)) / 2
            losses.append(-((adj_b * torch.log(rec_b + self.EPS)).sum(1) / adj_b.sum(1) + ((1 - adj_b) * torch.log(1 - rec_b + self.EPS)).sum(1) / (1 - adj_b).sum(1)))
        return torch.cat(losses)


class SimpleEncoder(nn.Module):
    def __init__(self, in_dim, out_dim):
        super(SimpleEncoder, self).__init__()
        self.linear = nn.Linear(in_dim, out_dim)
    
    def forward(self, x, edge_index):
        return self.linear(x)


class Args:
    def __init__(self):
        self.dim_h = 4
        self.dim_p = 3


encoder = SimpleEncoder(in_dim=5, out_dim=4)
args = Args()

INIT_ARGS = {
    'encoder': encoder,
    'args': args,
}

ARGS = {
    'z': torch.randn(2, 4),
    'edge_index': torch.tensor([[0, 1], [1, 0]], dtype=torch.long).t().contiguous(),
    'batch_size': 0,
    'epoch': 0,
}

METHOD = 'loss'

model = Model(**INIT_ARGS)
result = getattr(model, METHOD)(**ARGS)
print(f"Loss result: {result}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
Neighbor Ran
ran on a synthesized input
Namkyeong/AFGRL/models/AFGRL.py
pointer only (licence: NONE) · get_code("ddd828d861a3e447")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Namkyeong/AFGRL when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Online Ran
ran on a synthesized input · constructed an object; no result was computed
hedongxiao-tju/SGRL/models.py
code served (permissive licence) · get_code("47544660b7aa6e6f")
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 an instance of its own class, Online: the run constructed the object and did not call it, so no result was computed. 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)

# Build a minimal online encoder that takes (x, edge_index) and returns (embeddings, _)
class MinimalEncoder(nn.Module):
    def __init__(self, input_dim, hidden_dim):
        super(MinimalEncoder, self).__init__()
        self.linear = nn.Linear(input_dim, hidden_dim)
    
    def forward(self, x, edge_index):
        h = self.linear(x)
        return h, None

# Build a minimal target encoder (same interface)
class MinimalTargetEncoder(nn.Module):
    def __init__(self, input_dim, hidden_dim):
        super(MinimalTargetEncoder, self).__init__()
        self.linear = nn.Linear(input_dim, hidden_dim)
    
    def forward(self, x, edge_index):
        h = self.linear(x)
        return h, None

# Parameters
input_dim = 3
hidden_dim = 4
batch_size = 2
num_nodes = 2

# Create encoder instances
online_encoder = MinimalEncoder(input_dim, hidden_dim)
target_encoder = MinimalTargetEncoder(input_dim, hidden_dim)

# Create adjacency matrix for the embed method
# The embed method does: h_2 = adj @ h_2, so adj should be compatible with (batch, hidden_dim)
# For matrix multiplication to work, we need adj to be (hidden_dim, hidden_dim)
slsp_adj = torch.eye(hidden_dim)

# Create edge_index tensor (2, num_edges) - minimal case with 1 edge
edge_index = torch.tensor([[0, 1], [1, 0]], dtype=torch.long)

# Create input features (batch_size, input_dim)
x = torch.randn(batch_size, input_dim)

# Hyperparameters
num_hop = 10
momentum = 0.99

ARGS = {
    'online_encoder': online_encoder,
    'target_encoder': target_encoder,
    'hidden_dim': hidden_dim,
    'slsp_adj': slsp_adj,
    'num_hop': num_hop,
    'momentum': momentum
}
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 Online — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Online 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
compute_representations Ran
ran; our contract draft was wrong, not the code
nerdslab/bgrl/bgrl/bgrl.py
code served (permissive licence) · get_code("88c2733c063d14d3")
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 list. 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 minimal neural network that takes a batch of data and returns representations
class MinimalNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create a minimal data object with x and y attributes
class DataBatch:
    def __init__(self, x, y):
        self.x = x
        self.y = y
    
    def to(self, device):
        self.x = self.x.to(device)
        self.y = self.y.to(device)
        return self

# Create a dataset (list of batches)
# Each item should have .to(device) method and .y attribute for labels
dataset = [
    DataBatch(torch.randn(2, 4), torch.tensor([0, 1])),
    DataBatch(torch.randn(2, 4), torch.tensor([1, 0]))
]

# Create net instance
net = MinimalNet()

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

# However, the function calls net(data) directly, not net(data.x)
# So we need to modify our DataBatch to be callable or make the net handle it differently
# Looking at the code: reps.append(net(data)) - it passes data directly to net
# And data.y is accessed for labels
# So data must be both passable to net AND have a .y attribute

class DataBatchForNet:
    def __init__(self, x, y):
        self.x = x
        self.y = y
    
    def to(self, device):
        new_batch = DataBatchForNet(self.x.to(device), self.y.to(device))
        return new_batch

class NetWrapper(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, data):
        # If data is a DataBatchForNet object, extract x
        if hasattr(data, 'x'):
            return self.linear(data.x)
        else:
            return self.linear(data)

dataset = [
    DataBatchForNet(torch.randn(2, 4), torch.tensor([0, 1])),
    DataBatchForNet(torch.randn(2, 4), torch.tensor([1, 0]))
]

net = NetWrapper()
device = torch.device('cpu')

ARGS = {
    'net': net,
    'dataset': dataset,
    '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 list — a list 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
contrastive_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
tengxiao1/GraphACL/hete/model.py
pointer only (licence: NONE); the stored copy get_code serves, from tengxiao1/graphacl, is pointer only (licence: NONE) · get_code("bd248e252b9ee711")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, tengxiao1/GraphACL when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

drop_feature_weighted Ran
ran; our contract draft was wrong, not the code
junxia97/ProGCL/pGRACE/functional.py
pointer only (licence: NONE) · get_code("867c9382144672b7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, junxia97/ProGCL when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

drop_feature_weighted_2 Ran
ran; our contract draft was wrong, not the code
CRIPAC-DIG/GCA/pGRACE/functional.py
code served (permissive licence) · get_code("2694bcf35c3d7b93")
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

torch.manual_seed(0)

# x: tensor with shape (batch_size, num_features)
# Should be float tensor for arithmetic operations
x = torch.randn(2, 4)

# w: weight tensor that will be normalized and thresholded
# Should have same number of features as x's second dimension
w = torch.randn(4).abs() + 0.1  # ensure positive values for bernoulli

# p: drop probability scaling factor (float between 0 and 1)
p = 0.5

# threshold: maximum drop probability allowed (float)
threshold = 0.7

ARGS = {
    "x": x,
    "w": w,
    "p": p,
    "threshold": threshold,
}
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
edgeindex2adj Ran
ran; our contract draft was wrong, not the code
sunisfighting/SIGNA/model.py
code served (permissive licence) · get_code("92505c19d4aa9cbb")
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 Tensor. 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 torch_geometric.utils import add_remaining_self_loops, to_torch_coo_tensor

torch.manual_seed(0)

# edge_index: a 2D tensor with shape (2, num_edges) containing edge indices
# num_nodes: an integer specifying the number of nodes in the graph
num_nodes = 5
num_edges = 4

# Create a simple edge_index tensor
# Shape: (2, num_edges) where each column represents an edge (source, target)
edge_index = torch.tensor([
    [0, 1, 2, 3],
    [1, 2, 3, 4]
], dtype=torch.long)

ARGS = {
    "edge_index": edge_index,
    "num_nodes": num_nodes
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 Tensor, shape (5, 5) — shape (5, 5) as a later run recorded it
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
nerdslab/bgrl/bgrl/transforms.py
code served (permissive licence) · get_code("524d998681e42414")
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.utils.dropout import dropout_adj
from torch_geometric.transforms import Compose

torch.manual_seed(0)

# Define a minimal stand-in for a Data object that the transforms expect
class Data:
    def __init__(self):
        self.x = torch.randn(2, 4)  # 2 nodes, 4 features
        self.edge_index = torch.tensor([[0, 1], [1, 0]], dtype=torch.long).t().contiguous()
        self.edge_attr = torch.randn(2, 3)  # 2 edges, 3 attributes

ARGS = {
    'drop_edge_p': 0.5,
    'drop_feat_p': 0.3,
}
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
get_wiki_cs Ran
ran; our contract draft was wrong, not the code
nerdslab/bgrl/bgrl/data.py
code served (permissive licence) · get_code("436013cac49fa475")
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
from torch_geometric.transforms import NormalizeFeatures
from unittest.mock import Mock, MagicMock

torch.manual_seed(0)

# Create a mock dataset that mimics WikiCS structure
mock_data = Mock()
mock_data.x = torch.randn(2, 4)  # 2 nodes, 4 features
mock_data.edge_index = torch.tensor([[0, 1], [1, 0]], dtype=torch.long)  # 2 edges
mock_data.train_mask = torch.tensor([True, False], dtype=torch.bool)
mock_data.val_mask = torch.tensor([False, True], dtype=torch.bool)
mock_data.test_mask = torch.tensor([False, False], dtype=torch.bool)

mock_dataset = Mock()
mock_dataset.__getitem__ = Mock(return_value=mock_data)

# Patch the WikiCS dataset loader
import torch_geometric.datasets as datasets_module
original_wikics = datasets_module.WikiCS
datasets_module.WikiCS = Mock(return_value=mock_dataset)

# Define arguments
ARGS = {
    'root': '/tmp/wiki_cs',
    'transform': NormalizeFeatures()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, torch_geometric — 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_fixed_splits Ran
ran; our contract draft was wrong, not the code
tengxiao1/GraphACL/hete/dataset.py
pointer only (licence: NONE) · get_code("ee2bc565d6f81f12")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, tengxiao1/GraphACL when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

repeat_1d_tensor Ran
ran; our contract draft was wrong, not the code
Namkyeong/AFGRL/models/AFGRL.py
pointer only (licence: NONE) · get_code("87c0bb319e19bf42")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Namkyeong/AFGRL when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

udf_u_add_log_e Ran
ran; our contract draft was wrong, not the code
tengxiao1/GraphACL/homo/model.py
pointer only (licence: NONE) · get_code("facfb4f3eaf05f2a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, tengxiao1/GraphACL when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

AFGRL Not yet run
unverified (harvested, no recorded run)
Namkyeong/AFGRL/models/AFGRL.py
pointer only (licence: NONE) · get_code("fbe2032783804911")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Namkyeong/AFGRL when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

CSGCL Not yet run
unverified (harvested, no recorded run)
HanChen-HUST/CSGCL/src/model.py
code served (permissive licence) · get_code("8a429771818c4e7f")
How it ran

no invocation recorded.

GCN_prop Not yet run
unverified (harvested, no recorded run)
yifanQi98/HGRL/model.py
code served (permissive licence) · get_code("13dfce38efd0ba35")
How it ran

no invocation recorded.

HGRL Not yet run
unverified (harvested, no recorded run)
yifanQi98/HGRL/model.py
code served (permissive licence) · get_code("173f87920e13cfee")
How it ran

no invocation recorded.

fit_logistic_regression Not yet run
unverified (harvested, no recorded run)
nerdslab/bgrl/bgrl/logistic_regression_eval.py
code served (permissive licence) · get_code("71c1fef2e56a3dc0")
How it ran

no invocation recorded.

fit_logistic_regression_preset_splits Not yet run
unverified (harvested, no recorded run)
nerdslab/bgrl/bgrl/logistic_regression_eval.py
code served (permissive licence) · get_code("8e31486466f6ecf4")
How it ran

no invocation recorded.

get_dataset Not yet run
unverified (harvested, no recorded run)
nerdslab/bgrl/bgrl/data.py
code served (permissive licence) · get_code("8021d44d3b828d80")
How it ran

no invocation recorded.

init_weights Not yet run
unverified (harvested, no recorded run)
Namkyeong/AFGRL/models/AFGRL.py
pointer only (licence: NONE) · get_code("b4e3e4f19bbd5dd0")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Namkyeong/AFGRL when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

load_trained_encoder Not yet run
unverified (harvested, no recorded run)
nerdslab/bgrl/bgrl/bgrl.py
code served (permissive licence) · get_code("d0852bc7decfea66")
How it ran

no invocation recorded.

ppi_train_linear_layer Not yet run
unverified (harvested, no recorded run)
nerdslab/bgrl/bgrl/linear_eval_ppi.py
code served (permissive licence) · get_code("a071438db1f34e7b")
How it ran

no invocation recorded.

Also present in other papers' code

Of 26 samples lifted from this paper's linked repositories, 26 carry a function identity and 0 do not. Of the 26 distinct functions with an identity, 12 are also present in other papers whose code we hold (12 with at least one paper dated earlier, 0 the same month, 0 later) and 14 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
get_graph_drop_transform 3 other papers
3 dated earlier
2312.02619 (2023-12)
Rethinking and Simplifying Bootstrapped Graph Latents
2408.05087 (2024-08)
Bootstrap Latents of Nodes and Neighbors for Graph Self-Supervised Learning
2506.15698 (2025-06)
Global Context-aware Representation Learning for Spatially Resolved Transcriptomics
compute_representations 2 other papers
2 dated earlier
2312.02619 (2023-12)
Rethinking and Simplifying Bootstrapped Graph Latents
2408.05087 (2024-08)
Bootstrap Latents of Nodes and Neighbors for Graph Self-Supervised Learning
load_trained_encoder 2 other papers
2 dated earlier
2312.02619 (2023-12)
Rethinking and Simplifying Bootstrapped Graph Latents
2408.05087 (2024-08)
Bootstrap Latents of Nodes and Neighbors for Graph Self-Supervised Learning
contrastive_loss 1 other paper
1 dated earlier
2310.18884 (2023-10)
Simple and Asymmetric Graph Contrastive Learning without Augmentations
drop_feature_weighted
brick of this paper's assembly: entry
1 other paper
1 dated earlier
2309.13944 (2023-09)
Provable Training for Graph Contrastive Learning
drop_feature_weighted_2
brick of this paper's assembly: entry
1 other paper
1 dated earlier
2309.13944 (2023-09)
Provable Training for Graph Contrastive Learning
get_dataset 1 other paper
1 dated earlier
2408.05087 (2024-08)
Bootstrap Latents of Nodes and Neighbors for Graph Self-Supervised Learning
get_wiki_cs 1 other paper
1 dated earlier
2408.05087 (2024-08)
Bootstrap Latents of Nodes and Neighbors for Graph Self-Supervised Learning
init_weights
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2102.06514 (2021-02)
Large-Scale Representation Learning on Graphs via Bootstrapping
load_fixed_splits 1 other paper
1 dated earlier
2310.10362 (2023-10)
Self-Pro: A Self-Prompt and Tuning Framework for Graph Neural Networks
ppi_train_linear_layer 1 other paper
1 dated earlier
2408.05087 (2024-08)
Bootstrap Latents of Nodes and Neighbors for Graph Self-Supervised Learning
udf_u_add_log_e 1 other paper
1 dated earlier
2310.10362 (2023-10)
Self-Pro: A Self-Prompt and Tuning Framework for Graph Neural Networks

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

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 Contrastive Learning (GCL), which trains graph encoders by maximizing similarity between positive samples and minimizing it between negative ones, has emerged as a mainstream graph pre-training paradigm. It is widely recognized that positive samples are essential in GCLs. Ideally, maximizing the similarity of positive samples enables graph encoders to capture intrinsic semantics and patterns of graph data. However, we discover an interesting phenomenon: GCLs can achieve competitive performance even without positive samples. This motivates us to revisit the fundamental mechanism of positive samples in GCLs. From the perspective of Dirichlet energy, we theoretically find that message passing, a key mechanism in graph encoders, trivializes the maximization of positive samples, preventing GCLs from effectively learning from positive samples. To address this, we propose SPGCL to mitigate the trivialization caused by message passing and restore the learning efficacy of positive samples. Specifically, we find that high Dirichlet energy features help positive samples provide effective learning signals while low Dirichlet energy features contribute little to positive learning signal but is useful for positive sampling. Based on this, SPGCL introduces an energy-aware propagation mechanism that selectively propagates features based on their Dirichlet energy, preventing low-energy features from dominating similarity. Furthermore, we construct a positive sampling matrix based on Dirichlet energy to exclude misleading positive samples and focus on node pairs with higher discrimination. Extensive experiments demonstrate the effectiveness of SPGCL.

For agents

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

get_harvested_code_for_paper("2606.10284")
get_code_for_paper("2606.10284")
have("2606.10284")

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

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

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

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

Connect an agent — have() is free.