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 beyond what can be extracted from the input alone. 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 marginal 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 is 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 implement 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 call our method "Test-Time Label-Shift Adaptation" or TTLSA. We apply our method to two different image datasets -- the CheXpert chest X-ray dataset and the colored MNIST dataset -- and show that it gives better downstream results than methods that try to train classifiers which are invariant to the changes in prior distribution. Code reproducing experiments is available at https://github.com/nalzok/test-time-label-shift .
翻译:在模型可以部署的域域间发生变化的表面相关关系,或对机器学习模型的实际应用提出重大挑战。然而,这种关联并不总是“净化” ;但通常,它们为预测提供了有价值的先前信息,超出了仅从输入中可以提取的内容。在这里,我们提出了一个测试-时间适应方法,利用了虚假相关现象,与最近试图通过惯性消除虚假关联的方法形成对比。我们考虑的是,先前的分发 $(y, z) 美元(美元, z) 的情况,它模拟了类标签美元和骚扰系数美元之间的边际依赖性。但这种关联并不总是“净化 ” ; 但是,它们提供了比仅仅从输入输入输入输入输入输入输入的特性(mathb{x{x}, z) 更有价值的先前信息。我们注意到,这是一个扩大版的标签转换假设, 其中的标签现在也包括了niscent $z$。基于此观察,我们训练一个分类,用来预测$(y, zämathbr) 和 niser 调值的值值值值值值值值值值值分配中, 将使用一个测试- dal- dal- dalbreal- dal- dalbrealbremodal disal dismodrealdaldal disal disaldaldaldaldaldal dal dism disaldaldaldaldaldaldaldal dism dismaldaldaldaldaldalddddddaldaldaldddddddddddaldddddddddddddddaldddddddddddddald) 。在来源分配中, 在运行中, 调出,在运行中可以调出“我们使用两种方法。