TL;DR
Conditionally Adaptive Multi-Task Learning (CA-MTL) introduces a parameter-efficient hypernetwork adapter framework that enables a single Transformer model to excel across dozens of NLP tasks simultaneously. By freezing half of the pretrained weights and utilizing a novel uncertainty-based data sampling strategy, CA-MTL successfully mitigates catastrophic forgetting and negative task transfer, outperforming traditional single-task fine-tuning while using a fraction of the parameters.
What Problem Does This Paper Address?
Fine-tuning massive pretrained language models (like BERT or RoBERTa) for individual downstream tasks is the standard recipe in modern NLP. However, this approach is highly parameter-inefficient, requiring an entirely separate copy of the model's weights for every single task.
Multi-Task Learning (MTL) aims to solve this by training a single shared model on multiple tasks at once. Unfortunately, standard MTL suffers from three major roadblocks:
- Negative task transfer (learning interference): Training on diverse tasks simultaneously can cause gradients to conflict, degrading overall performance.
- Catastrophic forgetting: The model often loses the rich, general linguistic knowledge it acquired during its massive pretraining phase.
- Data imbalance: High-resource tasks easily overwhelm low-resource tasks during training, leading to severe overfitting or underperformance on smaller datasets.
Existing adapter methods reduce parameter counts by inserting small trainable layers into the network, but they typically require adding isolated, non-shared parameters for every new task introduced.
Methods
The authors propose CA-MTL, a framework that combines a task-conditioned hypernetwork adapter architecture with an active-learning-inspired data loader.
- Task-Conditioned Transformer Modules: Instead of creating separate adapter modules per task, CA-MTL learns a low-dimensional task embedding ($z_i$) for each task. A single set of shared adapter weights is dynamically modulated by these embeddings using Feature-Wise Linear Modulation (FiLM).
- Conditional Attention: The standard query-key attention mechanism is augmented with a task-dependent block-diagonal bias matrix $M(z_i)$ to account for task-specific context (illustrated in Conditional Attention Module).
- Conditional Alignment & Layer Normalization: The model dynamically rescales layer normalization statistics and aligns input feature covariances across diverse tasks to reduce interference.
- Conditional Bottlenecks: Task-conditioned feed-forward bottleneck layers (CFF up/down) are integrated into the upper layers of the network or added as skip connections (illustrated in Conditional Bottleneck Architecture).
- MT-Uncertainty Sampling: To combat data imbalance, the authors introduce a task selection strategy based on normalized Shannon Entropy. The model evaluates its own uncertainty on a candidate batch of samples and dynamically prioritizes training on the tasks it finds most difficult at that exact moment.
To preserve pretrained knowledge, the bottom half of the underlying Transformer layers are kept completely frozen throughout training.
Datasets
The authors evaluated their approach across a massive suite of 26 distinct NLP tasks:
- GLUE Benchmark (9 tasks): Includes CoLA, MNLI, MRPC, STS-B, QQP, QNLI, RTE, and SST-2.
- Super-GLUE Benchmark (8 tasks): Includes BoolQ, CB, COPA, MultiRC, ReCoRD, RTE, WiC, and WSC.
- MRQA 2019 Shared Task (6 tasks): Reading comprehension datasets including SQuAD, NewsQA, TriviaQA, SearchQA, HotpotQA, and Natural Questions.
- WNUT2017: Named Entity Recognition (NER).
- SciTail & SNLI: Used to evaluate zero-shot transfer and domain adaptation capabilities.
Key Insights and Ideas
- Freezing Saves Knowledge: Keeping the bottom 50% of the pretrained Transformer layers frozen acts as an effective regularizer. It locks in basic syntactic and structural language rules, preventing the model from overwriting foundational knowledge during multi-task training.
- Dynamic Task Prioritization Beats Static Schedules: Rather than relying on fixed data-proportional ratios or rigid curriculum learning, letting the model choose tasks based on its own real-time uncertainty naturally prevents high-resource tasks (like MNLI) from washing out low-resource tasks (like CoLA).
- Shared Adapters via Latent Spaces: Projecting tasks into a continuous latent space (task embeddings) allows the hypernetwork to share structural knowledge across related tasks while maintaining distinct task-specific behaviors via weight modulation.
Key Results
- Parameter Efficiency: CA-MTL requires only 1.12x the parameters of a single base model to handle all tasks simultaneously, compared to the 24x parameter footprint required by individual single-task models.
- GLUE Performance: On the GLUE benchmark, the 8-task CA-MTL (BERT-Large) model outperformed other popular adapter methods by 2.8% and surpassed single-task fine-tuning by 1.3% on average.
- Scaling to 24 Tasks: When scaled to 24 tasks simultaneously, CA-MTL (RoBERTa-Large) outperformed single-task baselines by 1.2% on average.
- State-of-the-Art (SOTA): The 24-task model achieved a new SOTA F1 score of 58.0 on the WNUT2017 NER test set. It also matched or exceeded SOTA models on SciTail (96.8% accuracy) and SNLI (92.1% accuracy) during domain adaptation experiments.
- Faster Convergence: The MT-Uncertainty sampling method converged significantly faster than random or task-size-based sampling strategies (shown in Sampling Strategy Comparison).
Limitations and Future Work
- Layer Freezing Trade-off: The authors note that freezing 50% of the layers slightly reduces performance on the 9 GLUE tasks compared to unfreezing the entire model (0% frozen). They hypothesize this trade-off becomes net-positive only when scaling past 24 tasks, but call for more thorough exploration.
- Token-Level Tasks: While CA-MTL achieved SOTA results on the WNUT2017 NER task, it required more training cycles to close the gap with single-task baselines during early training phases, indicating that token-level sequence labeling tasks might require specialized handling within multi-task frameworks.
Summary updated