What to Pre-Train on? Efficient Intermediate Task Selection

Clifton Poth, Jonas Pfeiffer, Andreas Rücklé, Iryna Gurevych

Abstract

Intermediate task fine-tuning (STILTs) can significantly improve performance on target NLP tasks, yet selecting an optimal "donor" task remains a computationally expensive challenge. This study evaluates several efficient selection methods across 53 tasks, demonstrating that simple sentence embeddings (SEmb) can identify top-performing intermediate datasets with 99% of optimal performance. We find that task-type matching is a primary driver of success and that negative transfer is a frequent risk, occurring in nearly half of all tested combinations for certain architectures.

Introduction

In modern NLP, the standard pipeline involves pre-training on massive raw text followed by fine-tuning on a specific target task. An increasingly popular "middle step" is intermediate task fine-tuning, where a model is trained on a secondary, often larger, dataset before the final target task. While this can yield substantial gains, it introduces a "combinatorial explosion": with hundreds of potential donor tasks and various architectures, testing every combination is infeasible. Moreover, "negative transfer"—where an intermediate task actually degrades final performance—is common. This paper investigates "cheap" methods to predict which tasks will transfer well without requiring full trial-and-error training.

Methodology

The authors focus on adapter-based tuning, where main model weights are frozen and only small modular layers are trained. They categorize selection strategies into four groups:

  1. Metadata: Ranking by training set size or matching the "Task Type" (e.g., QA to QA).
  2. Intermediate Task Data ($D_S$): Using BERT or Sentence-BERT (SEmb) to create dataset "fingerprints" and measuring cosine similarity to the target task.
  3. Intermediate Models ($M_S$): Few-Shot Fine-Tuning (FSFT) for a few steps on the target task, or using proxy models (kNN/Linear) on frozen representations.
  4. Data and Models: Using the Fisher Information Matrix (TaskEmb) to compare model weight importance patterns across tasks.

The study utilizes a benchmark of 53 English NLP tasks, including 42 potential intermediate "donor" tasks and 11 target tasks representing Classification, Multiple Choice, Question Answering, and Sequence Tagging. To highlight transfer benefits, target task data is limited to 1,000 examples.

Results and Discussion

The Prevalence of Negative Transfer

A critical finding is that more training is not always better. For RoBERTa, 44% of intermediate task combinations resulted in lower performance than no intermediate training at all. This underscores the necessity of precise task selection to avoid performance degradation.

Distribution of relative transfer gains across target tasks, highlighting the prevalence of negative transfer.

The Significance of Task Type

The structural similarity between tasks is a powerful predictor of transfer success. Training on a donor task of the same type (e.g., Multiple Choice to Multiple Choice) consistently outperformed transfers between different task types, regardless of the textual domain. This is particularly evident in Question Answering (QA) and Multiple Choice tasks.

Transfer gain is significantly higher when intermediate and target tasks share the same type.

Efficiency vs. Performance

Embedding-based methods, particularly SEmb, emerged as "cheap" winners. These methods are two orders of magnitude faster than few-shot fine-tuning because they only require comparing dataset representations rather than training models. Despite their low cost, they achieved an average Regret@3 of 1%, meaning the top three recommendations were nearly as effective as the single best possible task.

Conclusion

Efficient intermediate task selection is viable through simple embedding-based similarity and task-type matching. While model-specific methods like TaskEmb work well for BERT, they may struggle with newer architectures like RoBERTa due to higher dimensionality. Future work should explore these dynamics in cross-lingual settings and with other parameter-efficient tuning methods like LoRA.

Summary updated

BibTeX
@inproceedings{poth2021what,
  author = {Clifton Poth and Jonas Pfeiffer and Andreas Rücklé and Iryna Gurevych},
  title = {{What to Pre-Train on? Efficient Intermediate Task Selection}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
  doi = {10.18653/v1/2021.emnlp-main.827},
}
Figure