Less is More: Parameter-Efficient Selection of Intermediate Tasks for Transfer Learning

David Schulte, Felix Hamborg, Alan AkbikEMNLP 2024

Abstract

Intermediate task transfer learning often enhances performance on target NLP tasks, yet selecting the optimal source task from thousands of available datasets is computationally prohibitive. We present Embedding Space Maps (ESMs), a parameter-efficient approach to task selection. ESMs are lightweight linear transformations that approximate the shift in a model's embedding space caused by fine-tuning. By applying these maps to base model embeddings, we can simulate fine-tuned representations and rank potential source tasks using the LogME metric. Our method achieves a 10.6x speedup and a 278x reduction in storage requirements compared to standard selection methods, while maintaining high selection quality across a large-scale study of 12,000 source-target pairs.

Introduction

Transfer learning is the cornerstone of modern Natural Language Processing (NLP). While pre-training provides a robust foundation, researchers have identified "intermediate task transfer" as a powerful technique: fine-tuning a model on a related intermediate task (e.g., sentiment analysis) before training on the final target task (e.g., emotion detection) often yields significant performance gains.

However, the sheer scale of available data—with over 160,000 datasets on the Hugging Face Hub—presents a massive search problem. Traditional selection methods require performing full forward passes through every potential fine-tuned source model, which is computationally exhausting and storage-intensive. This paper introduces a practical framework to navigate this search space efficiently.

Methodology: Embedding Space Maps (ESMs)

The core innovation is the Embedding Space Map (ESM). Instead of storing and running full 110M-parameter models for every potential source task, the authors propose training a single, lightweight linear layer ($\phi$) for each task. This layer is designed to map the embeddings of a "base" model ($f_0$) to the approximate embeddings of a "fine-tuned" model ($f_T$).

The ESM workflow: A lightweight linear layer approximates the transformation of embeddings from a base model to a fine-tuned model.

The ESM-LogME Workflow

  1. Offline Phase: For every potential source task, a linear ESM is trained to mimic that task's fine-tuned embedding space. This reduces the representation of a fine-tuned model from ~400MB to less than 2MB.
  2. Selection Phase: For a new target task, the user runs their data through the base model once. They then apply the tiny ESMs (simple matrix multiplications) to these base embeddings to simulate the fine-tuned embedding spaces.
  3. Ranking: These simulated embeddings are evaluated using LogME, a standard metric for assessing transferability, to rank the most promising source tasks.

Experimental Setup

The authors conducted an extensive study involving 12,000 source-target pairs, the largest of its kind to date.

  • Source Pool: 1,553 datasets from the Hugging Face Hub (1,496 classification and 57 regression tasks).
  • Target Benchmarks: Eight diverse datasets including IMDB (sentiment), TweetEval (emotion), J-STS (Japanese similarity), and PAWS-X (paraphrase).
  • Base Model: bert-base-multilingual-uncased.

Results and Discussion

Efficiency and Scalability

ESM-LogME demonstrates remarkable efficiency, achieving a 10.6x speedup over standard LogME and requiring 278x less disk space. This makes large-scale task selection feasible on commodity hardware. The method outperformed other efficient benchmarks like TextEmb and TaskEmb, suggesting that approximating model behavior is more effective than analyzing raw data statistics.

Selection Quality

Despite the linear approximation, ESM-LogME remains highly effective at identifying high-quality source tasks. On classification benchmarks, it achieved an average Regret@5 of 2.95, meaning the best of the top 5 suggested tasks typically reaches within ~3% of the theoretical maximum performance gain available in the entire pool.

Performance comparison across eight target tasks. ESM-LogME (red cross) closely tracks the performance of full LogME (green dot) while significantly outperforming the baseline.

Key Insights

  • Linearity as a Proxy: A simple linear transformation captures enough of the fine-tuning effect to rank tasks effectively. While it may underfit the complex shifts in a transformer, it preserves the relative relationships necessary for selection.
  • Modular Transfer: ESMs act as lightweight proxies. Similar to Adapters, they are parameter-efficient; however, while Adapters facilitate task performance, ESMs facilitate task prediction.

Limitations and Future Work

While promising, ESMs are currently tied to specific base models; switching from BERT to another architecture requires retraining the maps. Additionally, the reliance on automated parsing for Hugging Face datasets can introduce noise. Future research may explore non-linear ESMs to improve ranking accuracy or investigate cross-lingual maps to broaden the utility of the source pool beyond English-centric data.

Summary updated

BibTeX
@inproceedings{schulte2024less,
  author = {David Schulte and Felix Hamborg and Alan Akbik},
  title = {{Less is More: Parameter-Efficient Selection of Intermediate Tasks for Transfer Learning}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.emnlp-main.529},
}
Figure