NEURAL NETWORKS FOR LEARNING COUNTERFAC-TUAL G-INVARIANCES FROM SINGLE ENVIRONMENTS

Abstract

Despite -or maybe because of-their astonishing capacity to fit data, neural networks are believed to have difficulties extrapolating beyond training data distribution. This work shows that, for extrapolations based on finite transformation groups, a model's inability to extrapolate is unrelated to its capacity. Rather, the shortcoming is inherited from a learning hypothesis: Examples not explicitly observed with infinitely many training examples have underspecified outcomes in the learner's model. In order to endow neural networks with the ability to extrapolate over group transformations, we introduce a learning framework counterfactually-guided by the learning hypothesis that any group invariance to (known) transformation groups is mandatory even without evidence, unless the learner deems it inconsistent with the training data. Unlike existing invariance-driven methods for (counterfactual) extrapolations, this framework allows extrapolations from a single environment. Finally, we introduce sequence and image extrapolation tasks that validate our framework and showcase the shortcomings of traditional approaches.

1. INTRODUCTION

Neural networks are widely praised for their ability to interpolate the training data. However, in some applications, they have also been shown to be unable to learn patterns that can provably extrapolate out-of-distribution (beyond the training data distribution) (Arjovsky et al., 2019; D'Amour et al., 2020; de Haan et al., 2019; Geirhos et al., 2020; McCoy et al., 2019; Schölkopf, 2019) . Recent counterfactual-based learning frameworks for extrapolation tasks -such as ICM and IRM (Arjovsky et al., 2019; Besserve et al., 2018; Johansson et al., 2016; Louizos et al., 2017; Peters et al., 2017; Schölkopf, 2019; Krueger et al., 2020) detailed in Section 2-assume the learner is given data from multiple environmental conditions (say environments E1 and E2) and is expected to learn patterns that work well over an unseen environment E3. In particular, the key idea behind IRM is to force the neural network to learn an internal representation of the input data that is invariant to environmental changes between E1 and E2, and, hence, hopefully also invariant to E3, which may not be true for nonlinear classifiers (Rosenfeld et al., 2020) . While successful for a class of extrapolation tasks, these frameworks require multiple environments in the training data. But, are we asking the impossible? Can humans even perform single-environment extrapolation? Young children, unlike monkeys and baboons, assume that a conditional stimulus F given another stimulus D extrapolates to a symmetric relation D given F without ever seeing any such examples (Sidman et al., 1982) . E.g., if given D, action F produces a treat, the child assumes that given F, action D also produces a treat. Young children differ from primates in their ability to use symmetries to build conceptual relations beyond visual patterns (Sidman and Tailby, 1982; Westphal-Fitch et al., 2012) , allowing extrapolations from intelligent reasoning. However, forcing symmetries against data evidence is undesirable, since symmetries can provide valuable evidence when they are broken. Unfortunately, single-environment extrapolations have not been addressed in the literature. The challenge comes from a learning framework where examples not explicitly observed with infinitely many independent training examples are underspecified in the learner's statistical model, which is shared by both objective (frequentist) and subjective (Bayesian) learner's frameworks. For instance, 1

