Meta-Learning Hyperparameters for Parameter Efficient Fine-Tuning

Zichen Tian, Yaoyao Liu, Qianru Sun

Meta-Learning Hyperparameters for Parameter Efficient Fine-Tuning

Abstract

Adapting large foundation models to specialized domains like Remote Sensing (RS) is challenging due to long-tailed data distributions and the manual complexity of tuning Parameter-Efficient Fine-Tuning (PEFT) hyperparameters. We present MetaPEFT, a framework that automates hyperparameter selection through a bi-level meta-learning approach. By introducing a continuous Unified Modulator ($\gamma$), MetaPEFT transforms discrete architectural choices into a differentiable optimization problem. Our results demonstrate state-of-the-art performance across natural and remote sensing benchmarks, particularly in data-scarce and cross-spectral scenarios.

1. Introduction

Foundation models like CLIP and ViT have revolutionized computer vision, yet their deployment in specialized fields remains non-trivial. Remote Sensing (RS), for instance, presents unique challenges: data is often long-tailed, and sensors vary from optical to radar. While PEFT methods like LoRA and Adapters reduce the computational burden of adaptation, they introduce a "black art" of hyperparameter tuning. Decisions regarding module placement and scaling factors significantly impact performance but are often made through exhaustive, manual trial-and-error. MetaPEFT aims to replace this manual process with an automated, gradient-based optimization framework.

2. The MetaPEFT Framework

MetaPEFT addresses tuning challenges by automating the selection of module placement and strength. The core of the method is the Unified Modulator ($\gamma$), which controls the influence of a PEFT module within a transformer block.

The Unified Modulator ($\gamma$) integrates into the transformer block, scaling the output of the PEFT module to control its influence.

Instead of binary placement decisions, $\gamma$ is a continuous scalar that can be optimized via gradients. This is embedded in a Bi-level Optimization framework:

  • Inner Loop: The model learns the actual PEFT weights on the training data while keeping the modulators fixed.
  • Outer Loop: The model updates the modulators ($\gamma$) based on performance on a validation subset, effectively learning where adaptation is most effective.

This process is further enhanced by dynamic sampling, which regularizes the model and prevents overfitting to dominant "head" classes, forcing the framework to find settings that work for rare "tail" classes.

3. Key Insights and Empirical Analysis

Empirical analysis reveals that PEFT performance is highly sensitive to architectural choices, which MetaPEFT navigates automatically.

Heatmap of performance across different block depths and intra-block positions, highlighting the importance of middle layers and FFN placement.
  • FFN > Attention: Feed-Forward Networks (FFNs) are generally superior "landing zones" for PEFT modules compared to Attention layers, likely due to their role in local feature transformation which is crucial for domain shifts.
  • The "Middle" Matters: Performance often peaks in the middle-lower blocks (layers 3–5 of a 12-layer ViT). Tuning the deepest layers can sometimes lead to performance degradation.
  • Decoupling Rank and Scale: A linear relationship exists between LoRA rank and optimal scaling, allowing MetaPEFT to handle scaling automatically while keeping rank fixed.

4. Experimental Results

MetaPEFT consistently outperforms standard PEFT baselines. On long-tailed datasets like iNaturalist-2018, it achieves significant gains in tail-class accuracy (e.g., 81.63% vs 80.43% for vanilla LoRA). In the Remote Sensing domain, MetaPEFT excels at cross-spectral transfer (optical to radar), bridging massive domain gaps where manual tuning often fails. Remarkably, this automation adds fewer than 800 parameters to a ViT-B/16 model, representing a negligible overhead of 0.0008M parameters.

5. Conclusion

MetaPEFT effectively removes the manual bottleneck in fine-tuning foundation models. By framing hyperparameter selection as a meta-learning problem, it achieves superior adaptation with minimal overhead, paving the way for more robust deployment of large models in specialized and data-constrained domains.

Summary updated

BibTeX
@inproceedings{tian2025meta,
  author = {Zichen Tian and Yaoyao Liu and Qianru Sun},
  title = {{Meta-Learning Hyperparameters for Parameter Efficient Fine-Tuning}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.02145},
}
Figure