[Paper Review] Learning Efficient Vision Transformers via Fine-Grained Manifold Distillation
This paper proposes fine-grained manifold distillation to compress Vision Transformers by matching patch-level feature manifolds between teacher and student models, significantly reducing computational cost through decoupled loss terms. The method achieves 76.5% top-1 accuracy on ImageNet-1k with a DeiT-Tiny student, outperforming prior distillation methods by +2.0% accuracy while maintaining strong generalization on transfer learning and object detection tasks.
In the past few years, transformers have achieved promising performances on various computer vision tasks. Unfortunately, the immense inference overhead of most existing vision transformers withholds their from being deployed on edge devices such as cell phones and smart watches. Knowledge distillation is a widely used paradigm for compressing cumbersome architectures via transferring information to a compact student. However, most of them are designed for convolutional neural networks (CNNs), which do not fully investigate the character of vision transformer (ViT). In this paper, we utilize the patch-level information and propose a fine-grained manifold distillation method. Specifically, we train a tiny student model to match a pre-trained teacher model in the patch-level manifold space. Then, we decouple the manifold matching loss into three terms with careful design to further reduce the computational costs for the patch relationship. Equipped with the proposed method, a DeiT-Tiny model containing 5M parameters achieves 76.5% top-1 accuracy on ImageNet-1k, which is +2.0% higher than previous distillation approaches. Transfer learning results on other classification benchmarks and downstream vision tasks also demonstrate the superiority of our method over the state-of-the-art algorithms.
Motivation & Objective
- To address the high inference cost of Vision Transformers, which limits deployment on edge devices such as smartphones and smartwatches.
- To overcome the limitations of existing knowledge distillation methods, which are primarily designed for CNNs and fail to exploit the patch-level structure of Vision Transformers.
- To develop a distillation method that leverages intermediate-layer feature relationships in a fine-grained, manifold-based manner to improve knowledge transfer.
- To reduce computational complexity in manifold matching while preserving performance through loss decoupling and patch merging.
- To demonstrate the superiority of soft-label distillation and fixed-depth student architectures in vision transformer compression.
Proposed method
- The method models the patch-level feature representations of both teacher and student networks as manifold spaces, capturing inter-patch relationships at each transformer layer.
- It introduces a decoupled manifold distillation loss composed of three terms: inter-image, intra-image, and randomly sampled relation matching, to reduce computational complexity.
- The inter-image loss matches the relative relationships between patches across different images, while the intra-image loss preserves relationships within the same image.
- The randomly sampled loss term reduces computation by approximating the full pairwise relation map using a subset of patches, achieving ~2 orders of magnitude speedup.
- A patch merging strategy is applied to further simplify the manifold representation and reduce computational load.
- The student model is trained to match the teacher’s soft labels and intermediate feature manifolds, with a fixed depth to ensure consistent distillation.
Experimental results
Research questions
- RQ1Can patch-level manifold relationships in Vision Transformers be effectively leveraged for knowledge distillation to improve model compression?
- RQ2How can the high computational cost of full manifold matching be reduced without sacrificing distillation performance?
- RQ3Does soft-label distillation and fixed-depth student training lead to better generalization than hard-label or variable-depth approaches?
- RQ4How does fine-grained manifold distillation compare to existing distillation methods in terms of accuracy and efficiency on image classification and downstream tasks?
- RQ5What hyperparameter settings (e.g., loss weights, sampling size) yield optimal performance in the proposed distillation framework?
Key findings
- The proposed fine-grained manifold distillation method achieves 76.5% top-1 accuracy on ImageNet-1k using a DeiT-Tiny student with only 5M parameters, surpassing previous distillation methods by +2.0% accuracy.
- On CIFAR-10 and CIFAR-100, the method improves transfer learning performance by +0.25% and +0.71% respectively, demonstrating superior generalization ability.
- In object detection on COCO 2017, the distilled Swin-Tiny model achieves 44.7% box AP, a +1.0% improvement over the student trained without distillation.
- Ablation studies confirm that soft-label distillation and fixed-depth student training are critical for performance gains, with ablation on these components leading to significant accuracy drops.
- The decoupled loss design reduces computational complexity by approximately two orders of magnitude compared to full manifold matching, enabling efficient training.
- Hyperparameter ablation shows that the default setting (α=4.0, β=0.1, γ=0.2, K=192) yields optimal performance, though further tuning could improve results.
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.