HydraOpt: Navigating the Efficiency-Performance Trade-off of Adapter Merging

Taha Ceritli, Ondrej Bohdal, Mete Ozay, Jijoong Moon, Kyeng-Hun Lee, Hyeonmok Ko, Umberto Michieli · DOI

Introduction

Large Language Models (LLMs) are increasingly customized for specific tasks using Parameter-Efficient Fine-Tuning (PEFT) methods like LoRA. While LoRA is efficient, storing a unique adapter for every task—such as grammar correction, summarization, or multi-language support—creates significant storage overhead. This poses a major challenge for "on-device" AI applications on smartphones or IoT devices where memory is constrained.

Existing model merging solutions, such as Task Arithmetic or TIES, attempt to consolidate multiple adapters into one. However, these methods typically offer a fixed, non-adjustable trade-off: significant space savings at the cost of unpredictable performance degradation. HydraOpt addresses this by providing a controllable, data-free merging technique that allows developers to precisely tune the balance between storage efficiency and model performance.

Methodology

HydraOpt introduces a "Hydra" architecture for merged adapters, consisting of a Shared Body ($A'$) and Multiple Heads ($B'$). This design is based on the observation that in LoRA, the $A$ matrices (projecting inputs to a lower dimension) capture general features and remain similar across tasks, while the $B$ matrices (projecting back to the original dimension) specialize to specific tasks.

The merging process is data-free, requiring only the weights of the existing LoRA adapters. HydraOpt treats these weights as "pseudo-labels" and employs an iterative optimization loop using Gradient Descent. The goal is to find the optimal shared $A'$ and specialized $B'$ heads that most closely approximate the original updates by minimizing the Mean Absolute Error. By adjusting the number of specialized heads ($M$), developers can navigate the efficiency-performance spectrum.

Key Insights: Matrix Asymmetry

The foundational insight of HydraOpt is the asymmetric behavior of LoRA matrices. Empirical analysis shows that $A$ matrices across different tasks exhibit high pairwise similarity, suggesting they are "safe" to merge into a single shared component. In contrast, $B$ matrices show much lower similarity, indicating they retain task-specific information necessary for performance.

Average pairwise similarity of LoRA A and B matrices across layers, demonstrating that A matrices are significantly more similar across tasks than B matrices.

Experimental Evaluation

The authors evaluated HydraOpt across 40 tasks spanning five applications (Grammar Correction, Smart Reply, Text Summarization, Tone Adjustment, and Question Answering) and eight languages. The method was tested on various model families, including Llama 3.2, Gemma 2, and Phi-3.5.

Key Results

HydraOpt consistently outperforms traditional merging baselines. In a 5-way merge of English tasks, it reduced storage requirements by approximately 48% with a negligible performance drop of only 0.2–1.8%.

Performance vs. parameter percentage trade-off. HydraOpt provides a controllable curve that outperforms fixed-point baselines like TIES and DARE.

As shown in the results, HydraOpt provides a spectrum of choices. Unlike traditional methods that offer a single data point, HydraOpt allows for incremental performance gains if additional memory is available. Furthermore, the method demonstrated strong robustness in language generalization, maintaining high performance when merging adapters across eight different languages for the same task.

Conclusion and Future Work

HydraOpt offers a practical solution for managing the storage overhead of task-specific adapters in LLMs. By exploiting the inherent asymmetry in LoRA matrices and utilizing a data-free optimization approach, it enables a controllable trade-off between efficiency and accuracy.

While HydraOpt significantly reduces storage, it does not currently reduce the computational cost of inference. Future research may explore extending this approach to cross-modal tasks or developing "data-driven" variants that could further enhance performance when small amounts of task-specific data are available.

Summary updated

BibTeX
@inproceedings{ceritli2025hydraopt,
  author = {Taha Ceritli and Ondrej Bohdal and Mete Ozay and Jijoong Moon and Kyeng-Hun Lee and Hyeonmok Ko and Umberto Michieli},
  title = {{HydraOpt: Navigating the Efficiency-Performance Trade-off of Adapter Merging}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2025},
}
Figure