{"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/revisiting-deep-feature-reconstruction-for","title":"Revisiting Deep Feature Reconstruction for Logical and Structural Industrial Anomaly Detection","arxiv_id":"2410.16255","date":"2024-10-21","proceeding":null,"authors":["Sukanya Patra","Souhaib Ben Taieb"],"abstract":"Industrial anomaly detection is crucial for quality control and predictive maintenance, but it presents challenges due to limited training data, diverse anomaly types, and external factors that alter object appearances. Existing methods commonly detect structural anomalies, such as dents and scratches, by leveraging multi-scale features from image patches extracted through deep pre-trained networks. However, significant memory and computational demands often limit their practical application. Additionally, detecting logical anomalies-such as images with missing or excess elements-requires an understanding of spatial relationships that traditional patch-based methods fail to capture. In this work, we address these limitations by focusing on Deep Feature Reconstruction (DFR), a memory- and compute-efficient approach for detecting structural anomalies. We further enhance DFR into a unified framework, called ULSAD, which is capable of detecting both structural and logical anomalies. Specifically, we refine the DFR training objective to improve performance in structural anomaly detection, while introducing an attention-based loss mechanism using a global autoencoder-like network to handle logical anomaly detection. Our empirical evaluation across five benchmark datasets demonstrates the performance of ULSAD in detecting and localizing both structural and logical anomalies, outperforming eight state-of-the-art methods. An extensive ablation study further highlights the contribution of each component to the overall performance improvement. Our code is available at https://github.com/sukanyapatra1997/ULSAD-2024.git","url_abs":"https://arxiv.org/abs/2410.16255v1","url_pdf":"https://arxiv.org/pdf/2410.16255v1.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":"revisiting-deep-feature-reconstruction-for","repo_url":"https://github.com/sukanyapatra1997/ulsad-2024","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"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/anomaly-detection-on-mpdd","task":"Anomaly Detection","dataset":"MPDD","model":"ULSAD","rank_in_archive_order":10,"of":16,"metrics":{"Detection AUROC":"95.73","Segmentation AUPRO":"92.02","Segmentation AUROC":"97.45"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2410.16255","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2410.16255"}},"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/sukanyapatra1997/ulsad-2024","reach":{"status":"ok"}}],"summary":{"unverified":13},"by_repo_kind":{"official":{"samples":13,"ran":0,"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":13,"samples":[{"code_sha256_prefix":"943f15268bdd462e","entry":"add_anomalous_label","repo":"sukanyapatra1997/ulsad-2024","repo_kind":"official","path":"anomalib/post_processing/post_process.py","file_url":"https://github.com/sukanyapatra1997/ulsad-2024/blob/HEAD/anomalib/post_processing/post_process.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":"943f15268bdd462e"}},{"code_sha256_prefix":"4447ac929ca7ab0c","entry":"add_label","repo":"sukanyapatra1997/ulsad-2024","repo_kind":"official","path":"anomalib/post_processing/post_process.py","file_url":"https://github.com/sukanyapatra1997/ulsad-2024/blob/HEAD/anomalib/post_processing/post_process.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":"4447ac929ca7ab0c"}},{"code_sha256_prefix":"fe1771d45fa5b75a","entry":"add_normal_label","repo":"sukanyapatra1997/ulsad-2024","repo_kind":"official","path":"anomalib/post_processing/post_process.py","file_url":"https://github.com/sukanyapatra1997/ulsad-2024/blob/HEAD/anomalib/post_processing/post_process.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":"fe1771d45fa5b75a"}},{"code_sha256_prefix":"a2dff7977c4b3db4","entry":"compute_new_image_size","repo":"sukanyapatra1997/ulsad-2024","repo_kind":"official","path":"anomalib/pre_processing/tiler.py","file_url":"https://github.com/sukanyapatra1997/ulsad-2024/blob/HEAD/anomalib/pre_processing/tiler.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":"a2dff7977c4b3db4"}},{"code_sha256_prefix":"84cd954064cff590","entry":"downscale_image","repo":"sukanyapatra1997/ulsad-2024","repo_kind":"official","path":"anomalib/pre_processing/tiler.py","file_url":"https://github.com/sukanyapatra1997/ulsad-2024/blob/HEAD/anomalib/pre_processing/tiler.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":"84cd954064cff590"}},{"code_sha256_prefix":"7703e3fe0138f8d3","entry":"get_image_height_and_width","repo":"sukanyapatra1997/ulsad-2024","repo_kind":"official","path":"anomalib/pre_processing/pre_process.py","file_url":"https://github.com/sukanyapatra1997/ulsad-2024/blob/HEAD/anomalib/pre_processing/pre_process.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":"7703e3fe0138f8d3"}},{"code_sha256_prefix":"36ed981842aa4e86","entry":"get_transforms","repo":"sukanyapatra1997/ulsad-2024","repo_kind":"official","path":"anomalib/pre_processing/pre_process.py","file_url":"https://github.com/sukanyapatra1997/ulsad-2024/blob/HEAD/anomalib/pre_processing/pre_process.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":"36ed981842aa4e86"}},{"code_sha256_prefix":"471a7f0d572c50e7","entry":"hide_output","repo":"sukanyapatra1997/ulsad-2024","repo_kind":"official","path":"benchmarking/benchmark.py","file_url":"https://github.com/sukanyapatra1997/ulsad-2024/blob/HEAD/benchmarking/benchmark.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":"471a7f0d572c50e7"}},{"code_sha256_prefix":"8a542d7a668c47e5","entry":"imagenet_norm_batch","repo":"sukanyapatra1997/ulsad-2024","repo_kind":"official","path":"anomalib/models/ulsad/torch_model.py","file_url":"https://github.com/sukanyapatra1997/ulsad-2024/blob/HEAD/anomalib/models/ulsad/torch_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":"8a542d7a668c47e5"}},{"code_sha256_prefix":"458acbf30c9b5a58","entry":"update_input_size_config","repo":"sukanyapatra1997/ulsad-2024","repo_kind":"official","path":"anomalib/config/config.py","file_url":"https://github.com/sukanyapatra1997/ulsad-2024/blob/HEAD/anomalib/config/config.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":"458acbf30c9b5a58"}},{"code_sha256_prefix":"6d3c92b52fa4d6da","entry":"update_multi_gpu_training_config","repo":"sukanyapatra1997/ulsad-2024","repo_kind":"official","path":"anomalib/config/config.py","file_url":"https://github.com/sukanyapatra1997/ulsad-2024/blob/HEAD/anomalib/config/config.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":"6d3c92b52fa4d6da"}},{"code_sha256_prefix":"5179dd442c5dbf8b","entry":"update_nncf_config","repo":"sukanyapatra1997/ulsad-2024","repo_kind":"official","path":"anomalib/config/config.py","file_url":"https://github.com/sukanyapatra1997/ulsad-2024/blob/HEAD/anomalib/config/config.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":"5179dd442c5dbf8b"}},{"code_sha256_prefix":"1b738f3ebd53da86","entry":"upscale_image","repo":"sukanyapatra1997/ulsad-2024","repo_kind":"official","path":"anomalib/pre_processing/tiler.py","file_url":"https://github.com/sukanyapatra1997/ulsad-2024/blob/HEAD/anomalib/pre_processing/tiler.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":"1b738f3ebd53da86"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}