Learned Adapters Are Better Than Manually Designed Adapters

Yuming Zhang, Peng Wang, Ming Tan, Wei Zhu

Introduction

As large language models (LLMs) scale to billions of parameters, traditional full fine-tuning—updating every weight for a specific task—becomes computationally and financially prohibitive. Parameter-Efficient Fine-Tuning (PEFT) methods, such as adapters, address this by inserting small, trainable modules into a frozen backbone. However, most existing adapters rely on manually designed, uniform architectures across all layers, which is likely sub-optimal.

Presented at ACL 2023, this research introduces the Learned Adapter framework. By moving away from "one-size-fits-all" designs, the authors use Neural Architecture Search (NAS) to discover task-specific and layer-specific adapter configurations that maximize both efficiency and performance.

The Learned Adapter Framework

The core innovation lies in treating adapter design as an architecture search problem rather than a manual engineering task. The authors define a unified search space that allows for heterogeneity across different layers of the Transformer.

The Search Space

The framework defines three types of "search cells" for every layer:

  • Activation Search Cell: Selects the optimal activation function (e.g., ReLU, GeLU, Swish, Tanh, or None).
  • Encoder Search Cell: Chooses operations between projection layers, such as 1D-convolutions, multi-head self-attention, or skip connections.
  • Adapter Placement Search Cell: Determines the optimal location for the adapter—parallel to the Feed-Forward Network (FFN), parallel to the Attention module, or wrapped around the entire Transformer block.
The Learned Adapter framework defines a hierarchical search space across the transformer backbone and individual adapter components.

Gradually Discretizing NAS (GDNAS)

To navigate this search space efficiently, the authors developed GDNAS. Unlike standard Differentiable Architecture Search (DARTS), which can be unstable and often requires a separate retraining phase, GDNAS gradually "solidifies" the architecture during the search. This allows the model to retain learned knowledge, making the process faster and more robust.

Key Results and Performance

The Learned Adapter framework was evaluated primarily on the GLUE benchmark using RoBERTa-large, as well as DeBERTa-large and GPT2-large backbones.

Comparison of average performance vs. tunable parameters on the GLUE benchmark. The Learned Adapter achieves superior performance with significantly fewer parameters than many baselines.
  • Superior Accuracy: On RoBERTa-large, the Learned Adapter achieved an average GLUE score of 86.5, outperforming established baselines like LoRA (85.2), Compacter (85.8), and standard Adapters (85.6).
  • Extreme Efficiency: The method recovered 99.5% of full fine-tuning performance while updating less than 0.1% of the model's parameters.
  • Search Speed: The GDNAS process is highly efficient, requiring only about 1.2 hours on a single NVIDIA V100 GPU for the RTE task.

Insights from Learned Architectures

The search results provided several interesting insights into how adapters should be structured:

  • Layer Heterogeneity: Optimal architectures vary significantly by layer. Deeper layers often benefit from convolutional operations, while some intermediate layers (3–5 on average) perform best with no adapter at all ("Null" option).
  • Transferability: Architectures discovered for one task (e.g., RTE) often perform remarkably well when applied to others (e.g., SST-2), suggesting they capture fundamental structural requirements for efficient adaptation.
  • Activation Patterns: Many deeper layers were found to perform better without any activation function (NullAct), a configuration rarely used in manual designs.

Conclusion and Future Work

The Learned Adapter framework demonstrates that automated architecture search can significantly improve the efficiency and effectiveness of PEFT. By tailoring adapter structures to specific tasks and layers, it achieves near-full fine-tuning performance with a fraction of the parameters.

While highly effective on models up to 700M parameters, future research is needed to explore the scalability of this approach to "super-sized" models with hundreds of billions of parameters and its applicability to generative tasks like summarization and dialogue.

Summary updated

BibTeX
@inproceedings{zhang2023learned,
  author = {Yuming Zhang and Peng Wang and Ming Tan and Wei Zhu},
  title = {{Learned Adapters Are Better Than Manually Designed Adapters}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.findings-acl.468},
}
Figure