SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.16114 · ICML · 2023

Fascinating Supervisory Signals and Where to Find Them: Deep Anomaly Detection with Scale Learning

Ning Liu, Hongzuo Xu, Yijie Wang, Juhui Wei, Songlei Jian, Yizhou Li

arXiv · PDF · Open in the Atlas

Code that ran

8 of 12 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (4 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; 3 failures of our instrument; 4 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/2305.16114.json · badge: /api/ran/2305.16114.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
xuhongzuo/scale-learning canonical (classifier label)
classifier basis: classifier_2025
4 ran · 2 no recorded run
xuhongzuo/DeepOD marked official in Papers with Code
Papers with Code archive
4 ran · 2 no recorded run
FunctionStatusWhere it lives
LinearBlock Ran
ran on a synthesized input · constructed an object; no result was computed
xuhongzuo/scale-learning/algorithms/slad.py
code served (permissive licence) · get_code("83c96bc91ba0d0c2")
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 an instance of its own class, LinearBlock: the run constructed the object and did not call it, so no result was computed. 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)

ARGS = {
    'in_channels': 4,
    'out_channels': 3,
    'activation': 'Tanh',
    'bias': False,
    'batch_norm': False,
    'skip_connection': None,
    'dropout': None,
}
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 LinearBlock — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a LinearBlock 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
LinearBlock Ran
ran on a synthesized input
xuhongzuo/DeepOD/deepod/models/tabular/slad.py
code served (permissive licence) · get_code("9ef15d66df3e979e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, 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 torch

INIT_ARGS = {
    'in_channels': 4,
    'out_channels': 3,
    'mid_channels': None,
    'activation': 'Tanh',
    'bias': False,
    'batch_norm': True,
    'skip_connection': None,
    'dropout': 0.1,
}

ARGS = {
    'x': torch.randn(2, 4),
}

if __name__ == '__main__':
    block = torch.nn.Module()
    
    def _instantiate_class(module_name: str, class_name: str):
        module = __import__(module_name, fromlist=[class_name])
        class_ = getattr(module, class_name)
        return class_()

    class LinearBlock(torch.nn.Module):
        """Linear Block"""

        def __init__(self, in_channels, out_channels, mid_channels=None, activation='Tanh', bias=False, batch_norm=False, skip_connection=None, dropout=None):
            super(LinearBlock, self).__init__()
            self.skip_connection = skip_connection
            self.linear = torch.nn.Linear(in_channels, out_channels, bias=bias)
            if activation is not None:
                self.act_layer = _instantiate_class('torch.nn.modules.activation', activation)
            else:
                self.act_layer = torch.nn.Identity()
            self.dropout = dropout
            if dropout is not None:
                self.dropout_layer = torch.nn.Dropout(p=dropout)
            self.batch_norm = batch_norm
            if batch_norm is True:
                dim = out_channels if mid_channels is None else mid_channels
                self.bn_layer = torch.nn.BatchNorm1d(dim, affine=bias)

        def forward(self, x):
            x1 = self.linear(x)
            x1 = self.act_layer(x1)
            if self.batch_norm is True:
                x1 = self.bn_layer(x1)
            if self.dropout is not None:
                x1 = self.dropout_layer(x1)
            if self.skip_connection == 'concat':
                x1 = torch.cat([x, x1], axis=1)
            return x1

    block = LinearBlock(**INIT_ARGS)
    output = block(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
MLPnet Ran
ran on a synthesized input · constructed an object; no result was computed
xuhongzuo/scale-learning/algorithms/slad.py
code served (permissive licence) · get_code("63c2f9f745848bff")
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 an instance of its own class, MLPnet: the run constructed the object and did not call it, so no result was computed. 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)

ARGS = {
    'n_features': 4,
    'n_hidden': [8, 6],
    'n_output': 3,
    'activation': 'ReLU',
    'bias': False,
    'batch_norm': False,
    'skip_connection': None,
    'dropout': None,
}
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 MLPnet — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MLPnet 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
MLPnet Ran
ran on a synthesized input · constructed an object; no result was computed
xuhongzuo/DeepOD/deepod/models/tabular/slad.py
code served (permissive licence) · get_code("dae893072b2277a2")
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 an instance of its own class, MLPnet: the run constructed the object and did not call it, so no result was computed. 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)

ARGS = {
    'n_features': 4,
    'n_hidden': '8,6',
    'n_output': 3,
    'mid_channels': None,
    'activation': 'ReLU',
    'bias': False,
    'batch_norm': False,
    'skip_connection': None,
    'dropout': None,
}
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 MLPnet — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MLPnet 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
SLADLoss Ran
ran on a synthesized input · constructed an object; no result was computed
xuhongzuo/scale-learning/algorithms/slad.py
code served (permissive licence) · get_code("e9730379b779ad23")
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 an instance of its own class, SLADLoss: the run constructed the object and did not call it, so no result was computed. 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 SLADLoss class takes y_pred and y_true as inputs in forward()
# Both should be torch.Tensor with shape [batch_size, distribution_size]
# The function applies softmax, so any real-valued tensors work

batch_size = 2
distribution_size = 4

# Create small sample tensors
y_pred = torch.randn(batch_size, distribution_size)
y_true = torch.randn(batch_size, distribution_size)

ARGS = {
    'reduction': 'mean'
}

# To actually run the forward pass, we'd do:
# loss_fn = SLADLoss(**ARGS)
# output = loss_fn(y_pred, y_true)
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 SLADLoss — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SLADLoss 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
get_sub_seqs Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
xuhongzuo/DeepOD/deepod/models/tabular/slad.py
code served (permissive licence) · get_code("a1a5760d9effd68a")
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 3, dtype family float, shape (21, 10, 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

np.random.seed(0)

# Create a simple time-series array with shape [time_length, channels]
# Using distinct dimensions: 50 time steps, 3 channels
x_arr = np.random.randn(50, 3).astype(np.float32)

ARGS = {
    "x_arr": x_arr,
    "seq_len": 10,
    "stride": 2,
}
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 3, dtype family float, shape (21, 10, 3) — shape (21, 10, 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
get_sub_seqs_label Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
xuhongzuo/DeepOD/deepod/models/tabular/slad.py
code served (permissive licence) · get_code("5fd7000332dae116")
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 (16,) 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 label array with some variation
y = np.array([0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 
              1, 0, 1, 1, 0, 0, 1, 0, 1, 0,
              0, 1, 1, 0, 1, 0, 0, 1, 1, 0,
              1, 0, 1, 0, 0, 1, 0, 1, 1, 0], dtype=np.float32)

ARGS = {
    "y": y,
    "seq_len": 10,
    "stride": 2
}
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 1, dtype family float, shape (16,) — shape (16,) 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
instantiate_class Ran
ran; our contract draft was wrong, not the code
xuhongzuo/scale-learning/algorithms/slad.py
code served (permissive licence) · get_code("83a9af4ceb0fe772")
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 TestClass. 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 sys
from types import ModuleType

# Create a minimal module with a test class
test_module = ModuleType('test_module')
test_module.__file__ = '<string>'

class TestClass:
    def __init__(self):
        self.value = 42

test_module.TestClass = TestClass
sys.modules['test_module'] = test_module

ARGS = {
    'module_name': 'test_module',
    'class_name': 'TestClass',
}
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 TestClass — a TestClass output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a TestClass 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
BaseDeepAD Not yet run
unverified (harvested, no recorded run)
xuhongzuo/scale-learning/algorithms/slad.py
code served (permissive licence) · get_code("f1dca4f7780ac0b5")
How it ran

no invocation recorded.

BaseDeepAD Not yet run
unverified (harvested, no recorded run)
xuhongzuo/DeepOD/deepod/models/tabular/slad.py
code served (permissive licence) · get_code("ef7592e75f447da4")
How it ran

no invocation recorded.

SLAD Not yet run
unverified (harvested, no recorded run)
xuhongzuo/scale-learning/algorithms/slad.py
code served (permissive licence) · get_code("62de302f2a216a85")
How it ran

no invocation recorded.

SLAD Not yet run
unverified (harvested, no recorded run)
xuhongzuo/DeepOD/deepod/models/tabular/slad.py
code served (permissive licence) · get_code("c465ae236f9aa312")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 4 are also present in other papers whose code we hold (3 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
BaseDeepAD
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2005.02359 (2020-05)
Classification-Based Anomaly Detection for General Data
LinearBlock
brick of this paper's assembly: helper
1 other paper
1 later
2503.10091 (2025-03)
G 2 SF: Geometry-Guided Score Fusion for Multimodal Industrial Anomaly Detection
get_sub_seqs
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2005.02359 (2020-05)
Classification-Based Anomaly Detection for General Data
get_sub_seqs_label
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2005.02359 (2020-05)
Classification-Based Anomaly Detection for General Data

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

Due to the unsupervised nature of anomaly detection, the key to fueling deep models is finding supervisory signals. Different from current reconstruction-guided generative models and transformation-based contrastive models, we devise novel data-driven supervision for tabular data by introducing a characteristic -scale -as data labels. By representing varied sub-vectors of data instances, we define scale as the relationship between the dimensionality of original sub-vectors and that of representations. Scales serve as labels attached to transformed representations, thus offering ample labeled data for neural network training. This paper further proposes a scale learningbased anomaly detection method. Supervised by the learning objective of scale distribution alignment, our approach learns the ranking of representations converted from varied subspaces of each data instance. Through this proxy task, our approach models inherent regularities and patterns within data, which well describes data "normality". Abnormal degrees of testing instances are obtained by measuring whether they fit these learned patterns. Extensive experiments show that our approach leads to significant improvement over state-of-the-art generative/contrastive anomaly detection methods.

For agents

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

get_harvested_code_for_paper("2305.16114")
get_code_for_paper("2305.16114")
have("2305.16114")

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

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

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

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

Connect an agent — have() is free.