Parameter-Efficient Fine-Tuning With Adapters

Keyu Chen, Yuan Pang, Zi YangarXiv 2024 · DOI

Abstract

Fine-tuning massive language models is traditionally a resource-intensive process, requiring the update of millions of parameters. This paper explores the UniPELT framework—specifically enhanced with a Prompt Tuning layer—to achieve performance comparable to full-model fine-tuning while training only approximately 9% of the total parameters. This approach proves particularly effective for adapting models to specialized domains, such as Computer Science and Biomedicine, where vocabulary significantly diverges from general pre-training data.

Introduction: The Parameter-Efficiency Gap

Standard methods for adapting language models to specific domains or tasks, such as Domain-Adaptive Pretraining (DAPT) and Task-Adaptive Pretraining (TAPT), are computationally expensive. These methods require updating every weight in a model, demanding substantial GPU memory and storage for each new task. This paper addresses whether it is possible to reach the high performance of DAPT/TAPT without this massive overhead. Specifically, the authors investigate how "adapters"—small, trainable modules inserted into a frozen model—can be optimized and stacked to handle diverse tasks ranging from general sentiment analysis to specialized scientific document classification.

Methodology: The UniPELT Framework

The researchers utilize the UniPELT framework, a versatile tool for parameter-efficient learning that combines three distinct adapter types:

  1. LoRA (Low-Rank Adaptation): Approximates weight updates using low-rank matrices.
  2. Prefix Tuning: Adds trainable tensors to the input of each transformer layer.
  3. SeqBn (Bottleneck Adapters): Inserts small feed-forward networks after transformer layers.

The authors introduced several architectural modifications to this stack:

  • PT + UniPELT: Adds a Prompt Tuning layer on top of the UniPELT stack to "steer" the model's inference direction.
  • IA3 Integration: Replaces LoRA with IA3, which scales activations by learned vectors, to further reduce the parameter count.
  • UniPELT Stack: Explores whether stacking three layers of UniPELT ("deeper" adaptation) yields better results.

The backbone model used was RoBERTa-Base, implemented via the Adapters library.

Experimental Setup

The study evaluates performance across three major benchmarks:

  • GLUE (General Language Understanding Evaluation): Eight tasks (e.g., SST-2, MNLI, CoLA) testing general linguistic competence.
  • Domain-Specific Datasets: Four areas—Biomedicine, Computer Science, News, and Reviews—testing the model's handling of specialized jargon.
  • SQuAD 1.1 (Stanford Question Answering Dataset): A machine comprehension benchmark with over 100,000 question-answer pairs.

Discussion and Key Insights

  • The Vocabulary Overlap Rule: Adapters provide the most significant gains when the target domain has low vocabulary overlap with the original pre-training data. For instance, in Computer Science (CS), F1 scores increased from 63.0 to 82.1. In the News domain, where overlap is high, gains were marginal.
  • Stacking Diminishing Returns: Stacking more adapters (the "Stack 3" approach) tripled the parameter count but rarely improved performance over the single-layer version, suggesting that structural synergy is more critical than raw parameter volume.
  • Prompt Tuning as a "Steering Wheel": Adding Prompt Tuning to UniPELT was highly effective for small, specialized datasets (like ACL-ARC), acting as a lightweight guide for the model.
  • The "Alpha" Bug: The authors identified a discrepancy in the Adapters library where the LoRA alpha parameter was incorrectly set. Correcting this was essential for replicating baseline results.

Key Results

Efficiency and Parameter Count

The proposed PT + UniPELT method demonstrated remarkable efficiency, utilizing only 11.09 million trainable parameters—just 8.89% of RoBERTa-Base's 124.6 million—while maintaining competitive performance.

Comparison of trainable parameters across different adaptation methods.

Performance Benchmarks

  • GLUE: Full fine-tuning achieved an average score of 86.35. The PT + UniPELT method trailed closely at 85.66, despite using a fraction of the resources.
  • Domain Adaptation: In specialized tasks, adapters often outperformed standard fine-tuning. On the ACL-ARC (Computer Science) task, the adapter approach reached an F1 of 82.10, significantly surpassing the standard fine-tuning score of 63.0.
Performance of various methods across domain-specific tasks.
  • SQuAD: While adapters performed well (90.23 F1), they did not reach the full fine-tuning baseline (94.6 F1), suggesting that complex extractive tasks may still benefit from full-model updates.

Conclusion: Limitations and Future Work

While PT + UniPELT excelled at classification, it underperformed on SQuAD by 1.5% compared to standalone UniPELT, indicating that the optimal adapter architecture is task-dependent. Additionally, while parameter-efficient, the inclusion of multiple adapter layers can increase inference latency. Future research should explore architectural configurations that enhance performance without increasing overhead and investigate why certain adapters struggle with the nuances of question-answering tasks.

Summary updated

BibTeX
@misc{chen2024parameter,
  author = {Keyu Chen and Yuan Pang and Zi Yang},
  title = {{Parameter-Efficient Fine-Tuning With Adapters}},
  year = {2024},
  eprint = {2405.05493},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2405.05493},
}
Figure