SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2411.06427 · NeurIPS · 2024

UniGAD: Unifying Multi-level Graph Anomaly Detection

Jia Li, Jianheng Tang, Yuan Yao, Chenyi Zi, Yiqing Lin, H Zhao, Gnn Encoder

arXiv · PDF · Open in the Atlas

Code that ran

6 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; 5 failures of our instrument; 7 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/2411.06427.json · badge: /api/ran/2411.06427.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
lllyyq1121/UniGAD canonical (classifier label)
classifier basis: census
4 ran · 4 no recorded run
lllyyq1121/unigad canonical (classifier label)
classifier basis: classifier_2025
2 ran · 3 no recorded run
FunctionStatusWhere it lives
ASM Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lllyyq1121/unigad/src/e2e_models.py
code served (permissive licence) · get_code("b59e82bc048376e0")
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 1, dtype family float, shape (5,) 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.optimize import minimize
from scipy.optimize import nnls

np.random.seed(0)

# Create small valid inputs for the ASM function
K = 5

# hat_w: shape (K,) - array of weights
hat_w = np.array([0.15, 0.25, 0.10, 0.30, 0.20])

# c: shape (K,) - array of constants
c = np.array([0.02, 0.03, 0.01, 0.04, 0.05])

ARGS = {
    'hat_w': hat_w,
    'c': c,
}
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 ndarray, ndim 1, dtype family float, shape (5,) — shape (5,) 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
ASM Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lllyyq1121/UniGAD/src/Pareto_fn.py
code served (permissive licence) · get_code("0ec085ddee672579")
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 1, dtype family float, shape (5,) 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

# Construct valid arguments for ASM function
# The function expects:
# - hat_w: array of shape (K,) - estimated weights
# - c: array of shape (K,) - constraint/bias vector

# Create small numpy arrays
K = 5
hat_w = np.array([0.2, 0.3, 0.1, 0.25, 0.15])
c = np.array([0.01, 0.02, 0.01, 0.015, 0.005])

ARGS = {
    'hat_w': hat_w,
    'c': c,
}
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 ndarray, ndim 1, dtype family float, shape (5,) — shape (5,) 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
calculate_theta2 Ran
ran, honoured the contract we drafted
lllyyq1121/UniGAD/src/edcoders.py
pointer only (licence: MIT); the stored copy get_code serves, from squareroot3/rethinking-anomaly-detection, is pointer only (licence: NONE) · get_code("cb875357b44a3298")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from squareroot3/rethinking-anomaly-detection, 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.

get_best_f1 Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lllyyq1121/unigad/src/e2e_models.py
code served (permissive licence) · get_code("fe569ec9c507448d")
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 numpy as np
from sklearn.metrics import f1_score

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

# Create sample labels (binary classification labels)
labels = np.array([0, 1, 0, 1, 1, 0, 1, 0])

# Create sample probabilities (predicted probabilities for positive class)
probs = np.array([0.1, 0.8, 0.2, 0.9, 0.7, 0.3, 0.85, 0.15])

ARGS = {
    "labels": labels,
    "probs": probs
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — 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
obtain_act Ran
ran; our contract draft was wrong, not the code
lllyyq1121/UniGAD/src/utils.py
code served (permissive licence) · get_code("35dd55beb4b42fbc")
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 ReLU. 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 obtain_act takes a single parameter 'name' which is a string
# or None that specifies which activation function to return.
# The function doesn't actually use the activation function it creates,
# it just instantiates and returns it, so we just need valid string values.

ARGS = {
    'name': 'relu'
}
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 ReLU — a ReLU output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ReLU 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
obtain_norm Ran
ran; our contract draft was wrong, not the code
lllyyq1121/UniGAD/src/utils.py
code served (permissive licence) · get_code("4c8fe0a8460d3b5c")
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 type. 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 functools import partial

torch.manual_seed(0)

ARGS = {
    'name': 'layernorm'
}
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 type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type 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
UnifyMLPDetector Not yet run
unverified (harvested, no recorded run)
lllyyq1121/unigad/src/e2e_models.py
code served (permissive licence) · get_code("423532caf6b167b4")
How it ran

no invocation recorded.

apply_edges_distance Not yet run
unverified (harvested, no recorded run)
lllyyq1121/UniGAD/src/predictors.py
code served (permissive licence) · get_code("dc12e2810d822a2f")
How it ran

no invocation recorded.

get_best_f1 Not yet run
unverified (harvested, no recorded run)
lllyyq1121/UniGAD/src/e2e_models.py
code served (permissive licence) · get_code("67d792fb28595133")
How it ran

no invocation recorded.

pareto_fn Not yet run
unverified (harvested, no recorded run)
lllyyq1121/unigad/src/e2e_models.py
code served (permissive licence) · get_code("215676227231e70e")
How it ran

no invocation recorded.

pareto_fn Not yet run
unverified (harvested, no recorded run)
lllyyq1121/UniGAD/src/Pareto_fn.py
code served (permissive licence) · get_code("5d6d091d68784a71")
How it ran

no invocation recorded.

pareto_step Not yet run
unverified (harvested, no recorded run)
lllyyq1121/unigad/src/e2e_models.py
code served (permissive licence) · get_code("f99c31ca2a255056")
How it ran

no invocation recorded.

pareto_step Not yet run
unverified (harvested, no recorded run)
lllyyq1121/UniGAD/src/Pareto_fn.py
code served (permissive licence) · get_code("914e644f6f8e2161")
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 9 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 8 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
calculate_theta2 3 other papers
2 dated earlier, 1 later
2205.15508 (2022-05)
Rethinking Graph Neural Networks for Anomaly Detection
2402.09834 (2024-02)
All in One and One for All: A Simple yet Effective Method towards Cross-domain Graph Pretraining
2502.16076 (2025-02)
Harnessing Feature Resonance under Arbitrary Target Alignment for Out-of-Distribution Node Detection

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

Graph Anomaly Detection (GAD) aims to identify uncommon, deviated, or suspicious objects within graph-structured data. Existing methods generally focus on a single graph object type (node, edge, graph, etc.) and often overlook the inherent connections among different object types of graph anomalies. For instance, a money laundering transaction might involve an abnormal account and the broader community it interacts with. To address this, we present UniGAD, the first unified framework for detecting anomalies at node, edge, and graph levels jointly. Specifically, we develop the Maximum Rayleigh Quotient Subgraph Sampler (MRQSampler) that unifies multi-level formats by transferring objects at each level into graph-level tasks on subgraphs. We theoretically prove that MRQSampler maximizes the accumulated spectral energy of subgraphs (i.e., the Rayleigh quotient) to preserve the most significant anomaly information. To further unify multi-level training, we introduce a novel GraphStitch Network to integrate information across different levels, adjust the amount of sharing required at each level, and harmonize conflicting training goals. Comprehensive experiments show that UniGAD outperforms both existing GAD methods specialized for a single task and graph prompt-based approaches for multiple tasks, while also providing robust zero-shot task transferability. All codes can be found at https://github.com/lllyyq1121/UniGAD.

For agents

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

get_harvested_code_for_paper("2411.06427")
get_code_for_paper("2411.06427")
have("2411.06427")

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

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

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

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

Connect an agent — have() is free.