Few-shot Adaptation to Distribution Shifts By Mixing Source and Target Embeddings
Yihao Xue, Ali Payani, Yu Yang, Baharan Mirzasoleiman
TL;DR
The paper tackles few-shot adaptation under distribution shifts by proposing MixPro, which constructs a large mixed-embedding dataset by linearly combining source embeddings with a small set of target embeddings and trains a linear probe on these mixtures. The authors provide theoretical evidence that MixPro can outperform projection-based baselines like Pro2, especially under domain generalization and subpopulation shift regimes, and they validate the method empirically across eight datasets using 2–16 target samples per class. The results show MixPro achieving consistent gains, up to about 7%, and demonstrating robustness to hyperparameter settings via cross-validation with limited target data. Overall, MixPro offers a lightweight, data-efficient approach for last-layer adaptation that leverages both abundant source data and scarce target data to mitigate overfitting and improve target-domain generalization.
Abstract
Pretrained machine learning models need to be adapted to distribution shifts when deployed in new target environments. When obtaining labeled data from the target distribution is expensive, few-shot adaptation with only a few examples from the target distribution becomes essential. In this work, we propose MixPro, a lightweight and highly data-efficient approach for few-shot adaptation. MixPro first generates a relatively large dataset by mixing (linearly combining) pre-trained embeddings of large source data with those of the few target examples. This process preserves important features of both source and target distributions, while mitigating the specific noise in the small target data. Then, it trains a linear classifier on the mixed embeddings to effectively adapts the model to the target distribution without overfitting the small target data. Theoretically, we demonstrate the advantages of MixPro over previous methods. Our experiments, conducted across various model architectures on 8 datasets featuring different types of distribution shifts, reveal that MixPro can outperform baselines by up to 7\%, with only 2-4 target examples.
