[Paper Review] Supervised Masked Knowledge Distillation for Few-Shot Transformers
This paper proposes Supervised Masked Knowledge Distillation (SMKD), a novel framework that enhances few-shot Vision Transformers by jointly applying supervised contrastive learning to [cls] tokens and masked patch reconstruction across intra-class images. By integrating label information into a self-distillation setup, SMKD reduces overfitting and achieves state-of-the-art performance on four few-shot benchmarks, outperforming prior methods by significant margins.
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.
Motivation & Objective
- To address the overfitting of Vision Transformers in few-shot learning due to lack of inductive bias and limited labeled data.
- To close the performance gap between self-supervised and supervised few-shot learning by integrating label information into a masked knowledge distillation framework.
- To develop a simple yet effective method that leverages both global [cls] tokens and local patch tokens for improved generalization.
- To unify the strengths of supervised contrastive learning and self-supervised masked distillation without requiring large batch sizes or negative samples.
Proposed method
- Introduces a supervised masked knowledge distillation framework (SMKD) that extends self-supervised masked distillation into the supervised setting.
- Applies supervised contrastive loss to align [cls] tokens across intra-class images to improve global representation learning.
- Proposes a novel masked patch reconstruction task that reconstructs masked patches across intra-class images, increasing learning difficulty and encouraging generalization.
- Uses cross-attention to estimate similarity between corresponding patch tokens across intra-class images, enabling patch-level knowledge distillation without ground-truth annotations.
- Combines [cls]-level and patch-level contrastive losses with a shared projection head to allow semantic complementarity between global and local representations.
- Employs weighted average pooling of patch tokens using self-attention weights to enhance feature representation, especially for background-robust features.
![Figure 1 : Comparison of the proposed idea and other existing methods for few-shot Transformers. Our model mitigates the overfitting issue of few-shot Transformers, by extending the masked knowledge distillation framework into the supervised setting, and enforcing the alignment of [cls] and correspo](https://ar5iv.labs.arxiv.org/html/2303.15466/assets/x1.png)
Experimental results
Research questions
- RQ1Can supervised knowledge distillation with masked patch reconstruction improve few-shot generalization in Vision Transformers?
- RQ2How does joint learning on [cls] and patch tokens affect performance compared to using only global or local features?
- RQ3Does incorporating intra-class alignment through cross-attention improve model robustness and reduce overfitting in low-data regimes?
- RQ4Can a unified framework combining supervised and self-supervised objectives outperform two-stage or auxiliary loss-based approaches in few-shot learning?
- RQ5What is the contribution of different feature aggregation strategies (e.g., [cls], average pooling, weighted average pooling) to final few-shot accuracy?
Key findings
- SMKD achieves a new state-of-the-art on four few-shot image classification benchmarks, with 74.28% accuracy on 1-shot and 88.82% on 5-shot ImageNet-1000.
- The combination of [cls]-level and patch-level contrastive losses yields a 13.35% improvement over the baseline in 1-shot and 8.44% in 5-shot settings.
- Using weighted average pooling of patch tokens boosts [cls] token performance by 3.02% in 1-shot and 0.79% in 5-shot, demonstrating enhanced feature quality.
- The ablation study confirms that [cls] and patch-level distillation are complementary, with the full SMKD model outperforming individual components.
- The method outperforms both supervised contrastive learning and self-supervised masked distillation baselines, showing the benefit of combining label supervision with masked reconstruction.
- The model's performance is further enhanced when combining [cls], weighted average pooling, and average pooling tokens, achieving 74.28% in 1-shot and 88.82% in 5-shot.
![Figure 2 : Comparison of other self-supervised/supervised frameworks. Our method (d) is a natural extension of (b) and (c), with the newly-introduced challenging task of masked [patch] tokens reconstruction across intra-class images.](https://ar5iv.labs.arxiv.org/html/2303.15466/assets/x2.png)
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.