Abstract
Multi-task learning (MTL) often faces the challenge of negative transfer, where learning disparate tasks simultaneously degrades performance. While Parameter-Efficient Fine-Tuning (PEFT) methods like adapters mitigate this by using task-specific parameters, they remain rigid at the instance level. This paper introduces Hyperdecoders, a method that utilizes an encoder-conditioned hypernetwork to generate unique, instance-specific adapter layers for the decoder. By dynamically re-configuring the decoder for every input, Hyperdecoders achieve performance comparable to or exceeding full fine-tuning while utilizing only approximately 3% of trainable parameters.
Introduction
In modern Natural Language Processing (NLP), the paradigm has shifted toward multi-task learning, where a single model is expected to handle a diverse array of linguistic challenges, from sentiment classification to abstractive summarization. However, this "one-size-fits-all" approach frequently encounters "negative transfer." This phenomenon occurs when the optimization for one task interferes with the internal representations required for another, leading to a performance plateau or decline compared to single-task models.
To address this, researchers have turned to Parameter-Efficient Fine-Tuning (PEFT), specifically adapters—small bottleneck layers inserted into a frozen backbone. While effective, standard adapters are typically task-specific: every instance within a dataset is processed by the same set of adapter weights. This paper proposes Hyperdecoders, a framework that moves beyond task-level adaptation to instance-level customization.
The Problem: Rigidity and Interference
The authors identify two primary limitations in current multi-task architectures:
- Rigidity: Task-specific adapters fail to exploit nuances and similarities between individual samples that may span different datasets.
- Negative Transfer in Decoders: Forcing a shared decoder to produce wildly different output formats—such as a single class label versus a multi-sentence summary—creates significant interference.
The challenge lies in creating a model flexible enough to adapt its decoding strategy to the specific requirements of an input instance without the prohibitive computational cost of maintaining full model copies for every task.
Methodology: The Hyperdecoder Architecture
Hyperdecoders are built upon the T5 encoder-decoder architecture. The core innovation is the Encoder-conditioned Hypernetwork, which functions through a four-stage process:
- The Encoder: The input text is processed by a standard transformer encoder. This component uses "static" adapters that are shared across all tasks, allowing the model to learn a robust, general-purpose representation of the input.
- Instance Embedding: The output of the encoder is mean-pooled and passed through a small Multi-Layer Perceptron (MLP). This generates a vector e that serves as a compressed representation of the specific input instance.
- The Hypernetwork: A small, two-layer auxiliary network takes the instance embedding e as input and dynamically generates the weights for the adapter layers located in the decoder.
- Dynamic Decoding: Because the hypernetwork is conditioned on the specific encoder output, the decoder’s adapters are generated on-the-fly. This allows the decoder to "specialize" its parameters for the specific output format required, whether it is a binary classification or a complex extractive answer.
Experimental Evaluation
The authors evaluated Hyperdecoders across three distinct settings to test generalization and robustness:
- General Language Understanding (GLUE): A benchmark of eight classification tasks.
- MRQA 2019: A large-scale question-answering benchmark. The study specifically focused on both in-domain (e.g., SQuAD) and out-of-domain (e.g., BioASQ, TextbookQA) performance to measure zero-shot generalization.
- Summarization & NLI: A combination of XSum, CNN/Daily Mail, and Natural Language Inference (NLI) tasks, which are historically prone to negative transfer when trained together.
Key Insights and Results
Performance and Efficiency
Hyperdecoders demonstrated remarkable efficiency, matching or exceeding full fine-tuning while training only 2.9% of the total parameters. On the GLUE benchmark, Hyperdecoders achieved an average score of 86.5, compared to 86.3 for full fine-tuning.
The most significant gains were observed in the MRQA Out-of-Domain tests. Hyperdecoders achieved a 60.2 F1 score, outperforming both full fine-tuning (58.8) and standard task-specific adapters (59.8). This suggests that instance-specific adaptation is particularly powerful for generalizing to unseen data distributions.
Decoder Flexibility vs. Encoder Stability
Ablation studies revealed that placing dynamic adapters in the decoder is significantly more effective than placing them in the encoder. The encoder benefits from shared multi-task knowledge to understand the input, while the decoder requires high flexibility to "steer" the generation toward the correct output space.
Label Space Mapping
By visualizing the embeddings produced by the encoder, the authors found that these vectors cluster by predicted label rather than by dataset. This indicates that the hypernetwork effectively learns to configure the decoder based on the type of answer it needs to produce, effectively mitigating interference between tasks with different output requirements.
Conclusion and Future Work
Hyperdecoders offer a compelling solution for high-performance multi-tasking. By allowing a model to "re-wire" its decoder for every instance, the architecture avoids the pitfalls of negative transfer while maintaining extreme parameter efficiency.
Future research directions include addressing the information bottleneck caused by mean-pooling long documents, exploring the scalability of hypernetworks when faced with thousands of tasks, and extending the framework to multilingual contexts. For now, Hyperdecoders represent a significant step toward models that don't just learn tasks, but learn how to adapt themselves to the specific needs of every input.
Summary updated