Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
119 tokens/sec
GPT-4o
56 tokens/sec
Gemini 2.5 Pro Pro
43 tokens/sec
o3 Pro
6 tokens/sec
GPT-4.1 Pro
47 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

A Unified Model for Multi-class Anomaly Detection (2206.03687v3)

Published 8 Jun 2022 in cs.CV

Abstract: Despite the rapid advance of unsupervised anomaly detection, existing methods require to train separate models for different objects. In this work, we present UniAD that accomplishes anomaly detection for multiple classes with a unified framework. Under such a challenging setting, popular reconstruction networks may fall into an "identical shortcut", where both normal and anomalous samples can be well recovered, and hence fail to spot outliers. To tackle this obstacle, we make three improvements. First, we revisit the formulations of fully-connected layer, convolutional layer, as well as attention layer, and confirm the important role of query embedding (i.e., within attention layer) in preventing the network from learning the shortcut. We therefore come up with a layer-wise query decoder to help model the multi-class distribution. Second, we employ a neighbor masked attention module to further avoid the information leak from the input feature to the reconstructed output feature. Third, we propose a feature jittering strategy that urges the model to recover the correct message even with noisy inputs. We evaluate our algorithm on MVTec-AD and CIFAR-10 datasets, where we surpass the state-of-the-art alternatives by a sufficiently large margin. For example, when learning a unified model for 15 categories in MVTec-AD, we surpass the second competitor on the tasks of both anomaly detection (from 88.1% to 96.5%) and anomaly localization (from 89.5% to 96.8%). Code is available at https://github.com/zhiyuanyou/UniAD.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (7)
  1. Zhiyuan You (14 papers)
  2. Lei Cui (43 papers)
  3. Yujun Shen (111 papers)
  4. Kai Yang (187 papers)
  5. Xin Lu (165 papers)
  6. Yu Zheng (196 papers)
  7. Xinyi Le (12 papers)
Citations (152)

Summary

Unified Anomaly Detection Framework

This essay provides an analysis of the research paper "A Unified Model for Multi-class Anomaly Detection," which addresses the challenge of performing anomaly detection across multiple object classes using a unified modeling approach. This problem is significant in domains such as manufacturing, where identifying defects across various products efficiently remains a challenge. The authors propose a novel solution, UniAD, which effectively learns across multiple categories without succumbing to pitfalls associated with popular anomaly detection methods.

Background and Motivation

Traditional unsupervised anomaly detection approaches often require training distinct models for each object class, which is not feasible in situations where computational resources are limited or when there is an extensive number of classes. Such methods may also struggle with categories that exhibit significant intra-class diversity. This paper's contribution lies in developing a unified model that supports detecting anomalies across multiple classes within a single framework, thus circumventing the typical one-model-per-class paradigm.

Key Contributions

  1. Addressing the "Identical Shortcut" Problem: The paper identifies a common failure mode in reconstruction-based anomaly detection methods, termed the "identical shortcut," where models reconstruct both normal and anomalous samples equally well, obscuring outliers. The authors propose three core improvements to counter this issue:
    • Layer-wise Query Decoder: Unlike conventional transformer decoders that rely on a single query embedding, this approach introduces query embeddings in each decoder layer, enhancing the model's ability to represent complex distributions of normal data.
    • Neighbor Masked Attention: By masking nearby tokens to prevent direct copying, this mechanism limits the potential for input-output shortcuts within the transformer framework.
    • Feature Jittering Strategy: Introducing noise to input features forces the model to be robust against perturbations, guiding it to focus on true normal data distribution rather than spurious correlations.
  2. Empirical Evaluation: The model's performance is validated on benchmark datasets MVTec-AD and CIFAR-10. On MVTec-AD, UniAD achieves an AUROC of 96.5% for anomaly detection, outperforming state-of-the-art methods by a significant margin. For anomaly localization, the improvement was evident with an AUROC increase to 96.8%. Notably, the unified model showcases comparable performance to independently optimized class-specific models, highlighting its utility in real-world scenarios where deploying multiple models may be impractical.
  3. Comparison with Transformer-based Approaches: The research delineates the shortcomings of existing transformer-based anomaly detection methods and asserts the importance of query embedding for preventing overfitting to the input distribution. The authors provide a comprehensive examination of different query embedding strategies, concluding with the superiority of layer-wise embedding implementation.

Implications and Future Directions

The implications of this work are twofold: it addresses the scalability issue in anomaly detection and indicates a shift towards utilizing sophisticated attention mechanisms to enhance model performance in complex scenarios. Moving forward, further exploration could incorporate category labels to improve model accuracy in mixed-label scenarios. Additionally, adapting this approach to other domains, such as video anomaly detection, where temporal information could be leveraged, presents a compelling avenue for future research.

In conclusion, "A Unified Model for Multi-class Anomaly Detection" marks a significant progression towards efficient multi-class anomaly detection. By leveraging transformer architecture enhancements and addressing intrinsic challenges in anomaly detection pipelines, this research offers a promising direction for future developments in anomaly detection frameworks. The provided evidence suggests that UniAD is not only competitive in existing benchmarks but also demonstrates robustness and applicability across diverse anomaly detection settings.

Github Logo Streamline Icon: https://streamlinehq.com