AdapterFusion is a two-stage parameter-efficient fine-tuning method that first trains multiple independent task-specific adapters and then learns to dynamically combine their outputs via a weighted composition layer for a new target task. This approach enables knowledge transfer from multiple source domains while keeping the base model frozen, avoiding catastrophic forgetting and leveraging diverse expertise. The fusion layer learns which adapters to activate and how to weight their contributions for each input.
Glossary
AdapterFusion

What is AdapterFusion?
A technique for combining knowledge from multiple pre-trained adapters to solve new tasks without training from scratch.
The method separates knowledge acquisition (adapter training) from knowledge composition (fusion learning), allowing efficient reuse of existing adapters from repositories like AdapterHub. This makes AdapterFusion highly effective for multi-task learning and cross-lingual transfer, as it can fuse language, domain, and task adapters. It provides a more flexible and powerful alternative to simple adapter stacking or adapter merging, introducing minimal new parameters compared to full model fine-tuning.
Key Features of AdapterFusion
AdapterFusion is a two-stage, parameter-efficient method that first trains task-specific adapters and then learns to combine them for a new target task.
Two-Stage Training Paradigm
AdapterFusion operates in two distinct, sequential phases to maximize knowledge transfer and composition.
Stage 1: Knowledge Extraction
- Multiple task-specific adapters are trained independently on diverse source tasks (e.g., sentiment analysis, natural language inference).
- The base model's parameters remain frozen.
- This stage captures specialized knowledge in discrete, modular components.
Stage 2: Knowledge Composition
- A new fusion layer is trained on the target task data.
- This layer learns to compute a context-dependent, weighted combination of the frozen adapters' outputs.
- Only the fusion layer's parameters are updated, keeping both the base model and all pre-trained adapters frozen.
Dynamic, Context-Aware Weighting
The core innovation is a learned mechanism that dynamically blends adapter outputs for each input.
- A fusion layer (a small neural network) computes attention-like weights for each pre-trained adapter.
- Weights are input-dependent, meaning the composition strategy changes based on the current example's context.
- For a question-answering input, the system might weight a commonsense reasoning adapter highly, while for sentiment, it would prioritize a sentiment analysis adapter.
- This is more flexible than static averaging or concatenation, allowing the model to specialize its knowledge retrieval per instance.
Parameter Efficiency & Catastrophic Forgetting Mitigation
The architecture is designed for extreme efficiency and stability.
Minimal New Parameters
- Adds only the parameters for the fusion layer (e.g., a query network and value matrices).
- This is a tiny increment on top of the already parameter-efficient adapters.
Prevention of Catastrophic Forgetting
- Because source adapters are frozen during the fusion stage, their task-specific knowledge is perfectly preserved.
- The fusion layer learns to leverage this knowledge without overwriting it.
- This makes AdapterFusion ideal for continual learning and multi-task learning scenarios where preserving past capabilities is critical.
Compositional Transfer Learning
Enables the model to solve new tasks by recombining existing skills, a form of meta-learning.
- The target task does not need to be closely related to any single source task.
- The model can solve it by composing relevant sub-skills from different adapters.
- Example: A target task like "detecting sarcasm" might be addressed by combining knowledge from adapters trained on:
- Sentiment Analysis (understanding polarity)
- Natural Language Inference (understanding contradiction)
- Commonsense Reasoning (understanding implied meaning)
- This moves beyond single-task adaptation towards building a reusable library of skills.
Distinction from Adapter Stacking & Merging
AdapterFusion is fundamentally different from simpler composition techniques.
Adapter Stacking: Places adapters sequentially; the input passes through one adapter, then the next. This can lead to cascading errors and makes the adapters dependent on each other's internal representations.
Adapter Merging: Averages the weights of multiple adapters to create a single, static adapter. This loses the dynamic, input-specific weighting capability.
AdapterFusion keeps adapters parallel and independent. Their outputs are combined after they have processed the shared base model activation, preserving their individual integrity and enabling dynamic selection.
Computational Overhead & Trade-offs
Introduces a predictable, manageable cost for enhanced capabilities.
Inference Overhead:
- Requires a forward pass through all relevant frozen adapters for a given input, plus the small fusion layer.
- This is more expensive than using a single adapter but far cheaper than fine-tuning the full model or running multiple models in ensemble.
Design Trade-off:
- The benefit is composable, reusable knowledge.
- The cost is increased latency and memory during inference proportional to the number of fused adapters.
- Techniques like AdapterDrop can be applied to prune less-critical adapters dynamically to mitigate this overhead.
AdapterFusion vs. Other Composition Methods
A technical comparison of strategies for combining multiple pre-trained adapters to perform a new task, focusing on architectural approach, parameter efficiency, and knowledge transfer capabilities.
| Feature / Metric | AdapterFusion | Adapter Stacking | Adapter Merging (Averaging) | Mixture-of-Adapters (MoA) |
|---|---|---|---|---|
Core Mechanism | Learns a weighted combination of adapter outputs via a fusion layer | Sequentially executes multiple adapters in a fixed, predefined order | Averages the weight matrices of multiple adapters into a single module | Uses a learned router to dynamically select or weight adapters per input |
Trainable Parameters for Composition | Only the fusion layer parameters (e.g., attention weights) | All parameters of the newly stacked adapter(s) | Zero (post-hoc, non-trainable operation) | Router network parameters |
Knowledge Transfer Type | Selective, context-aware combination | Sequential, potentially hierarchical processing | Static, uniform blending | Input-conditional, dynamic selection |
Preserves Original Task Performance | Yes (base adapters remain frozen) | No (risk of catastrophic forgetting if stacked adapters are trained) | Yes (if merging is lossless) | Yes (experts remain frozen) |
Computational Overhead at Inference | Low (small fusion layer) | High (scales with number of stacked adapters) | Low (single merged adapter) | Moderate (router computation + selected adapter(s)) |
Handles Conflicting Adapter Knowledge | Yes (fusion layer can learn to suppress or balance) | Poor (later adapters can override earlier ones) | Poor (averaging can dilute specialized features) | Yes (router can avoid conflicting experts) |
Typical Use Case | Multi-task learning, leveraging diverse expert adapters | Sequential task adaptation (e.g., domain -> task) | Creating a multi-task adapter from existing ones | Large-scale systems with many task/domain experts |
Requires Task-Specific Training Data for New Task | Yes (to train the fusion layer) | Yes (to train the new stacked adapter) | No (purely a post-training operation) | Yes (to train the router) |
AdapterFusion Use Cases
AdapterFusion enables a single model to leverage expertise from multiple pre-trained adapters. These cards detail its primary applications for efficient, multi-task learning.
Multi-Task Learning & Knowledge Composition
AdapterFusion's core use case is multi-task learning where a model must perform well on a new task by composing knowledge from several existing ones. Instead of training a monolithic model, you train lightweight task-specific adapters (e.g., for sentiment analysis, named entity recognition, and natural language inference) and then use AdapterFusion to learn an optimal, weighted combination of their outputs for a target task like question answering. This approach:
- Preserves modular expertise: Each adapter remains a reusable, isolated skill module.
- Enables cross-task transfer: The fusion layer learns how to blend relevant knowledge, often outperforming models trained on the target task from scratch.
- Avoids catastrophic forgetting: The base model and source adapters remain frozen, preserving their original capabilities.
Cross-Domain Adaptation
This technique is powerful for adapting a general-purpose language model to specialized enterprise domains like legal, biomedical, or financial text. You first train domain adapters on large corpora from each target domain (e.g., a legal corpus adapter, a medical paper adapter). AdapterFusion then learns to dynamically combine these domain-specific representations when processing inputs from a new, related domain or a mixed-domain task. For instance, a model analyzing pharmaceutical patents could fuse knowledge from both legal and biomedical adapters to understand the technical and regulatory language.
Continual & Lifelong Learning
AdapterFusion provides an elegant framework for continual learning, where a model must learn a sequence of tasks over time without forgetting previous ones. The standard process is:
- For each new task, train a new task-specific adapter, leaving prior adapters and the base model untouched.
- When a new task arrives that requires knowledge from previous tasks, apply AdapterFusion to learn a composition of the relevant historical adapters. This method decouples task learning from task composition, preventing catastrophic interference because the parameters for old tasks are never overwritten. The fusion layer acts as a flexible controller that reactivates past knowledge as needed.
Resource-Efficient Model Personalization
In scenarios requiring personalized models for different users, clients, or datasets, AdapterFusion offers a scalable alternative to training separate full models. User-specific or client-specific adapters can be trained on private data. A central fusion model can then be deployed that learns to select and weight these personalized adapters based on user context or metadata. This is far more storage and compute-efficient than maintaining thousands of fine-tuned full models, as only the small adapters and a single fusion network need to be managed and served.
Mitigating Negative Interference in Adapter Stacking
A naive way to use multiple adapters is to stack them sequentially, but this can cause negative interference where later adapters degrade the features learned by earlier ones. AdapterFusion addresses this by learning a parallel, weighted combination of adapter outputs. The fusion mechanism evaluates the contribution of each adapter's hidden representations at every layer, allowing the model to suppress irrelevant or conflicting signals and amplify complementary ones. This results in more stable and performant multi-adapter models compared to simple sequential stacking or averaging.
Building Modular AI Systems
AdapterFusion promotes a modular AI design philosophy. Different teams can independently develop and train adapters for specific capabilities (e.g., code generation, SQL querying, safety filtering). These adapters become plug-and-play components in a repository like AdapterHub. A system architect can then use AdapterFusion to integrate these pre-validated modules into a cohesive system for a complex application, such as an agent that writes, debugs, and documents code. This accelerates development, improves maintainability, and allows for hot-swapping components as better adapters become available.
Frequently Asked Questions
Common technical questions about AdapterFusion, a method for composing knowledge from multiple pre-trained adapters.
AdapterFusion is a two-stage parameter-efficient fine-tuning (PEFT) technique that learns to combine the outputs of multiple pre-trained, task-specific adapters to perform a new, unseen task. First, individual adapters are trained independently on different source tasks while the base model remains frozen. Second, for the target task, these pre-trained adapters are kept frozen, and a new fusion layer is trained. This layer learns to compute a weighted combination (e.g., via attention) of the hidden state outputs from all the source adapters, dynamically integrating their knowledge for each input.
- Stage 1: Knowledge Acquisition: Train N separate adapters on N diverse source tasks (e.g., sentiment analysis, natural language inference).
- Stage 2: Knowledge Composition: Freeze all adapters and the base model. Train only the fusion parameters to combine adapter outputs optimally for the target task (e.g., question answering).
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
AdapterFusion builds upon a family of techniques centered on inserting small, trainable modules into a frozen base model. These related concepts define the architectural components, training paradigms, and operational strategies within the adapter ecosystem.
Adapter
An adapter is a small, trainable neural network module inserted into a frozen pre-trained model to efficiently adapt it to a new task or domain. It acts as a lightweight plugin, allowing the model to learn new capabilities without modifying its original, foundational knowledge.
- Core Concept: The fundamental building block for adapter-based PEFT.
- Function: Processes the model's intermediate activations and adds its output back via a residual connection.
- Benefit: Enables task-specific adaptation while preserving the general-purpose knowledge of the large base model.
Adapter Tuning
Adapter tuning is the process of fine-tuning a pre-trained model by training only the parameters of inserted adapter modules while keeping all original model weights frozen. This is the foundational training procedure that creates task-specific or domain-specific adapters.
- Training Paradigm: Only the adapter parameters (typically <1% of the total model) are updated during backpropagation.
- Efficiency: Drastically reduces memory footprint and computational cost compared to full fine-tuning.
- Outcome: Produces a compact, reusable adapter file that can be attached to or detached from the base model.
Task-Specific Adapter
A task-specific adapter is an adapter module trained via adapter tuning to adapt a base model to perform a particular downstream task, such as sentiment analysis, named entity recognition, or text classification. AdapterFusion uses a collection of these as its source of pre-trained knowledge.
- Purpose: Encodes expertise for a single, well-defined objective.
- Example: A
sentiment-adaptertrained on product reviews, or anNER-adaptertrained on biomedical literature. - Input to AdapterFusion: Serves as one of the expert components whose outputs are fused for a new, related task.
Adapter Composition
Adapter composition refers to the general strategy of combining multiple pre-trained adapter modules to handle complex or composite tasks. AdapterFusion is a specific, learned form of composition, but other simpler strategies exist.
- Sequential Stacking: Running activations through one adapter after another (e.g., a language adapter followed by a task adapter).
- Parallel Application: Applying different adapters to different parts of the model architecture.
- Static vs. Learned: Composition can be heuristic (e.g., averaging outputs) or learned, as in AdapterFusion's attention-based weighting mechanism.
Mixture-of-Adapters (MoA)
Mixture-of-Adapters (MoA) is an architecture where multiple adapter modules are available within a model, and a routing mechanism dynamically selects or combines them for each input. It shares conceptual ground with AdapterFusion but differs in integration and timing.
- Dynamic Routing: A gating network decides which adapter(s) to use per input token or sequence.
- Sparsity: Often employs sparse activation (only a few experts active) for efficiency.
- Key Difference: MoA typically integrates routing within the forward pass of a single model, while AdapterFusion is a separate, secondary training stage that combines outputs from fully independent pre-trained adapters.
Adapter Merging
Adapter merging is a technique to combine the weights of multiple task-specific adapters, often via simple arithmetic operations like averaging, to create a single adapter capable of performing multiple tasks. It is a model-level fusion alternative to AdapterFusion's output-level fusion.
- Process: The weight matrices of several adapters are averaged to produce a unified adapter.
- Advantage: Zero inference overhead compared to the base model + a single adapter.
- Trade-off vs. AdapterFusion: Simpler and faster at inference but may struggle with task interference, whereas AdapterFusion's learned composition can more intelligently balance conflicting knowledge.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us