[Paper Review] Towards Efficient Visual Adaption via Structural Re-parameterization
RepAdapter introduces a sequential, structurally re-parameterizable visual adapter for giant vision models, achieving zero inference overhead while outperforming state-of-the-art PETL methods across 27 datasets.
Parameter-efficient transfer learning (PETL) is an emerging research spot aimed at inexpensively adapting large-scale pre-trained models to downstream tasks. Recent advances have achieved great success in saving storage costs for various pre-trained models by updating a small number of parameters instead of full tuning. However, we notice that most existing PETL methods still incur non-negligible latency during inference. In this paper, we propose a parameter-efficient and computational friendly adapter for giant vision models, called RepAdapter. Specifically, we first prove that common adaptation modules can also be seamlessly integrated into most giant vision models via our structural re-parameterization, thereby achieving zero-cost during inference. We then investigate the sparse design and effective placement of adapter structure, helping our RepAdaper obtain other advantages in terms of parameter efficiency and performance. To validate RepAdapter, we conduct extensive experiments on 27 benchmark datasets of three vision tasks, i.e., image and video classifications and semantic segmentation. Experimental results show the superior performance and efficiency of RepAdapter than the state-of-the-art PETL methods. For instance, RepAdapter outperforms full tuning by +7.2% on average and saves up to 25% training time, 20% GPU memory, and 94.6% storage cost of ViT-B/16 on VTAB-1k. The generalization ability of RepAdapter is also well validated by a bunch of vision models. Our source code is released at https://github.com/luogen1996/RepAdapter.
Motivation & Objective
- Motivate parameter-efficient transfer learning (PETL) for large-scale vision models to reduce storage and compute during deployment.
- Show that common visual adapters can be merged into pre-trained models via structural re-parameterization without extra inference cost.
- Investigate sparse design and placement of adapters to improve parameter efficiency and performance.
- Demonstrate RepAdapter's effectiveness across diverse vision tasks (image/video classification, semantic segmentation) and model families.
- Validate generalization across backbones like ConvNeXt, ViT, Swin-Transformer and CLIP.
Proposed method
- Propose RepAdapter, a lightweight adapter whose training-time additions can be re-parameterized into nearby projection weights for zero inference cost.
- Remove non-linear activation in adapters to enable linear re-parameterization, yielding an equivalent linear projection during inference.
- Re-parameterize sequential adapter blocks into pre-trained weights (W0, b0) to form Wrep and brep for incorporation into attention (MHA), FFN, and convolutions.
- Introduce a dense-sparse Adapters design where the up-projection is group-wise (Gs groups) to reduce parameters.
- Systematically study adapter placement, showing pre-insertion before neural modules (MHA/FFN) yields better performance on ViT and other backbones.
- Evaluate RepAdapter in three vision tasks (image/video classification, semantic segmentation) and across multiple backbones (ViT, ConvNeXt, Swin-Transformer, CLIP).
![Figure 1 : Performance comparison of our RepAdpater and existing PETL methods [ 19 , 16 , 2 , 18 , 38 ] on VTAB-1K. The vision model is ViT-B/16 and the inference speed is measured on a NVIDIA 3090 GPU with a batch size of 1. Most existing PETL methods incur non-negligible GPU latency during inferen](https://ar5iv.labs.arxiv.org/html/2302.08106/assets/x1.png)
Experimental results
Research questions
- RQ1Can linearized, sequential adapters be re-parameterized into pre-trained vision models without adding inference cost?
- RQ2Does sparse, group-wise adapter design maintain performance while reducing parameter count?
- RQ3What is the impact of adapter placement on large vision models, and which locations maximize gains?
- RQ4How does RepAdapter generalize across different architectures and tasks (image/video classification, segmentation, CLIP-based few-shot/domain generalization)?
- RQ5How does RepAdapter compare to existing PETL methods in accuracy and efficiency?
Key findings
- RepAdapter achieves zero extra computation during inference after re-parameterization.
- Sequentially placed, linearized adapters can be merged into pre-trained weights without performance degeneration.
- Sparse (grouped) design reduces parameters by about 25% with maintained or improved accuracy.
- Pre-insertion (before MHA/FFN) placements yield better performance than post-insertion across ViT and other backbones.
- RepAdapter outperforms state-of-the-art PETL methods on VTAB-1k and generalizes well to CLIP, ConvNeXt, Swin, ViT, and video/segmentation tasks.
- In inference, RepAdapter shows no additional FLOPs, unlike many competing PETL methods, while achieving superior or competitive accuracy.
![Figure 2 : Comparison of existing PETL methods [ 2 , 19 , 18 ] and our RepAdapter . RepAdapter is deployed in a sequential manner, but it can be completely re-parameterized into the vision models during inference, enabling zero additional computational overhead. Its structure is also more lightweigh](https://ar5iv.labs.arxiv.org/html/2302.08106/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.