{"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/logicode-an-llm-driven-framework-for-logical","title":"LogiCode: an LLM-Driven Framework for Logical Anomaly Detection","arxiv_id":"2406.04687","date":"2024-06-07","proceeding":null,"authors":["Yiheng Zhang","Yunkang Cao","Xiaohao Xu","Weiming Shen"],"abstract":"This paper presents LogiCode, a novel framework that leverages Large Language Models (LLMs) for identifying logical anomalies in industrial settings, moving beyond traditional focus on structural inconsistencies. By harnessing LLMs for logical reasoning, LogiCode autonomously generates Python codes to pinpoint anomalies such as incorrect component quantities or missing elements, marking a significant leap forward in anomaly detection technologies. A custom dataset \"LOCO-Annotations\" and a benchmark \"LogiBench\" are introduced to evaluate the LogiCode's performance across various metrics including binary classification accuracy, code generation success rate, and precision in reasoning. Findings demonstrate LogiCode's enhanced interpretability, significantly improving the accuracy of logical anomaly detection and offering detailed explanations for identified anomalies. This represents a notable shift towards more intelligent, LLM-driven approaches in industrial anomaly detection, promising substantial impacts on industry-specific applications.","url_abs":"https://arxiv.org/abs/2406.04687v1","url_pdf":"https://arxiv.org/pdf/2406.04687v1.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":"logicode-an-llm-driven-framework-for-logical","repo_url":"https://github.com/22strongestme/LOCO-Annotations","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}}],"tasks":[{"task_slug":"anomaly-detection","task_name":"Anomaly Detection"},{"task_slug":"binary-classification","task_name":"Binary Classification"},{"task_slug":"code-generation","task_name":"Code Generation"},{"task_slug":"logical-reasoning","task_name":"Logical Reasoning"},{"task_slug":"missing-elements","task_name":"Missing Elements"}],"methods":[{"method_slug":"focus","method_name":"Focus"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2406.04687","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.04687"}},"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/22strongestme/LOCO-Annotations","reach":{"status":"ok"}}],"summary":{"unverified":5},"by_repo_kind":{"official":{"samples":5,"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":5,"samples":[{"code_sha256_prefix":"f51e3f7e219792ae","entry":"analyze_food_setup","repo":"22strongestme/LOCO-Annotations","repo_kind":"official","path":"Generated_code_examples/breakfastbox_anomly_detection.py","file_url":"https://github.com/22strongestme/LOCO-Annotations/blob/HEAD/Generated_code_examples/breakfastbox_anomly_detection.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":"f51e3f7e219792ae"}},{"code_sha256_prefix":"93a643b040bb9fb1","entry":"analyze_hardware_image","repo":"22strongestme/LOCO-Annotations","repo_kind":"official","path":"Generated_code_examples/screwbag_anomly_detection.py","file_url":"https://github.com/22strongestme/LOCO-Annotations/blob/HEAD/Generated_code_examples/screwbag_anomly_detection.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":"93a643b040bb9fb1"}},{"code_sha256_prefix":"3836c82d46580ba4","entry":"analyze_image","repo":"22strongestme/LOCO-Annotations","repo_kind":"official","path":"Generated_code_examples/connector_anomly_detection.py","file_url":"https://github.com/22strongestme/LOCO-Annotations/blob/HEAD/Generated_code_examples/connector_anomly_detection.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":"3836c82d46580ba4"}},{"code_sha256_prefix":"9ee40e01e8ebe553","entry":"analyze_image_abnormality","repo":"22strongestme/LOCO-Annotations","repo_kind":"official","path":"Generated_code_examples/bottle_anomly_detection.py","file_url":"https://github.com/22strongestme/LOCO-Annotations/blob/HEAD/Generated_code_examples/bottle_anomly_detection.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":"9ee40e01e8ebe553"}},{"code_sha256_prefix":"a9e7689c3672f803","entry":"analyze_image_for_abnormality","repo":"22strongestme/LOCO-Annotations","repo_kind":"official","path":"Generated_code_examples/pushpins_anomly_detection.py","file_url":"https://github.com/22strongestme/LOCO-Annotations/blob/HEAD/Generated_code_examples/pushpins_anomly_detection.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":"a9e7689c3672f803"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}