The Role of Masking for Efficient Supervised Knowledge Distillation of Vision Transformers

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Son, Seungwoo, Ryu, Jegwang, Lee, Namhoon, Lee, Jaeho
Formato: Preprint
Publicado: 2023
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866910623257853952
author Son, Seungwoo
Ryu, Jegwang
Lee, Namhoon
Lee, Jaeho
author_facet Son, Seungwoo
Ryu, Jegwang
Lee, Namhoon
Lee, Jaeho
contents Knowledge distillation is an effective method for training lightweight vision models. However, acquiring teacher supervision for training samples is often costly, especially from large-scale models like vision transformers (ViTs). In this paper, we develop a simple framework to reduce the supervision cost of ViT distillation: masking out a fraction of input tokens given to the teacher. By masking input tokens, one can skip the computations associated with the masked tokens without requiring any change to teacher parameters or architecture. We find that masking patches with the lowest student attention scores is highly effective, saving up to 50% of teacher FLOPs without any drop in student accuracy, while other masking criterion leads to suboptimal efficiency gains. Through in-depth analyses, we reveal that the student-guided masking provides a good curriculum to the student, making teacher supervision easier to follow during the early stage and challenging in the later stage.
format Preprint
id arxiv_https___arxiv_org_abs_2302_10494
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle The Role of Masking for Efficient Supervised Knowledge Distillation of Vision Transformers
Son, Seungwoo
Ryu, Jegwang
Lee, Namhoon
Lee, Jaeho
Machine Learning
Computer Vision and Pattern Recognition
Knowledge distillation is an effective method for training lightweight vision models. However, acquiring teacher supervision for training samples is often costly, especially from large-scale models like vision transformers (ViTs). In this paper, we develop a simple framework to reduce the supervision cost of ViT distillation: masking out a fraction of input tokens given to the teacher. By masking input tokens, one can skip the computations associated with the masked tokens without requiring any change to teacher parameters or architecture. We find that masking patches with the lowest student attention scores is highly effective, saving up to 50% of teacher FLOPs without any drop in student accuracy, while other masking criterion leads to suboptimal efficiency gains. Through in-depth analyses, we reveal that the student-guided masking provides a good curriculum to the student, making teacher supervision easier to follow during the early stage and challenging in the later stage.
title The Role of Masking for Efficient Supervised Knowledge Distillation of Vision Transformers
topic Machine Learning
Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2302.10494