Domain generalization asks for models trained over a set of training environments to perform well in unseen test environments. Recently, a series of algorithms such as Invariant Risk Minimization (IRM) has been proposed for domain generalization. However, Rosenfeld et al. (2021) shows that in a simple linear data model, even if non-convexity issues are ignored, IRM and its extensions cannot generalize to unseen environments with less than $d_s+1$ training environments, where $d_s$ is the dimension of the spurious-feature subspace. In this paper, we propose to achieve domain generalization with Invariant-feature Subspace Recovery (ISR). Our first algorithm, ISR-Mean, can identify the subspace spanned by invariant features from the first-order moments of the class-conditional distributions, and achieve provable domain generalization with $d_s+1$ training environments under the data model of Rosenfeld et al. (2021). Our second algorithm, ISR-Cov, further reduces the required number of training environments to $O(1)$ using the information of second-order moments. Notably, unlike IRM, our algorithms bypass non-convexity issues and enjoy global convergence guarantees. Empirically, our ISRs can obtain superior performance compared with IRM on synthetic benchmarks. In addition, on three real-world image and text datasets, we show that both ISRs can be used as simple yet effective post-processing methods to improve the worst-case accuracy of (pre-)trained models against spurious correlations and group shifts.
翻译:在一系列培训环境中训练的模型需要一般化,以便在看不见的测试环境中运行良好。最近,提出了一系列的算法,如不易变风险最小化(IRM),供域化使用。然而,Rosenfeld等人(2021年)指出,在一个简单的线性数据模型中,即使不易变化问题被忽视,综合管理及其扩展无法在低于美元+1美元的培训环境中向看不见环境推广,而美元+1美元的培训环境是随机性能超强的亚空间。在本文中,我们提议用不易变换的亚空间恢复(IRM)实现域化。我们的第一个算法,即ISR-Mean,可以识别从班级分配的第一阶时段起因变异性特征而跨越的子空间,在罗森菲尔德等人(2021年)的数据模型下,以美元+1美元的培训环境实现可变现的域化。我们的第二个算法,即ISR-Cov, 进一步将所需培训环境减为$(1)美元,用不易变换的亚变换的亚值模型,用Siral-alal assal assal assal assal assal assal assal as lax lax lax lax lax lax lax lax