Home
Scholarly Works
LogiCode: An LLM-Driven Framework for Logical...
Journal article

LogiCode: An LLM-Driven Framework for Logical Anomaly Detection

Abstract

This paper presents LogiCode, a novel framework that leverages Large Language Models (LLMs) for identifying logical anomalies in industrial settings, moving beyond the 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. Our code are available at https://github.com/22strongestme/LOCO-Annotations. Note to Practitioners—This work introduces LogiCode, an innovative system leveraging Large Language Models (LLMs) for logical anomaly detection in industrial settings, shifting the paradigm from traditional visual inspection methods. LogiCode autonomously generates Python codes for logical anomaly detection, enhancing interpretability and accuracy. Our novel approach, validated through the “LOCO-Annotations” dataset and LogiBench benchmark, demonstrates superior performance in identifying logical anomalies, a challenge often encountered in complex industrial components like assembly and packaging. LogiCode provides a significant advancement in addressing the nuanced requirements of detecting logical anomalies, offering a robust and interpretable solution to practitioners seeking to enhance quality control and reduce manual inspection efforts.

Authors

Zhang Y; Cao Y; Xu X; Shen W

Journal

IEEE Transactions on Automation Science and Engineering, Vol. 22, , pp. 7712–7723

Publisher

Institute of Electrical and Electronics Engineers (IEEE)

Publication Date

January 1, 2025

DOI

10.1109/tase.2024.3468464

ISSN

1545-5955

Contact the Experts team