Out-of-distribution (OOD) generalization is indispensable for learning models in the wild, where testing distribution typically unknown and different from the training. Recent methods derived from causality have shown great potential in achieving OOD generalization. However, existing methods mainly focus on the invariance property of causes, while largely overlooking the property of \textit{sufficiency} and \textit{necessity} conditions. Namely, a necessary but insufficient cause (feature) is invariant to distribution shift, yet it may not have required accuracy. By contrast, a sufficient yet unnecessary cause (feature) tends to fit specific data well but may have a risk of adapting to a new domain. To capture the information of sufficient and necessary causes, we employ a classical concept, the probability of sufficiency and necessary causes (PNS), which indicates the probability of whether one is the necessary and sufficient cause. To associate PNS with OOD generalization, we propose PNS risk and formulate an algorithm to learn representation with a high PNS value. We theoretically analyze and prove the generalizability of the PNS risk. Experiments on both synthetic and real-world benchmarks demonstrate the effectiveness of the proposed method. The details of the implementation can be found at the GitHub repository: https://github.com/ymy4323460/CaSN.
翻译:分布外(OOD)泛化对于在真实环境中学习模型不可或缺,因为测试分布通常未知且与训练分布不同。近年来,基于因果性的方法在实现OOD泛化方面展现出巨大潜力。然而,现有方法主要关注原因的因果不变性,很大程度上忽视了“充分性”和“必要性”条件的特性。具体而言,一个必要但不充分的原因(特征)对分布偏移具有不变性,但其准确性可能不足。相比之下,一个充分但不必要的原因(特征)能够很好地拟合特定数据,但在适应新领域时可能存在风险。为捕捉充分且必要原因的信息,我们采用了经典概念——充分且必要原因的概率(PNS),该概率表征某一因素是否为必要且充分原因的可能性。为将PNS与OOD泛化关联,我们提出了PNS风险,并设计了一种学习具有高PNS值表征的算法。我们从理论上分析并证明了PNS风险的泛化能力。在合成数据集和真实世界基准上的实验验证了所提方法的有效性。实现细节详见GitHub仓库:https://github.com/ymy4323460/CaSN。