SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.26068 · 2026

Rethinking Weak Supervision in Anomaly Detection: A Comprehensive Benchmark

Shuang Liang, Siyuan Zhou, Minqi Jiang, Songqiao Han, Hailiang Huang, Chaochuan Hou, Shiping Wang, Xu Yao, Zhenbo Wu

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; 1 honoured the contract we drafted, 2 violated it and 1 has no contract verdict; 6 failures of our instrument; 3 no recorded run), measured 2026-11-23; 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/2605.26068.json · badge: /api/ran/2605.26068.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
SUFE-AILAB/WSADBench canonical (classifier label)
classifier basis: census
10 ran · 3 no recorded run
FunctionStatusWhere it lives
count_parameters Ran
ran, honoured the contract we drafted
SUFE-AILAB/WSADBench/WSADBench/baseline/ARNet/model.py
code served (permissive licence) · get_code("4f9e5a396cc088e8")
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 int, ndim 0, dtype family int, 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 torch.nn as nn

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 8)
        self.linear2 = nn.Linear(8, 3)
        self.conv1 = nn.Conv2d(1, 2, kernel_size=3)
    
    def forward(self, x):
        return x

model = SimpleModel()

ARGS = {
    "model": model
}
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 int, ndim 0, dtype family int, 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
create_bags Ran
ran; our contract draft was wrong, not the code
SUFE-AILAB/WSADBench/WSADBench/build_bags.py
code served (permissive licence) · get_code("af7b885a070f3d02")
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

# Create sample data
# X should be a 2D array with shape (n_samples, n_features)
# y should be a 1D array with labels (0 for normal, 1 for anomaly)

n_samples = 20
n_features = 4

# Create feature matrix X
X = np.random.randn(n_samples, n_features).astype(np.float32)

# Create label vector y with some anomalies (1s) and normals (0s)
y = np.array([0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0], dtype=np.int32)

ARGS = {
    'X': X,
    'y': y,
    'g': 10,
    'bagprob': 0.3,
    'seed': 331
}
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 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
cross_entropy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
SUFE-AILAB/WSADBench/WSADBench/baseline/ARNet/fit.py
code served (permissive licence) · get_code("47f390b96dcfa119")
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 torch.nn.functional as F

torch.manual_seed(0)

# The function expects:
# - logits: a tensor that will be passed to F.log_softmax(logits, -1)
# - target: a tensor that will be element-wise multiplied with log_softmax output
# - size_average: a boolean flag

# Create small tensors for batch_size=2, num_classes=4
batch_size = 2
num_classes = 4

logits = torch.randn(batch_size, num_classes)
target = torch.randn(batch_size, num_classes)

# Normalize target to be valid probabilities (sum to 1 across classes)
target = F.softmax(target, dim=-1)

size_average = True

ARGS = {
    "logits": logits,
    "target": target,
    "size_average": size_average
}
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
exists Ran
ran, violated the contract we drafted
SUFE-AILAB/WSADBench/WSADBench/baseline/MGFN/model.py
pointer only (licence: MIT); the stored copy get_code serves, from ThomasMrY/VCT, is pointer only (licence: NONE) · get_code("aa5486a3650902d8")
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 ThomasMrY/VCT, 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_auc Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
SUFE-AILAB/WSADBench/WSADBench/baseline/DualMGAN/model.py
code served (permissive licence) · get_code("09a0f794fc3da1fe")
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
import pandas as pd

# Create small numpy arrays for the function
# data_out_x represents outlier/out-of-distribution data
data_out_x = np.random.randn(5, 3)  # 5 outlier samples

# data_unl_x represents in-distribution/unlabeled data
data_unl_x = np.random.randn(8, 3)  # 8 in-distribution samples

# p_value represents anomaly scores/p-values
# Should have length equal to total number of samples (5 + 8 = 13)
p_value = np.random.rand(13, 1)

ARGS = {
    "p_value": p_value,
    "data_out_x": data_out_x,
    "data_unl_x": data_unl_x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, sklearn — 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
get_vars Ran
ran on a synthesized input
SUFE-AILAB/WSADBench/WSADBench/baseline/ARNet/model.py
code served (permissive licence) · get_code("4ef8e6819a534a3d")
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 torch
import torch.nn as nn

torch.manual_seed(0)

class DummyModel(nn.Module):
    def __init__(self):
        super().__init__()
        # Create a simple model with some parameters
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
        
        # Store vars as an attribute - this is what get_vars returns
        self.vars = [
            self.linear1.weight,
            self.linear1.bias,
            self.linear2.weight,
            self.linear2.bias,
        ]
    
    def get_vars(self):
        """获取模型参数列表"""
        return self.vars

# Create an instance of the model
model = DummyModel()

# Define ARGS dict with self parameter mapped to the model instance
ARGS = {
    'self': model
}
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 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
hinger_loss Ran
ran; our contract draft was wrong, not the code
SUFE-AILAB/WSADBench/WSADBench/baseline/ARNet/fit.py
code served (permissive licence) · get_code("9bc9a69061f008ad")
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
import torch.nn.functional as F

torch.manual_seed(0)

# The function hinger_loss takes two parameters: anomaly_score and normal_score
# Both are used with F.relu() which expects tensor-like inputs
# The operation is: F.relu(1 - anomaly_score + normal_score)
# So both parameters should be tensors with compatible shapes for broadcasting

anomaly_score = torch.randn(2, 4)
normal_score = torch.randn(2, 4)

ARGS = {
    "anomaly_score": anomaly_score,
    "normal_score": normal_score,
}
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
import_class Ran
ran; our contract draft was wrong, not the code
SUFE-AILAB/WSADBench/WSADBench/myutils.py
code served (permissive licence) · get_code("428a295d6688c7c9")
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 importlib
import torch

torch.manual_seed(0)

# The function dynamically imports a class given a string path
# It uses rsplit to split module path from class name
# Then uses importlib.import_module and getattr to retrieve the class

# We'll use a real built-in class path that exists in Python's standard library
# Example: 'collections.OrderedDict' or we can use torch classes
# Let's use 'torch.nn.Linear' as a valid class path

class_path = 'torch.nn.Linear'

ARGS = {
    'class_path': class_path
}
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
new_feature Ran
ran, violated the contract we drafted
SUFE-AILAB/WSADBench/WSADBench/baseline/MGFN/model.py
code served (permissive licence) · get_code("46d6b5b4d4588e96")
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 4, dtype family float, shape (2, 3, 4, 6) 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 numpy as np

torch.manual_seed(0)

# Construct a small numpy array with shape (batch, ncrop, seg, feature_dim)
# Using distinct sizes: batch=2, ncrop=3, seg=4, feature_dim=5
feat = np.random.randn(2, 3, 4, 5).astype(np.float32)

ARGS = {
    "feat": feat
}
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 Tensor, ndim 4, dtype family float, shape (2, 3, 4, 6) — shape (2, 3, 4, 6) 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
train_discriminator Ran
ran; our contract draft was wrong, not the code
SUFE-AILAB/WSADBench/WSADBench/baseline/DualMGAN/model.py
code served (permissive licence) · get_code("9e677983aa638e87")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# Define a simple discriminator model
class SimpleDiscriminator(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 1)
    
    def forward(self, x):
        return self.linear(x)

# Create model instance
model = SimpleDiscriminator()

# Create small batch tensors
# x_batch: batch_size=2, feature_dim=4
x_batch = torch.randn(2, 4)

# y_batch: batch_size=2, will be reshaped to (2, 1) in function
y_batch = torch.randint(0, 2, (2,)).float()

# Create optimizer
optimizer = torch.optim.Adam(model.parameters(), lr=0.001)

# Create loss function (BCEWithLogitsLoss for binary classification)
loss_fn = nn.BCEWithLogitsLoss()

ARGS = {
    "model": model,
    "x_batch": x_batch,
    "y_batch": y_batch,
    "optimizer": optimizer,
    "loss_fn": loss_fn
}
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 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
KMXMILL_individual Not yet run
unverified (harvested, no recorded run)
SUFE-AILAB/WSADBench/WSADBench/baseline/ARNet/fit.py
code served (permissive licence) · get_code("0c739923a1fa33ca")
How it ran

no invocation recorded.

get_score Not yet run
unverified (harvested, no recorded run)
SUFE-AILAB/WSADBench/WSADBench/baseline/DualMGAN/model.py
code served (permissive licence) · get_code("d82550e8f4e38ef6")
How it ran

no invocation recorded.

model_generater Not yet run
unverified (harvested, no recorded run)
SUFE-AILAB/WSADBench/WSADBench/baseline/ARNet/model.py
code served (permissive licence) · get_code("0bab4cc76b0f6c5c")
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 (2 with at least one paper dated earlier, 2 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
exists 486 other papers
479 dated earlier, 2 the same month, 3 later, 2 undated · 78 only as an assembly brick
1603.08155 (2016-03)
Perceptual Losses for Real-Time Style Transfer and Super-Resolution
1611.07004 (2016-11)
Image-to-Image Translation with Conditional Adversarial Networks
1804.04637 (2018-04)
EMBER: An Open Dataset for Training Static PE Malware Machine Learning Models
and 483 more not named here
count_parameters 180 other papers
173 dated earlier, 2 the same month, 5 later · 8 only as an assembly brick
1705.08415 (2017-05)
Supervised Community Detection with Line Graph Neural Networks
1707.01926 (2017-07)
Diffusion Convolutional Recurrent Neural Network: Data-Driven Traffic Forecasting
1808.09367 (2018-08)
Deriving Machine Attention from Human Rationales
and 177 more not named here

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

Weakly supervised anomaly detection (WSAD) has developed in three primary directions: incomplete, inexact, and inaccurate supervision. However, these directions remain isolated, lacking a unified framework to assess whether they address unique challenges or share fundamental mechanisms. This paper introduces WSADBench, the first benchmark that unifies evaluation across distinct weakly supervised scenarios, benchmarking diverse approaches from specialized WSAD methods to advanced tabular foundation models. WSADBench establishes standardized protocols to evaluate 36 algorithms across 4 modalities by systematically varying label quantity, granularity, and quality, revealing the performance boundaries of various methods. Based on over 700K experiments, WSADBench reveals four critical insights: (i) Strong intrinsic correlations exist between these weak supervision scenarios, challenging the isolation of current research directions. (ii) Specialized WSAD algorithms excel only in extreme label-scarcity regimes but are quickly dominated by tabular foundation models and general classification methods as supervision increases * Equal contribution.

For agents

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

get_harvested_code_for_paper("2605.26068")
get_code_for_paper("2605.26068")
have("2605.26068")

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

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

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

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

Connect an agent — have() is free.