Skip to main content

KDFAS: Multi-stage Knowledge Distillation Vision Transformer for Face Anti-spoofing

  • Conference paper
  • First Online:
Pattern Recognition and Computer Vision (PRCV 2023)

Abstract

With the commercial application of face recognition systems, face anti-spoofing has been studied extensively to enhance security in recent years. In this work, a lightweight network via knowledge distillation for face anti-spoofing is proposed. The main innovations of our approach are threefold: (1) In convolutional neural network based knowledge distillation, the local receptive field of teacher network may be inconsistent with that of student network, which results in misguiding. In our method, vision transformer architecture is leveraged because of its global modeling capabilities. (2) Beyond conventional decision-level knowledge transfer in the classification step via kullback-leibler loss, we present multi-stage feature-level knowledge distillation strategy to guide the feature learning of student network which can transfer richer knowledge from teacher to student network. (3) In contrast to traditional projection head learning, we construct a covariance matrix to solve the embedding dimensionality mismatching problem between teacher and student network in middle layers. Compared to teacher model of 1.28 GB, the memory of student model is only 330.8 MB, which effectively achieves a trade-off between memory and accuracy. Extensive experiments on three standard benchmarks demonstrate the superiority of our proposed method, which evidently corroborates the significance of multi-stage knowledge distillation for face anti-spoofing.

This work was supported by the National Natural Science Foundation of China (62101376) and Natural Science Foundation of Shanxi Province of China (201901D211078).

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

References

  1. Boulkenafet, Z., Komulainen, J., Hadid, A.: Face anti-spoofing based on color texture analysis. In: IEEE international conference on image processing. pp. 2636–2640 (2015)

    Google Scholar 

  2. Boulkenafet, Z., Komulainen, J., Li, L., Feng, X., Hadid, A.: Oulu-npu: A mobile face presentation attack database with real-world variations. In: IEEE international conference on automatic face & gesture recognition. pp. 612–618 (2017)

    Google Scholar 

  3. Chen, D., Mei, J.P., Zhang, H., Wang, C., Feng, Y., Chen, C.: Knowledge distillation with the reused teacher classifier. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 11933–11942 (2022)

    Google Scholar 

  4. Chen, H., Hu, G., Lei, Z., Chen, Y., Robertson, N.M., Li, S.Z.: Attention-based two-stream convolutional networks for face spoofing detection. IEEE Trans. Inf. Forensics Secur. 15, 578–593 (2019)

    Article  Google Scholar 

  5. Chingovska, I., Anjos, A., Marcel, S.: On the effectiveness of local binary patterns in face anti-spoofing. In: Proceedings of the international conference of biometrics special interest group. pp. 1–7 (2012)

    Google Scholar 

  6. Chingovska, I., Dos Anjos, A.R., Marcel, S.: Biometrics evaluation under spoofing attacks. IEEE Trans. Inf. Forensics Secur. 9(12), 2264–2276 (2014)

    Article  Google Scholar 

  7. Choudhary, T., Mishra, V., Goswami, A., Sarangapani, J.: A comprehensive survey on model compression and acceleration. Artif. Intell. Rev. 53, 5113–5155 (2020)

    Article  Google Scholar 

  8. Deng, Y.: Deep learning on mobile devices: a review. In: Mobile Multimedia/Image Processing, Security, and Applications 2019. vol. 10993, pp. 52–66 (2019)

    Google Scholar 

  9. Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, et al.: An image is worth 16x16 words: Transformers for image recognition at scale. In: International Conference on Learning Representations (2021)

    Google Scholar 

  10. Galbally, J., Marcel, S., Fierrez, J.: Biometric antispoofing methods: A survey in face recognition. IEEE Access 2, 1530–1552 (2014)

    Article  Google Scholar 

  11. Geras, K.J., Mohamed, A.r., Caruana, R., Urban, G., Wang, S., Aslan, O., Philipose, M., Richardson, M., Sutton, C.: Blending lstms into cnns. In: International Conference on Learning Representations (2016)

    Google Scholar 

  12. Hinton, G., Vinyals, O., Dean, J.: Distilling the knowledge in a neural network. In: NIPS Deep Learning and Representation Learning Workshop (2015)

    Google Scholar 

  13. Howard, A.G., Zhu, M., Chen, B., Kalenichenko, D., Wang, W., Weyand, T., Andreetto, M., Adam, H.: Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861 (2017)

  14. Huang, Y.H., Hsieh, J.W., Chang, M.C., Ke, L., Lyu, S., Santra, A.S.: Multi-teacher single-student visual transformer with multi-level attention for face spoofing detection. In: British Machine Vision Conference. p. 125 (2021)

    Google Scholar 

  15. Kim, J., Park, S., Kwak, N.: Paraphrasing complex network: Network compression via factor transfer. Advances in neural information processing systems 31 (2018)

    Google Scholar 

  16. Komulainen, J., Hadid, A., Pietikäinen, M.: Context based face anti-spoofing. In: IEEE Sixth International Conference on Biometrics: Theory, Applications and Systems. pp. 1–8 (2013)

    Google Scholar 

  17. Laurens, Van Der Maaten, and Hinton, Geoffrey: Visualizing data using t-sne. Journal of Machine Learning Research 9(2605), 2579–2605 (2008)

    Google Scholar 

  18. Li, H., He, P., Wang, S., Rocha, A., Jiang, X., Kot, A.C.: Learning generalized deep feature representation for face anti-spoofing. IEEE Trans. Inf. Forensics Secur. 13(10), 2639–2652 (2018)

    Article  Google Scholar 

  19. Li, H., Wang, S., He, P., Rocha, A.: Face anti-spoofing with deep neural network distillation. IEEE Journal of Selected Topics in Signal Processing 14(5), 933–946 (2020)

    Article  Google Scholar 

  20. Li, S., Dong, J., Chen, J., Gao, X., Niu, S.: Vision transformer with depth auxiliary information for face anti-spoofing. In: Neural Information Processing: 29th International Conference, Part III. pp. 335–346 (2023)

    Google Scholar 

  21. Li, Z., Cai, R., Li, H., Lam, K.Y., Hu, Y., Kot, A.C.: One-class knowledge distillation for face presentation attack detection. IEEE Trans. Inf. Forensics Secur. 17, 2137–2150 (2022)

    Article  Google Scholar 

  22. Passban, P., Wu, Y., Rezagholizadeh, M., Liu, Q.: Alp-kd: Attention-based layer projection for knowledge distillation. In: Proceedings of the AAAI Conference on artificial intelligence. vol. 35, pp. 13657–13665 (2021)

    Google Scholar 

  23. Patel, K., Han, H., Jain, A.K.: Secure face unlock: Spoof detection on smartphones. IEEE Trans. Inf. Forensics Secur. 11(10), 2268–2283 (2016)

    Article  Google Scholar 

  24. Peng, F., Meng, S.h., Long, M.: Presentation attack detection based on two-stream vision transformers with self-attention fusion. Journal of Visual Communication and Image Representation 85, 103518 (2022)

    Google Scholar 

  25. Polino, A., Pascanu, R., Alistarh, D.: Model compression via distillation and quantization. arXiv preprint arXiv:1802.05668 (2018)

  26. Ratha, N.K., Connell, J.H., Bolle, R.M.: Enhancing security and privacy in biometrics-based authentication systems. IBM Syst. J. 40(3), 614–634 (2001)

    Article  Google Scholar 

  27. Romero, A., Ballas, N., Kahou, S.E., Chassang, A., Bengio, Y.: Fitnets: Hints for thin deep nets. In: International Conference on Learning Representations (2015)

    Google Scholar 

  28. Touvron, H., Cord, M., Douze, M., Massa, F., Sablayrolles, A., Jégou, H.: Training data-efficient image transformers & distillation through attention. In: International conference on machine learning. pp. 10347–10357 (2021)

    Google Scholar 

  29. Yang, J., Lei, Z., Li, S.Z.: Learn convolutional neural network for face anti-spoofing. arXiv preprint arXiv:1408.5601 (2014)

  30. Yang, X., Luo, W., Bao, L., Gao, Y., Gong, D., Zheng, S., Li, Z., Liu, W.: Face anti-spoofing: Model matters, so does data. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. pp. 3507–3516 (2019)

    Google Scholar 

  31. Yang, Z., Li, Z., Zeng, A., Li, Z., Yuan, C., Li, Y.: Vitkd: Practical guidelines for vit feature knowledge distillation. arXiv preprint arXiv:2209.02432 (2022)

  32. Yu, Z., Qin, Y., Li, X., Zhao, C., Lei, Z., Zhao, G.: Deep learning for face anti-spoofing: A survey. IEEE Trans. Pattern Anal. Mach. Intell. 45(5), 5609–5631 (2022)

    Google Scholar 

  33. Yu, Z., Zhao, C., Wang, Z., Qin, Y., Su, Z., Li, X., Zhou, F., Zhao, G.: Searching central difference convolutional networks for face anti-spoofing. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. pp. 5295–5305 (2020)

    Google Scholar 

  34. Zhang, L.B., Peng, F., Qin, L., Long, M.: Face spoofing detection based on color texture markov feature and support vector machine recursive feature elimination. J. Vis. Commun. Image Represent. 51, 56–69 (2018)

    Article  Google Scholar 

  35. Zhang, Z., Yan, J., Liu, S., Lei, Z., Yi, D., Li, S.Z.: A face anti-spoofing database with diverse attacks. In: IAPR international conference on Biometrics. pp. 26–31 (2012)

    Google Scholar 

  36. Zhu, M., Tang, Y., Han, K.: Vision transformer pruning. arXiv preprint arXiv:2104.08500 (2021)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Daoxiang Zhou .

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

Zhang, J., Zhang, Y., Shao, F., Ma, X., Zhou, D. (2024). KDFAS: Multi-stage Knowledge Distillation Vision Transformer for Face Anti-spoofing. In: Liu, Q., et al. Pattern Recognition and Computer Vision. PRCV 2023. Lecture Notes in Computer Science, vol 14429. Springer, Singapore. https://doi.org/10.1007/978-981-99-8469-5_13

Download citation

  • DOI: https://doi.org/10.1007/978-981-99-8469-5_13

  • Published:

  • Publisher Name: Springer, Singapore

  • Print ISBN: 978-981-99-8468-8

  • Online ISBN: 978-981-99-8469-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics