SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1901.08954 · 2019

Skip-GANomaly: Skip Connected and Adversarially Trained Encoder-Decoder Anomaly Detection

arXiv · PDF · Open in the Atlas

Code that ran

10 of 10 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 6 have no contract verdict; 4 failures of our instrument; 0 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/1901.08954.json · badge: /api/ran/1901.08954.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
samet-akcay/skip-ganomaly community (classifier label)
classifier basis not recorded on the link
8 ran · 0 no recorded run
YeongHyeon/Skip-GANomaly community (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
FunctionStatusWhere it lives
auprc Ran
ran on a synthesized input
samet-akcay/skip-ganomaly/lib/evaluate.py
code served (permissive licence) · get_code("784683e6a5654175")
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 numpy as np
from sklearn.metrics import roc_curve, auc, average_precision_score, f1_score

torch.manual_seed(0)

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

# Create prediction scores (probabilities between 0 and 1)
scores = np.array([0.1, 0.9, 0.8, 0.2, 0.85, 0.15])

ARGS = {
    "labels": labels,
    "scores": scores
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, 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
dat2canvas Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
YeongHyeon/Skip-GANomaly/source/tf_process.py
code served (permissive licence) · get_code("9a083fc9c5cd9850")
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 (56, 56, 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
import math

# Create a small batch of grayscale image data
# Shape: (batch_size, height, width, channels)
# Using 4 images, 28x28 size, 1 channel (grayscale)
batch_size = 4
height = 28
width = 28
channels = 1

data = np.random.rand(batch_size, height, width, channels).astype(np.float32)

ARGS = {
    "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 3, dtype family float, shape (56, 56, 3) — shape (56, 56, 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
evaluate Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
samet-akcay/skip-ganomaly/lib/evaluate.py
code served (permissive licence) · get_code("345038078079cc36")
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 numpy as np

torch.manual_seed(0)

# Create small binary classification tensors
# labels: binary labels (0 or 1)
# scores: prediction scores between 0 and 1
labels = torch.tensor([0, 1, 1, 0, 1, 1], dtype=torch.float32)
scores = torch.tensor([0.1, 0.9, 0.8, 0.2, 0.7, 0.95], dtype=torch.float32)

ARGS = {
    'labels': labels,
    'scores': scores,
    'metric': 'roc'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, scipy, sklearn, 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
get_norm_layer Ran
ran on a synthesized input
samet-akcay/skip-ganomaly/lib/models/networks.py
code served (permissive licence) · get_code("8da796d8d2d055b4")
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 partial. 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
import functools

torch.manual_seed(0)

# The function get_norm_layer takes one parameter: norm_type
# It accepts 'batch', 'instance', or 'none' as valid values
# Let's test with 'instance' as a representative case

ARGS = {
    'norm_type': 'instance'
}
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 partial — a partial output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a partial 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_scheduler Ran
ran on a synthesized input
samet-akcay/skip-ganomaly/lib/models/networks.py
code served (permissive licence) · get_code("bf9182e2d81230d0")
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 LambdaLR. 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 torch.optim import Adam

torch.manual_seed(0)

# Create a minimal model
class TinyModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

model = TinyModel()

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

# Create a minimal options object with all required attributes
class OptConfig:
    def __init__(self):
        self.lr_policy = 'lambda'
        self.iter = 0
        self.niter = 100
        self.niter_decay = 50
        self.lr_decay_iters = 10

opt = OptConfig()

ARGS = {
    'optimizer': optimizer,
    'opt': opt
}
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 LambdaLR — a LambdaLR output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a LambdaLR 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
gray2rgb Ran
ran on a synthesized input
YeongHyeon/Skip-GANomaly/source/tf_process.py
code served (permissive licence) · get_code("aa166086c035e6eb")
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 (4, 3, 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

# Create a small grayscale image (2D array with single channel)
# Shape should be (height, width, 1) based on how the function accesses gray[:, :, 0]
gray_image = np.random.rand(4, 3, 1).astype(np.float32)

ARGS = {
    "gray": gray_image
}
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 (4, 3, 3) — shape (4, 3, 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
init_net Ran
ran; our contract draft was wrong, not the code
samet-akcay/skip-ganomaly/lib/models/networks.py
code served (permissive licence) · get_code("26c1a0c85ed550cc")
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 Sequential. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 torch.nn import init

torch.manual_seed(0)

# Build a simple neural network with Conv2d, Linear, and BatchNorm2d layers
net = nn.Sequential(
    nn.Conv2d(3, 4, kernel_size=3),
    nn.BatchNorm2d(4),
    nn.Linear(4, 8),
)

ARGS = {
    'net': net,
    'init_type': 'normal',
    'gpu_ids': []
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
l1_loss Ran
ran on a synthesized input
samet-akcay/skip-ganomaly/lib/loss.py
code served (permissive licence) · get_code("8a2f4a14a4eff7ff")
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

torch.manual_seed(0)

# Create small test tensors
input_tensor = torch.randn(2, 4)
target_tensor = torch.randn(2, 4)

ARGS = {
    "input": input_tensor,
    "target": target_tensor,
}
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
l2_loss Ran
ran on a synthesized input
samet-akcay/skip-ganomaly/lib/loss.py
code served (permissive licence) · get_code("602022135f879cb7")
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

torch.manual_seed(0)

# Create small input and target tensors
# Using batch size 2, dimension 4
input_tensor = torch.randn(2, 4)
target_tensor = torch.randn(2, 4)

ARGS = {
    "input": input_tensor,
    "target": target_tensor,
    "size_average": 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 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
roc Ran
ran; our contract draft was wrong, not the code
samet-akcay/skip-ganomaly/lib/evaluate.py
code served (permissive licence) · get_code("a2c76c01c3578d6f")
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 numpy as np

torch.manual_seed(0)

# Create small binary classification labels and scores tensors
labels = torch.tensor([0, 1, 0, 1, 1, 0], dtype=torch.float32)
scores = torch.tensor([0.1, 0.9, 0.2, 0.8, 0.7, 0.3], dtype=torch.float32)

ARGS = {
    'labels': labels,
    'scores': scores,
    'saveto': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, scipy, sklearn, 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

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 10 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 0 the same month, 9 later) and 0 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
get_norm_layer 4 other papers
2 dated earlier, 2 later
1406.2283 (2014-06)
Depth Map Prediction from a Single Image using a Multi-Scale Deep Network
1611.07004 (2016-11)
Image-to-Image Translation with Conditional Adversarial Networks
1904.10620 (2019-04)
Bidirectional Learning for Domain Adaptation of Semantic Segmentation
and 1 more not named here
dat2canvas 3 other papers
2 dated earlier, 1 later
1703.05921 (2017-03)
Unsupervised Anomaly Detection with Generative Adversarial Networks to Guide Marker Discovery
1805.06725 (2018-05)
GANomaly: Semi-Supervised Anomaly Detection via Adversarial Training
1904.02639 (2019-04)
Memorizing Normality to Detect Anomaly: Memory-augmented Deep Autoencoder for Unsupervised Anomaly Detection
gray2rgb 3 other papers
2 dated earlier, 1 later
1703.05921 (2017-03)
Unsupervised Anomaly Detection with Generative Adversarial Networks to Guide Marker Discovery
1805.06725 (2018-05)
GANomaly: Semi-Supervised Anomaly Detection via Adversarial Training
1904.02639 (2019-04)
Memorizing Normality to Detect Anomaly: Memory-augmented Deep Autoencoder for Unsupervised Anomaly Detection
evaluate 2 other papers
1 dated earlier, 1 later
1805.06725 (2018-05)
GANomaly: Semi-Supervised Anomaly Detection via Adversarial Training
2203.00259 (2022-03)
Omni-frequency Channel-selection Representations for Unsupervised Anomaly Detection
init_net 2 other papers
1 dated earlier, 1 later
1810.08771 (2018-10)
Image Inpainting via Generative Multi-column Convolutional Neural Networks
2203.00259 (2022-03)
Omni-frequency Channel-selection Representations for Unsupervised Anomaly Detection
l1_loss 2 other papers
1 dated earlier, 1 later
1805.06725 (2018-05)
GANomaly: Semi-Supervised Anomaly Detection via Adversarial Training
2203.00259 (2022-03)
Omni-frequency Channel-selection Representations for Unsupervised Anomaly Detection
l2_loss 2 other papers
1 dated earlier, 1 later
1805.06725 (2018-05)
GANomaly: Semi-Supervised Anomaly Detection via Adversarial Training
2203.00259 (2022-03)
Omni-frequency Channel-selection Representations for Unsupervised Anomaly Detection
roc 2 other papers
1 dated earlier, 1 later
1805.06725 (2018-05)
GANomaly: Semi-Supervised Anomaly Detection via Adversarial Training
2203.00259 (2022-03)
Omni-frequency Channel-selection Representations for Unsupervised Anomaly Detection
auprc 1 other paper
1 dated earlier
1805.06725 (2018-05)
GANomaly: Semi-Supervised Anomaly Detection via Adversarial Training
get_scheduler 1 other paper
1 later
2203.00259 (2022-03)
Omni-frequency Channel-selection Representations for Unsupervised Anomaly 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

Despite inherent ill-definition, anomaly detection is a research endeavor of great interest within machine learning and visual scene understanding alike. Most commonly, anomaly detection is considered as the detection of outliers within a given data distribution based on some measure of normality. The most significant challenge in real-world anomaly detection problems is that available data is highly imbalanced towards normality (i.e. non-anomalous) and contains a most a subset of all possible anomalous samples - hence limiting the use of well-established supervised learning methods. By contrast, we introduce an unsupervised anomaly detection model, trained only on the normal (non-anomalous, plentiful) samples in order to learn the normality distribution of the domain and hence detect abnormality based on deviation from this model. Our proposed approach employs an encoder-decoder convolutional neural network with skip connections to thoroughly capture the multi-scale distribution of the normal data distribution in high-dimensional image space. Furthermore, utilizing an adversarial training scheme for this chosen architecture provides superior reconstruction both within high-dimensional image space and a lower-dimensional latent vector space encoding. Minimizing the reconstruction error metric within both the image and hidden vector spaces during training aids the model to learn the distribution of normality as required. Higher reconstruction metrics during subsequent test and deployment are thus indicative of a deviation from this normal distribution, hence indicative of an anomaly. Experimentation over established anomaly detection benchmarks and challenging real-world datasets, within the context of X-ray security screening, shows the unique promise of such a proposed approach.

For agents

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

get_harvested_code_for_paper("1901.08954")
get_code_for_paper("1901.08954")
have("1901.08954")

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

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

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

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

Connect an agent — have() is free.