SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.09876 · 2021

Anomaly Detection in Dynamic Graphs via Transformer

arXiv · PDF · Open in the Atlas

Code that ran

5 of 6 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 5 have no contract verdict; 0 failures of our instrument; 1 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/2106.09876.json · badge: /api/ran/2106.09876.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
yuetan031/taddy_pytorch community (classifier label)
classifier basis not recorded on the link
5 ran · 1 no recorded run
FunctionStatusWhere it lives
WL_setting_init Ran
ran on a synthesized input
yuetan031/taddy_pytorch/codes/utils.py
code served (permissive licence) · get_code("87c6dd6cf2d6135d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

# Analyze the function:
# - node_list: iterable of nodes (can be any hashable objects)
# - link_list: iterable of pairs (tuples/lists of two elements each)
# The function builds dictionaries keyed by nodes and processes pairs

# Create simple node identifiers
node_list = ['A', 'B', 'C', 'D']

# Create links as pairs connecting nodes
link_list = [
    ('A', 'B'),
    ('B', 'C'),
    ('C', 'D'),
    ('A', 'D')
]

ARGS = {
    'node_list': node_list,
    'link_list': link_list
}
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, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
anomaly_generation2 Ran
ran on a synthesized input
yuetan031/taddy_pytorch/codes/AnomalyGeneration.py
code served (permissive licence) · get_code("470b184737feb845")
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 numpy as np
from scipy.sparse import csr_matrix, coo_matrix

# Create a small synthetic graph for testing
np.random.seed(0)

# Number of nodes and edges
n = 10  # number of nodes
m = 20  # number of edges

# Create a simple edge list (node pairs)
# Each row is [source_node, target_node]
edges = np.array([
    [0, 1], [1, 2], [2, 3], [3, 4], [4, 5],
    [5, 6], [6, 7], [7, 8], [8, 9], [9, 0],
    [0, 2], [1, 3], [2, 4], [3, 5], [4, 6],
    [5, 7], [6, 8], [7, 9], [8, 0], [9, 1]
], dtype=np.int32)

# Ensure edges are valid (within node range)
edges = edges % n

# Create sparse matrix representation
data = edges

# Parameters for anomaly generation
ini_graph_percent = 0.7  # 70% of edges for training
anomaly_percent = 0.3   # 30% of test edges are anomalies
seed = 42

ARGS = {
    'ini_graph_percent': ini_graph_percent,
    'anomaly_percent': anomaly_percent,
    'data': data,
    'n': n,
    'm': m,
    'seed': seed
}
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
compute_batch_hop Ran
ran on a synthesized input
yuetan031/taddy_pytorch/codes/utils.py
code served (permissive licence) · get_code("c8856e0ae8b0042f")
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 numpy as np
import networkx as nx

# Set random seeds for reproducibility
np.random.seed(0)

# Define parameters
num_snap = 4  # number of snapshots
k = 5  # number of top neighbors
window_size = 3  # window size for lookback

# Create a small node list
node_list = [0, 1, 2, 3, 4, 5]

# Create edges for each snapshot
# edges_all is a list of lists, where each inner list contains edges for that snapshot
edges_all = [
    [(0, 1), (1, 2), (2, 3)],  # snapshot 0
    [(0, 1), (1, 3), (3, 4)],  # snapshot 1
    [(1, 2), (2, 4), (4, 5)],  # snapshot 2
    [(0, 2), (2, 5), (3, 4)],  # snapshot 3
]

# Create Ss - a list of dicts for each snapshot
# Each dict maps node index to a score array
# The score array should have length equal to number of nodes
Ss = []
for snap in range(num_snap):
    snap_dict = {}
    for node in node_list:
        # Create a score array for each node with random values
        scores = np.random.rand(len(node_list)) * 100
        snap_dict[node] = scores
    Ss.append(snap_dict)

ARGS = {
    'node_list': node_list,
    'edges_all': edges_all,
    'num_snap': num_snap,
    'Ss': Ss,
    'k': k,
    'window_size': window_size,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, numpy — 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
compute_zero_WL Ran
ran on a synthesized input
yuetan031/taddy_pytorch/codes/utils.py
code served (permissive licence) · get_code("e6d859b522912ef4")
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 numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - compute_zero_WL takes node_list and link_list
# - It iterates over node_list
# - It uses each element i as a dictionary key
# - link_list is not used in the function body
# - Returns a dictionary mapping each node to 0

# Create a simple node_list with distinct nodes
node_list = ['node_0', 'node_1', 'node_2']

# Create a simple link_list (not used but required parameter)
link_list = [('node_0', 'node_1'), ('node_1', 'node_2')]

ARGS = {
    'node_list': node_list,
    'link_list': link_list
}
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 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
processEdges Ran
ran on a synthesized input
yuetan031/taddy_pytorch/codes/AnomalyGeneration.py
code served (permissive licence) · get_code("46790ff4c0d55965")
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 int, shape (1, 2) 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 fake_edges: a 2D array of edge pairs (node_i, node_j)
# Include some self-loops, duplicates, and unordered pairs to test the function
fake_edges = np.array([
    [0, 1],
    [2, 1],  # Will be reordered to [1, 2]
    [3, 2],  # Will be reordered to [2, 3]
    [1, 1],  # Self-loop
    [0, 1],  # Duplicate
    [4, 5],
])

# Create data: original edge list (some edges will be filtered out)
data = np.array([
    [0, 1],
    [1, 2],
    [2, 3],
])

ARGS = {
    "fake_edges": fake_edges.copy(),
    "data": data,
}
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 int, shape (1, 2) — shape (1, 2) 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
anomaly_generation Not yet run
unverified (harvested, no recorded run)
yuetan031/taddy_pytorch/codes/AnomalyGeneration.py
code served (permissive licence) · get_code("67d3de48f6ae6da8")
How it ran

no invocation recorded.

Also present in other papers' code

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

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

Detecting anomalies for dynamic graphs has drawn increasing attention due to their wide applications in social networks, e-commerce, and cybersecurity. Recent deep learning-based approaches have shown promising results over shallow methods. However, they fail to address two core challenges of anomaly detection in dynamic graphs: the lack of informative encoding for unattributed nodes and the difficulty of learning discriminate knowledge from coupled spatial-temporal dynamic graphs. To overcome these challenges, in this paper, we present a novel Transformer-based Anomaly Detection framework for DYnamic graphs (TADDY). Our framework constructs a comprehensive node encoding strategy to better represent each node's structural and temporal roles in an evolving graphs stream. Meanwhile, TADDY captures informative representation from dynamic graphs with coupled spatial-temporal patterns via a dynamic graph transformer model. The extensive experimental results demonstrate that our proposed TADDY framework outperforms the state-of-the-art methods by a large margin on six real-world datasets.

For agents

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

get_harvested_code_for_paper("2106.09876")
get_code_for_paper("2106.09876")
have("2106.09876")

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

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

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

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

Connect an agent — have() is free.