Selective Feature Adapter for Dense Vision Transformers

Xueqing Deng, Qi Fan, Xiaojie Jin, Linjie Yang, Peng WangarXiv 2023

Abstract

Fine-tuning large-scale pre-trained Vision Transformers (ViTs) for dense prediction tasks like semantic segmentation and object detection is computationally and storage-intensive. We introduce the Selective Feature Adapter (SFA), a parameter-efficient fine-tuning strategy that achieves state-of-the-art performance while significantly reducing the number of trainable parameters. SFA utilizes a dual-adapter approach: external adapters provide new task-specific capacity, while internal adapters selectively update critical pre-trained weights identified via a lottery ticket algorithm. Our results demonstrate that SFA can match or exceed full fine-tuning performance on benchmarks like ADE20K and MS COCO using only a fraction of the parameters.

Introduction: The Challenge of Scaling Dense Vision Tasks

As Vision Transformers (ViTs) scale to billions of parameters, "Full Fine-Tuning"—updating every weight for every new task—becomes impractical. Storing separate, massive model versions for multiple downstream tasks (e.g., segmentation, depth estimation, detection) creates a significant deployment bottleneck. While Parameter-Efficient Transfer Learning (PETL) methods exist, they often struggle with "dense" tasks that require both high-level semantics and fine-grained spatial details, leading to a performance gap compared to full fine-tuning.

The SFA Approach: Dual Adapters

The Selective Feature Adapter (SFA) addresses this gap by combining two distinct mechanisms:

  1. External Adapters ($F_e$): SFA inserts small, trainable Multi-Layer Perceptron (MLP) modules sequentially after the attention and MLP blocks. Unlike parallel adapters, this sequential-plus-residual design increases the functional depth of the trainable network, which is crucial for capturing the complexities of dense prediction.
  2. Internal Adapters ($F_i$): Rather than adding more weights, SFA identifies and tunes a tiny subset of the existing backbone parameters. Using an iterative "lottery ticket" selection process based on gradient magnitudes, the model discovers which pre-trained weights are most critical for the new task.
Comparison of fine-tuning strategies: (a) Full, (b) Head-only, (c) External-only, and (d) the proposed SFA dual-adapter method.

Experimental Evaluation

We evaluated SFA across demanding benchmarks including ADE20K (segmentation), MS COCO (detection), and NYUv2 (depth estimation) using SwinV2 backbones.

Performance vs. Efficiency

SFA consistently outperforms existing PETL methods like VPT-Deep and AdaptFormer. On the ADE20K semantic segmentation task, SFA-Base achieves a 55.4 mIoU using only 19.5% of the parameters, effectively matching the performance of a fully fine-tuned model (55.5 mIoU). Even at extremely low parameter budgets (<1%), SFA maintains a significant lead over competitors.

Performance (mIoU) on ADE20K vs. trainable parameter ratio. SFA matches full fine-tuning performance at approximately 20% parameter usage.

Task-Specific Sensitivity

A key insight from SFA is that different tasks prioritize different layers. For object detection, the selection algorithm favors later, high-level layers to capture complex shapes. In contrast, depth estimation tasks trigger more updates in earlier, low-level layers to preserve structural and spatial details. This confirms that for dense tasks, tuning a small subset of internal backbone weights is more effective than simply adding large external modules.

Conclusion

SFA provides a robust solution for deploying giant ViTs on diverse dense vision tasks. By combining sequential external adapters with selective internal fine-tuning, it bridges the performance gap typically seen in parameter-efficient methods. Future work will explore cross-task feature sharing to further optimize storage for multi-task vision systems.

Summary updated

BibTeX
@misc{deng2023selective,
  author = {Xueqing Deng and Qi Fan and Xiaojie Jin and Linjie Yang and Peng Wang},
  title = {{Selective Feature Adapter for Dense Vision Transformers}},
  year = {2023},
  eprint = {2310.01843},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2310.01843},
}
Figure