{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/unsupervised-anomaly-localization-with","title":"Unsupervised Anomaly Localization with Structural Feature-Autoencoders","arxiv_id":"2208.10992","date":"2022-08-23","proceeding":null,"authors":["Felix Meissen","Johannes Paetzold","Georgios Kaissis","Daniel Rueckert"],"abstract":"Unsupervised Anomaly Detection has become a popular method to detect pathologies in medical images as it does not require supervision or labels for training. Most commonly, the anomaly detection model generates a \"normal\" version of an input image, and the pixel-wise $l^p$-difference of the two is used to localize anomalies. However, large residuals often occur due to imperfect reconstruction of the complex anatomical structures present in most medical images. This method also fails to detect anomalies that are not characterized by large intensity differences to the surrounding tissue. We propose to tackle this problem using a feature-mapping function that transforms the input intensity images into a space with multiple channels where anomalies can be detected along different discriminative feature maps extracted from the original image. We then train an Autoencoder model in this space using structural similarity loss that does not only consider differences in intensity but also in contrast and structure. Our method significantly increases performance on two medical data sets for brain MRI. Code and experiments are available at https://github.com/FeliMe/feature-autoencoder","url_abs":"https://arxiv.org/abs/2208.10992v1","url_pdf":"https://arxiv.org/pdf/2208.10992v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"unsupervised-anomaly-localization-with","repo_url":"https://github.com/felime/feature-autoencoder","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"anomaly-detection","task_name":"Anomaly Detection"},{"task_slug":"anomaly-localization","task_name":"Anomaly Localization"},{"task_slug":"unsupervised-anomaly-detection","task_name":"Unsupervised Anomaly Detection"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2208.10992","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2208.10992"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/felime/feature-autoencoder","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"unverified":14},"by_repo_kind":{"official":{"samples":15,"ran":1,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"600ff2c45e0de056","entry":"conv3x3","repo":"felime/feature-autoencoder","repo_kind":"official","path":"fae/baselines/fpi/model.py","file_url":"https://github.com/felime/feature-autoencoder/blob/HEAD/fae/baselines/fpi/model.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"600ff2c45e0de056"}},{"code_sha256_prefix":"1e798cf12214d71d","entry":"boolean","repo":"felime/feature-autoencoder","repo_kind":"official","path":"fae/configs/base_config.py","file_url":"https://github.com/felime/feature-autoencoder/blob/HEAD/fae/configs/base_config.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1e798cf12214d71d"}},{"code_sha256_prefix":"4a46c8fc04ae380b","entry":"build_decoder","repo":"felime/feature-autoencoder","repo_kind":"official","path":"fae/baselines/ae/model.py","file_url":"https://github.com/felime/feature-autoencoder/blob/HEAD/fae/baselines/ae/model.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4a46c8fc04ae380b"}},{"code_sha256_prefix":"ad2d82660bf6a2f9","entry":"build_encoder","repo":"felime/feature-autoencoder","repo_kind":"official","path":"fae/baselines/ae/model.py","file_url":"https://github.com/felime/feature-autoencoder/blob/HEAD/fae/baselines/ae/model.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ad2d82660bf6a2f9"}},{"code_sha256_prefix":"a53a84989fef934c","entry":"compute_auroc","repo":"felime/feature-autoencoder","repo_kind":"official","path":"fae/utils/evaluation.py","file_url":"https://github.com/felime/feature-autoencoder/blob/HEAD/fae/utils/evaluation.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a53a84989fef934c"}},{"code_sha256_prefix":"9d8609f4128d3914","entry":"compute_average_precision","repo":"felime/feature-autoencoder","repo_kind":"official","path":"fae/utils/evaluation.py","file_url":"https://github.com/felime/feature-autoencoder/blob/HEAD/fae/utils/evaluation.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9d8609f4128d3914"}},{"code_sha256_prefix":"e50f73d2962d5a88","entry":"compute_pro_auc","repo":"felime/feature-autoencoder","repo_kind":"official","path":"fae/utils/evaluation.py","file_url":"https://github.com/felime/feature-autoencoder/blob/HEAD/fae/utils/evaluation.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e50f73d2962d5a88"}},{"code_sha256_prefix":"989a0ab4920e5696","entry":"conv1x1","repo":"felime/feature-autoencoder","repo_kind":"official","path":"fae/baselines/fpi/model.py","file_url":"https://github.com/felime/feature-autoencoder/blob/HEAD/fae/baselines/fpi/model.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"989a0ab4920e5696"}},{"code_sha256_prefix":"66d28fbd10f1cd8f","entry":"create_window","repo":"felime/feature-autoencoder","repo_kind":"official","path":"fae/utils/pytorch_ssim.py","file_url":"https://github.com/felime/feature-autoencoder/blob/HEAD/fae/utils/pytorch_ssim.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"66d28fbd10f1cd8f"}},{"code_sha256_prefix":"c79e44e8e4c93169","entry":"gaussian","repo":"felime/feature-autoencoder","repo_kind":"official","path":"fae/utils/pytorch_ssim.py","file_url":"https://github.com/felime/feature-autoencoder/blob/HEAD/fae/utils/pytorch_ssim.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c79e44e8e4c93169"}},{"code_sha256_prefix":"30a6ffa2b3ab0f28","entry":"grad_cam","repo":"felime/feature-autoencoder","repo_kind":"official","path":"fae/baselines/CAVGA/model.py","file_url":"https://github.com/felime/feature-autoencoder/blob/HEAD/fae/baselines/CAVGA/model.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"30a6ffa2b3ab0f28"}},{"code_sha256_prefix":"d42cf3e7b1d96116","entry":"layer_","repo":"felime/feature-autoencoder","repo_kind":"official","path":"fae/baselines/fpi/model.py","file_url":"https://github.com/felime/feature-autoencoder/blob/HEAD/fae/baselines/fpi/model.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d42cf3e7b1d96116"}},{"code_sha256_prefix":"b8d7262798e2b0b4","entry":"ssim","repo":"felime/feature-autoencoder","repo_kind":"official","path":"fae/utils/pytorch_ssim.py","file_url":"https://github.com/felime/feature-autoencoder/blob/HEAD/fae/utils/pytorch_ssim.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b8d7262798e2b0b4"}},{"code_sha256_prefix":"6f21eb96ef97abe9","entry":"vanilla_feature_decoder","repo":"felime/feature-autoencoder","repo_kind":"official","path":"fae/models/models.py","file_url":"https://github.com/felime/feature-autoencoder/blob/HEAD/fae/models/models.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6f21eb96ef97abe9"}},{"code_sha256_prefix":"2b28bcdb6e3234d2","entry":"vanilla_feature_encoder","repo":"felime/feature-autoencoder","repo_kind":"official","path":"fae/models/models.py","file_url":"https://github.com/felime/feature-autoencoder/blob/HEAD/fae/models/models.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2b28bcdb6e3234d2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}