SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2110.06623 · 2021

SSSNET: Semi-Supervised Signed Network Clustering

arXiv · PDF · Open in the Atlas

Code that ran

10 of 13 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 9 have no contract verdict; 1 failure of our instrument; 3 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/2110.06623.json · badge: /api/ran/2110.06623.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
sherylhyx/sssnet_signed_clustering canonical (classifier label)
classifier basis not recorded on the link
10 ran · 3 no recorded run
FunctionStatusWhere it lives
SSBM Ran
ran on a synthesized input
sherylhyx/sssnet_signed_clustering/src/utils.py
code served (permissive licence) · get_code("325b1acd86ab7132")
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 math
import numpy as np
import scipy.sparse as sp
import numpy.random as rnd

# Set seed for reproducibility
np.random.seed(42)
rnd.seed(42)

ARGS = {
    'n': 10,
    'k': 3,
    'pin': 0.3,
    'etain': 0.1,
    'pout': 0.1,
    'etaout': 0.05,
    'sizes': 'uniform',
    'size_ratio': 2,
    'values': 'ones'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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
cuda_canonical_version Ran
ran on a synthesized input
sherylhyx/sssnet_signed_clustering/install_dependencies.py
code served (permissive licence) · get_code("53641a1aa95bd9d2")
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

# The function takes a parameter 'v' which can be either int or str
# When int: it performs arithmetic operations (// and -)
# When str: it splits by '.' and accesses indices [0] and [1], converts to int

# Test with an integer version code
ARGS = {
    'v': 11030  # This represents version 11.3 in CUDA format (major=11, minor=3)
}
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
fill Ran
ran on a synthesized input
sherylhyx/sssnet_signed_clustering/src/utils.py
code served (permissive licence) · get_code("5532a45b7a61f6bb")
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 float, 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 numpy as np

ARGS = {
    'values': 'ones'
}
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 float, 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
invdiag Ran
ran on a synthesized input
sherylhyx/sssnet_signed_clustering/src/signet_utils.py
code served (permissive licence) · get_code("ac2e486e413404a7")
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 csc_matrix. 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 scipy.sparse as ss
import numpy as np

# Create a small positive diagonal matrix
# The function expects a csc sparse matrix and calls .diagonal() on it
# We'll create a 5x5 diagonal matrix with positive values

# Create diagonal data
diagonal_values = [2.0, 3.0, 4.0, 5.0, 6.0]

# Create a dia_matrix and convert to csc
M = ss.dia_matrix((diagonal_values, [0]), shape=(5, 5)).tocsc()

ARGS = {
    "M": M
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type csc_matrix — a csc_matrix output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a csc_matrix 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
label_size_ratio Ran
ran on a synthesized input
sherylhyx/sssnet_signed_clustering/src/metrics.py
code served (permissive licence) · get_code("56f5884d0ac3f418")
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 2, dtype family float, shape (2, 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 numpy as np

# Create a small labels_distributions array
# Shape: (num_trials, num_methods, num_labels)
# Using distinct dimensions: 2 trials, 3 methods, 4 labels
num_trials = 2
num_methods = 3
num_labels = 4

labels_distributions = np.array([
    # Trial 0
    [
        [1.0, 2.0, 8.0, 0.0],      # Method 0
        [0.5, 1.5, 6.0, 0.0],      # Method 1
        [2.0, 3.0, 10.0, 0.0],     # Method 2
    ],
    # Trial 1
    [
        [0.2, 0.8, 4.0, 0.0],      # Method 0
        [1.0, 3.0, 9.0, 0.0],      # Method 1
        [0.1, 2.0, 5.0, 0.0],      # Method 2
    ]
], dtype=np.float64)

ARGS = {
    "labels_distributions": labels_distributions,
    "return_std": False,
}
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 2, dtype family float, shape (2, 3) — shape (2, 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
load_data_from_memory Ran
ran; our contract draft was wrong, not the code
sherylhyx/sssnet_signed_clustering/src/preprocess.py
code served (permissive licence) · get_code("deddc4458686cd82")
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, 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 os
import pickle as pk
import tempfile

# Create a temporary directory and file for testing
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test_data.pkl")

# Create some sample data and pickle it
sample_data = {"key1": "value1", "key2": [1, 2, 3], "key3": {"nested": "data"}}
with open(temp_file, 'wb') as f:
    pk.dump(sample_data, f)

ARGS = {
    "root": temp_file,
    "name": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list 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
objscore Ran
ran on a synthesized input
sherylhyx/sssnet_signed_clustering/src/signet_utils.py
code served (permissive licence) · get_code("686cc71cff023b7c")
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 float, 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 numpy as np
from scipy.sparse import csc_matrix

# Create small sparse matrices for mat1 and mat2
# Using 5x5 matrices to have enough structure
data1 = np.array([1, 2, 3, 4, 5, 6])
rows1 = np.array([0, 1, 2, 3, 1, 4])
cols1 = np.array([0, 1, 2, 3, 2, 4])
mat1 = csc_matrix((data1, (rows1, cols1)), shape=(5, 5))

data2 = np.array([1, 1, 1, 1, 1, 1])
rows2 = np.array([0, 1, 2, 3, 1, 4])
cols2 = np.array([0, 1, 2, 3, 2, 4])
mat2 = csc_matrix((data2, (rows2, cols2)), shape=(5, 5))

# Create labels for 5 samples into 3 clusters
labels = [0, 1, 0, 2, 1]

# Number of clusters
k = 3

ARGS = {
    'labels': labels,
    'k': k,
    'mat1': mat1,
    'mat2': mat2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
sizeorder Ran
ran on a synthesized input
sherylhyx/sssnet_signed_clustering/src/signet_utils.py
code served (permissive licence) · get_code("ae557b0431639df1")
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, ndim 1, 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 numpy as np
import scipy.sparse as ss

# Create small test data for sizeorder function
np.random.seed(0)

# Number of samples and clusters
n = 6
k = 3

# Create labels: assign each sample to a cluster (0, 1, or 2)
labels = np.array([0, 0, 1, 1, 2, 2])

# Create pos matrix - a sparse matrix used in computation
# Shape should be (n, n) since vec.transpose() * pos * vec where vec is (n, 1)
pos = ss.random(n, n, density=0.5, format='csc')
pos = pos + pos.transpose()  # Make it symmetric for numerical stability

# Create neg matrix - another sparse matrix
# Shape should be (n, n) 
neg = ss.random(n, n, density=0.5, format='csc')
neg = neg + neg.transpose()  # Make it symmetric

# Convert to proper sparse format if needed
pos = pos.tocsc()
neg = neg.tocsc()

ARGS = {
    'labels': labels,
    'k': k,
    'pos': pos,
    'neg': neg,
    'largest': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family int — a list 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
triplet_loss_InnerProduct Ran
ran on a synthesized input
sherylhyx/sssnet_signed_clustering/src/metrics.py
code served (permissive licence) · get_code("1447da5cf2f5597d")
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 random

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

# Parameters for the function
nclass = 3  # number of classes
n_samples = 96  # total samples

# Create logits tensor: shape (batch_size, feature_dim)
# We need enough samples to split across classes
batch_size = 100
feature_dim = 4
logits = torch.randn(batch_size, feature_dim)

# Create labels_split: list of lists, where each inner list contains indices for a class
# labels_split[i] contains indices of samples belonging to class i
labels_split = []
samples_per_class = batch_size // nclass
for i in range(nclass):
    start_idx = i * samples_per_class
    end_idx = start_idx + samples_per_class
    class_indices = list(range(start_idx, end_idx))
    labels_split.append(class_indices)

# Create labels_split_dif: list of lists for "different" class samples
# For each class i, this should contain indices of samples NOT from class i
labels_split_dif = []
for i in range(nclass):
    # Collect indices from all other classes
    dif_indices = []
    for j in range(nclass):
        if i != j:
            start_idx = j * samples_per_class
            end_idx = start_idx + samples_per_class
            dif_indices.extend(list(range(start_idx, end_idx)))
    labels_split_dif.append(dif_indices)

ARGS = {
    "nclass": nclass,
    "labels_split": labels_split,
    "labels_split_dif": labels_split_dif,
    "logits": logits,
    "n_samples": n_samples,
}
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
triplet_loss_InnerProduct_alpha Ran
ran on a synthesized input
sherylhyx/sssnet_signed_clustering/src/metrics.py
code served (permissive licence) · get_code("3c8b10a13b664971")
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 random

torch.manual_seed(0)

# Set up parameters for triplet_loss_InnerProduct_alpha
nclass = 3  # number of classes
n_samples = 96  # total number of samples to use

# Create a small feature tensor (logits)
# Shape: (total_samples, feature_dim)
total_samples = 120
feature_dim = 4
logits = torch.randn(total_samples, feature_dim)

# Create labels_split: a list where each element contains indices of samples belonging to that class
# For each class, we have some sample indices
labels_split = [
    list(range(0, 40)),      # class 0: indices 0-39
    list(range(40, 80)),     # class 1: indices 40-79
    list(range(80, 120))     # class 2: indices 80-119
]

# Create labels_split_dif: indices of "different" samples for each class
# These could be indices from other classes
labels_split_dif = [
    list(range(40, 80)) + list(range(80, 120)),    # class 0: samples from other classes
    list(range(0, 40)) + list(range(80, 120)),     # class 1: samples from other classes
    list(range(0, 40)) + list(range(40, 80))       # class 2: samples from other classes
]

ARGS = {
    "nclass": nclass,
    "labels_split": labels_split,
    "labels_split_dif": labels_split_dif,
    "logits": logits,
    "n_samples": n_samples,
    "thre": 0.1
}
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
ConvertSMVer2Cores Not yet run
unverified (harvested, no recorded run)
sherylhyx/sssnet_signed_clustering/cuda_check.py
code served (permissive licence) · get_code("292f2f8aa3c972d1")
How it ran

no invocation recorded.

fix_network Not yet run
unverified (harvested, no recorded run)
sherylhyx/sssnet_signed_clustering/src/utils.py
code served (permissive licence) · get_code("61c1e705c0cef2af")
How it ran

no invocation recorded.

load_corre_networks Not yet run
unverified (harvested, no recorded run)
sherylhyx/sssnet_signed_clustering/src/preprocess.py
code served (permissive licence) · get_code("03cd4246adc37e93")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 2 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 2 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.

FunctionAlso present inEarliest-datedOthers named
ConvertSMVer2Cores 1 other paper
1 later
2305.19466 (2023-05)
The Impact of Positional Encoding on Length Generalization in Transformers
load_data_from_memory 1 other paper
1 later
2310.05842 (2023-10)
Robust Angular Synchronization via Directed 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-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

Node embeddings are a powerful tool in the analysis of networks; yet, their full potential for the important task of node clustering has not been fully exploited. In particular, most state-of-the-art methods generating node embeddings of signed networks focus on link sign prediction, and those that pertain to node clustering are usually not graph neural network (GNN) methods. Here, we introduce a novel probabilistic balanced normalized cut loss for training nodes in a GNN framework for semi-supervised signed network clustering, called SSSNET. The method is end-to-end in combining embedding generation and clustering without an intermediate step; it has node clustering as main focus, with an emphasis on polarization effects arising in networks. The main novelty of our approach is a new take on the role of social balance theory for signed network embeddings. The standard heuristic for justifying the criteria for the embeddings hinges on the assumption that "an enemy's enemy is a friend". Here, instead, a neutral stance is assumed on whether or not the enemy of an enemy is a friend. Experimental results on various data sets, including a synthetic signed stochastic block model, a polarized version of it, and real-world data at different scales, demonstrate that SSSNET can achieve comparable or better results than state-of-the-art spectral clustering methods, for a wide range of noise and sparsity levels. SSSNET complements existing methods through the possibility of including exogenous information, in the form of node-level features or labels.

For agents

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

get_harvested_code_for_paper("2110.06623")
get_code_for_paper("2110.06623")
have("2110.06623")

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

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

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

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

Connect an agent — have() is free.