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

Transferability Estimation Based On Principal Gradient Expectation

Huiyan Qi, Lechao Cheng, Jingjing Chen, Yue Yu, Zunlei Feng, Yu-Gang JiangarXiv 2022 · DOI

TL;DR

This paper introduces Principal Gradient Expectation (PGE), a novel and efficient method for estimating how well knowledge from a source task will transfer to a target task. PGE outperforms existing methods in stability, reliability, and efficiency by focusing on the gradients of the model's backbone, offering a more robust way to select optimal source domains for transfer learning.

What Problem Does This Paper Address?

Transfer learning is a cornerstone of modern machine learning, allowing models trained on one task to be adapted for another, saving significant data and computational resources. A critical step in this process is selecting the right source task or domain to transfer from. If the source and target tasks are too dissimilar, the transfer can be ineffective or even detrimental. While methods exist to estimate this "transferability," they often struggle to balance performance with computational cost. Many existing approaches are sensitive to small changes in the target data distribution, leading to unstable estimates, or require extensive computation, making them impractical for large-scale applications. This paper aims to bridge this gap by proposing a transferability estimation method that is stable, reliable, and efficient.

Methods

The core of this paper is the Principal Gradient Expectation (PGE) method. The authors propose that transferability can be understood by examining the "gap" between the initial and optimal states of a model's parameters. Since the optimal state is unknown, PGE approximates this by:

  1. Gradient Expectation: Instead of directly updating model parameters, PGE repeatedly samples initial random weights, computes the gradients of the loss function with respect to these weights, and then averages these gradients. This "Principal Gradient Expectation" is believed to capture inherent characteristics of the task and is more stable than a single gradient computation.
  2. Gap Calculation: The transferability is then quantified by the "gap" between the Principal Gradient Expectations of the source and target tasks. This gap is normalized and calculated using the gradients of the model's backbone only, avoiding the need for task-specific layers and improving generality.

The authors also define three key properties for a good transferability metric:

  • Stability: The metric's value should not change drastically with minor variations in the target data.
  • Reliability: The metric should accurately predict which source domain will yield the best performance on the target task.
  • Efficiency: The estimation process should be computationally inexpensive.

PGE is designed to satisfy all three properties.

Datasets

The experiments were conducted using a variety of image classification datasets:

  • Source Datasets: CIFAR10, CIFAR100, STL10, Mini-ImageNet, CUB, MNIST, FGVC-Aircraft, and PASCAL VOC 2012.
  • Target Datasets: Primarily CIFAR100, but also PASCAL VOC 2012 for cross-domain transferability tests.

The paper also describes two strategies for constructing target domain subsets (SI and SII) for stability evaluation, which involve random sampling of categories and samples within categories.

Key Insights and Ideas

  • Focusing on Gradients is Key: The paper argues that the gradients of a model's backbone, rather than task-specific layers, are more indicative of transferability. This is because backbone gradients capture more fundamental feature representations.
  • Expectation for Stability: Averaging gradients over multiple random initializations (PGE) significantly improves the stability of transferability estimates, making them less susceptible to noise or specific initial weight configurations.
  • Efficiency Through Unsupervised Gradients: By calculating gradients in an unsupervised manner and not requiring pre-training for the source task, PGE drastically reduces computational cost compared to methods that rely on full source task training or complex feature space analysis.
  • Generalizability Across Domains: PGE demonstrates potential for estimating transferability even when source and target tasks are of different types (e.g., classification to segmentation), a limitation for many existing methods.

Key Results

  • Superior Stability: PGE showed significantly more stable transferability scores across different sampling ratios of target data compared to LEEP, LogMe, H-score, NCE, and GBC.
  • High Reliability: PGE achieved the highest Kendall's T correlation coefficient (a measure of rank correlation) between its estimated transferability scores and actual transfer performances for both linear probing and fine-tuning across multiple datasets. The average Kendall's T for PGE was 0.68, outperforming other methods.
  • Significant Efficiency Gains: PGE was up to 7x faster than existing methods, with a computation time of 45488 seconds for a specific task compared to over 300,000 seconds for others.
  • Robustness to Dataset Characteristics: PGE showed robustness to variations in image resolution, outperforming other methods on datasets like CUB and Aircraft.

Limitations and Future Work

  • Task-Irrelevant Assumption: The current formulation of PGE assumes that the source and target tasks are single tasks. While it can handle different task types (e.g., classification to regression), it's not explicitly designed for complex multi-task scenarios.
  • Future Exploration: The authors suggest exploring the composition of multiple source tasks for a given target task and investigating how to choose a proper source task or a rational composition of source tasks for a given target task. They also mention extending PGE to different tasks and exploring its use in more complex transfer settings.

Summary updated

BibTeX
@misc{qi2022transferability,
  author = {Huiyan Qi and Lechao Cheng and Jingjing Chen and Yue Yu and Zunlei Feng and Yu-Gang Jiang},
  title = {{Transferability Estimation Based On Principal Gradient Expectation}},
  year = {2022},
  eprint = {2211.16299},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.16299},
}
Figure