Logical Anomaly Detection with Text-based Logic via Component-Aware Contrastive Language-Image Training
Seungeon Lee, Soopil Kim, Sion An, Sang-Chul Lee, Sang Hyun Park
Abstract
AI-based automatic visual inspection systems have been extensively researched to streamline various industrial products' labor-intensive anomaly detection processes. Despite significant advancements, detecting logical anomalies remains challenging due to the multitude of rules governing the assembly of multiple components to create a normal product. Existing methods have relied solely on image information for anomaly detection, resulting in limited accuracy as they fail to account for these diverse complex rules. Instead, humans detect anomalies by comparing the image with pre-defined logic which can be clearly expressed with natural language. Inspired by the human decision process, we propose a logical anomaly detection model that leverages text-based logic like human reasoning. With user-defined rules (i.e., positive rules) and logically distinct negative rules, we train the model using component-aware contrastive learning that increases the similarity between images and positive rules while decreasing the similarity with negative rules. However, accurately comparing textual and visual features is challenging due to multiple components, each governed by different rules, within a single image. To address this, we developed a zero-shot related region detection technique, which guides the model's focus on components relevant to each rule. We evaluated the proposed model on three public datasets and achieved state-of-the-art results in a few-shot logical anomaly detection task. Our findings highlight the potential of integrating vision-language models to enhance logical anomaly detection and utilizing text-based logic in complex industrial settings.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get c630b98e-e6a5-41b7-93eb-3a5e13b3ee2cRelated papers
- LogicAD: Explainable Anomaly Detection via VLM-based Text Feature ExtractionEr Jin, Qihui Feng, Yongli Mou, Gerhard Lakemeyer et al.AAAI 2025 · 35 citations
- Few Shot Part Segmentation Reveals Compositional Logic for Industrial Anomaly DetectionSoopil Kim, Sion An, Philip Chikontwe, Myeongkyun Kang et al.AAAI 2024 · 48 citations
- UniVAD: A Training-free Unified Model for Few-shot Visual Anomaly DetectionZhaopeng Gu, Bingke Zhu, Guibo Zhu, Yingying Chen et al.CVPR 2025
- Towards Zero-Shot Anomaly Detection and Reasoning with Multimodal Large Language ModelsJiacong Xu, Shao-Yuan Lo, Bardia Safaei, Vishal M. Patel et al.CVPR 2025
- WinCLIP: Zero-/Few-Shot Anomaly Classification and SegmentationJongheon Jeong, Yang Zou, Taewan Kim, Dongqing Zhang et al.CVPR 2023
