HaloAE: An HaloNet based Local Transformer Auto-Encoder for Anomaly Detection and Localization
E. Mathian, H. Liu, L. Fernandez-Cuesta, D. Samaras, M. Foll, L. Chen
TL;DR
HaloAE addresses unsupervised anomaly detection and localization by integrating a HaloNet-based local self-attention auto-encoder with multi-scale CNN features and self-supervised learning. The method combines a Cut&Paste SSL proxy task, VGG19-derived multi-scale feature maps, and a HaloNet encoder–decoder to produce pixel-wise anomaly maps from feature-map and image reconstructions. Adaptive loss weighting and an SSL framework significantly improve both image-level detection and pixel-level localization, achieving competitive averages of ROC-AUC 91.4% (image) and 91.2% (pixel) on the MVTec AD dataset. This work demonstrates that local self-attention in vision transformers can effectively complement convolutional processing for anomaly detection, suggesting broader applicability of local-transformer architectures in real-world industrial inspection scenarios.
Abstract
Unsupervised anomaly detection and localization is a crucial task as it is impossible to collect and label all possible anomalies. Many studies have emphasized the importance of integrating local and global information to achieve accurate segmentation of anomalies. To this end, there has been a growing interest in Transformer, which allows modeling long-range content interactions. However, global interactions through self attention are generally too expensive for most image scales. In this study, we introduce HaloAE, the first auto-encoder based on a local 2D version of Transformer with HaloNet. With HaloAE, we have created a hybrid model that combines convolution and local 2D block-wise self-attention layers and jointly performs anomaly detection and segmentation through a single model. We achieved competitive results on the MVTec dataset, suggesting that vision models incorporating Transformer could benefit from a local computation of the self-attention operation, and pave the way for other applications.
