SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.04658 · IJCAI · 2023

CSGCL: Community-Strength-Enhanced Graph Contrastive Learning

Rui Zhang, Ruixuan Li, Han Chen, Yuhua Li, Yixiong Zou, Ziwen Zhao

arXiv · PDF · Open in the Atlas

Code that ran

2 of 9 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 2 have no contract verdict; 0 failures of our instrument; 7 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/2305.04658.json · badge: /api/ran/2305.04658.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
hanchen-hust/csgcl canonical (classifier label)
classifier basis: census
2 ran · 7 no recorded run
FunctionStatusWhere it lives
ced Ran
ran on a synthesized input
hanchen-hust/csgcl/src/functional.py
code served (permissive licence) · get_code("41443fb78cbc65cb")
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 int, 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)

# edge_index: torch.Tensor - should be a 2D tensor with shape (2, num_edges)
# representing source and target node indices
edge_index = torch.tensor([[0, 1, 0, 1],
                           [1, 0, 2, 3]], dtype=torch.long)

# edge_weight: torch.Tensor - should be a 1D tensor with num_edges elements
# containing weights for each edge
edge_weight = torch.tensor([0.5, 0.8, 0.3, 0.9], dtype=torch.float32)

# p: float - dropout probability parameter
p = 0.3

# threshold: float - threshold parameter (default 1.0)
threshold = 1.0

ARGS = {
    "edge_index": edge_index,
    "edge_weight": edge_weight,
    "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 int, 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
preprocess_nni Ran
ran on a synthesized input
hanchen-hust/csgcl/src/sp.py
code served (permissive licence) · get_code("21aec3c8a429525b")
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 dict. 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)

# The function takes a params dict and processes its keys
# Keys are split by '/', and:
# - If 3 parts (e.g., "a/b/c"), keep the middle part "b"
# - If 1 part (e.g., "a"), keep it as is
# - Otherwise raise an exception

# Create test params with various key formats
params = {
    "simple_param": 42,
    "another_param": 3.14,
    "prefix/middle_part/suffix": "value1",
    "pre/keep_this/post": [1, 2, 3],
    "single": torch.tensor([1.0, 2.0]),
}

ARGS = {
    "params": params
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
cav_dense Not yet run
unverified (harvested, no recorded run)
hanchen-hust/csgcl/src/functional.py
code served (permissive licence) · get_code("18d0d06fa76d3e99")
How it ran

no invocation recorded.

generate_split Not yet run
unverified (harvested, no recorded run)
hanchen-hust/csgcl/src/utils.py
code served (permissive licence) · get_code("b41011cae64fab39")
How it ran

no invocation recorded.

get_activation Not yet run
unverified (harvested, no recorded run)
hanchen-hust/csgcl/src/utils.py
code served (permissive licence) · get_code("97a44d8325a2f6c3")
How it ran

no invocation recorded.

get_base_model Not yet run
unverified (harvested, no recorded run)
hanchen-hust/csgcl/src/utils.py
code served (permissive licence) · get_code("4bcc3cd0abc7030a")
How it ran

no invocation recorded.

get_dataset Not yet run
unverified (harvested, no recorded run)
hanchen-hust/csgcl/src/dataset.py
code served (permissive licence) · get_code("07b7797f4172c759")
How it ran

no invocation recorded.

parse_json Not yet run
unverified (harvested, no recorded run)
hanchen-hust/csgcl/src/sp.py
code served (permissive licence) · get_code("302c6c94764d906c")
How it ran

no invocation recorded.

parse_yaml Not yet run
unverified (harvested, no recorded run)
hanchen-hust/csgcl/src/sp.py
code served (permissive licence) · get_code("b328763e19736d1f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 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 9 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 Contrastive Learning (GCL) is an effective way to learn generalized graph representations in a self-supervised manner, and has grown rapidly in recent years. However, the underlying community semantics has not been well explored by most previous GCL methods. Research that attempts to leverage communities in GCL regards them as having the same influence on the graph, leading to extra representation biases. To tackle this issue, we define "community strength" to measure the difference of influence among communities. Under this premise, we propose a Community-Strength-enhanced Graph Contrastive Learning (CSGCL) framework to preserve community strength throughout the learning process. Firstly, we present two novel graph augmentation methods, Communal Attribute Voting (CAV) and Communal Edge Dropping (CED), where the perturbations of node attributes and edges are guided by community strength. Secondly, we propose a dynamic "Team-up" contrastive learning scheme, where community strength is used to progressively fine-tune the contrastive objective. We report extensive experiment results on three downstream tasks: node classification, node clustering, and link prediction. CSGCL achieves state-of-the-art performance compared with other GCL methods, validating that community strength brings effectiveness and generality to graph representations. Our code is available at https://github.com/HanChen-HUST/ CSGCL.

For agents

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

get_harvested_code_for_paper("2305.04658")
get_code_for_paper("2305.04658")
have("2305.04658")

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

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

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

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

Connect an agent — have() is free.