The existence of spurious correlations such as image backgrounds in the training environment can make empirical risk minimization (ERM) perform badly in the test environment. To address this problem, Kirichenko et al. (2022) empirically found that the core features that are related to the outcome can still be learned well even with the presence of spurious correlations. This opens a promising strategy to first train a feature learner rather than a classifier, and then perform linear probing (last layer retraining) in the test environment. However, a theoretical understanding of when and why this approach works is lacking. In this paper, we find that core features are only learned well when their associated non-realizable noise is smaller than that of spurious features, which is not necessarily true in practice. We provide both theories and experiments to support this finding and to illustrate the importance of non-realizable noise. Moreover, we propose an algorithm called Freeze then Train (FTT), that first freezes certain salient features and then trains the rest of the features using ERM. We theoretically show that FTT preserves features that are more beneficial to test time probing. Across two commonly used spurious correlation datasets, FTT outperforms ERM, IRM, JTT and CVaR-DRO, with substantial improvement in accuracy (by 4.5%) when the feature noise is large. FTT also performs better on general distribution shift benchmarks.
翻译:误导性相关(比如:图像背景)在训练环境中的存在,可能导致经验风险最小化(ERM)在测试环境中性能较差。为了解决这个问题,Kirichenko等人(2022)通过实验证明即使存在误导性相关性,与结果有关的核心特征也可以学得很好。这开辟了一个有前途的策略,即首先训练特征学习器而不是分类器,然后在测试环境中执行线性探测(重新训练最后一层)。然而,我们缺乏关于此方法何时以及为什么有效的理论理解。本文发现只有当核心特征对应的非实现噪声小于误导性特征的非实现噪声时,核心特征才能被很好地学习。这在实践中不一定成立。我们提供了理论和实验来支持这一发现,并且阐明了非实现噪声的重要性。此外,我们提出了一种名为“冻结再训练”的算法(FTT),该算法首先冻结某些显著特征,然后使用ERM训练余下的特征。我们从理论上证明了FTT保留了更有益于测试时探测的特征。在两个常用的误导性相关数据集上,FTT优于ERM、IRM、JTT和CVaR-DRO,在特征噪声较大时准确度有大幅改善(高达4.5%)。FTT还在一般分布偏移基准测试中表现更好。