Supervised Masked Knowledge Distillation for Few-Shot Transformers

Hanxi Lin, G. Han, Jiawei Ma, Shiyuan Huang, Xudong Lin +1 more
2/14/2026

No official code found. Best implementation: HL-hanlin/SMKD (42 stars, MIT, last commit 2023-03-29).

Abstract

Vision Transformers (ViTs) emerge to achieve impressive performance on many data-abundant computer vision tasks by capturing long-range dependencies among local features. However, under few-shot learning (FSL) settings on small datasets with only a few labeled data, ViT tends to overfit and suffers from severe performance degradation due to its absence of CNN-alike inductive bias. Previous works in FSL avoid such problem either through the help of self-supervised auxiliary losses, or through the dextile uses of label information under supervised settings. But the gap between self-supervised and supervised few-shot Transformers is still unfilled. Inspired by recent advances in self-supervised knowledge distillation and masked image modeling (MIM), we propose a novel Supervised Masked Knowledge Distillation model (SMKD) for few-shot Transformers which incorporates label information into self-distillation frameworks. Compared with previous self-supervised methods, we allow intra-class knowledge distillation on both class and patch tokens, and introduce the challenging task of masked patch tokens reconstruction across intra-class images. Experimental results on four few-shot classification benchmark datasets show that our method with simple design outperforms previous methods by a large margin and achieves a new start-of-the-art. Detailed ablation studies confirm the effectiveness of each component of our model. Code for this paper is available here: https://github.com/HL-hanlin/SMKD.

View on arXivView PDF

Code Implementations(1)

HL-hanlin/SMKDCommunity100%
MIT

Code implementation for the paper: Supervised Masked Knowledge Distillation for Few-Shot Transformers

427PythonNov 16, 20223 years agoMIT

Similar Papers

Cite this paper

@article{lin2026supervised,
  title  = {Supervised Masked Knowledge Distillation for Few-Shot Transformers},
  author = {Hanxi Lin and G. Han and Jiawei Ma and Shiyuan Huang and Xudong Lin and Shih-Fu Chang},
  year   = {2026},
  eprint = {2303.15466},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2303.15466},
  journal = {CVPR 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2303.15466.svg)](https://codeofpaper.com/paper/2303.15466)

Discussion