Ensuring generalization to unseen environments remains a challenge. Domain shift can lead to substantially degraded performance unless shifts are well-exercised within the available training environments. We introduce a simple robust estimation criterion -- transfer risk -- that is specifically geared towards optimizing transfer to new environments. Effectively, the criterion amounts to finding a representation that minimizes the risk of applying any optimal predictor trained on one environment to another. The transfer risk essentially decomposes into two terms, a direct transfer term and a weighted gradient-matching term arising from the optimality of per-environment predictors. Although inspired by IRM, we show that transfer risk serves as a better out-of-distribution generalization criterion, both theoretically and empirically. We further demonstrate the impact of optimizing such transfer risk on two controlled settings, each representing a different pattern of environment shift, as well as on two real-world datasets. Experimentally, the approach outperforms baselines across various out-of-distribution generalization tasks. Code is available at \url{https://github.com/Newbeeer/TRM}.
翻译:除非在现有培训环境中妥善地运用转移,否则,这一转移会导致业绩严重退化。我们引入了简单的稳健估算标准 -- -- 转移风险 -- -- 具体针对优化向新环境的转移。实际上,该标准相当于找到一种代表,以最大限度地减少将任何最佳预测器应用到一个环境的最佳预测器到另一个环境的风险。转移风险基本上分解成两个条件,即直接转移条件和因每个环境预测器的最佳性而产生的加权梯度比对术语。尽管受IRM的启发,但我们表明转移风险在理论上和实践中都是一种更好的分配以外的通用标准。我们进一步展示了优化这种转移风险在两个受控制环境中的影响,每个环境转移风险代表一种不同的环境变化模式,以及对两个真实世界数据集的影响。实验性地说,这一方法超越了各种分配外一般化任务的基线。代码可在\url{https://github.com/Newbeer/TRM}查阅。