Adaptable Adapters

Nafise Sadat Moosavi, Quentin Delfosse, Kristian Kersting, Iryna Gurevych

Introduction

Large Language Models (LLMs) have revolutionized NLP, but their scale makes full fine-tuning computationally expensive. Neural adapters—small bottleneck layers inserted into frozen pretrained models—offer a parameter-efficient alternative. However, standard adapters typically employ a "one-size-fits-all" approach, placing identical layers across all levels of a transformer and using fixed activation functions. This rigidity often leads to redundancy and suboptimal performance.

This paper introduces Adaptable Adapters (AA), a framework that automatically learns which layers require adapters and identifies the optimal activation functions for specific tasks. By introducing architectural flexibility, AA achieves significant performance gains, particularly in low-data scenarios, while reducing the adapter parameter count by approximately 50%.

Methodology: Learnable Flexibility

The Adaptable Adapters framework introduces two primary innovations to the standard adapter architecture:

1. Learnable Layer Selection

Rather than inserting an adapter at every layer, AA employs a Gumbel Softmax switch. This differentiable "hard attention" mechanism allows the model to choose between utilizing an adapter or an identity function (skipping the adapter) during training. This enables the model to identify "beneficial" layers for a given task.

Gumbel Softmax mechanism for learnable layer selection

2. Rational Activation Functions

Instead of fixed non-linearities like ReLU, AA utilizes Rational Activations (Padé Activation Units). These are learnable functions defined as the ratio of two polynomials. They can approximate standard functions or evolve into entirely new shapes tailored to the specific data distribution and layer depth.

Following the initial search phase, the authors propose AA-focused models. These are leaner architectures that retain only the selected layers and learned activations, significantly improving inference efficiency.

Experimental Setup

The framework was evaluated on the GLUE benchmark, covering a diverse range of NLU tasks including sentiment analysis (SST-2), linguistic acceptability (CoLA), and natural language inference (MNLI, QNLI, RTE). To test robustness, experiments were conducted across multiple data scales: Full Data and Low-data settings (100, 300, and 500 training examples).

Key Results and Insights

The experimental results highlight several critical advantages of the Adaptable Adapter approach:

  • Superiority in Low-Data Regimes: AA-focused models significantly outperform standard adapters when data is scarce. In the "Low-data-100" setting, the AA-focused model achieved an average score of 51.28, a substantial improvement over the baseline adapter's 44.87.
  • Efficiency and Parameter Reduction: AA-focused models typically utilize only ~13 layers (compared to 24 in BERT-large), effectively halving the adapter-related parameter count and inference overhead while maintaining performance parity on full datasets.
  • Layer Importance Trends: The model consistently prioritized adapters in later transformer layers. This suggests that deeper layers, which handle task-specific semantics, benefit more from adaptation than earlier layers that capture general linguistic features.
  • Architecture Transferability: Architectures discovered for one task often generalize well to others, suggesting that the "search" phase may not be necessary for every new dataset.
Performance comparison across low-data and full-data regimes

Conclusion and Future Work

Adaptable Adapters demonstrate that architectural flexibility is key to efficient and effective model adaptation. By learning layer placement and activation shapes, AA provides a more nuanced approach than static adapters.

While the initial search phase introduces some training overhead, the resulting "focused" models are faster and more storage-efficient, making them ideal for edge deployment. Future research could explore scaling these techniques to even larger models and further optimizing the search process to reduce initial computational costs.

Summary updated

BibTeX
@inproceedings{moosavi2022adaptable,
  author = {Nafise Sadat Moosavi and Quentin Delfosse and Kristian Kersting and Iryna Gurevych},
  title = {{Adaptable Adapters}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.naacl-main.274},
}
Figure