Environment annotations are essential for the success of many out-of-distribution (OOD) generalization methods. Unfortunately, these are costly to obtain and often limited by human annotators' biases. To achieve robust generalization, it is essential to develop algorithms for automatic environment discovery within datasets. Current proposals, which divide examples based on their training error, suffer from one fundamental problem. These methods introduce hyper-parameters and early-stopping criteria, which require a validation set with human-annotated environments, the very information subject to discovery. In this paper, we propose Cross-Risk-Minimization (XRM) to address this issue. XRM trains twin networks, each learning from one random half of the training data, while imitating confident held-out mistakes made by its sibling. XRM provides a recipe for hyper-parameter tuning, does not require early-stopping, and can discover environments for all training and validation data. Algorithms built on top of XRM environments achieve oracle worst-group-accuracy, addressing a long-standing challenge in OOD generalization. Code available at \url{https://github.com/facebookresearch/XRM}.
翻译:环境标注对于许多分布外泛化方法的成功至关重要。然而,获取这些标注成本高昂,且常受限于人类标注者的偏见。为实现稳健的泛化性能,开发能够自动发现数据集中环境划分的算法显得尤为重要。现有方法通常依据训练误差对样本进行划分,但存在一个根本性问题:这些方法引入了超参数和早停准则,其调优过程需要依赖人工标注环境信息的验证集——而这正是待发现的目标信息。本文提出交叉风险最小化方法以解决该问题。XRM训练一对孪生网络,每个网络从训练数据的随机半数样本中学习,同时模拟其兄弟网络在保留数据上产生的高置信度错误预测。XRM提供了超参数调优方案,无需早停机制,且能为所有训练和验证数据发现环境划分。基于XRM环境构建的算法能够达到理论最优的最差组准确率,解决了分布外泛化领域长期存在的挑战。代码发布于\url{https://github.com/facebookresearch/XRM}。