SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.11225 · 2024

SeBot: Structural Entropy Guided Multi-View Contrastive Learning for Social Bot Detection

arXiv · PDF · Open in the Atlas

Code that ran

13 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 12 failures of our instrument; 0 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/2405.11225.json · badge: /api/ran/2405.11225.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
846468230/sebot canonical (classifier label)
classifier basis: census
13 ran · 0 no recorded run
FunctionStatusWhere it lives
child_tree_deepth Ran
ran, honoured the contract we drafted
846468230/sebot/SEPG/utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from Rooooyy/HiTIN, is pointer only (licence: NONE) · get_code("b16d0d091d08f27f")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from Rooooyy/HiTIN, and GitHub detected no licence in that repository 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.

cut_volume Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
846468230/sebot/SEPG/utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from Rooooyy/HiTIN, is pointer only (licence: NONE) · get_code("721b31dc7e862365")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from Rooooyy/HiTIN, and GitHub detected no licence in that repository 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.

edge_dropping Ran
ran; our contract draft was wrong, not the code
846468230/sebot/main_mgtab.py
code served (permissive licence) · get_code("fc042c73717f4575")
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)

# edge_index: shape (2, num_edges) - indices of graph edges
edge_index = torch.tensor([[0, 1, 0, 1], [1, 0, 2, 2]], dtype=torch.long)

# edge_attr: shape (num_edges, attr_dim) - attributes for each edge
edge_attr = torch.randn(4, 3)

# edge_weight: shape (num_edges,) - probabilities for bernoulli sampling
edge_weight = torch.tensor([0.8, 0.6, 0.9, 0.3])

ARGS = {
    "edge_index": edge_index,
    "edge_attr": edge_attr,
    "edge_weight": edge_weight,
}
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
edge_mask Ran
ran; our contract draft was wrong, not the code
846468230/sebot/main_mgtab.py
code served (permissive licence) · get_code("cedc2ce0919049da")
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)

# Construct valid arguments for edge_mask function
# edge_index: tensor of shape [2, num_edges] representing graph edges
# edge_attr: tensor of shape [num_edges, feature_dim] representing edge attributes
# pe: float, probability for edge masking (Bernoulli parameter)

edge_index = torch.tensor([[0, 1, 2, 1], [1, 2, 3, 0]], dtype=torch.long)
edge_attr = torch.randn(4, 3)
pe = 0.5

ARGS = {
    "edge_index": edge_index,
    "edge_attr": edge_attr,
    "pe": pe
}
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
extract_tree Ran
ran; our contract draft was wrong, not the code
846468230/sebot/SEPG/data.py
code served (permissive licence) · get_code("7816de9206821783")
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 networkx as nx
import copy

torch.manual_seed(0)

# Build a minimal NetworkX graph
G = nx.Graph()
G.add_nodes_from([0, 1, 2, 3])
G.nodes[0]['tag'] = 1
G.nodes[1]['tag'] = 2
G.nodes[2]['tag'] = 0
G.nodes[3]['tag'] = 1
G.add_edges_from([(0, 1), (1, 2), (2, 3)])

# Build a tree structure with hierarchical nodes
tree = {
    0: {'ID': 0, 'depth': 0, 'graphID': 0, 'children': []},
    1: {'ID': 1, 'depth': 0, 'graphID': 1, 'children': []},
    2: {'ID': 2, 'depth': 0, 'graphID': 2, 'children': []},
    3: {'ID': 3, 'depth': 0, 'graphID': 3, 'children': []},
    4: {'ID': 4, 'depth': 1, 'children': [0, 1]},
    5: {'ID': 5, 'depth': 1, 'children': [2, 3]},
    6: {'ID': 6, 'depth': 2, 'children': [4, 5]},
}

# Build graph dict with required structure
graph = {
    'G': G,
    'label': 'test_graph',
    'tree': tree,
    'nodelist': [0, 1, 2, 3]
}

tree_depth = 2

ARGS = {
    'graph': graph,
    'tree_depth': tree_depth
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, 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
feature_mask Ran
ran; our contract draft was wrong, not the code
846468230/sebot/main_twibot20.py
code served (permissive licence) · get_code("e025810519395dbd")
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)

# Create a small input tensor with batch size 2 and 4 features
x = torch.randn(2, 4, dtype=torch.float32)

# Set drop_prob to a reasonable value
drop_prob = 0.3

ARGS = {
    "x": x,
    "drop_prob": drop_prob,
}
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
get_layer_graph Ran
ran; our contract draft was wrong, not the code
846468230/sebot/SEPG/data.py
code served (permissive licence) · get_code("3626d54c9c119c8f")
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 networkx as nx

# Build a minimal tree structure that the function expects
# tree is a dict where keys are node identifiers and values are dicts with 'depth', 'children', and optionally 'graphID'
tree = {
    0: {'depth': 0, 'children': [1, 2], 'graphID': 0},
    1: {'depth': 1, 'children': [3, 4], 'graphID': 1},
    2: {'depth': 1, 'children': [5], 'graphID': 2},
    3: {'depth': 2, 'children': [], 'graphID': 3},
    4: {'depth': 2, 'children': [], 'graphID': 4},
    5: {'depth': 2, 'children': [], 'graphID': 5},
}

# Build a base graph with nodes corresponding to leaf nodes
# The function will create quotient graphs by partitioning nodes
base_graph = nx.Graph()
base_graph.add_nodes_from([0, 1, 2, 3, 4, 5])
base_graph.add_edges_from([(0, 1), (0, 2), (1, 3), (1, 4), (2, 5)])

# Tree depth determines how many layers will be built
tree_depth = 3

ARGS = {
    'tree': tree,
    'graph': base_graph,
    'tree_depth': tree_depth,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx — 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
graph_parse Ran
ran; our contract draft was wrong, not the code
846468230/sebot/SEPG/utils.py
code served (permissive licence) · get_code("21dda7ecf92b5b2c")
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

torch.manual_seed(0)

# Create a small adjacency matrix
# The function expects a matrix where adj_matrix[i, j] represents edge weight from node i to node j
# Using a 4x4 matrix for a small graph
adj_matrix = np.array([
    [0, 1, 2, 0],
    [1, 0, 0, 3],
    [2, 0, 0, 1],
    [0, 3, 1, 0]
], dtype=np.float32)

ARGS = {
    'adj_matrix': adj_matrix
}
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 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
integrate_label Ran
ran; our contract draft was wrong, not the code
846468230/sebot/SEPG/data.py
code served (permissive licence) · get_code("2f01cf160b34a636")
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 torch
import numpy as np

# Construct trees - a list of dicts, each with a 'label' key
trees = [
    {'label': 'cat', 'data': [1, 2, 3]},
    {'label': 'dog', 'data': [4, 5, 6]},
    {'label': 'cat', 'data': [7, 8, 9]},
    {'label': 'bird', 'data': [10, 11, 12]},
]

ARGS = {
    'trees': trees
}
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 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
relatioal_edge_adding Ran
ran; our contract draft was wrong, not the code
846468230/sebot/main_mgtab.py
code served (permissive licence) · get_code("96b35c8a743ef57b")
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)

# Construct valid arguments for relatioal_edge_adding
# The function expects:
# - edge_index: tensor of shape (2, num_edges) with node indices
# - edge_attr: tensor of edge attributes (relation types)
# - pe: float, the proportion of edges to add per relation

# Create edge_index: 2 x num_edges
# Edges connect nodes, so values should be in range [0, node_num)
num_nodes = 5
num_edges = 6
edge_index = torch.randint(0, num_nodes, (2, num_edges))

# Create edge_attr: num_edges tensor with relation types (0 to relation_num-1)
# Using 3 different relation types
edge_attr = torch.tensor([0, 1, 2, 0, 1, 2], dtype=torch.long)

# pe: proportion/expansion factor for adding edges (e.g., 0.5 means add 50% more edges per relation)
pe = 0.5

ARGS = {
    "edge_index": edge_index,
    "edge_attr": edge_attr,
    "pe": pe
}
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
relational_undirected Ran
ran; our contract draft was wrong, not the code
846468230/sebot/main_twibot20.py
code served (permissive licence) · get_code("be48e44dbf661266")
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)

# Construct edge_index: shape [2, num_edges]
# Represents directed edges between nodes
edge_index = torch.tensor([
    [0, 1, 2, 0, 1],  # source nodes
    [1, 2, 0, 2, 0]   # target nodes
], dtype=torch.long)

# Construct edge_type: shape [num_edges]
# Each edge has a relation type (0, 1, or 2)
edge_type = torch.tensor([0, 1, 0, 2, 1], dtype=torch.long)

ARGS = {
    "edge_index": edge_index,
    "edge_type": edge_type
}
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
trans_to_adj Ran
ran; our contract draft was wrong, not the code
846468230/sebot/SEPG/trans_graph.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from ringbdstack/sisa, is pointer only (licence: NONE) · get_code("cb653477a7fefad1")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from ringbdstack/sisa, and GitHub detected no licence in that repository 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.

update_node Ran
ran; our contract draft was wrong, not the code
846468230/sebot/SEPG/trans_graph.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from ringbdstack/sisa, is pointer only (licence: NONE) · get_code("1bc1bd0cbe71477b")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from ringbdstack/sisa, and GitHub detected no licence in that repository 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.

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, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 0 the same month, 2 later) and 6 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
child_tree_deepth 7 other papers
7 dated earlier · 3 only as an assembly brick
2206.02404 (2022-06)
A Simple yet Effective Method for Graph Classification
2206.13510 (2022-06)
Structural Entropy Guided Graph Hierarchical Pooling
2304.12000 (2023-04)
Hierarchical State Abstraction Based on Structural Information Principles
and 4 more not named here
cut_volume 6 other papers
6 dated earlier · 3 only as an assembly brick
2206.02404 (2022-06)
A Simple yet Effective Method for Graph Classification
2206.13510 (2022-06)
Structural Entropy Guided Graph Hierarchical Pooling
2304.12000 (2023-04)
Hierarchical State Abstraction Based on Structural Information Principles
and 3 more not named here
graph_parse 6 other papers
6 dated earlier · 2 only as an assembly brick
2206.02404 (2022-06)
A Simple yet Effective Method for Graph Classification
2206.13510 (2022-06)
Structural Entropy Guided Graph Hierarchical Pooling
2304.12000 (2023-04)
Hierarchical State Abstraction Based on Structural Information Principles
and 3 more not named here
trans_to_adj 3 other papers
2 dated earlier, 1 later
2206.13510 (2022-06)
Structural Entropy Guided Graph Hierarchical Pooling
2304.12000 (2023-04)
Hierarchical State Abstraction Based on Structural Information Principles
2406.09031 (2024-06)
A Comprehensive Graph Pooling Benchmark: Effectiveness, Robustness and Generalizability
update_node 3 other papers
2 dated earlier, 1 later
2206.13510 (2022-06)
Structural Entropy Guided Graph Hierarchical Pooling
2304.12000 (2023-04)
Hierarchical State Abstraction Based on Structural Information Principles
2406.09031 (2024-06)
A Comprehensive Graph Pooling Benchmark: Effectiveness, Robustness and Generalizability
get_layer_graph 1 other paper
1 dated earlier
2206.13510 (2022-06)
Structural Entropy Guided Graph Hierarchical Pooling
integrate_label 1 other paper
1 dated earlier
2206.13510 (2022-06)
Structural Entropy Guided Graph Hierarchical Pooling

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

Recent advancements in social bot detection have been driven by the adoption of Graph Neural Networks. The social graph, constructed from social network interactions, contains benign and bot accounts that influence each other. However, previous graph-based detection methods that follow the transductive message-passing paradigm may not fully utilize hidden graph information and are vulnerable to adversarial bot behavior. The indiscriminate message passing between nodes from different categories and communities results in excessively homogeneous node representations, ultimately reducing the effectiveness of social bot detectors. In this paper, we propose SEBot, a novel multi-view graph-based contrastive learning-enabled social bot detector. In particular, we use structural entropy as an uncertainty metric to optimize the entire graph's structure and subgraph-level granularity, revealing the implicitly existing hierarchical community structure. And we design an encoder to enable message passing beyond the homophily assumption, enhancing robustness to adversarial behaviors of social bots. Finally, we employ multi-view contrastive learning to maximize mutual information between different views and enhance the detection performance through multi-task learning. Experimental results demonstrate that our approach significantly improves the performance of social bot detection compared with SOTA methods.

For agents

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

get_harvested_code_for_paper("2405.11225")
get_code_for_paper("2405.11225")
have("2405.11225")

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

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

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

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

Connect an agent — have() is free.