NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Adaptive Layer Selection for Efficient Vision Transformer Fine-Tuning

Alessio Devoto, Federico Alvetreti, Jary Pomponi, Paolo Di Lorenzo, Pasquale Minervini, Simone ScardapanearXiv 2024 · DOI

Introduction

Vision Transformers (ViTs) have established themselves as state-of-the-art models for computer vision tasks. However, their widespread adoption is hindered by a significant "computational tax." Fine-tuning these models—adapting a pre-trained backbone to a specific downstream task—is resource-intensive, requiring substantial memory and processing power (FLOPs). This makes it challenging to deploy or update ViTs on edge devices, drones, or other low-energy hardware.

While Parameter-Efficient Fine-Tuning (PEFT) techniques like LoRA reduce the number of trainable parameters, they often fail to significantly lower the actual computational load or the memory required to store activations during backpropagation. This paper introduces ALaST (Adaptive Layer Selection Fine-Tuning), a method that dynamically identifies and prioritizes the most critical layers and image tokens for a specific task, making fine-tuning significantly more efficient.

Methods: Adaptive Layer Selection (ALaST)

ALaST operates on the premise that not all layers or image patches (tokens) contribute equally to a model's final decision. Instead of treating the architecture as a static monolith, ALaST assigns a dynamic "compute budget" to each transformer layer that evolves throughout the training process.

Figure 5: Conceptual overview of the ALaST framework, illustrating adaptive token dropping and layer freezing based on learned importance.

The framework consists of four primary components:

  1. Estimating Importance via CLS Tokens: ALaST monitors the evolution of the classification (CLS) token across layers. Since the CLS token is the primary input for the final classification head, its rate of change serves as a proxy for a layer's contribution. Layers that minimally alter the CLS token are deemed less important.
  2. Adaptive Token Selection: For layers with lower assigned budgets, the model discards redundant image tokens. By using attention scores to identify patches the CLS token ignores, ALaST reduces the quadratic computational cost inherent in self-attention.
  3. Adaptive Layer Freezing: Layers with the lowest budgets are frozen entirely. This provides massive memory savings because the system no longer needs to store the activations required for gradient calculations in those layers.
  4. Dynamic Scheduling: Unlike static pruning methods, ALaST updates its selection decisions at every training step. This allows the model to shift its focus to different parts of the architecture as the learning process progresses.

Experimental Setup

The researchers evaluated ALaST using several ViT variants, including DeiT-Tiny, DeiT-Small, and ViT-Base, across three diverse benchmarks:

  • Flower-102: Fine-grained classification of flower species.
  • Cifar-100: A standard medium-scale dataset with 100 classes.
  • Food-101: A large-scale dataset containing 101,000 images of various dishes.

Key Results and Insights

ALaST demonstrates that significant efficiency gains can be achieved with minimal impact on model performance. By exploiting "token redundancy" and the "identity function phenomenon"—where certain layers contribute very little to the residual stream—the method streamlines the training pipeline.

Figure 6: Performance comparison between full fine-tuning and ALaST, showing significant reductions in FLOPs, memory, and time while maintaining high accuracy.
  • Efficiency Gains: ALaST achieved up to a 2x reduction in total FLOPs and peak memory usage compared to traditional full fine-tuning. This translated to a wall-clock training speedup of up to 1.5x.
  • Accuracy Preservation: Despite these aggressive computational cuts, accuracy remained highly competitive. On the ViT-Base model, ALaST matched the accuracy of full fine-tuning while using a fraction of the resources.
  • Synergy with PEFT: ALaST is orthogonal to methods like LoRA. Researchers found that combining LoRA (to reduce parameters) with ALaST (to reduce computational footprint) provides a "best of both worlds" approach to efficient training.
  • Dataset Sensitivity: The method automatically discovered that different datasets require different active layers, proving that static layer-freezing heuristics are often suboptimal.

Conclusion and Future Work

ALaST offers a robust path toward making large-scale Vision Transformers accessible for resource-constrained environments. By dynamically managing compute budgets, it bridges the gap between high-performance modeling and practical deployment. Future research directions include extending these adaptive principles to Large Language Models (LLMs) and exploring the application of adaptive token/layer selection during the inference phase to further reduce operational costs.

Summary updated

BibTeX
@misc{devoto2024adaptive,
  author = {Alessio Devoto and Federico Alvetreti and Jary Pomponi and Paolo Di Lorenzo and Pasquale Minervini and Simone Scardapane},
  title = {{Adaptive Layer Selection for Efficient Vision Transformer Fine-Tuning}},
  year = {2024},
  eprint = {2408.08670},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.08670},
}
Figure