A More Unified Theory of Transfer Learning

Steve Hanneke, Samory KpotufearXiv 2024

Abstract

Transfer Learning aims to optimally aggregate samples from a target distribution, with related samples from a so-called source distribution to improve target risk. Multiple procedures have been proposed over the last two decades to address this problem, each driven by one of a multitude of possible divergence measures between source and target distributions. A first question asked in this work is whether there exist unified algorithmic approaches that automatically adapt to many of these divergence measures simultaneously. We show that this is indeed the case for a large family of divergences proposed across classification and regression tasks, as they all happen to upper-bound the same measure of continuity between source and target risks, which we refer to as a weak modulus of transfer. This more unified view allows us, first, to identify algorithmic approaches that are simultaneously adaptive to these various divergence measures via a reduction to particular confidence sets. Second, it allows for a more refined understanding of the statistical limits of transfer under such divergences, and in particular, reveals regimes with faster rates than might be expected under coarser lenses. We then turn to situations that are not well captured by the weak modulus and corresponding divergences: these are situations where the aggregate of source and target data can improve target performance significantly beyond what's possible with either source or target data alone. We show that common such situations -- as may arise, e.g., under certain causal models with spurious correlations -- are well described by a so-called strong modulus of transfer which supersedes the weak modulus. We finally show that the strong modulus also admits adaptive procedures, which achieve near optimal rates in terms of the unknown strong modulus, and therefore apply in more general settings.

Introduction

Transfer learning—the process of leveraging data from a "source" distribution to improve performance on a "target" distribution—has become a cornerstone of modern machine learning. However, the theoretical landscape of the field remains fragmented. Over the last two decades, researchers have proposed dozens of distinct divergence measures (e.g., Wasserstein distance, $\mathcal{Y}$-discrepancy, transfer exponents) to quantify the relationship between distributions.

This fragmentation creates a significant hurdle for practitioners: most algorithms require prior knowledge of which divergence measure applies and what its specific value is. Furthermore, traditional measures often fail in scenarios involving "spurious features," where source and target data must be combined to "unlearn" harmful biases. This paper addresses these challenges by introducing a unified framework based on "moduli of transfer."

A Unified Lens: The Weak Modulus

The authors propose moving away from specific divergence measures toward a more fundamental concept: the Weak Modulus of Transfer ($\\delta(\\epsilon)$). This modulus captures the core intuition that if the risk on the source distribution is low, the risk on the target distribution must also be bounded.

Visualization of the Weak Modulus of Transfer $\delta(\epsilon)$, which relates source risk to target risk.

The key insight is that almost all popular divergence measures are simply specific, often loose, upper bounds on this weak modulus. By designing algorithms around the modulus itself, researchers can create systems that are simultaneously adaptive to a wide variety of distributional shifts without needing to specify the divergence type beforehand.

Beyond Monotonicity: The Strong Modulus

While the weak modulus unifies existing theories, it struggles with complex scenarios like causal modeling or feature selection where the relationship between source and target risk is non-monotonic. In these cases, source data might contain "spurious features" (e.g., a background color) that predict labels in the source but fail in the target.

To address this, the authors introduce the Strong Modulus of Transfer ($\\delta(\\epsilon_1, \\epsilon_2)$). This bivariate measure accounts for the target data's ability to reject hypotheses that appear optimal on the source but are actually harmful for the target.

The Strong Modulus $\delta(\epsilon_1, \epsilon_2)$ accounts for non-monotonic risk relationships, crucial for filtering spurious features.

Adaptive Algorithms via Confidence Sets

The paper introduces algorithmic principles based on Confidence Sets to achieve adaptivity. Instead of estimating divergences directly, the proposed algorithms:

  1. Construct independent confidence sets for the source and target distributions.
  2. Identify a hypothesis within the intersection of these sets.
  3. Default to target-only data if the intersection is empty, thereby avoiding "negative transfer."

This approach allows the algorithm to automatically find the optimal balance between source and target information. In simple convex problems, the weak modulus suffices; however, in settings like feature selection, the strong modulus provides strictly better learning rates.

Key Results and Theoretical Implications

  • Minimax Optimality: The authors prove that their adaptive algorithms achieve the best possible theoretical rates (minimax rates) for transfer learning.
  • Rate Interpolation: The learning rate smoothly interpolates between the standard target rate (if source data is useless) and a significantly faster "transfer rate" (if distributions are highly related).
  • Fast Rates: By assuming a "Bernstein Class Condition," the adaptive approach can achieve fast rates (e.g., $1/n$ instead of $1/\sqrt{n}$) without prior knowledge of noise levels.

Limitations and Future Directions

While the theoretical foundation is robust, several challenges remain for practical implementation. Constructing precise confidence sets for high-dimensional deep neural networks is computationally intensive. Additionally, the current theory assumes identical loss functions for source and target, whereas real-world applications often use surrogate losses. Extending this unified modulus approach to multi-source transfer learning represents a promising avenue for future research.

Summary updated

BibTeX
@misc{hanneke2024more,
  author = {Steve Hanneke and Samory Kpotufe},
  title = {{A More Unified Theory of Transfer Learning}},
  year = {2024},
  eprint = {2408.16189},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.16189},
}
Figure