Meta-learning Transferable Representations with a Single Target Domain

Hong Liu, Jeff Z. HaoChen, Colin Wei, Tengyu Ma

Abstract

Recent works found that fine-tuning and joint training—two popular approaches for transfer learning—do not always improve accuracy on downstream tasks. First, we aim to understand more about when and why fine-tuning and joint training can be suboptimal or even harmful for transfer learning. We design semi-synthetic datasets where the source task can be solved by either source-specific features or transferable features. We observe that (1) pre-training may not have incentive to learn transferable features and (2) joint training may simultaneously learn source-specific features and overfit to the target. Second, to improve over fine-tuning and joint training, we propose Meta Representation Learning (MeRLin) to learn transferable features. MeRLin meta-learns representations by ensuring that a head fit on top of the representations with target training data also performs well on target validation data. We also prove that MeRLin recovers the target ground-truth model with a quadratic neural net parameterization and a source distribution that contains both transferable and source-specific features. MeRLin empirically outperforms previous state-of-the-art transfer learning algorithms on various real-world vision and NLP transfer learning benchmarks.

Introduction

In modern machine learning, transfer learning has become the standard paradigm: models are pre-trained on massive datasets like ImageNet or large-scale text corpora and then fine-tuned on specific target tasks. However, this process is not foolproof. Standard methods like fine-tuning and joint training often fail to capture the underlying structures necessary for the target task, sometimes even performing worse than training on the target data alone. This paper investigates these failure modes and introduces Meta Representation Learning (MeRLin), a method designed to explicitly incentivize the learning of transferable features.

The Challenge of Feature Transfer

The authors identify two primary reasons why traditional transfer learning fails. First, pre-training is "blind" to the target task. During pre-training, a model might solve the source task using "shortcuts"—features that are predictive in the source domain but irrelevant or noisy in the target domain. Second, joint training often leads to overfitting. When training on source and target data simultaneously, the model may use its high capacity to simply memorize the target training set rather than learning generalizable representations.

To diagnose these issues, the researchers developed a semi-synthetic CIFAR-10 dataset. In this setup, images are split: one half contains transferable features (actual object parts), while the other half contains source-specific noise or "shortcuts."

Conceptual comparison of transfer learning failure modes vs. MeRLin on synthetic data.

As illustrated above, when a source contains mixed features (Source AB), standard fine-tuning and joint training struggle. Fine-tuning relies on whatever features were learned during pre-training, which may be mostly source-specific. Joint training, while having access to target data, tends to overfit the target while maintaining good performance on the source via non-transferable shortcuts.

MeRLin: Meta Representation Learning

To address these limitations, MeRLin treats representation learning as a bi-level optimization problem. The goal is to find a feature extractor (the representation) such that a simple classifier (the head) trained on target data generalizes well to unseen target data.

  • The Inner Loop: For a given fixed feature extractor, the model learns a linear head using a subset of the target training data.
  • The Outer Loop: The feature extractor is updated to maximize the performance of that learned head on a held-out target validation set.

By optimizing for generalization on the target domain, MeRLin forces the feature extractor to discard source-specific shortcuts and focus on features that are truly useful for the target task. To ensure this process is computationally efficient, the authors utilize a closed-form solution for the inner loop using Mean Squared Error (MSE) loss, avoiding the need for expensive second-order gradient calculations.

Empirical Results and Key Insights

The effectiveness of MeRLin was validated across a wide range of benchmarks, from synthetic diagnostics to real-world vision and NLP tasks.

Accuracy on the target dataset comparing MeRLin against standard transfer learning baselines.

In the semi-synthetic experiments, MeRLin significantly outperformed both fine-tuning and joint training when the source data contained a mix of transferable and source-specific features. While joint training suffered from overfitting, MeRLin successfully identified the transferable components, achieving accuracy levels much closer to the theoretical maximum.

On real-world datasets, the gains remained substantial:

  • Vision: In a challenging transfer from Food-101 to CUB-200 (bird species), MeRLin achieved 58.68% accuracy, compared to 52.30% for standard fine-tuning.
  • NLP: When fine-tuning BERT on the GLUE benchmark, MeRLin-ft improved performance on tasks like MRPC, raising accuracy from 83.74% to 86.03%.

Beyond raw accuracy, T-SNE visualizations revealed that MeRLin produces more coherent and well-separated feature clusters in the target domain, indicating that the learned representations are structurally superior for the downstream task.

Conclusion

MeRLin demonstrates that meta-learning principles can be highly effective even with only a single target domain. By providing a mathematical incentive for generalization, it overcomes the "blindness" of pre-training and the overfitting tendencies of joint training. This work provides both a theoretical foundation and a practical algorithm for more robust and efficient transfer learning in complex, real-world scenarios.

Summary updated

BibTeX
@misc{liu2020meta,
  author = {Hong Liu and Jeff Z. HaoChen and Colin Wei and Tengyu Ma},
  title = {{Meta-learning Transferable Representations with a Single Target Domain}},
  year = {2020},
  eprint = {2011.01418},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2011.01418},
}
Figure