LogiCo: A Unified Framework for Logical and Structural Anomaly Detection
Abstract
Current anomaly detection methods primarily focus on struc-tural anomalies, while paying insux001Ecient attention to anomalies that vi-olate logical constraints. Conversely, top-performing logical anomaly de-tection approaches address this by modeling global semantic consistency,but perform poorly on subtle structural anomalies due to inadequate de-tection granularity. In this paper, we propose LogiCo , a unix001Ced frame-work for Logi cal and structural anomaly detection via Co mponent-levelfeature reconstruction. Unlike existing methods that rely on explicitglobal semantic modeling, LogiCo employs a novel component-level fea-ture reconstruction technique to capture inter-component logical con-straints. Specix001Ccally, LogiCo maps pre-trained image features into a dis-crete component-level feature space and performs collaborative featurereconstruction at both component and patch levels, enabling it to ef-fectively detect both logical and structural anomalies. Furthermore, toaddress the specix001Cc challenge of count-related logical anomalies, we inte-grate a segmentation-map discriminator that extends the model's capa-bility to identify quantitative inconsistencies. LogiCo achieves state-of-the-art performance on both logical and structural anomaly detectionacross four benchmarks, including MVTec-LOCO, MVTec-AD, VisA,and Real-IAD, demonstrating its superiority and practical feasibility.The code is available at https://github.com/cnulab/LogiCo.