{"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/anomaly-detection-via-reverse-distillation","title":"Anomaly Detection via Reverse Distillation from One-Class Embedding","arxiv_id":"2201.10703","date":"2022-01-26","proceeding":"CVPR 2022 1","authors":["Hanqiu Deng","Xingyu Li"],"abstract":"Knowledge distillation (KD) achieves promising results on the challenging problem of unsupervised anomaly detection (AD).The representation discrepancy of anomalies in the teacher-student (T-S) model provides essential evidence for AD. However, using similar or identical architectures to build the teacher and student models in previous studies hinders the diversity of anomalous representations. To tackle this problem, we propose a novel T-S model consisting of a teacher encoder and a student decoder and introduce a simple yet effective \"reverse distillation\" paradigm accordingly. Instead of receiving raw images directly, the student network takes teacher model's one-class embedding as input and targets to restore the teacher's multiscale representations. Inherently, knowledge distillation in this study starts from abstract, high-level presentations to low-level features. In addition, we introduce a trainable one-class bottleneck embedding (OCBE) module in our T-S model. The obtained compact embedding effectively preserves essential information on normal patterns, but abandons anomaly perturbations. Extensive experimentation on AD and one-class novelty detection benchmarks shows that our method surpasses SOTA performance, demonstrating our proposed approach's effectiveness and generalizability.","url_abs":"https://arxiv.org/abs/2201.10703v2","url_pdf":"https://arxiv.org/pdf/2201.10703v2.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":"anomaly-detection-via-reverse-distillation","repo_url":"https://github.com/hq-deng/RD4AD","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"anomaly-detection-via-reverse-distillation","repo_url":"https://github.com/SimonThomine/DistillationAD","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"anomaly-detection-via-reverse-distillation","repo_url":"https://github.com/SimonThomine/RememberingNormality","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"anomaly-detection-via-reverse-distillation","repo_url":"https://github.com/Merenguelkl/Reverse_Disstilation","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"anomaly-detection-via-reverse-distillation","repo_url":"https://github.com/openvinotoolkit/anomalib/tree/development/anomalib/models/reverse_distillation","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"anomaly-classification","task_name":"Anomaly Classification"},{"task_slug":"anomaly-detection","task_name":"Anomaly Detection"},{"task_slug":"anomaly-segmentation","task_name":"Anomaly Segmentation"},{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"diversity","task_name":"Diversity"},{"task_slug":"knowledge-distillation","task_name":"Knowledge Distillation"},{"task_slug":"novelty-detection","task_name":"Novelty Detection"},{"task_slug":"unsupervised-anomaly-detection","task_name":"Unsupervised Anomaly Detection"}],"methods":[{"method_slug":"knowledge-distillation","method_name":"Knowledge Distillation"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/anomaly-classification-on-goodsad","task":"Anomaly Classification","dataset":"GoodsAD","model":"RD4AD","rank_in_archive_order":8,"of":11,"metrics":{"AUPR":"68.2","AUROC":"66.5"},"uses_additional_data":false},{"leaderboard":"/sota/anomaly-detection-on-aebad-s","task":"Anomaly Detection","dataset":"AeBAD-S","model":"ReverseDistillation","rank_in_archive_order":3,"of":8,"metrics":{"Detection AUROC":"81.0","Segmentation AUPRO":"85.6"},"uses_additional_data":false},{"leaderboard":"/sota/anomaly-detection-on-aebad-v","task":"Anomaly Detection","dataset":"AeBAD-V","model":"ReverseDistillation","rank_in_archive_order":2,"of":7,"metrics":{"Detection AUROC":"71.0"},"uses_additional_data":false},{"leaderboard":"/sota/anomaly-detection-on-fashion-mnist","task":"Anomaly Detection","dataset":"Fashion-MNIST","model":"Reverse Distillation","rank_in_archive_order":3,"of":12,"metrics":{"ROC AUC":"95.0"},"uses_additional_data":false},{"leaderboard":"/sota/anomaly-detection-on-mvtec-ad","task":"Anomaly Detection","dataset":"MVTec AD","model":"Reverse Distillation","rank_in_archive_order":57,"of":148,"metrics":{"Detection AUROC":"98.5","Segmentation AUPRO":"93.9","Segmentation AUROC":"97.8"},"uses_additional_data":false},{"leaderboard":"/sota/anomaly-detection-on-mvtec-loco-ad","task":"Anomaly Detection","dataset":"MVTec LOCO AD","model":"RD4AD","rank_in_archive_order":29,"of":40,"metrics":{"Avg. Detection AUROC":"78.7","Detection AUROC (only logical)":"69.4","Detection AUROC (only structural)":"88.0","Segmentation AU-sPRO (until FPR 5%)":"63.7"},"uses_additional_data":false},{"leaderboard":"/sota/anomaly-detection-on-one-class-cifar-10","task":"Anomaly Detection","dataset":"One-class CIFAR-10","model":"Reverse Distillation","rank_in_archive_order":24,"of":36,"metrics":{"AUROC":"86.5"},"uses_additional_data":false},{"leaderboard":"/sota/anomaly-detection-on-visa","task":"Anomaly Detection","dataset":"VisA","model":"Reverse Distillation","rank_in_archive_order":45,"of":50,"metrics":{"Segmentation AUPRO (until 30% FPR)":"70.9"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2201.10703","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2201.10703"}},"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/SimonThomine/DistillationAD","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/SimonThomine/RememberingNormality","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Merenguelkl/Reverse_Disstilation","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/openvinotoolkit/anomalib/tree/development/anomalib/models/reverse_distillation","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hq-deng/RD4AD","reach":null}],"summary":{"ran":10,"ran_draft_wrong":4,"unverified":4},"by_repo_kind":{"official":{"samples":3,"ran":2,"repositories":1},"listed":{"samples":13,"ran":10,"repositories":3}},"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":15,"samples":[{"code_sha256_prefix":"ce529f9eb01d326b","entry":"BasicBlock","repo":"hq-deng/RD4AD","repo_kind":"official","path":"de_resnet.py","file_url":"https://github.com/hq-deng/RD4AD/blob/HEAD/de_resnet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ce529f9eb01d326b"}},{"code_sha256_prefix":"2d33e6c48f4a2845","entry":"Bottleneck","repo":"hq-deng/RD4AD","repo_kind":"official","path":"de_resnet.py","file_url":"https://github.com/hq-deng/RD4AD/blob/HEAD/de_resnet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2d33e6c48f4a2845"}},{"code_sha256_prefix":"6e7469746fc85cb1","entry":"ConvBlock","repo":"Merenguelkl/Reverse_Disstilation","repo_kind":"listed","path":"model.py","file_url":"https://github.com/Merenguelkl/Reverse_Disstilation/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6e7469746fc85cb1"}},{"code_sha256_prefix":"5063a4c43a1a7153","entry":"ConvTransposeBlock","repo":"Merenguelkl/Reverse_Disstilation","repo_kind":"listed","path":"model.py","file_url":"https://github.com/Merenguelkl/Reverse_Disstilation/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5063a4c43a1a7153"}},{"code_sha256_prefix":"38c83c026aa86db5","entry":"Decoder","repo":"Merenguelkl/Reverse_Disstilation","repo_kind":"listed","path":"model.py","file_url":"https://github.com/Merenguelkl/Reverse_Disstilation/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"38c83c026aa86db5"}},{"code_sha256_prefix":"214139d28682c605","entry":"IndentityBlock","repo":"Merenguelkl/Reverse_Disstilation","repo_kind":"listed","path":"model.py","file_url":"https://github.com/Merenguelkl/Reverse_Disstilation/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"214139d28682c605"}},{"code_sha256_prefix":"9d92e02d06b0fcdc","entry":"OCBE","repo":"Merenguelkl/Reverse_Disstilation","repo_kind":"listed","path":"model.py","file_url":"https://github.com/Merenguelkl/Reverse_Disstilation/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9d92e02d06b0fcdc"}},{"code_sha256_prefix":"2a80220dabcb742a","entry":"conv1x1","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"2a80220dabcb742a"}},{"code_sha256_prefix":"600ff2c45e0de056","entry":"conv3x3","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"600ff2c45e0de056"}},{"code_sha256_prefix":"3f0806f63aee3bdd","entry":"deBasicBlock","repo":"SimonThomine/DistillationAD","repo_kind":"listed","path":"models/ReverseDistillation/de_resnet.py","file_url":"https://github.com/SimonThomine/DistillationAD/blob/HEAD/models/ReverseDistillation/de_resnet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3f0806f63aee3bdd"}},{"code_sha256_prefix":"274a066ad1685214","entry":"deResNet","repo":"SimonThomine/DistillationAD","repo_kind":"listed","path":"models/ReverseDistillation/de_resnet.py","file_url":"https://github.com/SimonThomine/DistillationAD/blob/HEAD/models/ReverseDistillation/de_resnet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"274a066ad1685214"}},{"code_sha256_prefix":"8d035278d5e4a82a","entry":"deconv2x2","repo":"SimonThomine/DistillationAD","repo_kind":"listed","path":"models/ReverseDistillation/de_resnet.py","file_url":"https://github.com/SimonThomine/DistillationAD/blob/HEAD/models/ReverseDistillation/de_resnet.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8d035278d5e4a82a"}},{"code_sha256_prefix":"5c6ddf757751d73a","entry":"init_weights","repo":"SimonThomine/DistillationAD","repo_kind":"listed","path":"models/ReverseDistillation/de_resnet.py","file_url":"https://github.com/SimonThomine/DistillationAD/blob/HEAD/models/ReverseDistillation/de_resnet.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5c6ddf757751d73a"}},{"code_sha256_prefix":"ddda7402c136e2b4","entry":"memoryModule","repo":"SimonThomine/RememberingNormality","repo_kind":"listed","path":"models/RD/de_resnetRM.py","file_url":"https://github.com/SimonThomine/RememberingNormality/blob/HEAD/models/RD/de_resnetRM.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ddda7402c136e2b4"}},{"code_sha256_prefix":"b647c54316ac9330","entry":"OcbeAndDecoder","repo":"Merenguelkl/Reverse_Disstilation","repo_kind":"listed","path":"model.py","file_url":"https://github.com/Merenguelkl/Reverse_Disstilation/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b647c54316ac9330"}},{"code_sha256_prefix":"6f9abfc5f148cc04","entry":"ResNet","repo":"hq-deng/RD4AD","repo_kind":"official","path":"de_resnet.py","file_url":"https://github.com/hq-deng/RD4AD/blob/HEAD/de_resnet.py","link_basis":"first_harvest_node","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":"6f9abfc5f148cc04"}},{"code_sha256_prefix":"c27cbb6fba18f4ba","entry":"ResNet","repo":"SimonThomine/RememberingNormality","repo_kind":"listed","path":"models/RD/de_resnetRM.py","file_url":"https://github.com/SimonThomine/RememberingNormality/blob/HEAD/models/RD/de_resnetRM.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c27cbb6fba18f4ba"}},{"code_sha256_prefix":"1e173e8f7793f155","entry":"deBottleneck","repo":"SimonThomine/DistillationAD","repo_kind":"listed","path":"models/ReverseDistillation/de_resnet.py","file_url":"https://github.com/SimonThomine/DistillationAD/blob/HEAD/models/ReverseDistillation/de_resnet.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1e173e8f7793f155"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}