SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1703.05921 · 2017

Unsupervised Anomaly Detection with Generative Adversarial Networks to Guide Marker Discovery

arXiv · PDF · Open in the Atlas

Code that ran

7 of 11 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 2 have no contract verdict; 4 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/1703.05921.json · badge: /api/ran/1703.05921.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
LeeDoYup/AnoGAN canonical (classifier label)
classifier basis: census
1 ran · 3 no recorded run
YeongHyeon/f-AnoGAN-TF community (classifier label)
classifier basis not recorded on the link
3 ran · 0 no recorded run
tkwoo/anogan-keras reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
A03ki/f-AnoGAN reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
xtarx/Unsupervised-Anomaly-Detection-with-Generative-Adversarial-Networks reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
kosyoshida/simple-keras reimplementation (classifier label)
classifier basis: classifier_2025
0 ran · 1 no recorded run
FunctionStatusWhere it lives
combine_images Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
tkwoo/anogan-keras/anogan.py
pointer only (licence: NONE) · get_code("23797f9dee43955f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, tkwoo/anogan-keras 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.

compute_gradient_penalty Ran
ran; our contract draft was wrong, not the code
A03ki/f-AnoGAN/fanogan/train_wgangp.py
code served (permissive licence) · get_code("90dc48f19c618ed7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) 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 as nn

torch.manual_seed(0)

# Create a simple discriminator model
class SimpleDiscriminator(nn.Module):
    def __init__(self):
        super(SimpleDiscriminator, self).__init__()
        # Assuming input is (batch, channels, height, width)
        self.conv = nn.Conv2d(3, 8, kernel_size=3, padding=1)
        self.pool = nn.AdaptiveAvgPool2d(1)
        self.fc = nn.Linear(8, 1)
    
    def forward(self, x):
        x = self.conv(x)
        x = self.pool(x)
        x = x.view(x.size(0), -1)
        x = self.fc(x)
        return x

D = SimpleDiscriminator()

# Create real and fake samples with shape (batch, channels, height, width)
batch_size = 2
channels = 3
height = 4
width = 5

real_samples = torch.randn(batch_size, channels, height, width)
fake_samples = torch.randn(batch_size, channels, height, width)

device = torch.device('cpu')

ARGS = {
    'D': D,
    'real_samples': real_samples,
    'fake_samples': fake_samples,
    'device': device
}
Setup block drafted by
a language model, Claude Sonnet 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 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
conv_cond_concat Ran
ran; our contract draft was wrong, not the code
LeeDoYup/AnoGAN/ops.py
code served (permissive licence) · get_code("d5f19e9b7af11f57")
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 EagerTensor, ndim 4, dtype family float, shape (2, 4, 3, 12) 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 tensorflow as tf
import numpy as np

# Create tiny tensors for testing
# x: feature map with shape [batch=2, height=4, width=3, channels=5]
x = tf.constant(np.random.randn(2, 4, 3, 5).astype(np.float32))

# y: conditioning vector with shape [batch=2, 1, 1, 7]
# The function broadcasts y to match x's spatial dimensions
y = tf.constant(np.random.randn(2, 1, 1, 7).astype(np.float32))

ARGS = {
    "x": x,
    "y": y,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 4, dtype family float, shape (2, 4, 3, 12) — shape (2, 4, 3, 12) 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
conv_out_size_same Ran
ran, honoured the contract we drafted
xtarx/Unsupervised-Anomaly-Detection-with-Generative-Adversarial-Networks/model.py
pointer only (licence: NONE) · get_code("40125e1efb67fa92")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, xtarx/Unsupervised-Anomaly-Detection-with-Generative-Adversarial-Networks 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.

dat2canvas Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
YeongHyeon/f-AnoGAN-TF/source/tf_process.py
code served (permissive licence) · get_code("5f267024749fe99d")
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 small dimensions: 4 images of 28x28 with 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
gray2rgb Ran
ran on a synthesized input
YeongHyeon/f-AnoGAN-TF/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
random_noise Ran
ran on a synthesized input
YeongHyeon/f-AnoGAN-TF/source/tf_process.py
code served (permissive licence) · get_code("362cd017683d59df")
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 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 numpy as np

# Analyze the function: random_noise(batch_size, zdim)
# - batch_size: int, used in np.random.uniform shape
# - zdim: int, used in np.random.uniform shape
# Both are simple integers with no special requirements

ARGS = {
    "batch_size": 2,
    "zdim": 4,
}
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 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
concat Not yet run
unverified (harvested, no recorded run)
LeeDoYup/AnoGAN/ops.py
code served (permissive licence) · get_code("6758e6e7c8eb29d4")
How it ran

no invocation recorded.

conv2d Not yet run
unverified (harvested, no recorded run)
LeeDoYup/AnoGAN/ops.py
code served (permissive licence) · get_code("f0cb37d52c4b56e2")
How it ran

no invocation recorded.

get_confirm_token Not yet run
unverified (harvested, no recorded run)
LeeDoYup/AnoGAN/download.py
pointer only (licence: MIT); the stored copy get_code serves, from med-air/FedBN, is pointer only (licence: NONE) · get_code("135b3dc835ffe6ad")
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 med-air/FedBN, 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. No invocation recorded.

view_feature Not yet run
unverified (harvested, no recorded run)
kosyoshida/simple-keras/anogan/anogan.py
pointer only (licence: NONE) · get_code("59f62234e2a0ff3e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kosyoshida/simple-keras 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. No invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 6 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 6 later) and 5 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_confirm_token 38 other papers
6 dated earlier, 32 later
1409.8230 (2014-09)
RENOIR - A Dataset for Real Low-Light Image Noise Reduction
1503.03832 (2015-03)
FaceNet: A Unified Embedding for Face Recognition and Clustering
1506.03134 (2015-06)
Pointer Networks
and 35 more not named here
conv_out_size_same 6 other papers
1 dated earlier, 5 later
1511.06434 (2015-11)
Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks
1804.04391 (2018-04)
MGGAN: Solving Mode Collapse using Manifold Guided Training
1811.03205 (2018-11)
Robustness of Conditional GANs to Noisy Labels
and 3 more not named here
conv2d 4 other papers
3 dated earlier, 1 later
1609.07009 (2016-09)
Is the deconvolution layer the same as a convolutional layer?
1611.04488 (2016-11)
Generative Models and Model Criticism via Optimized Maximum Mean Discrepancy
1611.07004 (2016-11)
Image-to-Image Translation with Conditional Adversarial Networks
and 1 more not named here
dat2canvas 3 other papers
3 later
1805.06725 (2018-05)
GANomaly: Semi-Supervised Anomaly Detection via Adversarial Training
1901.08954 (2019-01)
Skip-GANomaly: Skip Connected and Adversarially Trained Encoder-Decoder Anomaly Detection
1904.02639 (2019-04)
Memorizing Normality to Detect Anomaly: Memory-augmented Deep Autoencoder for Unsupervised Anomaly Detection
gray2rgb 3 other papers
3 later
1805.06725 (2018-05)
GANomaly: Semi-Supervised Anomaly Detection via Adversarial Training
1901.08954 (2019-01)
Skip-GANomaly: Skip Connected and Adversarially Trained Encoder-Decoder Anomaly Detection
1904.02639 (2019-04)
Memorizing Normality to Detect Anomaly: Memory-augmented Deep Autoencoder for Unsupervised Anomaly Detection
conv_cond_concat 2 other papers
2 later
1811.03205 (2018-11)
Robustness of Conditional GANs to Noisy Labels
2202.07857 (2022-02)
Graph-Augmented Normalizing Flows for Anomaly Detection of Multiple Time Series

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

Obtaining models that capture imaging markers relevant for disease progression and treatment monitoring is challenging. Models are typically based on large amounts of data with annotated examples of known markers aiming at automating detection. High annotation effort and the limitation to a vocabulary of known markers limit the power of such approaches. Here, we perform unsupervised learning to identify anomalies in imaging data as candidates for markers. We propose AnoGAN, a deep convolutional generative adversarial network to learn a manifold of normal anatomical variability, accompanying a novel anomaly scoring scheme based on the mapping from image space to a latent space. Applied to new data, the model labels anomalies, and scores image patches indicating their fit into the learned distribution. Results on optical coherence tomography images of the retina demonstrate that the approach correctly identifies anomalous images, such as images containing retinal fluid or hyperreflective foci.

For agents

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

get_harvested_code_for_paper("1703.05921")
get_code_for_paper("1703.05921")
have("1703.05921")

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

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

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

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

Connect an agent — have() is free.