Interpretable Logical Anomaly Classification via Constraint Decomposition and Instruction Fine-Tuning

Xufei Zhang, Xinjiao Zhou, Ziling Deng, Dongdong Geng, Jianxiong Wang
2/3/2026
cs.CV

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Logical anomalies are violations of predefined constraints on object quantity, spatial layout, and compositional relationships in industrial images. While prior work largely treats anomaly detection as a binary decision, such formulations cannot indicate which logical rule is broken and therefore offer limited value for quality assurance. We introduce Logical Anomaly Classification (LAC), a task that unifies anomaly detection and fine-grained violation classification in a single inference step. To tackle LAC, we propose LogiCls, a vision-language framework that decomposes complex logical constraints into a sequence of verifiable subqueries. We further present a data-centric instruction synthesis pipeline that generates chain-of-thought (CoT) supervision for these subqueries, coupling precise grounding annotations with diverse image-text augmentations to adapt vision language models (VLMs) to logic-sensitive reasoning. Training is stabilized by a difficulty-aware resampling strategy that emphasizes challenging subqueries and long tail constraint types. Extensive experiments demonstrate that LogiCls delivers robust, interpretable, and accurate industrial logical anomaly classification, providing both the predicted violation categories and their evidence trails.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhang2026interpretable,
  title  = {Interpretable Logical Anomaly Classification via Constraint Decomposition and Instruction Fine-Tuning},
  author = {Xufei Zhang and Xinjiao Zhou and Ziling Deng and Dongdong Geng and Jianxiong Wang},
  year   = {2026},
  eprint = {2602.03530},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2602.03530v1}
}

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/2602.03530.svg)](https://codeofpaper.com/paper/2602.03530)

Discussion