NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learning to Transfer Learn

Linchao Zhu, Sercan Ömer Arik, Yi Yang, Tomas PfisterarXiv 2019

Abstract

Transfer learning is a cornerstone of modern machine learning, yet standard fine-tuning often treats all source data as equally beneficial, potentially leading to "negative transfer." We present the Learning to Transfer Learn (L2TL) framework, which employs reinforcement learning to automatically identify and weight the most relevant samples from massive source datasets. By optimizing data selection based on target task performance, L2TL achieves significant accuracy gains, particularly in data-scarce scenarios and across dissimilar domains.

Introduction

The prevailing paradigm in deep learning involves pre-training models on massive datasets like ImageNet and fine-tuning them for specific downstream tasks. While effective, this "one-size-fits-all" approach assumes that the entire source distribution is relevant to the target task. In practice, irrelevant or noisy source data can degrade performance.

Comparison of L2TL with other learning paradigms including unsupervised domain adaptation, knowledge distillation, and standard transfer learning.

As shown in Figure 1, L2TL distinguishes itself from traditional transfer learning by introducing an adaptive mechanism that learns how to transfer knowledge by selecting the most beneficial source components.

The Problem of Negative Transfer

Standard fine-tuning is a blunt instrument. When the source and target domains differ significantly—for instance, transferring from general object recognition to medical imaging—much of the source data may be irrelevant. Manually selecting relevant subsets is labor-intensive and often relies on heuristics. The challenge lies in automatically and adaptively extracting only the "beneficial" information from a source dataset to maximize performance on a target task.

The L2TL Framework

The authors propose L2TL (Learning to Transfer Learn), a framework that treats data selection as a reinforcement learning (RL) problem.

The L2TL architecture illustrating the shared encoder, task-specific decision layers, and the RL policy model that generates importance weights.

Architecture and Optimization

As illustrated in Figure 2, the system consists of several key components:

  1. Shared Encoder: A backbone network (e.g., Inception-V3) processes both source and target data.
  2. Decision Layers: Separate "heads" are maintained for the source and target tasks.
  3. Policy Model: An RL agent that outputs "importance weights" for source data classes.
  4. The Optimization Loop:
    • Model Training: The encoder and task heads are trained using a weighted combination of source and target losses. To maintain efficiency, a "top-k" strategy is used, calculating gradients only for samples deemed most relevant by the policy.
  5. Policy Training: Following a training step, the model is evaluated on a held-out target validation set. The resulting performance metric (e.g., Top-1 accuracy) serves as a reward $R$ for the RL agent.
  6. Algorithm: The REINFORCE algorithm updates the policy model, encouraging it to prioritize source classes that improve target validation scores.

Experimental Evaluation

L2TL was evaluated across diverse scenarios, using ImageNet (1.2M images) and JFT-300M (~300M images) as source datasets. Target tasks included fine-grained classification (Birdsnap, Oxford-IIIT Pets, Stanford Cars) and dissimilar domains (MNIST to SVHN, ImageNet to CheXpert).

Key Insights

  • Discovery of Latent Visual Similarities: The RL agent often identifies non-obvious connections. For example, in an aircraft recognition task, the agent assigned high weights to the "teapot" class from ImageNet. This is likely because the visual features of teapot spouts and handles resemble airplane wings and tails—a connection label-based methods would miss.
  • Performance in Low-Shot Scenarios: L2TL is particularly effective when target data is scarce. In experiments with only 5 images per class for Stanford Cars, L2TL outperformed standard fine-tuning by 6.5%.
  • Scalability and Efficiency: Designed for industry-scale datasets like JFT-300M, L2TL adds only approximately 30% computational overhead compared to standard fine-tuning, making it a practical solution for real-world pipelines.

Results and Discussion

L2TL consistently outperformed fine-tuning baselines across all eight tested datasets. Notably, using JFT-300M as a source for Birdsnap resulted in a 7.5% improvement. Even in the cross-domain CheXpert medical imaging task, L2TL improved the mean AUC by 0.7, demonstrating its ability to find utility in seemingly unrelated data.

The framework also provides interpretability; the importance weights offer a ranked list of source categories that contribute most to the model's learning, providing insights into which features are truly useful for the target task.

Conclusion and Future Work

L2TL represents a significant step toward more intelligent and automated transfer learning. By framing data selection as an RL problem, it mitigates negative transfer and maximizes the utility of large-scale source datasets. Future research may explore more granular weighting at the individual image level or continuous action spaces for even finer control over the transfer process.

Summary updated

BibTeX
@misc{zhu2019learning,
  author = {Linchao Zhu and Sercan Ömer Arik and Yi Yang and Tomas Pfister},
  title = {{Learning to Transfer Learn}},
  year = {2019},
  eprint = {1908.11406},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1908.11406},
}
Figure