Learning domain-invariant semantic representations is crucial for achieving domain generalization (DG), where a model is required to perform well on unseen target domains. One critical challenge is that standard training often results in entangled semantic and domain-specific features. Previous works suggest formulating the problem from a causal perspective and solving the entanglement problem by enforcing marginal independence between the causal (\ie semantic) and non-causal (\ie domain-specific) features. Despite its simplicity, the basic marginal independent-based idea alone may be insufficient to identify the causal feature. By d-separation, we observe that the causal feature can be further characterized by being independent of the domain conditioned on the object, and we propose the following two strategies as complements for the basic framework. First, the observation implicitly implies that for the same object, the causal feature should not be associated with the non-causal feature, revealing that the common practice of obtaining the two features with a shared base feature extractor and two lightweight prediction heads might be inappropriate. To meet the constraint, we propose a simple early-branching structure, where the causal and non-causal feature obtaining branches share the first few blocks while diverging thereafter, for better structure design; Second, the observation implies that the causal feature remains invariant across different domains for the same object. To this end, we suggest that augmentation should be incorporated into the framework to better characterize the causal feature, and we further suggest an effective random domain sampling scheme to fulfill the task. Theoretical and experimental results show that the two strategies are beneficial for the basic marginal independent-based framework. Code is available at \url{https://github.com/liangchen527/CausEB}.
翻译:学习领域不变的语义表征对于实现领域泛化(DG)至关重要,要求模型在未见过的目标领域上表现良好。一个关键挑战是,标准训练常常导致语义特征与领域特定特征纠缠在一起。先前的研究建议从因果角度构建问题,并通过强制因果(即语义)特征与非因果(即领域特定)特征之间的边际独立性来解决纠缠问题。尽管该方法简单,但仅基于边际独立性的基本思想可能不足以识别因果特征。通过d-分离,我们观察到因果特征可以通过在给定对象条件下独立于领域来进一步刻画,并提出了以下两种策略作为基本框架的补充。首先,该观察隐式表明,对于同一对象,因果特征不应与非因果特征相关联,这揭示了当前使用共享基础特征提取器和两个轻量级预测头获取这两种特征的常见做法可能是不合适的。为了满足这一约束,我们提出了一种简单的早期分支结构,其中因果特征和非因果特征获取分支共享前几个块,之后分叉,以实现更好的结构设计;其次,该观察表明,对于同一对象,因果特征在不同领域中保持不变。为此,我们建议将数据增强纳入框架以更好地刻画因果特征,并进一步提出一种有效的随机领域采样方案来完成该任务。理论和实验结果表明,这两种策略对基于边际独立性的基本框架是有益的。代码可在\url{https://github.com/liangchen527/CausEB}获取。