Task Compass: Scaling Multi-task Pre-training with Task Prefix

Zhuosheng Zhang, Shuohang Wang, Yichong Xu, Yuwei Fang, Wenhao Yu, Yang Liu, Hai Zhao, Chenguang Zhu, Michael Zeng

Introduction

In the development of Large Language Models (LLMs), the prevailing philosophy is that more data leads to better performance. However, when scaling Multi-Task Learning (MTL) to include dozens or hundreds of diverse supervised tasks—ranging from legal document classification to mathematical reasoning—researchers often encounter "negative transfer." This phenomenon occurs when conflicting signals from disparate tasks interfere with the model's ability to learn a cohesive representation, effectively creating a bottleneck in performance.

To address this, the authors introduce Task Compass, a framework designed to navigate the complex landscape of task relationships. By utilizing simple task prefixes and a novel masking strategy, the system identifies which tasks are complementary and which are detrimental, enabling more efficient and effective multi-task pre-training.

The CompassMTL Framework

The researchers propose CompassMTL, a framework that shifts away from the common text-to-text generative format in favor of a more efficient discriminative approach for Natural Language Understanding (NLU). The methodology consists of several key components:

  1. Unified Multiple-Choice Format: To leverage a discriminative encoder-only backbone (specifically DeBERTa-V3), the authors convert 40 diverse datasets into a standardized multiple-choice format. This allows the model to focus on discriminative accuracy, which is often more efficient for NLU tasks than generative modeling.
  2. Task Prefixes: Every input is prepended with a specific token indicating its source dataset (e.g., [sciq]: A wetland is...).
  3. The Task Compass Mechanism: During the pre-training phase, the model is not only tasked with predicting masked words but also with predicting randomly masked task prefixes. To successfully recover a missing prefix, the model must learn the unique underlying patterns and "flavor" of that specific dataset.
  4. Relationship Probing: The learned embeddings of these task prefixes serve as a mathematical map. By calculating a correlation matrix of these embeddings, the researchers can visualize the "Task Compass," identifying clusters of tasks that share high similarity.
  5. Task Tailoring: Using insights from the compass, the authors can move beyond a noisy "fullset" training approach. Instead, they select a "Tailor" subset—a curated group of complementary tasks—to optimize performance for specific target domains.

Experimental Setup and Datasets

The study evaluates the framework using a massive collection of 40 datasets categorized into several distinct families:

  • General NLU: Standard benchmarks from the GLUE suite (e.g., MNLI, QNLI).
  • Commonsense Reasoning: The Rainbow suite, including $\alpha$NLI, HellaSwag, and PIQA.
  • Specialized Domains: Legal tasks from LexGLUE (SCOTUS, ECtHR) and biomedical datasets (RCT).
  • Question Answering: Multiple-choice sets such as DREAM, SciQ, and ARC.

Key Insights and Results

Task Interference is a Scaling Bottleneck

The authors confirmed that "more isn't always merrier." Training on the complete set of 40 tasks often yielded worse results than training on a carefully selected "Tailor" subset of 14 related tasks. This highlights the critical need for intelligent task selection in large-scale MTL.

Achieving Human Parity

CompassMTL demonstrated exceptional performance on commonsense reasoning benchmarks. It achieved results on par with human performance on the HellaSwag (95.94%) and $\alpha$NLI (92.80%) leaderboards. On the overall Rainbow benchmark, CompassMTL reached an average of 89.7%, significantly outperforming T5-based models like ExT5 (84.1%) and previous state-of-the-art models like UNICORN (80.4%).

Cross-Format Generalization

Despite being pre-trained exclusively on multiple-choice data, the representations learned by CompassMTL proved highly robust. When fine-tuned on entirely different formats—such as Named Entity Recognition (NER) or extractive Question Answering (SQuAD)—the model continued to outperform established baselines, suggesting that the Task Compass helps the model learn fundamental linguistic features.

Conclusion and Future Directions

Task Compass provides a simple yet powerful data-centric method for managing task interference in multi-task pre-training. By forcing the model to identify the "task space" it is operating in, CompassMTL achieves superior NLU performance with a relatively efficient encoder-only architecture.

While the current work focuses on NLU, future research may explore applying the Task Compass mechanism to Encoder-Decoder models (like T5) to benefit generative tasks. Additionally, the authors suggest that automating the selection of optimal training mixtures and adapting the framework for continual learning—where new tasks are added over time—remain important areas for further investigation.

Summary updated

BibTeX
@inproceedings{zhang2022task,
  author = {Zhuosheng Zhang and Shuohang Wang and Yichong Xu and Yuwei Fang and Wenhao Yu and Yang Liu and Hai Zhao and Chenguang Zhu and Michael Zeng},
  title = {{Task Compass: Scaling Multi-task Pre-training with Task Prefix}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.findings-emnlp.416},
}
Figure