Spurious correlations, or correlations that change across domains where a model can be deployed, present significant challenges to real-world applications of machine learning models. However, such correlations are not always "spurious"; often, they provide valuable prior information for a prediction. Here, we present a test-time adaptation method that exploits the spurious correlation phenomenon, in contrast to recent approaches that attempt to eliminate spurious correlations through invariance. We consider situations where the prior distribution $p(y, z)$, which models the dependence between the class label $y$ and the "nuisance" factors $z$, may change across domains, but the generative model for features $p(\mathbf{x}|y, z)$ is constant. We note that this corresponds to an expanded version of the label shift assumption, where the labels now also include the nuisance factors $z$. Based on this observation, we train a classifier to predict $p(y, z|\mathbf{x})$ on the source distribution, and propose a test-time label shift correction that adapts to changes in the marginal distribution $p(y, z)$ using unlabeled samples from the target domain. We evaluate our method, which we call "Test-Time Label-Shift Adaptation" (TTLSA), on two different image datasets -- the CheXpert chest X-ray dataset and the Colored MNIST dataset -- and show a significant improvement over baseline methods. Code reproducing experiments is available at https://github.com/nalzok/test-time-label-shift .
翻译:在模型可以部署的域间发生变化的表面相关关系,或对机器学习模型的实际应用提出重大挑战。 但是,这种关联并不总是“净化” ; 通常, 它们为预测提供了宝贵的先前信息。 这里, 我们展示了一种测试- 时间适应方法, 利用了虚假相关现象, 与最近试图通过不谨慎消除虚假关联的方法形成对比。 我们考虑的是, 之前的分发 $p(y, z) 美元, 用来模拟等级标签$y(y, z) 和“ 讨厌” 系数$z$( $) 之间的依赖性。 但是, 这种关联并不总是“ 净化 ” ; 但是, 这些功能的突变模型通常能提供有价值的先前信息。 我们注意到, 这相当于一个扩大版的标签变换假设, 其中的标签中也包括了“ $z$. ” 。 基于此观察, 我们在源分配上训练一个分类员来预测$p(y, z ⁇ frefref{x) 和“ number lab- tab- laft ladeal ladeal- dal ladeal ladeal ladeal- we seral ladeal ladeal labers