TL;DR
This paper introduces ALTER, a system that enhances small language models (SLMs) to become effective multi-task learners. It achieves this by employing a novel Mixture-of-Task-Adapters (MTA) module and a two-stage training strategy, allowing SLMs to capture task-specific knowledge while remaining computationally efficient.
What Problem Does This Paper Address?
Large Language Models (LLMs) have demonstrated remarkable zero-shot learning capabilities across various Natural Language Processing (NLP) tasks. However, their immense size poses significant challenges in terms of computational cost for training and deployment, especially for resource-constrained environments or domain-specific applications. Furthermore, decoder-only LLMs can struggle with tasks requiring a limited output space, like text classification. This paper aims to bridge this gap by enabling smaller, more manageable language models to achieve strong multi-task performance without the prohibitive costs of LLMs.
Methods
The core of the ALTER system is the Mixture-of-Task-Adapters (MTA) module. This module is designed as a lightweight extension to the transformer architecture, specifically replacing the Feed-Forward Network (FFN) layer. The MTA module consists of:
- Parallel Adapters: These are individual adapter blocks, each potentially specializing in a different task.
- Task Weight Selector: This component learns to assign weights to the parallel adapters, guiding the model to leverage the most relevant adapter for a given task.
ALTER employs a two-stage training strategy to optimize the MTA module:
- First-Stage Training: This stage focuses on establishing a correspondence between tasks and adapters. The entire model is fine-tuned, with a bias introduced in the Task Weight Selector's initialization to encourage task-adapter alignment. A "Softmax-T" function is used to amplify this bias. The input is processed at the sentence level, not token level, to better capture sentence semantics.
- Second-Stage Training: This stage aims to refine the collaboration between adapters. It introduces a shared adapter module and a gate network. All parameters except those in the MTA module are frozen. The gate network learns to generate adaptive weights, further improving the collaborative relationships among adapters by leveraging "[START]" information. This stage uses a top-K selection mechanism to mitigate direct interference between tasks while a shared adapter facilitates information interaction.
Datasets
The paper uses a mixture of common NLP tasks to construct multi-task datasets for training and evaluation. These include:
- Text Classification: CR, MR, SST-2, TREC
- Natural Language Inference: SNLI
- Question Answering (text generation): SQUAD
The authors also mention training domain-specific MTA-equipped models, citing a medical domain instruction-tuning dataset in Chinese (PromptCBLUE) as an example.
Key Insights and Ideas
- SLMs can be powerful multi-task learners: The research demonstrates that with the right architecture and training strategy, smaller models can achieve competitive performance on a range of NLP tasks.
- Task-specific adapters are key: The MTA module effectively allows models to learn both commonalities and differences across tasks by dedicating specific adapter components.
- Two-stage training is crucial for collaboration: The proposed two-stage approach effectively balances learning task-specific knowledge with fostering collaboration between adapters, leading to improved performance.
- Sentence-level processing is beneficial: Moving away from token-level processing in MoE models to sentence-level input for MTA improves the model's ability to capture overall sentence semantics.
- Domain-specific applications are feasible: The success in the medical domain highlights the potential of ALTER for creating specialized, efficient models for various real-world applications.
Key Results
- ALTER achieves higher overall results compared to baseline models like BART, GPT-2, and Switch Transformers on a mixed multi-task test set.
- The proposed MTA approach, when applied to T5-base and T5-large models, outperforms the full implementation of T5 and vanilla fine-tuning. For instance, "Ours-Base" achieves 93.26% in Classification, 86.34% in NLI, and 81.28% in QA, surpassing "T5-Base" (92.47%, 84.78%, 80.00%).
- The two-stage training method is shown to be more effective than a single-stage approach or training without parameter freezing in the second stage.
- ALTER demonstrates performance comparable to ChatGPT (evaluated in zero-shot) on some tasks, even when using smaller models. The paper notes that for ChatGPT, they relaxed scoring criteria to include answer words as long as they were correct.
Limitations and Future Work
- Computational Cost: While significantly more efficient than LLMs, the paper focuses on making SLMs better multi-task learners. The absolute computational cost of training and inference for these SLMs is not the primary focus of comparison against LLMs, but rather their relative efficiency and performance.
- Domain-Specific Models: The paper mentions training domain-specific models and showcasing their value, but a deeper dive into the specific challenges and successes of these domain-specific applications might be a future direction.
- Further Exploration of Collaboration: While the second stage improves collaboration, the paper suggests that further exploration of how to optimize these collaborative relationships could yield even better results.
Summary updated