REB: Reducing Biases in Representation for Industrial Anomaly Detection
Shuai Lyu, Dongmei Mo, Waikeung Wong
TL;DR
REB tackles industrial anomaly detection by addressing two core biases: domain bias in pre-trained representations and local density bias in patch-level features. It introduces DefectMaker for diverse synthetic defects and a self-supervised learning task to adapt representations, and pairs this with Local-Density KNN (LDKNN) to normalize anomaly scores by local feature density. The approach builds a normality memory bank from multi-scale features and uses density-aware inference to achieve state-of-the-art Im.AUROC on MVTec AD, MVTec LOCO AD, and BTAD with compact backbones, while maintaining real-time efficiency. The results demonstrate robust performance across backbones, improved few-shot behavior, and practical applicability, albeit with some limitations on logical defects and the independence of the two modules offering avenues for future integration.
Abstract
Existing representation-based methods usually conduct industrial anomaly detection in two stages: obtain feature representations with a pre-trained model and perform distance measures for anomaly detection. Among them, K-nearest neighbor (KNN) retrieval-based anomaly detection methods show promising results. However, the features are not fully exploited as these methods ignore domain bias of pre-trained models and the difference of local density in feature space, which limits the detection performance. In this paper, we propose Reducing Biases (REB) in representation by considering the domain bias and building a self-supervised learning task for better domain adaption with a defect generation strategy (DefectMaker) that ensures a strong diversity in the synthetic defects. Additionally, we propose a local-density KNN (LDKNN) to reduce the local density bias in the feature space and obtain effective anomaly detection. The proposed REB method achieves a promising result of 99.5\% Im.AUROC on the widely used MVTec AD, with smaller backbone networks such as Vgg11 and Resnet18. The method also achieves an impressive 88.8\% Im.AUROC on the MVTec LOCO AD dataset and a remarkable 96.0\% on the BTAD dataset, outperforming other representation-based approaches. These results indicate the effectiveness and efficiency of REB for practical industrial applications. Code:https://github.com/ShuaiLYU/REB.
