Skip to main content
QUICK REVIEW

[Paper Review] Exploring Efficient Few-shot Adaptation for Vision Transformers

Chengming Xu, Siqian Yang|arXiv (Cornell University)|Jan 6, 2023
Domain Adaptation and Few-Shot LearningComputer Science8 citations
TL;DR

This paper introduces efficient Transformer Tuning (eTT) for few-shot learning with Vision Transformers, using Attentive Prefix Tuning (APT) and Domain Residual Adapter (DRA) to achieve strong Meta-Dataset performance with few trainable parameters.

ABSTRACT

The task of Few-shot Learning (FSL) aims to do the inference on novel categories containing only few labeled examples, with the help of knowledge learned from base categories containing abundant labeled training samples. While there are numerous works into FSL task, Vision Transformers (ViTs) have rarely been taken as the backbone to FSL with few trials focusing on naive finetuning of whole backbone or classification layer.} Essentially, despite ViTs have been shown to enjoy comparable or even better performance on other vision tasks, it is still very nontrivial to efficiently finetune the ViTs in real-world FSL scenarios. To this end, we propose a novel efficient Transformer Tuning (eTT) method that facilitates finetuning ViTs in the FSL tasks. The key novelties come from the newly presented Attentive Prefix Tuning (APT) and Domain Residual Adapter (DRA) for the task and backbone tuning, individually. Specifically, in APT, the prefix is projected to new key and value pairs that are attached to each self-attention layer to provide the model with task-specific information. Moreover, we design the DRA in the form of learnable offset vectors to handle the potential domain gaps between base and novel data. To ensure the APT would not deviate from the initial task-specific information much, we further propose a novel prototypical regularization, which maximizes the similarity between the projected distribution of prefix and initial prototypes, regularizing the update procedure. Our method receives outstanding performance on the challenging Meta-Dataset. We conduct extensive experiments to show the efficacy of our model.

Motivation & Objective

  • Motivate efficient ViT-based fine-tuning for few-shot learning (FSL) to overcome heavy computation and overfitting in base methods.
  • Propose a light-weight tuning framework (eTT) combining APT and DRA to adapt ViTs to novel tasks with limited data.
  • Introduce prototypical regularization to preserve task-specific knowledge during prefix updates.
  • Demonstrate state-of-the-art or competitive FSL performance on Meta-Dataset using ViT backbones without extra data for training.

Proposed method

  • Pretrain ViT with self-supervised DINO on base data to obtain robust representations.
  • Use Attentive Prefix Tuning (APT): initialize a task-specific visual prefix from attentive prototypes and attach learned key/value pairs to each self-attention layer.
  • Introduce Domain Residual Adapter (DRA): learn small domain-offset vectors per Transformer layer to bridge base/novel domain gaps.
  • Apply prototypical regularization to keep prefix updates aligned with initial prototypes by matching projected distributions.
  • Fine-tune with a combination of cross-entropy loss and a distillation-based prototypical regularization (L = L_CE + lambda L_dist).
  • Report efficiency: trainable parameters during finetuning amount to ~9% of the full ViT when using ViT-small/ViT-tiny.
Figure 1: (a) Comparing with other backbones, we propose the Domain Residual Adapter (DRA) to tune much less parameters in our efficient Transformer Tuning (eTT); and effective for large-scale FSL. (b) The few-shot support samples are first processed into attentive prototypes which are used to initi
Figure 1: (a) Comparing with other backbones, we propose the Domain Residual Adapter (DRA) to tune much less parameters in our efficient Transformer Tuning (eTT); and effective for large-scale FSL. (b) The few-shot support samples are first processed into attentive prototypes which are used to initi

Experimental results

Research questions

  • RQ1How can ViT-based backbones be efficiently fine-tuned for few-shot learning without extensive retraining?
  • RQ2Can attentive prototypes and lightweight adapters improve task adaptation across domain shifts in FSL?
  • RQ3Does a prototypical regularization help preserve task-specific information during rapid fine-tuning?
  • RQ4What is the empirical performance of eTT on large-scale FSL benchmarks like Meta-Dataset compared to ResNet-based methods?

Key findings

  • eTT with ViT-small achieves strong Meta-Dataset performance, achieving competitive average ranks (e.g., 4.1 with ViT-tiny and ViT-small configurations; 1.6 average rank with ViT-s in some setups).
  • On several datasets, eTT outperforms strong baselines (e.g., Texture and Fungi) by notable margins versus CTX and TSA (approximately 8% and 10%).
  • eTT attains high efficiency, with learnable parameters during finetuning around 9% of the full ViT model for ViT-small configurations.
  • Using self-supervised DINO pretraining without extra training data yields favorable generalization for FSL on Meta-Dataset.
  • The method maintains robustness across large domain gaps by combining Attentive Prefix Tuning and Domain Residual Adapters.
Figure 2: Schematic illustration of our proposed model. For each image, we first fetch its patch embedding sequence and the attention score with regard to the last layer’s class token, from which the image embedding can be computed. Then the visual prefix is initialized as the attentive prototypes o
Figure 2: Schematic illustration of our proposed model. For each image, we first fetch its patch embedding sequence and the attention score with regard to the last layer’s class token, from which the image embedding can be computed. Then the visual prefix is initialized as the attentive prototypes o

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.