Out-of-distribution (OoD) generalization occurs when representation learning encounters a distribution shift. This occurs frequently in practice when training and testing data come from different environments. Covariate shift is a type of distribution shift that occurs only in the input data, while the concept distribution stays invariant. We propose RIA - Regularization for Invariance with Adversarial training, a new method for OoD generalization under convariate shift. Motivated by an analogy to $Q$-learning, it performs an adversarial exploration for training data environments. These new environments are induced by adversarial label invariant data augmentations that prevent a collapse to an in-distribution trained learner. It works with many existing OoD generalization methods for covariate shift that can be formulated as constrained optimization problems. We develop an alternating gradient descent-ascent algorithm to solve the problem, and perform extensive experiments on OoD graph classification for various kinds of synthetic and natural distribution shifts. We demonstrate that our method can achieve high accuracy compared with OoD baselines.
翻译:分布外泛化发生在表示学习遇到分布偏移时。当训练和测试数据来自不同环境时,这种情况在实践中频繁出现。协变量偏移是一种仅发生在输入数据中的分布偏移,而概念分布保持不变。我们提出RIA——一种通过对抗训练实现不变性的正则化方法,用于协变量偏移下的分布外泛化。受$Q$学习的类比启发,该方法对训练数据环境进行对抗性探索。这些新环境由对抗性标签不变的数据增强生成,从而防止模型坍缩为仅在分布内训练的模型。该方法适用于多种可表述为约束优化问题的协变量偏移分布外泛化方法。我们开发了交替梯度下降-上升算法来求解该问题,并在各种合成与自然分布偏移场景下对分布外图分类任务进行了大量实验。结果表明,与分布外基线方法相比,我们的方法能够实现更高的准确率。