Papers › Memorizing Normality to Detect Anomaly: Memory-augmented Deep Autoencoder for...

Memorizing Normality to Detect Anomaly: Memory-augmented Deep Autoencoder for Unsupervised Anomaly Detection

4 Apr 2019ICCV 2019 10arXiv:1904.02639archive 2025-07-28

Dong Gong, Lingqiao Liu, Vuong Le, Budhaditya Saha, Moussa Reda Mansour, Svetha Venkatesh, Anton Van Den Hengel

Deep autoencoder has been extensively used for anomaly detection. Training on the normal data, the autoencoder is expected to produce higher reconstruction error for the abnormal inputs than the normal ones, which is adopted as a criterion for identifying anomalies. However, this assumption does not always hold in practice. It has been observed that sometimes the autoencoder "generalizes" so well that it can also reconstruct anomalies well, leading to the miss detection of anomalies. To mitigate this drawback for autoencoder based anomaly detector, we propose to augment the autoencoder with a memory module and develop an improved autoencoder called memory-augmented autoencoder, i.e. MemAE. Given an input, MemAE firstly obtains the encoding from the encoder and then uses it as a query to retrieve the most relevant memory items for reconstruction. At the training stage, the memory contents are updated and are encouraged to represent the prototypical elements of the normal data. At the test stage, the learned memory will be fixed, and the reconstruction is obtained from a few selected memory records of the normal data. The reconstruction will thus tend to be close to a normal sample. Thus the reconstructed errors on anomalies will be strengthened for anomaly detection. MemAE is free of assumptions on the data type and thus general to be applied to different tasks. Experiments on various datasets prove the excellent generalization and high effectiveness of the proposed MemAE.

PaperPDFConference PDFCodeCode 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="1904.02639")

Code

Syntology Ran 1 of 9 code samples harvested from 2 repositories linked to this paper; 8 have no recorded run. Of those that ran: 1 ran · violated contract.

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

YUL-git/MemAE mentioned on GitHubpytorch report
YeongHyeon/MemAE mentioned on GitHubtfMIT report
YeongHyeon/MemAE-TF2 mentioned on GitHubtfMIT report
donggong1/memae-anomaly-detection mentioned on GitHubpytorchMIT report
h19920918/memae 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

9 samples harvested; 1 ran; 0 honoured the contract we drafted; 8 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.

1ran · violated contract
8unverified

Licence: 0 of the 9 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 2 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.

str2bool donggong1/memae-anomaly-detection/options/testing_options.py community (archive-listed) ran · violated contract MIT (permissive) · f017532fc389cbfe · report
crop_image donggong1/memae-anomaly-detection/utils/utils.py community (archive-listed) unverified MIT (permissive) · dbb1ce6b9400bd85 · report
dat2canvas YeongHyeon/MemAE/source/tf_process.py community (archive-listed) unverified MIT (permissive) · 9a083fc9c5cd9850 · report
discrete_cmap YeongHyeon/MemAE/source/tf_process.py community (archive-listed) unverified MIT (permissive) · d6efb7ecae19cdd8 · report
feature_map_permute donggong1/memae-anomaly-detection/models/entropy_loss.py community (archive-listed) unverified MIT (permissive) · 81f7962015e0eda6 · report
get_subdir_list donggong1/memae-anomaly-detection/utils/utils.py community (archive-listed) unverified MIT (permissive) · edff0ecdd8e380de · report
gray2rgb YeongHyeon/MemAE/source/tf_process.py community (archive-listed) unverified MIT (permissive) · aa166086c035e6eb · report
hard_shrink_relu donggong1/memae-anomaly-detection/models/memory_module.py community (archive-listed) unverified MIT (permissive) · 9a26454b2ff613bb · report
tensor2numpy donggong1/memae-anomaly-detection/utils/utils.py community (archive-listed) unverified MIT (permissive) · 20c6252c6b02cdfd · report

Tasks

Anomaly DetectionUnsupervised Anomaly Detection

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