Skip to main content

Anomaly Detection Requires Better Representations

  • Conference paper
  • First Online:
Computer Vision – ECCV 2022 Workshops (ECCV 2022)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13804))

Included in the following conference series:

Abstract

Anomaly detection seeks to identify unusual phenomena, a central task in science and industry. The task is inherently unsupervised as anomalies are unexpected and unknown during training. Recent advances in self-supervised representation learning have directly driven improvements in anomaly detection. In this position paper, we first explain how self-supervised representations can be easily used to achieve state-of-the-art performance in commonly reported anomaly detection benchmarks. We then argue that tackling the next generation of anomaly detection tasks requires new technical and conceptual improvements in representation learning.

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 89.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 119.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

Notes

  1. 1.

    http://odds.cs.stonybrook.edu/.

References

  1. Bergman, L., Hoshen, Y.: Classification-based anomaly detection for general data. In: ICLR (2020)

    Google Scholar 

  2. 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 

  3. Bergmann, P., Jin, X., Sattlegger, D., Steger, C.: The MVTec 3D-AD dataset for unsupervised 3D anomaly detection and localization (2021). arXiv preprint arXiv:2112.09045

  4. Bradley, A.P.: The use of the area under the ROC curve in the evaluation of machine learning algorithms. Pattern Recogn. 30(7), 1145–1159 (1997)

    Article  Google Scholar 

  5. Caron, M., et al.: Emerging properties in self-supervised vision transformers. In: Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 9650–9660 (2021)

    Google Scholar 

  6. Cohen, N., Kahana, J., Hoshen, Y.: Red PANDA: disambiguating anomaly detection by removing nuisance factors (2022) arXiv preprint arXiv

    Google Scholar 

  7. Dalal, N., Triggs, B.: Histograms of oriented gradients for human detection. In: 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR 2005), vol. 1, pp. 886–893. IEEE (2005)

    Google Scholar 

  8. Deng, J., Dong, W., Socher, R., Li, L.J., Li, K., Fei-Fei, L.: ImageNet: a large-scale hierarchical image database. In: 2009 IEEE Conference on Computer Vision and Pattern Recognition, pp. 248–255. IEEE (2009)

    Google Scholar 

  9. Eskin, E., Arnold, A., Prerau, M., Portnoy, L., Stolfo, S.: A geometric framework for unsupervised anomaly detection. In: Barbará, D., Jajodia, S. (eds.) Applications of Data Mining in Computer Security. Advances in Information Security, vol. 6, pp. 77–101. Springer, Boston (2002). https://doi.org/10.1007/978-1-4615-0953-0_4

  10. Golan, I., El-Yaniv, R.: Deep anomaly detection using geometric transformations. In: NeurIPS (2018)

    Google Scholar 

  11. He, K., Chen, X., Xie, S., Li, Y., Dollár, P., Girshick, R.: Masked autoencoders are scalable vision learners. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 16000–16009 (2022)

    Google Scholar 

  12. He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 770–778 (2016)

    Google Scholar 

  13. Hendrycks, D., Mazeika, M., Kadavath, S., Song, D.: Using self-supervised learning can improve model robustness and uncertainty. In: NeurIPS (2019)

    Google Scholar 

  14. Horwitz, E., Hoshen, Y.: An empirical investigation of 3D anomaly detection and segmentation (2022)

    Google Scholar 

  15. Jolliffe, I.: Principal component analysis. Springer (2011) https://doi.org/10.1007/978-1-4757-1904-8

  16. Kahana, J., Hoshen, Y.: A contrastive objective for learning disentangled representations (2022) arXiv preprint arXiv:2203.11284

  17. Koh, P.W., et al.: Concept bottleneck models. In: International Conference on Machine Learning, pp. 5338–5348. PMLR (2020)

    Google Scholar 

  18. Krizhevsky, A., Hinton, G., et al.: Learning multiple layers of features from tiny images (2009)

    Google Scholar 

  19. Larsson, G., Maire, M., Shakhnarovich, G.: Learning representations for automatic colorization. In: Leibe, B., Matas, J., Sebe, N., Welling, M. (eds.) ECCV 2016. LNCS, vol. 9908, pp. 577–593. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-46493-0_35

    Chapter  Google Scholar 

  20. Latecki, L.J., Lazarevic, A., Pokrajac, D.: Outlier detection with kernel density functions. In: Perner, P. (ed.) MLDM 2007. LNCS (LNAI), vol. 4571, pp. 61–75. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-73499-4_6

    Chapter  Google Scholar 

  21. Lin, T.-Y., et al.: Microsoft COCO: common objects in context. In: Fleet, D., Pajdla, T., Schiele, B., Tuytelaars, T. (eds.) ECCV 2014. LNCS, vol. 8693, pp. 740–755. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-10602-1_48

    Chapter  Google Scholar 

  22. Lowe, D.G.: Distinctive image features from scale-invariant keypoints. Int. J. Comput. vis. 60(2), 91–110 (2004)

    Article  Google Scholar 

  23. Mathieu, M., Couprie, C., LeCun, Y.: Deep multi-scale video prediction beyond mean square error. In: ICLR (2016)

    Google Scholar 

  24. Noroozi, M., Favaro, P.: Unsupervised learning of visual representations by solving Jigsaw Puzzles. In: Leibe, B., Matas, J., Sebe, N., Welling, M. (eds.) ECCV 2016. LNCS, vol. 9910, pp. 69–84. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-46466-4_5

    Chapter  Google Scholar 

  25. Perera, P., Patel, V.M.: Learning deep features for one-class classification. IEEE Trans. Image Process. 28(11), 5450–5463 (2019)

    Article  MathSciNet  MATH  Google Scholar 

  26. Qiu, C., Pfrommer, T., Kloft, M., Mandt, S., Rudolph, M.: Neural transformation learning for deep anomaly detection beyond images. In: International Conference on Machine Learning, pp. 8703–8714. PMLR (2021)

    Google Scholar 

  27. Reiss, T., Cohen, N., Bergman, L., Hoshen, Y.: Panda: adapting pretrained features for anomaly detection and segmentation. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 2806–2814 (2021)

    Google Scholar 

  28. Reiss, T., Hoshen, Y.: Mean-shifted contrastive loss for anomaly detection (2021). arXiv preprint arXiv:2106.03844

  29. Ridnik, T., Ben-Baruch, E., Noy, A., Zelnik-Manor, L.: ImageNet-21k pretraining for the masses (2021)

    Google Scholar 

  30. Ruff, L., et al.: Deep one-class classification. In: ICML (2018)

    Google Scholar 

  31. Rusu, R.B., Blodow, N., Beetz, M.: Fast point feature histograms (FPFH) for 3D registration. In: 2009 IEEE International Conference on Robotics and Automation, pp. 3212–3217 (2009)

    Google Scholar 

  32. Salehi, M., Sadjadi, N., Baselizadeh, S., Rohban, M.H., Rabiee, H.R.: Multiresolution knowledge distillation for anomaly detection. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 14902–14912 (2021)

    Google Scholar 

  33. Schlüter, H.M., Tan, J., Hou, B., Kainz, B.: Self-Supervised out-of-distribution detection and localization with natural synthetic anomalies (NSA) (2021). arXiv preprint arXiv:2109.15222

  34. Shenkar, T., Wolf, L.: Anomaly detection for tabular data with internal contrastive learning. In: International Conference on Learning Representations (2021)

    Google Scholar 

  35. Sohn, K., Li, C.L., Yoon, J., Jin, M., Pfister, T.: Learning and evaluating representations for deep one-class classification (2020). arXiv preprint arXiv:2011.02578

  36. Tack, J., Mo, S., Jeong, J., Shin, J.: CSI: Novelty detection via contrastive learning on distributionally shifted instances. In: NeurIPS (2020)

    Google Scholar 

  37. Welinder, P., et al.: Caltech-UCSD birds 200. 2(5), 11 (2010)

    Google Scholar 

  38. Zhang, R., Isola, P., Efros, A.A.: Colorful image colorization. In: Leibe, B., Matas, J., Sebe, N., Welling, M. (eds.) ECCV 2016. LNCS, vol. 9907, pp. 649–666. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-46487-9_40

    Chapter  Google Scholar 

  39. Zong, B., et al.: Deep autoencoding gaussian mixture model for unsupervised anomaly detection. In: International Conference on Learning Representations (2018)

    Google Scholar 

Download references

Acknowledgements

This work was partially supported by the Malvina and Solomon Pollack Scholarship, a Facebook award, the Israeli Cyber Directorate, the Israeli Higher Council and the Israeli Science Foundation. We also acknowledge support of Oracle Cloud credits and related resources provided by the Oracle for Research program.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Tal Reiss .

Editor information

Editors and Affiliations

A Appendix

A Appendix

In this paper we report anomaly detection results using the standard uni-modal protocol, which is widely used in the anomaly detection community. In the uni-modal protocol, multi-class datasets are converted to anomaly detection by setting a class as normal and all other classes as anomalies. The process is repeated for all classes, converting a dataset with C classes into C datasets. Finally, we report the mean ROC-AUC % over all C datasets as the anomaly detection results.

1.1 A.1 Anomaly detection comparison of MAE and DINO

We compare between DINO [5] and MAE [11] as a representation for a kNN based anomaly detection algorithm. For MAE, we experimented both with kNN and reconstruction error for anomaly scoring and found that the latter works badly, therefore we report just the kNN results. We evaluate using a variety of datasets, in the uni-modal setting described above. We used the following datasets:

INet-S [29]: The dataset is subset of 10 animal classes taken from ImageNet21k (e.g. “petrel”, “tyrannosaur”, “rat snake”, “duck”, “bee fly”, “sheep”, “beer cub”, “red deer”, “silverback”, “opossum rat”) that do not appear in ImageNet1K dataset. The dataset is coarse-grained and contains images relatively close to ImageNet1K dataset. It intended to convey that even for easy tasks the MAE doesn’t achieve as good results as DINO.

CIFAR-10 [18]: Consists of low-resolution \(32\times 32\) images from 10 different classes.

CUB-200 [37]: Bird species image dataset which contains 11,788 images of 200 subcategories. In the experiment we calculated mean ROC-AUC% over the 20 first categories.

1.2 A.2 Multi-modal datasets

In these experiment we specify a single class as anomalous, and treat all images which does not contain it as normal.

MS-COCO-I [21]: We build a multi-modal anomaly detection dataset comprised of scenes benchmarks, where each image is evaluated against other images featuring similar scenes. We choose 10 object categories (“bicycle”,“traffic light”, “bird” , “backpack”, “frisbee”, “bottle”, “banana”, “chair”, “tv”, “microwave”, “book”) from different MS-COCO super-categories. To construct a multi-modal anomaly detection benchmark, we designate an object category from the list as the anomalous class, and training images of a similar super-category that do not contain it as our normal train set. Our test set contains all the test images from that super-category, where images containing the anomalous object are labelled as anomalies. This process is repeated for the 10 object categories resulting in 10 different evaluations. We report their average ROC-AUC %.

MS-COCO-O: We introduce a similar benchmark to MS-COCO-I, focusing on single objects rather than scenes. We crop all objects from our 10 super-categories (described above) according to the MS-COCO supplied bounding boxes. We repeat a similar process, using a similar object category as normal and the rest as anomalies.

CUB-200 [37]: We create a multi-modal anomaly detection benchmark based on the CUB-200 dataset. We focus on the 20 first categories, designating only one as an anomaly each time.

1.3 A.3 Tabular domain

Various datasets used for tabular data anomaly detection were used for the experiments. A total of 31 datasets from Outlier Detection DataSets (ODDS)Footnote 1 are employed. For the evaluation of GOAD and ICL we used the official repositories and made an effort to select the best configuration available. For all density estimation evaluations we used kNN with \(k=5\) nearest neighbors. To convert GOAD and ICL into the standard paradigm of representation learning followed by density estimation: i) we use the original approaches to train a feature encoder (followed by a classifier which we discard) ii) we use the feature encoder to represent each sample iii) density estimation is performed on the representations using kNN exactly as in Sect. 3.

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Reiss, T., Cohen, N., Horwitz, E., Abutbul, R., Hoshen, Y. (2023). Anomaly Detection Requires Better Representations. In: Karlinsky, L., Michaeli, T., Nishino, K. (eds) Computer Vision – ECCV 2022 Workshops. ECCV 2022. Lecture Notes in Computer Science, vol 13804. Springer, Cham. https://doi.org/10.1007/978-3-031-25069-9_4

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-25069-9_4

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-25068-2

  • Online ISBN: 978-3-031-25069-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics