Papers › GANomaly: Semi-Supervised Anomaly Detection via Adversarial Training

GANomaly: Semi-Supervised Anomaly Detection via Adversarial Training

17 May 2018arXiv:1805.06725archive 2025-07-28

Samet Akcay, Amir Atapour-Abarghouei, Toby P. Breckon

Anomaly detection is a classical problem in computer vision, namely the determination of the normal from the abnormal when datasets are highly biased towards one class (normal) due to the insufficient sample size of the other class (abnormal). While this can be addressed as a supervised learning problem, a significantly more challenging problem is that of detecting the unknown/unseen anomaly case that takes us instead into the space of a one-class, semi-supervised learning paradigm. We introduce such a novel anomaly detection model, by using a conditional generative adversarial network that jointly learns the generation of high-dimensional image space and the inference of latent space. Employing encoder-decoder-encoder sub-networks in the generator network enables the model to map the input image to a lower dimension vector, which is then used to reconstruct the generated output image. The use of the additional encoder network maps this generated image to its latent representation. Minimizing the distance between these images and the latent vectors during training aids in learning the data distribution for the normal samples. As a result, a larger distance metric from this learned data distribution at inference time is indicative of an outlier from that distribution - an anomaly. Experimentation over several benchmark datasets, from varying domains, shows the model efficacy and superiority over previous state-of-the-art approaches.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="1805.06725")

Code

Syntology Ran 0 of 23 code samples harvested from 4 repositories linked to this paper; 23 have no recorded run.

By repository: named in the paper: 4 samples from 1 repository, 0 ran; community (archive-listed): 19 samples from 3 repositories, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

openvinotoolkit/anomalib officialpytorchApache-2.0 report
samet-akcay/ganomaly mentioned in papermentioned on GitHubpytorchMIT report
YeongHyeon/GANomaly mentioned on GitHubtfMIT report
aarthipriyar/GAN mentioned on GitHubpytorchMIT report
danbochman/GANomaly-TF2 mentioned on GitHubtfMIT report
llien30/GANomaly mentioned on GitHubpytorch report
rickyHong/GANomaly-repl mentioned on GitHubpytorchMIT report
ucbtns/medgan mentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

23 samples harvested; 0 ran; 0 honoured the contract we drafted; 23 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

23unverified

Licence: 0 of the 23 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 4 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

auprc samet-akcay/ganomaly/lib/evaluate.py named in the paper unverified MIT (permissive) · 0fd8eb2f687fa0dd · report
evaluate samet-akcay/ganomaly/lib/evaluate.py named in the paper unverified MIT (permissive) · 15c45ecba2721176 · report
load_data samet-akcay/ganomaly/lib/data.py named in the paper unverified MIT (permissive) · fff66175b188911e · report
roc samet-akcay/ganomaly/lib/evaluate.py named in the paper unverified MIT (permissive) · a2c76c01c3578d6f · report
annotation_to_bboxes_ltwh danbochman/GANomaly-TF2/dataloader/annotation_utils.py community (archive-listed) unverified MIT (permissive) · 987e51bd5d0d4f05 · report
augment danbochman/GANomaly-TF2/dataloader/augmentations.py community (archive-listed) unverified MIT (permissive) · 99382519a0bea945 · report
auprc rickyHong/GANomaly-repl/lib/evaluate.py community (archive-listed) unverified MIT (permissive) · 784683e6a5654175 · report
bboxes_included_in_crop danbochman/GANomaly-TF2/dataloader/cogwheel_slicer.py community (archive-listed) unverified MIT (permissive) · 46ae5523f95a4bb5 · report
center_and_scale danbochman/GANomaly-TF2/dataloader/preprocessing.py community (archive-listed) unverified MIT (permissive) · dd25489eddcd9d2b · report
dat2canvas YeongHyeon/GANomaly/source/tf_process.py community (archive-listed) unverified MIT (permissive) · 5f267024749fe99d · report
display_precision_recall_curve danbochman/GANomaly-TF2/eval_utils/visualization_utils.py community (archive-listed) unverified MIT (permissive) · 0b760551a0644d97 · report
evaluate rickyHong/GANomaly-repl/lib/evaluate.py community (archive-listed) unverified MIT (permissive) · a32f5b6f251d152b · report
get_cifar_anomaly_dataset rickyHong/GANomaly-repl/lib/data.py community (archive-listed) unverified MIT (permissive) · ed42ab65f58ce81e · report
get_mnist_anomaly_dataset rickyHong/GANomaly-repl/lib/data.py community (archive-listed) unverified MIT (permissive) · a6ddb2558bc17387 · report
gray2rgb YeongHyeon/GANomaly/source/tf_process.py community (archive-listed) unverified MIT (permissive) · aa166086c035e6eb · report
img_slice_and_label danbochman/GANomaly-TF2/dataloader/cogwheel_slicer.py community (archive-listed) unverified MIT (permissive) · 65c5eb22e03c7d55 · report
l1_loss rickyHong/GANomaly-repl/lib/loss.py community (archive-listed) unverified MIT (permissive) · 8a2f4a14a4eff7ff · report
l2_loss rickyHong/GANomaly-repl/lib/loss.py community (archive-listed) unverified MIT (permissive) · 602022135f879cb7 · report
load_annotation_file danbochman/GANomaly-TF2/dataloader/annotation_utils.py community (archive-listed) unverified MIT (permissive) · 22a02f2c65cda9f1 · report
load_data rickyHong/GANomaly-repl/lib/data.py community (archive-listed) unverified MIT (permissive) · 3a96b9b27dddc30c · report
necessary_overlap_region danbochman/GANomaly-TF2/dataloader/cogwheel_slicer.py community (archive-listed) unverified MIT (permissive) · 625a1b73ba18c9b3 · report
roc rickyHong/GANomaly-repl/lib/evaluate.py community (archive-listed) unverified MIT (permissive) · 726767c6e03cf190 · report
stack_and_expand danbochman/GANomaly-TF2/dataloader/preprocessing.py community (archive-listed) unverified MIT (permissive) · 9d292fa4e629c34e · report

Tasks

Anomaly DetectionDecoderSemi-supervised Anomaly DetectionSupervised Anomaly Detection

1 archive task tag without a task page not shown.

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections