{"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/learning-unified-reference-representation-for","title":"Learning Unified Reference Representation for Unsupervised Multi-class Anomaly Detection","arxiv_id":"2403.11561","date":"2024-03-18","proceeding":null,"authors":["Liren He","Zhengkai Jiang","Jinlong Peng","Liang Liu","Qiangang Du","Xiaobin Hu","Wenbing Zhu","Mingmin Chi","Yabiao Wang","Chengjie Wang"],"abstract":"In the field of multi-class anomaly detection, reconstruction-based methods derived from single-class anomaly detection face the well-known challenge of \"learning shortcuts\", wherein the model fails to learn the patterns of normal samples as it should, opting instead for shortcuts such as identity mapping or artificial noise elimination. Consequently, the model becomes unable to reconstruct genuine anomalies as normal instances, resulting in a failure of anomaly detection. To counter this issue, we present a novel unified feature reconstruction-based anomaly detection framework termed RLR (Reconstruct features from a Learnable Reference representation). Unlike previous methods, RLR utilizes learnable reference representations to compel the model to learn normal feature patterns explicitly, thereby prevents the model from succumbing to the \"learning shortcuts\" issue. Additionally, RLR incorporates locality constraints into the learnable reference to facilitate more effective normal pattern capture and utilizes a masked learnable key attention mechanism to enhance robustness. Evaluation of RLR on the 15-category MVTec-AD dataset and the 12-category VisA dataset shows superior performance compared to state-of-the-art methods under the unified setting. The code of RLR will be publicly available.","url_abs":"https://arxiv.org/abs/2403.11561v2","url_pdf":"https://arxiv.org/pdf/2403.11561v2.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":"learning-unified-reference-representation-for","repo_url":"https://github.com/hlr7999/rlr","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"anomaly-detection","task_name":"Anomaly Detection"},{"task_slug":"multi-class-anomaly-detection","task_name":"Multi-class Anomaly Detection"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/multi-class-anomaly-detection-on-mvtec-ad","task":"Multi-class Anomaly Detection","dataset":"MVTec AD","model":"RLR","rank_in_archive_order":5,"of":13,"metrics":{"Detection AUROC":"98.6","Segmentation AUROC":"98.5"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2403.11561","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.11561"}},"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/hlr7999/rlr","reach":{"status":"ok"}}],"summary":{"ran":5,"ran_draft_wrong":1,"unverified":1},"by_repo_kind":{"official":{"samples":7,"ran":6,"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":7,"samples":[{"code_sha256_prefix":"b45f413cb8bb72e2","entry":"compute_pro_retrieval_metrics","repo":"hlr7999/rlr","repo_kind":"official","path":"utils/utils.py","file_url":"https://github.com/hlr7999/rlr/blob/HEAD/utils/utils.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":"b45f413cb8bb72e2"}},{"code_sha256_prefix":"fe5ed3e943aa408e","entry":"conv1x1","repo":"hlr7999/rlr","repo_kind":"official","path":"models/decoder.py","file_url":"https://github.com/hlr7999/rlr/blob/HEAD/models/decoder.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":"fe5ed3e943aa408e"}},{"code_sha256_prefix":"2db7a58e9288f8c7","entry":"conv3x3","repo":"hlr7999/rlr","repo_kind":"official","path":"models/decoder.py","file_url":"https://github.com/hlr7999/rlr/blob/HEAD/models/decoder.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":"2db7a58e9288f8c7"}},{"code_sha256_prefix":"3dcadf77eb559329","entry":"denormalization","repo":"hlr7999/rlr","repo_kind":"official","path":"utils/visualizer.py","file_url":"https://github.com/hlr7999/rlr/blob/HEAD/utils/visualizer.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":"3dcadf77eb559329"}},{"code_sha256_prefix":"ef0e6b962918f4b4","entry":"embedding_concat","repo":"hlr7999/rlr","repo_kind":"official","path":"utils/utils.py","file_url":"https://github.com/hlr7999/rlr/blob/HEAD/utils/utils.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":"ef0e6b962918f4b4"}},{"code_sha256_prefix":"502c50812b7f31ab","entry":"to_var","repo":"hlr7999/rlr","repo_kind":"official","path":"utils/utils.py","file_url":"https://github.com/hlr7999/rlr/blob/HEAD/utils/utils.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"502c50812b7f31ab"}},{"code_sha256_prefix":"ff1b6dd30e0c723e","entry":"Decoder","repo":"hlr7999/rlr","repo_kind":"official","path":"models/decoder.py","file_url":"https://github.com/hlr7999/rlr/blob/HEAD/models/decoder.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":"ff1b6dd30e0c723e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}