Introduction
Deep learning's reliance on massive labeled datasets presents a significant barrier for new tasks where data is scarce. While standard transfer learning typically fine-tunes a model from a single source, real-world scenarios often provide access to multiple disparate datasets. These sources frequently exhibit Multi-Source Domain and Task Transfer (MS-DTT) challenges, characterized by both domain shift (variations in visual style) and task shift (differences in label spaces).
GradMix addresses these challenges by intelligently weighting and mixing gradients from multiple source datasets to optimize performance on a target task. Unlike traditional domain adaptation methods that require shared label spaces, GradMix is model-agnostic and capable of transferring knowledge across entirely different tasks.
Methodology: Smart Gradient Mixing
The fundamental premise of GradMix is that not all gradients from source datasets contribute equally to learning the target task. Some data batches may provide useful features, while others might cause "negative transfer."
Layer-wise Gradient Weighting
GradMix assigns specific weights to source gradients at every network layer. Using a small, labeled target validation set as a reference, the algorithm calculates weights that maximize the cosine similarity between the aggregated source gradients and the gradient required to minimize loss on the target validation set.
Adaptive Learning Rate (AdaLR)
To further mitigate negative transfer, GradMix employs an Adaptive Learning Rate (AdaLR). If a source mini-batch produces a gradient poorly aligned with the target task (indicated by low cosine similarity), the learning rate for that batch is automatically scaled down, preventing irrelevant data from degrading model weights.
Pseudo-labeling with Ensembles
To utilize unlabeled target data, GradMix employs an ensemble of models to generate high-confidence pseudo-labels. This consensus-based approach ensures that only reliable labels are incorporated into the training process, preventing the model from reinforcing its own errors.
Experimental Evaluation
The authors evaluated GradMix across two primary benchmarks designed to test domain and task shift simultaneously.
- Digit Recognition: Sources included SVHN (digits 5-9) and MNIST (digits 0-4), with the target being MNIST (digits 5-9). This requires the model to bridge both visual domain gaps and distinct label sets.
- Action Recognition: Sources included MPII (human activity images) and BU101 (web images), targeting UCF101 (video action recognition). This benchmark tests the transition from static images to temporal video data.
Key Results and Insights
GradMix demonstrates exceptional performance in low-data regimes. In the digit recognition task with only two labeled samples per class ($k=2$), GradMix achieved 91.17% accuracy, significantly outperforming standard fine-tuning (89.94%) and target-only training (71.35%).
Furthermore, GradMix shows strong synergy with semi-supervised learning (SSL). When integrated with MixMatch at $k=2$, accuracy reached 96.30%, nearly matching performance levels typically requiring thousands of labels. In action recognition, GradMix outperformed specialized baselines like EnergyNet and MDDA, proving the robustness of gradient-mixing in high-dimensional tasks.
Conclusion
GradMix offers a powerful, model-agnostic framework for multi-source transfer learning. By treating gradients as a universal language for optimization and applying layer-wise meta-learning, it effectively navigates complex domain and task shifts. While it introduces a ~40% computational overhead during training, its ability to achieve high accuracy with minimal target data makes it a compelling solution for data-constrained applications.
Summary updated