LogiCode: an LLM-Driven Framework for Logical Anomaly Detection

Yiheng Zhang, Yunkang Cao, Xiaohao Xu, Weiming Shen
6/7/2024
cs.LGcs.CV

No official code found. Best implementation: 22strongestme/LOCO-Annotations (27 stars, last commit 2025-09-23).

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.

View on arXivView PDF

Code Implementations(1)

The LOCO-Annotations dataset is a specialized extension of the MVTec LOCO dataset, focusing on detecting and analyzing high-level semantic logical anomalies in industrial settings. This dataset provides detailed annotations designed to evaluate and improve logical anomaly detection methods.

270PythonJun 7, 20241 years ago

Similar Papers

Cite this paper

@article{zhang2024logicode,
  title  = {LogiCode: an LLM-Driven Framework for Logical Anomaly Detection},
  author = {Yiheng Zhang and Yunkang Cao and Xiaohao Xu and Weiming Shen},
  year   = {2024},
  eprint = {2406.04687},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2406.04687v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2406.04687.svg)](https://codeofpaper.com/paper/2406.04687)

Discussion