By default neural networks are not robust to changes in data distribution. This has been demonstrated with simple image corruptions, such as blurring or adding noise, degrading image classification performance. Many methods have been proposed to mitigate these issues but for the most part models are evaluated on single corruptions. In reality, visual space is compositional in nature, that is, that as well as robustness to elemental corruptions, robustness to compositions of corruptions is also needed. In this work we develop a compositional image classification task where, given a few elemental corruptions, models are asked to generalize to compositions of these corruptions. That is, to achieve compositional robustness. We experimentally compare empirical risk minimization with an invariance building pairwise contrastive loss and, counter to common intuitions in domain generalization, achieve only marginal improvements in compositional robustness by encouraging invariance. To move beyond invariance, following previously proposed inductive biases that model architectures should reflect data structure, we introduce a modular architecture whose structure replicates the compositional nature of the task. We then show that this modular approach consistently achieves better compositional robustness than non-modular approaches. We additionally find empirical evidence that the degree of invariance between representations of 'in-distribution' elemental corruptions fails to correlate with robustness to 'out-of-distribution' compositions of corruptions.
翻译:默认情况下,神经网络对数据分布的变化不具备鲁棒性。这已通过简单的图像损坏(如模糊或添加噪声)导致图像分类性能下降得到证实。许多方法被提出以缓解这些问题,但大多数模型仅在单一损坏场景下进行评估。实际上,视觉空间本质上具有组合性,即除了需要针对基本损坏的鲁棒性外,还需要针对损坏组合的鲁棒性。在本工作中,我们构建了一个组合式图像分类任务:给定若干基本损坏,要求模型泛化到这些损坏的组合形式,即实现组合鲁棒性。我们通过实验对比了经验风险最小化与基于不变性的成对对比损失,发现与领域泛化领域的常见直觉相反,通过鼓励不变性仅能获得微弱的组合鲁棒性提升。为突破不变性局限,遵循此前提出的架构应反映数据结构的归纳偏好,我们引入了一种模块化架构,其结构复制了任务的组合性质。结果表明,该模块化方法在组合鲁棒性上始终优于非模块化方法。此外,我们发现经验证据表明:'分布内'基本损坏表示之间的不变性程度,与对'分布外'损坏组合的鲁棒性之间不存在相关性。