Anomaly Detection for Images Using Auto-encoder Based Sparse Representation

  • Qiang ZhaoEmail author
  • Fakhri KarrayEmail author
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 12132)


Anomaly detection is a pattern recognition task that aims at distinguishing abnormal patterns from normal ones. In this paper, we propose a convolutional auto-encoder based model to detect anomaly images by producing a sparse representation in the latent space. The proposed approach is able to represent the normal images using sparse encoding and the encoding can be well reconstructed by the decoder. However, the learned convolutional filters are not able to represent the abnormal images in a sparse way. Therefore, the decoder can not reconstruct the abnormal images with high quality. By assessing the reconstruction performance, we can distinguish the abnormal images from the normal ones. The experimental results show the superiority of our proposed model over other variants of auto-encoder based anomaly detection models in terms of AUC. In addition, the results show that the sparse representation based anomaly detection method could apply to different scenarios.


Anomaly detection Auto-encoder Sparse representation 



The authors would like to thank the Natural Sciences and Engineering Research Council of Canada (NSERC) for its generous support of the project under the Strategic Partnership Grants (NSERC SPG-G).


  1. 1.
    Kingma, D.P., Welling, M.: Auto-encoding variational Bayes. In: The 2nd International Conference on Learning Representations (ICLR) (2014)Google Scholar
  2. 2.
    Goodfellow, I.J., et al.: Generative adversarial nets. In: Conference on Neural Information Processing Systems (NIPS) (2014)Google Scholar
  3. 3.
    Chalapathy, R., Chawla, S.: Deep learning for anomaly detection: a survey. arXiv:1901.03407 (2019)
  4. 4.
    Fukushima, K.: Neocognitron: a hierarchical neural network capable of visual pattern recognition. Neural Networks 1, 119–130 (1988)CrossRefGoogle Scholar
  5. 5.
    Zhou, C., Paffenroth, R.C.: Anomaly detection with robust deep autoencoders. In: Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 665–674 (2017)Google Scholar
  6. 6.
    Vincent, P., Larochelle, H., Lajoie, I., Bengio, Y., Manzagol, P.-A.: Stacked denoising autoencoders: learning useful representations in a deep network with a local denoising criterion. J. Mach. Learn. Res. 11, 3371–3408 (2010)MathSciNetzbMATHGoogle Scholar
  7. 7.
    Vincent, P., Larochelle, H., Bengio, Y., Manzagol, P.-A.: Extracting and composing robust features with denoising autoencoders. In: The 25th International Conference on Machine Learning, pp. 1096–1103 (2008)Google Scholar
  8. 8.
    Sun, J.Y., Wang, X.Z., Xiong, N.X., Shao, J.: Learning sparse representation with variational auto-encoder for anomaly detection. IEEE Access 6, 33353–33361 (2018)CrossRefGoogle Scholar
  9. 9.
    Zhao, B., Fei-Fei, L., Xing, E.P.: Online detection of unusual events in videos via dynamic sparse coding. In: Computer Vision and Pattern Recognition (CVPR), pp. 3313–3320 (2011)Google Scholar
  10. 10.
    Cong, Y., Yuan, J., Liu, J.: Sparse reconstruction cost for abnormal event detection. In: Computer vision and pattern recognition (CVPR), pp. 3449–3456 (2011)Google Scholar
  11. 11.
    Lee, H., Battle, A., Raina, R., Ng, A.Y.: Efficient sparse coding algorithms. In: Advances in neural information processing systems (NIPS), pp. 801–808 (2007)Google Scholar
  12. 12.
    Springenberg, J.T., Dosovitskiy, A., Brox, T., Riedmiller, M.: Striving for simplicity: the all convolutional net. CoRR, abs/1412.6806 (2014)Google Scholar
  13. 13.
    Ioffe, s., Szegedy, C.: Batch normalization: accelerating deep network training by reducing internal covariate shift. In: ICML (2015)Google Scholar
  14. 14.
    Radford, A., Metz, L., Chintala, S.: Unsupervised representation learning with deep convolutional generative adversarial networks. In: ICLR (2015)Google Scholar
  15. 15.
    Xu, B., Wang, N., Chen, T., Li, M.: Empirical evaluation of rectified activations in convolution network. arXiv preprint arXiv:1505.00853 (2015)
  16. 16.
    Philipp, T.: The HAM10000 dataset, a large collection of multi-source dermatoscopic images of common pigmented skin lesions. Online (2018)Google Scholar
  17. 17.
    Ou, C., Zhao, Q., Karray, F., Khatib, A.E.: Design of an end-to-end dual mode driver distraction detection system. In: Karray, F., Campilho, A., Yu, A. (eds.) ICIAR 2019. LNCS, vol. 11663, pp. 199–207. Springer, Cham (2019). Scholar
  18. 18.
    Kingma, D.P., Ba, J.L.: Adam: a method for stochastic optimization (2015) Google Scholar

Copyright information

© Springer Nature Switzerland AG 2020

Authors and Affiliations

  1. 1.Center for Pattern Analysis and Machine Intelligence, Department of Electrical and Computer EngineeringUniversity of WaterlooOntarioCanada

Personalised recommendations