Abstract
Transfer learning, specifically fine-tuning models pre-trained on massive datasets, is the standard approach for training deep networks on small target datasets. However, standard fine-tuning assumes all source data is equally beneficial, which can lead to "negative transfer" when irrelevant source information confuses the model. This paper introduces L2TL (Learning to Transfer Learn), a reinforcement learning-based framework that automatically identifies and weights the most beneficial samples from a source dataset for a specific target task. By optimizing source data selection based on target validation performance, L2TL significantly outperforms standard fine-tuning, particularly in low-data regimes and across mismatched domains.
Introduction
The current industry standard for deep learning involves pre-training a model on a large dataset (like ImageNet) and fine-tuning it on a smaller, target-specific dataset. While effective, this approach is often suboptimal because it ignores the specific relationship between source and target data. Some source classes may be irrelevant or even detrimental to the target task.
Existing adaptive methods often rely on fixed similarity metrics, such as label distribution comparisons, which fail to capture low-level visual features shared across seemingly unrelated classes. L2TL addresses this by treating source data selection as an optimization problem solved via Reinforcement Learning (RL).
The L2TL Framework
L2TL utilizes a shared architecture where a single encoder feeds into two separate task-specific "heads." The core innovation is the inclusion of a Policy Model that acts as an RL agent.
Optimization Mechanism
The framework operates through a two-phase optimization process:
- Main Model Update: The encoder and task heads are updated using standard stochastic gradient descent (SGD) to minimize a joint loss function weighted by the policy model's outputs.
- Policy Model Update: The RL agent learns to output class-specific importance weights ($\lambda$) and a global scaling factor ($\alpha$). It is updated using the REINFORCE algorithm, where the "reward" is the model’s actual performance (e.g., accuracy or AUC) on a held-out target validation set.
This approach allows the system to optimize for non-differentiable rewards and discover non-obvious relationships. For example, L2TL might weight "antelope" images highly when training a "bird" classifier because both share sharp, angular visual features.
Experimental Results and Insights
The researchers evaluated L2TL across a diverse array of source datasets (ImageNet, JFT-300M) and target domains (fine-grained objects, textures, and medical X-rays).
- The "Low-Shot" Advantage: L2TL is most effective when target data is extremely scarce. On the Stanford Cars dataset with only 5 samples per class, L2TL provided a 6.5% accuracy boost over standard fine-tuning.
- Cross-Domain Success: On the CheXpert medical imaging task, L2TL improved the Mean AUC by 0.7, proving it can extract useful features even when transferring from natural images to X-rays.
- Scalability: Despite the complexity of RL, L2TL scales to massive datasets like JFT-300M (300M images) and only adds approximately 30% to the total training time compared to standard fine-tuning.
Conclusion and Future Work
L2TL demonstrates that adaptive, RL-based data selection is a powerful tool for maximizing the efficiency of transfer learning. By moving beyond simple label matching to feature-based importance weighting, it mitigates negative transfer and excels in data-poor scenarios. Future research may focus on moving from class-level to sample-level weighting to further refine the selection process, though this presents significant computational challenges.
Summary updated