Flexible Transfer Learning under Support and Model Shift

Xuezhi Wang, Jeff G. Schneider

Introduction

In the ideal world of machine learning, our training data (source) and testing data (target) come from the exact same distribution. In the real world, they rarely do. This discrepancy is the core challenge of Transfer Learning.

Most existing techniques tackle specific, limited types of "drift." For instance, covariate shift assumes the range of your inputs ($X$) might change, but the rule connecting $X$ to your output ($Y$) remains the same. Crucially, these methods usually assume the target data is a subset of the training data.

But what if you’re a farmer using a robot to predict grape yields? If you trained your model on Riesling grapes last year (source) but want to use it on Traminette grapes this year (target), you face two massive hurdles:

  1. Support Shift: The visual features (color, texture) of the new grapes might fall entirely outside the range of the original training set.
  2. Model Shift: The relationship between "how the grape looks" and "how much it weighs" might be fundamentally different for the new variety.

This paper introduces Support and Model Shift (SMS), a flexible transfer learning framework designed to handle this "double shift" scenario. It focuses specifically on real-valued regression tasks where labels in the target domain are extremely expensive to obtain.

The Support and Model Shift (SMS) Framework

Instead of trying to force the source model to fit the target data directly, SMS learns a "bridge" between the two domains.

  • Location-Scale Transformations: The algorithm learns a nonlinear mapping to transform target inputs ($X^{te}$) into a "new" space ($X^{new}$) that overlaps with the source support. Simultaneously, it transforms the target labels ($Y^{te}$) to match the source labels ($Y^*$).
  • Gaussian Process (GP) Backbone: To ensure these transformations don't become chaotic or overfit, the authors use Gaussian Processes. This imposes a "smoothness" constraint—essentially assuming that if two points are close in the original space, they should remain relatively close after the transformation.
  • Simultaneous Learning: The model uses a few labeled points from the target domain to "anchor" the transformation. It optimizes an empirical loss function that minimizes the discrepancy between the transformed target data and the source model's predictions.
  • Active Learning Integration: Because labeling is expensive, the authors integrate SMS with Active Learning. The model uses its own predictive uncertainty to "ask" the human for labels on the specific data points that would most improve the transformation.
Comparison of SMS against baseline methods on the synthetic sine wave dataset.

By assuming the shift between domains is "smooth," the authors can use the power of GPs to regularize the transformation. This prevents the model from "hallucinating" complex relationships where none exist. Furthermore, by allowing the labels ($Y$) to shift as well as the inputs, SMS can handle cases where the scale of the output changes entirely.

Datasets and Key Results

The paper evaluates the method on two primary benchmarks:

  1. Synthetic Sine Wave: A toy problem where the source and target are sine waves with different offsets and non-overlapping input ranges. This serves as a "stress test" for the algorithm's ability to recover a shifted function.
  2. Autonomous Agriculture (Grape Yield): A real-world dataset consisting of images of grapevines, using 128 labeled images of Riesling grapes as the source and 96 images of Traminette grapes as the target.

The SMS method consistently outperformed standard baselines like Kernel Mean Matching (KMM), Target/Conditional (T/C) shift, and simple offset models.

Mean Squared Error of SMS compared to baselines across varying numbers of labeled target points.
  • Superior Accuracy with Fewer Labels: On the real-world grape dataset, with only 5 labeled target points, SMS achieved a Root Mean Squared Error (RMSE) of 1197, compared to 2127 for KMM and 1479 for a model trained only on those 5 points.
  • Statistical Significance: In almost all tests with low label counts (5 to 25 points), SMS provided the best results with statistical significance ($p=0.05$).
  • Active Learning Boost: When the model was allowed to choose which grapevines to label (Active Surveying), the error dropped much faster than with random selection, proving that the model's uncertainty estimates are well-calibrated for the new domain.

Limitations and Future Work

While powerful, SMS has a few limitations. The objective function is non-convex and multi-modal. The authors currently use a Metropolis-Hastings algorithm (a type of MCMC sampling) to find the best transformation. While effective, this is computationally involved and slower than gradient-based methods (taking about 2.5 minutes for the grape dataset on a standard CPU). Finding faster ways to solve the objective is a priority for future work.

Additionally, the smoothness assumption is a strength, but it might fail in cases where the domain shift is abrupt or discontinuous—such as a sensor failing and suddenly reporting completely different types of noise.

Summary updated

Abstract

Transfer learning algorithms are used when one has sufficient training data for one supervised learning task (the source/training domain) but only very limited training data for a second task (the target/test domain) that is similar but not identical to the first. Previous work on transfer learning has focused on relatively restricted settings, where specific parts of the model are considered to be carried over between tasks. Recent work on covariate shift focuses on matching the marginal distributions on observations $X$ across domains. Similarly, work on target/conditional shift focuses on matching marginal distributions on labels $Y$ and adjusting conditional distributions $P(X|Y)$, such that $P(X)$ can be matched across domains. However, covariate shift assumes that the support of test $P(X)$ is contained in the support of training $P(X)$, i.e., the training set is richer than the test set. Target/conditional shift makes a similar assumption for $P(Y)$. Moreover, not much work on transfer learning has considered the case when a few labels in the test domain are available. Also little work has been done when all marginal and conditional distributions are allowed to change while the changes are smooth. In this paper, we consider a general case where both the support and the model change across domains. We transform both $X$ and $Y$ by a location-scale shift to achieve transfer between tasks. Since we allow more flexible transformations, the proposed method yields better results on both synthetic data and real-world data.
BibTeX
@inproceedings{wang2014flexible,
  author = {Xuezhi Wang and Jeff G. Schneider},
  title = {{Flexible Transfer Learning under Support and Model Shift}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2014},
}
Figure