Skip to main content

Nearest Memory Augmented Feature Reconstruction forĀ Unified Anomaly Detection

  • Conference paper
  • First Online:
Neural Information Processing (ICONIP 2023)

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 1966))

Included in the following conference series:

  • 486 Accesses

Abstract

Reconstruction-based anomaly detection methods expect to reconstruct normality well but fail for abnormality. Memory modules have been exploited to avoid reconstructing anomalies, but they may overgeneralize by using memory in a weighted manner. Additionally, existing methods often require separate models for different objects. In this work, we propose nearest memory augmented feature reconstruction for unified anomaly detection. Specifically, the novel nearest memory addressing (NMA) module enables memory items to record normal prototypical patterns individually. In this way, the risk of over-generalization is mitigated while the capacity of the memory item is fully exploited. To overcome the constraint of training caused by NMA that has no real gradient defined, we perform end-to-end training with straight-through gradient estimation and exponential moving average. Moreover, we introduce the feature reconstruction paradigm to avoid the reconstruction challenge in the image space caused by information loss of the memory mechanism. As a result, our method can unify anomaly detection for multiple categories. Extensive experiments show that our method achieves state-of-the-art performance on MVTecAD dataset under the unified setting. Remarkably, it achieves comparable or better performance than other algorithms under the separate setting.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 79.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 99.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Abati, D., Porrello, A., Calderara, S., Cucchiara, R.: Latent space autoregression for novelty detection. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 481ā€“490 (2019)

    Google ScholarĀ 

  2. Akcay, S., Atapour-Abarghouei, A., Breckon, T.P.: GANomaly: semi-supervised anomaly detection via adversarial training. In: Jawahar, C.V., Li, H., Mori, G., Schindler, K. (eds.) ACCV 2018. LNCS, vol. 11363, pp. 622ā€“637. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-20893-6_39

    ChapterĀ  Google ScholarĀ 

  3. Bengio, Y., LĆ©onard, N., Courville, A.: Estimating or propagating gradients through stochastic neurons for conditional computation. arXiv preprint arXiv:1308.3432 (2013)

  4. Bergmann, P., Fauser, M., Sattlegger, D., Steger, C.: MVTec AD-a comprehensive real-world dataset for unsupervised anomaly detection. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9592ā€“9600 (2019)

    Google ScholarĀ 

  5. Bergmann, P., Fauser, M., Sattlegger, D., Steger, C.: Uninformed students: student-teacher anomaly detection with discriminative latent embeddings. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4183ā€“4192 (2020)

    Google ScholarĀ 

  6. Cohen, N., Hoshen, Y.: Sub-image anomaly detection with deep pyramid correspondences. arXiv preprint arXiv:2005.02357 (2020)

  7. Defard, T., Setkov, A., Loesch, A., Audigier, R.: PaDiM: a patch distribution modeling framework for anomaly detection and localization. In: Del Bimbo, A., et al. (eds.) ICPR 2021. LNCS, vol. 12664, pp. 475ā€“489. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-68799-1_35

    ChapterĀ  Google ScholarĀ 

  8. Dosovitskiy, A., et al.: An image is worth 16\(\times \)16 words: transformers for image recognition at scale. arXiv preprint arXiv:2010.11929 (2020)

  9. Gong, D., et al.: Memorizing normality to detect anomaly: memory-augmented deep autoencoder for unsupervised anomaly detection. In: Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 1705ā€“1714 (2019)

    Google ScholarĀ 

  10. Hou, J., Zhang, Y., Zhong, Q., Xie, D., Pu, S., Zhou, H.: Divide-and-assemble: learning block-wise memory for unsupervised anomaly detection. In: Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 8791ā€“8800 (2021)

    Google ScholarĀ 

  11. Huang, C., Guan, H., Jiang, A., Zhang, Y., Spratling, M., Wang, Y.F.: Registration based few-shot anomaly detection. In: Computer Vision-ECCV 2022: 17th European Conference, Tel Aviv, Israel, 23ā€“27 October 2022, Proceedings, Part XXIV, pp. 303ā€“319. Springer, Heidelberg (2022). https://doi.org/10.1007/978-3-031-20053-3_18

  12. Li, C.L., Sohn, K., Yoon, J., Pfister, T.: Cutpaste: self-supervised learning for anomaly detection and localization. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9664ā€“9674 (2021)

    Google ScholarĀ 

  13. Loshchilov, I., Hutter, F.: Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101 (2017)

  14. Park, H., Noh, J., Ham, B.: Learning memory-guided normality for anomaly detection. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 14372ā€“14381 (2020)

    Google ScholarĀ 

  15. Perera, P., Nallapati, R., Xiang, B.: OCGAN: one-class novelty detection using GANs with constrained latent representations. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 2898ā€“2906 (2019)

    Google ScholarĀ 

  16. Rudolph, M., Wandt, B., Rosenhahn, B.: Same same but differnet: semi-supervised defect detection with normalizing flows. In: Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pp. 1907ā€“1916 (2021)

    Google ScholarĀ 

  17. Ruff, L., et al.: Deep one-class classification. In: International Conference on Machine Learning, pp. 4393ā€“4402. PMLR (2018)

    Google ScholarĀ 

  18. Schlegl, T., Seebƶck, P., Waldstein, S.M., Schmidt-Erfurth, U., Langs, G.: Unsupervised anomaly detection with generative adversarial networks to guide marker discovery. In: Niethammer, M., et al. (eds.) IPMI 2017. LNCS, vol. 10265, pp. 146ā€“157. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-59050-9_12

    ChapterĀ  Google ScholarĀ 

  19. Shi, Y., Yang, J., Qi, Z.: Unsupervised anomaly segmentation via deep feature reconstruction. Neurocomputing 424, 9ā€“22 (2021)

    ArticleĀ  Google ScholarĀ 

  20. Tan, M., Le, Q.: EfficientNet: rethinking model scaling for convolutional neural networks. In: International Conference on Machine Learning, pp. 6105ā€“6114. PMLR (2019)

    Google ScholarĀ 

  21. Van Den Oord, A., Vinyals, O., et al.: Neural discrete representation learning. Adv. Neural Inf. Process. Syst. 30, 1ā€“10 (2017)

    Google ScholarĀ 

  22. Yi, J., Yoon, S.: Patch SVDD: patch-level SVDD for anomaly detection and segmentation. In: Proceedings of the Asian Conference on Computer Vision (2020)

    Google ScholarĀ 

  23. You, Z., et al.: A unified model for multi-class anomaly detection. In: Neural Information Processing Systems (2022)

    Google ScholarĀ 

  24. Yu, J., et al.: Fastflow: unsupervised anomaly detection and localization via 2D normalizing flows. arXiv preprint arXiv:2111.07677 (2021)

  25. Zavrtanik, V., Kristan, M., Skočaj, D.: Draem-a discriminatively trained reconstruction embedding for surface anomaly detection. In: Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 8330ā€“8339 (2021)

    Google ScholarĀ 

Download references

Acknowledgements

This work is supported in part by the Natural Science Foundation of Fujian under Grant 2023J01351; in part by the Natural Science Foundation of Guandong under Grant 2021A1515011578.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yongxuan Lai .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

Ā© 2024 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Wu, H., Wang, C., Jian, Z., Lai, Y., Song, L., Yang, F. (2024). Nearest Memory Augmented Feature Reconstruction forĀ Unified Anomaly Detection. In: Luo, B., Cheng, L., Wu, ZG., Li, H., Li, C. (eds) Neural Information Processing. ICONIP 2023. Communications in Computer and Information Science, vol 1966. Springer, Singapore. https://doi.org/10.1007/978-981-99-8148-9_28

Download citation

  • DOI: https://doi.org/10.1007/978-981-99-8148-9_28

  • Published:

  • Publisher Name: Springer, Singapore

  • Print ISBN: 978-981-99-8147-2

  • Online ISBN: 978-981-99-8148-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics