SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2109.04684 · 2021

Enhancing Unsupervised Anomaly Detection with Score-Guided Network

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 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 3 have no contract verdict; 1 failure 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/2109.04684.json · badge: /api/ran/2109.04684.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
urbanmobility/SGM_mindspore canonical (classifier label)
classifier basis: census
4 ran · 0 no recorded run
urbanmobility/sgm canonical (classifier label)
classifier basis: census
0 ran · 1 no recorded run
FunctionStatusWhere it lives
LoadImageData Ran
ran on a synthesized input
urbanmobility/SGM_mindspore/dataloader.py
code served (permissive licence) · get_code("5cd82972b1552065")
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
import tempfile
import os

# Create a temporary directory for test data
tmpdir = tempfile.mkdtemp()

# Create minimal test data files
data_array = np.random.randn(100, 5)
np.savetxt(os.path.join(tmpdir, 'test_data.txt'), data_array, delimiter=',')

y_array = np.array([4.0] * 80 + [1.0] * 20)
np.savetxt(os.path.join(tmpdir, 'test_y.txt'), y_array, delimiter=',')

# Create a minimal params class with required attributes
class Params:
    def __init__(self):
        self.data_path = tmpdir + '/'
        self.data_name = 'test'
        self.seed = 42
        self.anomal_rate = None

params = Params()

ARGS = {
    'params': params
}
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 — 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
merge Ran
ran; our contract draft was wrong, not the code
urbanmobility/SGM_mindspore/model_utils/config.py
code served (permissive licence) · get_code("b9e24c3e3e0e88a7")
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) 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 argparse

torch.manual_seed(0)

# Create a mock args object with some attributes
args = argparse.Namespace(
    learning_rate=0.001,
    batch_size=32,
    epochs=10,
    model_name="test_model",
    debug=True,
    seed=42
)

# Create a base configuration dictionary
cfg = {
    "default_lr": 0.0001,
    "default_batch": 16,
    "dataset": "cifar10"
}

ARGS = {
    "args": args,
    "cfg": cfg
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
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
parse_cli_to_yaml Ran
ran on a synthesized input
urbanmobility/SGM_mindspore/model_utils/config.py
code served (permissive licence) · get_code("1c44a0c487504765")
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 Namespace. 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 argparse
import ast

# Create a minimal parent parser
parent_parser = argparse.ArgumentParser(add_help=False)

# Create a base configuration dictionary with various types
base_cfg = {
    'learning_rate': 0.001,
    'batch_size': 32,
    'epochs': 100,
    'debug': True,
    'model_name': 'resnet50',
    'temperature': 0.7,
    'use_cache': False,
}

# Create a helper dictionary with descriptions
helper_dict = {
    'learning_rate': 'Learning rate for optimization',
    'batch_size': 'Batch size for training',
    'epochs': 'Number of training epochs',
    'debug': 'Enable debug mode',
    'model_name': 'Name of the model to use',
    'temperature': 'Temperature parameter for sampling',
    'use_cache': 'Whether to use caching',
}

# Create a choices dictionary for some parameters
choices_dict = {
    'model_name': ['resnet50', 'resnet101', 'vgg16'],
}

# Define arguments for the function
ARGS = {
    'parser': parent_parser,
    'cfg': base_cfg,
    'helper': helper_dict,
    'choices': choices_dict,
    'cfg_path': 'config.yaml',
}
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 Namespace — a Namespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Namespace 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
parse_yaml Ran
ran on a synthesized input
urbanmobility/SGM_mindspore/model_utils/config.py
code served (permissive licence) · get_code("9fde06375d75b9b5")
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 tempfile
import os
import yaml

# Create a temporary YAML file with valid config structure
temp_dir = tempfile.mkdtemp()
yaml_path = os.path.join(temp_dir, "config.yaml")

# Write a test YAML file with 3 documents
yaml_content = """
model: resnet50
learning_rate: 0.001
batch_size: 32
---
model: Model architecture choice
learning_rate: Learning rate for optimization
batch_size: Number of samples per batch
---
model: [resnet50, resnet101, vgg16]
learning_rate: [0.0001, 0.001, 0.01]
batch_size: [16, 32, 64]
"""

with open(yaml_path, 'w') as f:
    f.write(yaml_content)

ARGS = {
    'yaml_path': yaml_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
yaml — 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
LoadTabularData Not yet run
unverified (harvested, no recorded run)
urbanmobility/sgm/dataloader.py
code served (permissive licence) · get_code("509618481aa68e98")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 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 4 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
merge 28 other papers
26 dated earlier, 2 later
1406.1078 (2014-06)
Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation
1409.3215 (2014-09)
Sequence to Sequence Learning with Neural Networks
1512.00567 (2015-12)
Rethinking the Inception Architecture for Computer Vision
and 25 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-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

Anomaly detection plays a crucial role in various real-world applications, including healthcare and finance systems. Owing to the limited number of anomaly labels in these complex systems, unsupervised anomaly detection methods have attracted great attention in recent years. Two major challenges faced by the existing unsupervised methods are: (i) distinguishing between normal and abnormal data in the transition field, where normal and abnormal data are highly mixed together; (ii) defining an effective metric to maximize the gap between normal and abnormal data in a hypothesis space, which is built by a representation learner. To that end, this work proposes a novel scoring network with a score-guided regularization to learn and enlarge the anomaly score disparities between normal and abnormal data. With such score-guided strategy, the representation learner can gradually learn more informative representation during the model training stage, especially for the samples in the transition field. We next propose a score-guided autoencoder (SG-AE), incorporating the scoring network into an autoencoder framework for anomaly detection, as well as other three state-of-the-art models, to further demonstrate the effectiveness and transferability of the design. Extensive experiments on both synthetic and real-world datasets demonstrate the state-of-the-art performance of these score-guided models (SGMs).

For agents

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

get_harvested_code_for_paper("2109.04684")
get_code_for_paper("2109.04684")
have("2109.04684")

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

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

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

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

Connect an agent — have() is free.