Original: In What Ways Are Deep Neural Networks Invariant and How Should We Measure This?
Revised: In What Ways Are Deep Neural Networks Invariant and How Should We Measure This?

Original: Abstract
Revised: Abstract

Original: It is often said that a deep learning model is “invariant” to some speciﬁc type of transformation.
Revised: It is often said that a deep learning model is “invariant” to some speciﬁc type of transformation.

Original: However, what is meant by this statement strongly depends on the context in which it is made.
Revised: However, what is meant by this statement strongly depends on the context in which it is made.

Original: In this paper we explore the nature of invariance and equivariance of deep learning models with the goal of better understanding the ways in which they actually capture these concepts on a formal level.
Revised: In this paper we explore the nature of invariance and equivariance of deep learning models with the goal of better understanding the ways in which they actually capture these concepts on a formal level.

Original: We introduce a family of invariance and equivariance metrics that allows us to quantify these properties in a way that disentangles them from other metrics such as loss or accuracy.
Revised: We introduce a family of invariance and equivariance metrics that allows us to quantify these properties in a way that disentangles them from other metrics such as loss or accuracy.

Original: We use our metrics to better understand the two most popular methods used to build invariance into networks: data augmentation and equivariant layers.
Revised: We use our metrics to better understand the two most popular methods used to build invariance into networks: data augmentation and equivariant layers.

Original: We draw a range of conclusions about invariance and equivariance in deep learning models, ranging from whether initializing a model with pretrained weights has an effect on a trained model’s invariance, to the extent to which invariance learned via training can generalize to out-of-distribution data.
Revised: We draw a range of conclusions about invariance and equivariance in deep learning models, ranging from whether initializing a model with pretrained weights has an effect on a trained model’s invariance, to the extent to which invariance learned via training can generalize to out-of-distribution data.

Original:  Introduction
Revised:  Introduction

Original: The notions of invariance and equivariance have been guiding concepts across a diverse range of scientiﬁc domains, from physics to psychology.
Revised: The notions of invariance and equivariance have been guiding concepts across a diverse range of scientiﬁc domains, from physics to psychology.

Original: In machine learning (ML) the concept of invariance is frequently invoked to describe models whose output does not change when its input is transformed in ways that are irrelevant to the task the model was designed for.
Revised: In machine learning (ML) the concept of invariance is frequently invoked to describe models whose output does not change when its input is transformed in ways that are irrelevant to the task the model was designed for.

Original: For a dog or cat image classiﬁer, for example, it is desirable for the model to be reﬂection invariant so that the same prediction is made whether or not the input image is reﬂected across its vertical axis.
Revised: For a dog or cat image classiﬁer, for example, it is desirable for the model to be reﬂection invariant so that the same prediction is made whether or not the input image is reﬂected across its vertical axis.

Original: This type of invariance is useful in this model because although an image generally changes when reﬂected, whether it contains a dog or cat does not.
Revised: This type of invariance is useful in this model because although an image generally changes when reﬂected, whether it contains a dog or cat does not.

Original: Equivariance is used to describe models whose output changes in a manner that is aligned with the way that input is transformed.
Revised: Equivariance is used to describe models whose output changes in a manner that is aligned with the way that input is transformed.

Original: For example, as an image is rotated, the position of bounding boxes predicted by an object detector should also rotate (thus, the object detector should be rotation equivariant).
Revised: For example, as an image is rotated, the position of bounding boxes predicted by an object detector should also rotate (thus, the object detector should be rotation equivariant).

Original: While mathematicians have developed rigorous theory that can describe invariance and equivariance, the amount of this that is actually used in the context of ML varies dramatically among different works.
Revised: While mathematicians have developed rigorous theory that can describe invariance and equivariance, the amount of this that is actually used in the context of ML varies dramatically among different works.

Original: Within computer vision, research on relatively simple image transformations (i.e., rotations or translations) is often presented within a solid group-theoretic framework [6; 52; 9].
Revised: Within computer vision, research on relatively simple image transformations (i.e., rotations or translations) is often presented within a solid group-theoretic framework [6; 52; 9].

Original: Other work dealing with more complex types of transformations such as changes in image background have (by necessity) needed to be more informal [51].
Revised: Other work dealing with more complex types of transformations such as changes in image background have (by necessity) needed to be more informal [51].

Original: Furthermore, while model invariance and equivariance are frequently a central component in a broad range of ML research, limited effort has been put into trying to measure them directly with the purpose of understanding the general invariance and equivariance properties of deep learning models.
Revised: Furthermore, while model invariance and equivariance are frequently a central component in a broad range of ML research, limited effort has been put into trying to measure them directly with the purpose of understanding the general invariance and equivariance properties of deep learning models.

Original: Rather, most works measure them indirectly through other ML metrics that align with the ultimate purpose of the model (e.g., loss or accuracy).
Revised: Rather, most works measure them indirectly through other ML metrics that align with the ultimate purpose of the model (e.g., loss or accuracy).

Original: While such a strategy makes sense when optimizing model performance is the primary objective, we miss an opportunity to better understand how and why deep neural networks work (or fail).
Revised: While such a strategy makes sense when optimizing model performance is the primary objective, we miss an opportunity to better understand how and why deep neural networks work (or fail).

Original: The purpose of this paper is to propose a group-theoretic family of metrics, associated to an arbitrary group of symmetries G , which we call G -empirical equivariance deviation ( G -EED), that quantify the
Revised: The purpose of this paper is to propose a group-theoretic family of metrics, associated to an arbitrary group of symmetries G , which we call G -empirical equivariance deviation ( G -EED), that quantify the

Original: G -equivariance (and G -invariance) of a model.
Revised: G -equivariance (and G -invariance) of a model.

Original: Informally, the G -EED of a model measures the extent to which it fails to be G -equivariant on a speciﬁc data distribution and with respect to a speciﬁc notion of distance in output space.
Revised: Informally, the G -EED of a model measures the extent to which it fails to be G -equivariant on a speciﬁc data distribution and with respect to a speciﬁc notion of distance in output space.

Original: This aligns with needs in ML where the user of a model may care only that their model is equivariant on data that the model will actually encounter in practice and not on any possible input.
Revised: This aligns with needs in ML where the user of a model may care only that their model is equivariant on data that the model will actually encounter in practice and not on any possible input.

Original: Further, since invariance is a special case of equivariance, G -EED also measures the extent to which a model fails to be invariant to the action of G .
Revised: Further, since invariance is a special case of equivariance, G -EED also measures the extent to which a model fails to be invariant to the action of G .

Original: To show the breadth of the G -EED concept, we give a number of different ways it can be applied to measure different aspects of equivariance in a model.
Revised: To show the breadth of the G -EED concept, we give a number of different ways it can be applied to measure different aspects of equivariance in a model.

Original: For example, we show how G -EED can be applied to a model’s latent space representations to measure the extent to which a model extracts G -invariant features.
Revised: For example, we show how G -EED can be applied to a model’s latent space representations to measure the extent to which a model extracts G -invariant features.

Original: Finally, we use G -EED to answer a range of questions about invariance and equivariance in neural networks, with a focus on the two most popular ways of inducing invariance in these models: data augmentation and equivariant architectures.
Revised: Finally, we use G -EED to answer a range of questions about invariance and equivariance in neural networks, with a focus on the two most popular ways of inducing invariance in these models: data augmentation and equivariant architectures.

Original: Some of the conclusions we draw from our experiments include the following.
Revised: Some of the conclusions we draw from our experiments include the following.

Original: (1) Training with augmentation does not tend to induce invariance through learned equivariant layers; rather, invariance arises through some other mechanism.
Revised: (1) Training with augmentation does not tend to induce invariance through learned equivariant layers; rather, invariance arises through some other mechanism.

Original: (2) Invariance learned through augmentation does generalize mildly to out-of-distribution data (e.g., common image corruptions), but apparent invariance seen for far out-of-distribution data (e.g., images from a completely different domain) could be the result of model insensitivity.
Revised: (2) Invariance learned through augmentation does generalize mildly to out-of-distribution data (e.g., common image corruptions), but apparent invariance seen for far out-of-distribution data (e.g., images from a completely different domain) could be the result of model insensitivity.

Original: (3) Invariance should not be assumed to correlate with model performance: models with random weights can be more invariant (in the usual mathematical sense) than models with learned or hard-coded invariance.
Revised: (3) Invariance should not be assumed to correlate with model performance: models with random weights can be more invariant (in the usual mathematical sense) than models with learned or hard-coded invariance.

Original: (4) Models initialized with pretrained weights tend to have different invariance or equivariance properties than models initialized with random weights though whether these models are judged to be more invariant depends on the speciﬁc notion of distance one chooses to use.
Revised: (4) Models initialized with pretrained weights tend to have different invariance or equivariance properties than models initialized with random weights though whether these models are judged to be more invariant depends on the speciﬁc notion of distance one chooses to use.

Original: (5) Self-supervised models do not seem to be more invariant than supervised models except when they are trained with contrastive loss and augmentations from the relevant symmetry group G .
Revised: (5) Self-supervised models do not seem to be more invariant than supervised models except when they are trained with contrastive loss and augmentations from the relevant symmetry group G .

Original: In summary, the contributions of this paper include:
Revised: In summary, the contributions of this paper include:

Original: • The introduction of G -empirical equivariance deviation, the ﬁrst family of metrics that can rigorously and directly measure a range of notions of invariance and equivariance in deep learning models.
Revised: • The introduction of G -empirical equivariance deviation, the ﬁrst family of metrics that can rigorously and directly measure a range of notions of invariance and equivariance in deep learning models.

Original: • A demonstration of the ﬂexibility of G -EED, showing that it can be applied easily to a range of different components of a deep learning model to measure different forms of invariance and equivariance.
Revised: • A demonstration of the ﬂexibility of G -EED, showing that it can be applied easily to a range of different components of a deep learning model to measure different forms of invariance and equivariance.

Original: • Use of G -EED to answer a range of questions, shedding light on the extent to which neural networks are or are not invariant and equivariant.
Revised: • Use of G -EED to answer a range of questions, shedding light on the extent to which neural networks are or are not invariant and equivariant.

Original:  Related Work
Revised:  Related Work

Original: The literature on invariance and equivariance in machine learning can roughly be partitioned into two groups: those works that focus on how to build invariance and equivariance into a model or its components [27; 9; 52; 45; 10; 46; 19; 12; 37; 41; 2] and those works that focus on the theory behind invariance and equivariance [3; 6; 5; 34; 40].
Revised: The literature on invariance and equivariance in machine learning can roughly be partitioned into two groups: those works that focus on how to build invariance and equivariance into a model or its components [27; 9; 52; 45; 10; 46; 19; 12; 37; 41; 2] and those works that focus on the theory behind invariance and equivariance [3; 6; 5; 34; 40].

Original: Three common approaches are used to build invariance into deep learning models: data augmentation, feature averaging, and equivariant architectures.
Revised: Three common approaches are used to build invariance into deep learning models: data augmentation, feature averaging, and equivariant architectures.

Original: In this paper we focus on the ﬁrst and third of these.
Revised: In this paper we focus on the ﬁrst and third of these.

Original: Outside of a few ubiquitous layer types (such as standard translation equivariant convolutional layers), data augmentation is by far the most commonly used method, being a standard component of many training routines, particularly in computer vision.
Revised: Outside of a few ubiquitous layer types (such as standard translation equivariant convolutional layers), data augmentation is by far the most commonly used method, being a standard component of many training routines, particularly in computer vision.

Original: Since it has become a common procedure when training deep learning models, data augmentation research has expanded in many directions [12; 37; 41; 2].
Revised: Since it has become a common procedure when training deep learning models, data augmentation research has expanded in many directions [12; 37; 41; 2].

Original: The idea that G -invariance can be hardcoded into a model by combining multiple G -equivariant layers with data reduction layers (e.g., pooling) has a long history in deep learning.
Revised: The idea that G -invariance can be hardcoded into a model by combining multiple G -equivariant layers with data reduction layers (e.g., pooling) has a long history in deep learning.

Original: The most famous example of this idea is the conventional convolutional neural network (CNN) [32].
Revised: The most famous example of this idea is the conventional convolutional neural network (CNN) [32].

Original: Since then, a multitude of other group equivariant layers have been designed including two-dimensional rotation equivariant layers [47; 50; 36; 38; 39], three-dimensional rotational equivariant layers [46; 11; 16], layers equivariant to the Euclidean group and its subgroups [45] (which we test against in this paper), and layers that are equivariant with respect to the symmetric group [33].
Revised: Since then, a multitude of other group equivariant layers have been designed including two-dimensional rotation equivariant layers [47; 50; 36; 38; 39], three-dimensional rotational equivariant layers [46; 11; 16], layers equivariant to the Euclidean group and its subgroups [45] (which we test against in this paper), and layers that are equivariant with respect to the symmetric group [33].

Original: Our work is not the ﬁrst to analyze various aspects of invariance in neural network models.
Revised: Our work is not the ﬁrst to analyze various aspects of invariance in neural network models.

Original: Lyle et al.
Revised: Lyle et al.

Original: [34] analyzed invariance with respect to the beneﬁts and limitations of data augmentation and feature averaging, presenting both theoretical and empirical arguments for using feature averaging over data augmentation.
Revised: [34] analyzed invariance with respect to the beneﬁts and limitations of data augmentation and feature averaging, presenting both theoretical and empirical arguments for using feature averaging over data augmentation.

Original: More recently, Chen et al.
Revised: More recently, Chen et al.

Original: [6] presented a useful group-theoretic framework with which to understand data augmentation.
Revised: [6] presented a useful group-theoretic framework with which to understand data augmentation.

Original: Relevant to the present work, Chen et al.
Revised: Relevant to the present work, Chen et al.

Original: [5] introduced a notion of approximate invariance .
Revised: [5] introduced a notion of approximate invariance .

Original: Unlike that work, however, which focused on theoretical results related to data augmentation, this paper aims to introduce metrics that can be applied to modern deep learning architectures and answers questions about invariance from an empirical perspective.
Revised: Unlike that work, however, which focused on theoretical results related to data augmentation, this paper aims to introduce metrics that can be applied to modern deep learning architectures and answers questions about invariance from an empirical perspective.

Original: There are a number of existing works that proposed metrics aimed at measuring the extent to which a model is not equivariant (e.g. [8; 22; 18; 43; 49]).
Revised: There are a number of existing works that proposed metrics aimed at measuring the extent to which a model is not equivariant (e.g. [8; 22; 18; 43; 49]).

Original: Our work differs from these in two ways: (1) we build general metrics based on basic group theory that are designed to work across different groups and datatypes and (2) unlike other works that use their metric to evaluate the equivariance of a speciﬁc model, we use our metrics to explore how models learn (or do not learn) to be equivariant generally.
Revised: Our work differs from these in two ways: (1) we build general metrics based on basic group theory that are designed to work across different groups and datatypes and (2) unlike other works that use their metric to evaluate the equivariance of a speciﬁc model, we use our metrics to explore how models learn (or do not learn) to be equivariant generally.

Original: Finally, a range of recent works have shown that even beyond the standard evaluation statistics (e.g., accuracy), invariance is an important concept to consider when studying deep learning models.
Revised: Finally, a range of recent works have shown that even beyond the standard evaluation statistics (e.g., accuracy), invariance is an important concept to consider when studying deep learning models.

Original: For example, Kaur et al.
Revised: For example, Kaur et al.

Original: [25] showed that lack of invariance can be used to identify out-of-distribution inputs.
Revised: [25] showed that lack of invariance can be used to identify out-of-distribution inputs.

Original: A further series of works investigated whether excessive invariance can reduce adversarial robustness [23; 24; 40].
Revised: A further series of works investigated whether excessive invariance can reduce adversarial robustness [23; 24; 40].

Original: All of this work reinforces one of the primary messages of this paper, that it is important to be able to measure invariance and equivariance directly in a model.
Revised: All of this work reinforces one of the primary messages of this paper, that it is important to be able to measure invariance and equivariance directly in a model.

Original:  Quantifying Invariance and Equivariance
Revised:  Quantifying Invariance and Equivariance

Original: We begin this section by recalling the mathematical deﬁnitions of equivariance and invariance.
Revised: We begin this section by recalling the mathematical deﬁnitions of equivariance and invariance.

Original: We present these deﬁnitions in terms of the mathematical concept of a group, which formally captures the notion of symmetry [15].
Revised: We present these deﬁnitions in terms of the mathematical concept of a group, which formally captures the notion of symmetry [15].

Original: Assume that G is a group.
Revised: Assume that G is a group.

Original: We say that G acts on sets X and Y if there are maps φ X : G × X → X and φ Y : G × Y 
Revised: We say that G acts on sets X and Y if there are maps  X : G ⇥ X ! X and  Y : G ⇥ Y !

Original: → Y that respect the composition operation of G .
Revised: Y that respect the composition operation of G .

Original: That is, for g 1 , g 2 ∈ G and x ∈ X ,
Revised: That is, for g 1 , g 2 2 G and x 2 X ,

Original: [Equation]
Revised: [Equation]

Original: with an analogous condition for φ Y .
Revised: with an analogous condition for  Y .

Original: Whenever the meaning is clear, we simplify notation by writing φ X ( g, x ) =
Revised: Whenever the meaning is clear, we simplify notation by writing  X ( g, x ) =

Original: gx (with an analogous convention for φ Y ).
Revised: gx (with an analogous convention for  Y ).

Original: A map f : X → Y is said to be
Revised: A map f : X ! Y is said to be

Original: G - equivariant if for all x ∈ X and g ∈ G ,
Revised: G - equivariant if for all x 2 X and g 2 G ,

Original: [Equation]
Revised: [Equation]

Original: In the case where the map φ Y is trivial so that gy = y for all g ∈ G and y ∈ Y , we say that f is
Revised: In the case where the map  Y is trivial so that gy = y for all g 2 G and y 2 Y , we say that f is

Original: G - invariant .
Revised: G - invariant .

Original: Thus, invariance is a special case of equivariance.
Revised: Thus, invariance is a special case of equivariance.

Original: Assume that f : X → Y is a neural network where X is the ambient space of input data and Y is the target space.
Revised: Assume that f : X ! Y is a neural network where X is the ambient space of input data and Y is the target space.

Original: In many cases there is a natural way to factorize f into a composition f 
Revised: In many cases there is a natural way to factorize f into a composition f = f 2  fwhere f 1 : X !

Original: = f 2 ◦ fwhere f 1 : X → Z is known as the feature extractor, Z is the latent space of f , and f 2 : Z → Y is the classiﬁer.
Revised: Z is known as the feature extractor, Z is the latent space of f , and f 2 : Z ! Y is the classiﬁer.

Original: For example, if f is a ResNet50 CNN [20] then f 1 may consist of all residual blocks while f 2 would consist of the ﬁnal afﬁne classiﬁcation and softmax layers.
Revised: For example, if f is a ResNet50 CNN [20] then f 1 may consist of all residual blocks while f 2 would consist of the ﬁnal afﬁne classiﬁcation and softmax layers.

Original: We say that machine learning model f extracts G -equivariant features if f 1 is a G -equivariant function.
Revised: We say that machine learning model f extracts G -equivariant features if f 1 is a G -equivariant function.

Original: This is an especially meaningful distinction in the context of transfer learning where invariance or equivariance can be transferred to a new task via the invariance or equivariance of f 1 .
Revised: This is an especially meaningful distinction in the context of transfer learning where invariance or equivariance can be transferred to a new task via the invariance or equivariance of f 1 .

Original: Note that the deﬁnition of
Revised: Note that the deﬁnition of

Original: G -equivariant feature extraction requires a well-deﬁned action of G on Z , which may not be obvious in many cases.
Revised: G -equivariant feature extraction requires a well-deﬁned action of G on Z , which may not be obvious in many cases.

Original: Because the trivial action is deﬁned for any G and Z , we can always ask whether f extracts G -invariant features .
Revised: Because the trivial action is deﬁned for any G and Z , we can always ask whether f extracts G -invariant features .

Original: The following proposition provides some insight into how the invariance (or lack of invariance) of frelates to the invariance (or lack of invariance) of f .
Revised: The following proposition provides some insight into how the invariance (or lack of invariance) of frelates to the invariance (or lack of invariance) of f .

Original: Proposition 3.1.
Revised: Proposition 3.1.

Original: Let f : X → Y be a function that decomposes into f = f 2 ◦ f 1 where f 1 : X → Z and f 2 : Z → Y .
Revised: Let f : X ! Y be a function that decomposes into f = f 2  f 1 where f 1 : X ! Z and f 2 : Z !

Original:  Suppose that G acts on X , Z , and Y .
Revised: Y . Suppose that G acts on X , Z , and Y .

Original: f can be G -invariant even if f 1 and f 2 are not.
Revised: f can be G -invariant even if f 1 and f 2 are not.

Original: If f 1 is G -invariant, then f is G -invariant.
Revised: If f 1 is G -invariant, then f is G -invariant.

Original: A proof of Proposition 3.1 can be found in Section A.5.
Revised: A proof of Proposition 3.1 can be found in Section A.5.

Original: Note that Proposition 3.1.2 implies that if earlier layers of a network achieve invariance with respect to some group, then this invariance will persist into later layers.
Revised: Note that Proposition 3.1.2 implies that if earlier layers of a network achieve invariance with respect to some group, then this invariance will persist into later layers.

Original: This may be seen as part of the justiﬁcation of the common practice within the equivariant architectures community of building invariance through successive combinations of
Revised: This may be seen as part of the justiﬁcation of the common practice within the equivariant architectures community of building invariance through successive combinations of

Original: G -equivariant layers and pooling layers.
Revised: G -equivariant layers and pooling layers.

Original: Of course, the statement holds only when exact invariance is achieved.
Revised: Of course, the statement holds only when exact invariance is achieved.

Original: We see below that this is not generally the case.
Revised: We see below that this is not generally the case.

Original: 3.1 Measuring equivariance
Revised: 3.1 Measuring equivariance

Original: In this section we assume that both X and Y are vector spaces and the action of G on both X and Y is linear.
Revised: In this section we assume that both X and Y are vector spaces and the action of G on both X and Y is linear.

Original: In all of our experiments we assume that the action of G on X and Y is known.
Revised: In all of our experiments we assume that the action of G on X and Y is known.

Original: In the case that f is also a linear map, the equivariance of f can be checked directly by checking equivariance on a basis for X .
Revised: In the case that f is also a linear map, the equivariance of f can be checked directly by checking equivariance on a basis for X .

Original: By extension, the equivariance of many common types of neural network layers can be checked when these can be framed as linear maps (e.g., convolutional layers).
Revised: By extension, the equivariance of many common types of neural network layers can be checked when these can be framed as linear maps (e.g., convolutional layers).

Original: However, there is no systematic procedure for checking the equivariance of a nonlinear function f .
Revised: However, there is no systematic procedure for checking the equivariance of a nonlinear function f .

Original: If f is the composition of a sequence of functions f 1 , f 2 , . . .
Revised: If f is the composition of a sequence of functions f 1 , f 2 , . . .

Original: , f n and we can check that each is equivariant, then we know that f is equivariant, but we cannot prove that a function is not equivariant just by proving that each layer is not equivariant (this follows from Proposition 3.1.1).
Revised: , f n and we can check that each is equivariant, then we know that f is equivariant, but we cannot prove that a function is not equivariant just by proving that each layer is not equivariant (this follows from Proposition 3.1.1).

Original: We are thus motivated to introduce a family of metrics that can be used to empirically measure the extent to which a function deviates from being equivariant on a data distribution D on X .
Revised: We are thus motivated to introduce a family of metrics that can be used to empirically measure the extent to which a function deviates from being equivariant on a data distribution D on X .

Original: Since we assume in this section that the action of G on Y is linear, we can deﬁne the kernel of this action, ker( φ Y ) , which is a subgroup of G .
Revised: Since we assume in this section that the action of G on Y is linear, we can deﬁne the kernel of this action, ker(  Y ) , which is a subgroup of G .

Original: ker( φ Y ) consists of all those g ∈ G such that g acts as the identity on Y .
Revised: ker(  Y ) consists of all those g 2 G such that g acts as the identity on Y .

Original: For x ∈ X , we deﬁne ˆ f ( x ) to be the expected value of f ( gx ) over ker( φ Y ) ,
Revised: For x 2 X , we deﬁne ˆ f ( x ) to be the expected value of f ( gx ) over ker(  Y ) ,

Original: [Equation]
Revised: [Equation]

Original: where µ is the usual normalized Haar measure on subgroup ker( G ) .
Revised: where µ is the usual normalized Haar measure on subgroup ker( G ) .

Original: Note that when f is G -equivariant, then for each g ∈ ker( φ Y ) , f ( gx ) =
Revised: Note that when f is G -equivariant, then for each g 2 ker(  Y ) , f ( gx ) =

Original: gf ( x ) =
Revised: gf ( x ) =

Original: f
Revised: f

Original: ( x ) and hence ˆ f = f .
Revised: ( x ) and hence ˆ f = f .

Original: Let ( D , ν ) be a probability distribution on X and let m : 
Revised: Let ( D , ⌫ ) be a probability distribution on X and let m : Y ⇥ Y !

Original: Y × Y → R ≥ 0 be a distance function on Y .
Revised: R  0 be a distance function on Y .

Original: We can use m to measure the extent to which f deviates from being G -equivariant by computing
Revised: We can use m to measure the extent to which f deviates from being G -equivariant by computing

Original: [Equation]
Revised: [Equation]

Original: where this time µ is the normalized Haar measure on G .
Revised: where this time µ is the normalized Haar measure on G .

Original: Note that the argument m ( f ( gx ) , g ˆ f ( x )) measures the extent to which (1) fails to hold across distribution D , except that gf ( x ) is replaced by g ˆ f ( x ) .
Revised: Note that the argument m ( f ( gx ) , g ˆ f ( x )) measures the extent to which (1) fails to hold across distribution D , except that gf ( x ) is replaced by g ˆ f ( x ) .

Original: We use ˆ f ( x ) because it averages over all values in the orbit of x (under G ) that should map to f ( x ) .
Revised: We use ˆ f ( x ) because it averages over all values in the orbit of x (under G ) that should map to f ( x ) .

Original: If f were genuinely G -equivariant, all these values f ( gx ) would yield f ( x ) .
Revised: If f were genuinely G -equivariant, all these values f ( gx ) would yield f ( x ) .

Original: This choice is supported by the fact that it naturally interpolates between the two extreme cases: G acts trivially on
Revised: This choice is supported by the fact that it naturally interpolates between the two extreme cases: G acts trivially on

Original: Y (invariance) and G acts faithfully on Y .
Revised: Y (invariance) and G acts faithfully on Y .

Original: In the former case ˆ f ( x ) is the average value of f ( gx ) over all of g ∈ G and in the latter case ˆ f ( x ) =
Revised: In the former case ˆ f ( x ) is the average value of f ( gx ) over all of g 2 G and in the latter case ˆ f ( x ) =

Original: f
Revised: f

Original: ( x ) .
Revised: ( x ) .

Original: The proposition below proves that when the action of G is faithful on X , Y , (3) being 0 is equivalent to f satisfying (1) on a set of measure 1 .
Revised: The proposition below proves that when the action of G is faithful on X , Y , (3) being 0 is equivalent to f satisfying (1) on a set of measure 1 .

Original: Proposition 3.2.
Revised: Proposition 3.2.

Original: Let f : X → Y be a continuous function, G a group that acts linearly and faithfully on both X and Y , and m : 
Revised: Let f : X ! Y be a continuous function, G a group that acts linearly and faithfully on both X and Y , and m : Y ⇥ Y !

Original: Y × Y → R ≥ 0 a metric.
Revised: R  0 a metric.

Original: Let D be a distribution on X .
Revised: Let D be a distribution on X .

Original: Then (3) is zero if and only if f is G -equivariant almost surely, i.e., on a set of measure 1 .
Revised: Then (3) is zero if and only if f is G -equivariant almost surely, i.e., on a set of measure 1 .

Original: We provide a proof of Proposition 3.2 in Appendix A.
Revised: We provide a proof of Proposition 3.2 in Appendix A.

Original: To approximate (3) for real models and data where we always work with ﬁnite groups and ﬁnite samples of D , we deﬁne the G -EED of f with respect to m to be
Revised: To approximate (3) for real models and data where we always work with ﬁnite groups and ﬁnite samples of D , we deﬁne the G -EED of f with respect to m to be

Original: [Equation]
Revised: [Equation]

Original: Note that since G is a ﬁnite group (and hence discrete), the Haar measure turns into the usual counting measure.
Revised: Note that since G is a ﬁnite group (and hence discrete), the Haar measure turns into the usual counting measure.

Original: In the remainder of this section we describe some speciﬁc types of G -EED that may be relevant to computer vision tasks.
Revised: In the remainder of this section we describe some speciﬁc types of G -EED that may be relevant to computer vision tasks.

Original: By convention, when using a distance function m for which larger values of m ( x 1 , x 2 ) indicates that x 1 and x 2 are “closer” (the opposite of a proper metric), we attach a negative sign to m .
Revised: By convention, when using a distance function m for which larger values of m ( x 1 , x 2 ) indicates that x 1 and x 2 are “closer” (the opposite of a proper metric), we attach a negative sign to m .

Original: For example, rather than using cosine similarity, we use negative cosine similarity (e.g., (5)).
Revised: For example, rather than using cosine similarity, we use negative cosine similarity (e.g., (5)).

Original: This way, larger values of G -EED consisently indicate less invariance, regardless of the m used.
Revised: This way, larger values of G -EED consisently indicate less invariance, regardless of the m used.

Original: The channelwise G -equivariance of convolutional layer activations: Throughout most layers of a
Revised: The channelwise G -equivariance of convolutional layer activations: Throughout most layers of a

Original: CNN an individual image is represented as a 3 -tensor.
Revised: CNN an individual image is represented as a 3 -tensor.

Original: Let f (cid:96) : 
Revised: Let f ` : X !

Original: X → R C (cid:96) × H (cid:96) × W (cid:96) be the composition of the ﬁrst (cid:96) layers of a CNN such that for input image x ∈ X , f (cid:96) ( x ) is a C (cid:96) × H (cid:96) × W (cid:96) tensor where the ﬁrst dimension corresponds to the channels of the representation and the second and third dimensions correspond to the two spatial dimensions.
Revised: R C ` ⇥ H ` ⇥ W ` be the composition of the ﬁrst ` layers of a CNN such that for input image x 2 X , f ` ( x ) is a C ` ⇥ H ` ⇥ W ` tensor where the ﬁrst dimension corresponds to the channels of the representation and the second and third dimensions correspond to the two spatial dimensions.

Original: Suppose that G is a ﬁnite group that acts on images and other 2 -tensors (e.g., rotations, translations, and reﬂections).
Revised: Suppose that G is a ﬁnite group that acts on images and other 2 -tensors (e.g., rotations, translations, and reﬂections).

Original: To understand the extent to which the ﬁrst (cid:96) layers of the network are G -equivariant, we can measure the G -EED of f (cid:96) .
Revised: To understand the extent to which the ﬁrst ` layers of the network are G -equivariant, we can measure the G -EED of f ` .

Original: Although there are numerous choices of m for (3) that could be used to measure the channelwise difference between f (cid:96) ( gx ) and gf (cid:96) ( x ) , we choose the following: let
Revised: Although there are numerous choices of m for (3) that could be used to measure the channelwise difference between f ` ( gx ) and gf ` ( x ) , we choose the following: let

Original: S : R H (cid:96) × W (cid:96) × R H (cid:96) × W (cid:96) → [ − 1 , 1] be the cosine similarity on individual channels treated as vectors in R H (cid:96) W (cid:96) .
Revised: S : R H ` ⇥ W ` ⇥ R H ` ⇥ W ` ! [  1 , 1] be the cosine similarity on individual channels treated as vectors in R H ` W ` .

Original: Write [ f (cid:96) ( x )] i for the i th channel of f (cid:96) ( x ) .
Revised: Write [ f ` ( x )] i for the i th channel of f ` ( x ) .

Original: Then we set
Revised: Then we set

Original: [Equation]
Revised: [Equation]

Original: That is, let m be the negative of the average cosine similarity between individual channels of f (cid:96) ( gx ) and g ˆ f (cid:96) ( x ) .
Revised: That is, let m be the negative of the average cosine similarity between individual channels of f ` ( gx ) and g ˆ f ` ( x ) .

Original: This gives:
Revised: This gives:

Original: [Equation]
Revised: [Equation]

Original: Note that since rotation, translation, and reﬂection groups all act faithfully on R H (cid:96) × W (cid:96) , for these speciﬁc G , ˆ f = f .
Revised: Note that since rotation, translation, and reﬂection groups all act faithfully on R H ` ⇥ W ` , for these speciﬁc G , ˆ f = f .

Original: We call this version of G -EED channelwise G -EED .
Revised: We call this version of G -EED channelwise G -EED .

Original: This metric assumes that
Revised: This metric assumes that

Original: G acts on each channel in a 3-tensor independently.
Revised: G acts on each channel in a 3-tensor independently.

Original: It does not account for the more complicated setting where the action of G either permutes or mixes channels of R C (cid:96) × H (cid:96) × W (cid:96) in a non-trivial way.
Revised: It does not account for the more complicated setting where the action of G either permutes or mixes channels of R C ` ⇥ H ` ⇥ W ` in a non-trivial way.

Original: In this work we always assume that the action of G on channels of R C (cid:96) × H (cid:96) × W (cid:96) is identical to the action of G on X (up to differences in spatial scale and number of channels) except for the models with equivariant architectures, where the action of G is hardcoded to permute channels in a speciﬁc way.
Revised: In this work we always assume that the action of G on channels of R C ` ⇥ H ` ⇥ W ` is identical to the action of G on X (up to differences in spatial scale and number of channels) except for the models with equivariant architectures, where the action of G is hardcoded to permute channels in a speciﬁc way.

Original: In these latter cases we match channels in accordances to the speciﬁcs of the architecture.
Revised: In these latter cases we match channels in accordances to the speciﬁcs of the architecture.

Original: We consider the case where the action of G on R C (cid:96) × H (cid:96) × W (cid:96) may permute channels in non-equivariant architectures in Appendix A.4.
Revised: We consider the case where the action of G on R C ` ⇥ H ` ⇥ W ` may permute channels in non-equivariant architectures in Appendix A.4.

Original: Invariance of latent space representations: Consider a model f consisting of feature extractor f 1 : X → R k and classiﬁer f 2 : R k 
Revised: Invariance of latent space representations: Consider a model f consisting of feature extractor f 1 : X ! R k and classiﬁer f 2 : R k !

Original: → R n .
Revised: R n .

Original: If G is some group that acts on X , we can ask whether f 1 extracts G -invariant features.
Revised: If G is some group that acts on X , we can ask whether f 1 extracts G -invariant features.

Original: Deﬁne M to be either the average (cid:96) 2 -distance or cosine similarity between distinct points in the set f 1 ( D ) .
Revised: Deﬁne M to be either the average ` 2 -distance or cosine similarity between distinct points in the set f 1 ( D ) .

Original: By setting m to be the (cid:96) 2 -distance (respectively cosine similarity), we calculate the latent space G -EED as
Revised: By setting m to be the ` 2 -distance (respectively cosine similarity), we calculate the latent space G -EED as

Original: [Equation]
Revised: [Equation]

Original: Note that because in this setting G acts trivially on the latent space R k (because of the invariance assumption), ˆ f 1 ( x ) = 1 | G | (cid:80) g ∈ G f 1 ( gx ) .
Revised: Note that because in this setting G acts trivially on the latent space R k (because of the invariance assumption), ˆ f 1 ( x ) = [Equation] | [Equation]

Revised: gx ) .

Original: We describe why the normalization term M is necessary in
Revised: We describe why the normalization term M is necessary in

Original: Section A.7 of the Appendix.
Revised: Section A.7 of the Appendix.

Original: See also Figure 14.
Revised: See also Figure 14.

Original: As we show in Section 4.1, it is often useful to consider latent space G -EED with respect to both Euclidean distance and negative cosine similarity.
Revised: As we show in Section 4.1, it is often useful to consider latent space G -EED with respect to both Euclidean distance and negative cosine similarity.

Original: Invariance at the softmax layer of classiﬁers:
Revised: Invariance at the softmax layer of classiﬁers:

Original: While the two examples above focused on calculating invariance and equivariance at different intermediate layers of computer vision models, invariance of classiﬁcation models is most commonly considered with respect to the ﬁnal softmax output.
Revised: While the two examples above focused on calculating invariance and equivariance at different intermediate layers of computer vision models, invariance of classiﬁcation models is most commonly considered with respect to the ﬁnal softmax output.

Original: In this paper we choose to use KL-divergence for m because it is a distance function designed to handle probability distributions, which softmax outputs approximate.
Revised: In this paper we choose to use KL-divergence for m because it is a distance function designed to handle probability distributions, which softmax outputs approximate.

Original: In particular,
Revised: In particular,

Original: [Equation]
Revised: [Equation]

Original: We call this metric the softmax G -EED .
Revised: We call this metric the softmax G -EED .

Original:  Understanding invariance and equivariance in deep learning
Revised:  Understanding invariance and equivariance in deep learning

Original: To prototype G -EED we experiment with the ﬁnite cyclic group C 8 that acts on images by 45 ◦ rotations.
Revised: To prototype G -EED we experiment with the ﬁnite cyclic group C 8 that acts on images by 45  rotations.

Original: This symmetry is relevant to datasets where imagery does not have a preferred orientation.
Revised: This symmetry is relevant to datasets where imagery does not have a preferred orientation.

Original: The datasets we use include Rotated MNIST which consists of randomly rotated MNIST digits [14] from classes 0-8 and xView Maritime , a chipped version of the xView object detector overhead dataset [31] composed of the nine maritime classes.
Revised: The datasets we use include Rotated MNIST which consists of randomly rotated MNIST digits [14] from classes 0-8 and xView Maritime , a chipped version of the xView object detector overhead dataset [31] composed of the nine maritime classes.

Original: We chose xView Maritime because it is a more real-world dataset that has an obvious symmetry (rotation) that is not hardcoded into standard CNNs.
Revised: We chose xView Maritime because it is a more real-world dataset that has an obvious symmetry (rotation) that is not hardcoded into standard CNNs.

Original: We describe these and other datasets we use in detail in Section A.2.
Revised: We describe these and other datasets we use in detail in Section A.2.

Original: To reduce the computational burden, when calculating (4) we only used 50 randomly chosen examples from the corresponding dataset.
Revised: To reduce the computational burden, when calculating (4) we only used 50 randomly chosen examples from the corresponding dataset.

Original: We found that evaluating at more points did not substantially change the results.
Revised: We found that evaluating at more points did not substantially change the results.

Original: When not otherwise stated all invariance and equivariance measurements were calculated using points from the test set, not the training set.
Revised: When not otherwise stated all invariance and equivariance measurements were calculated using points from the test set, not the training set.

Original: The normalization constant for latent space G -EED is calculated over 200 randomly chosen points.
Revised: The normalization constant for latent space G -EED is calculated over 200 randomly chosen points.

Original: 4.1 Do networks trained with augmentation learn equivariant layers?
Revised: 4.1 Do networks trained with augmentation learn equivariant layers?

Original: In this section we apply our metrics to standard CNNs and C 8 -rotation equivariant, steerable CNNs ( C 8 -CNN) [45] to compare the invariance or equivariance of a model trained with augmentation with the invariance or equivariance of a model that is explicitly designed to learn invariance through progressive equivariant layers and pooling.
Revised: In this section we apply our metrics to standard CNNs and C 8 -rotation equivariant, steerable CNNs ( C 8 -CNN) [45] to compare the invariance or equivariance of a model trained with augmentation with the invariance or equivariance of a model that is explicitly designed to learn invariance through progressive equivariant layers and pooling.

Original: We train 10 copies of each model type for 2,000 iterations on rotated MNIST.
Revised: We train 10 copies of each model type for 2,000 iterations on rotated MNIST.

Original: We apply random rotation augmentation to the models during training and all achieve an accuracy of over 98% on the test set.
Revised: We apply random rotation augmentation to the models during training and all achieve an accuracy of over 98% on the test set.

Original: By design, for any 1 ≤ k ≤ 6 , the ﬁrst k -blocks of one of the C 8 -CNN models will be approximately rotation equivariant (up to hardcoded permutation of channels which we take into consideration when applying our metrics).
Revised: By design, for any 1  k  6 , the ﬁrst k -blocks of one of the C 8 -CNN models will be approximately rotation equivariant (up to hardcoded permutation of channels which we take into consideration when applying our metrics).

Original: The standard wisdom is that, with pooling, this will lead to an invariant representation in the latent space.
Revised: The standard wisdom is that, with pooling, this will lead to an invariant representation in the latent space.

Original: Despite the fact that both families of models achieve similar performance, we note that their invariance and equivariance properties differ signiﬁcantly.
Revised: Despite the fact that both families of models achieve similar performance, we note that their invariance and equivariance properties differ signiﬁcantly.

Original: The channelwise C 8 -EED of the composition of the ﬁrst k blocks (where 1 ≤ k ≤ 6 ) of the C 8 -CNN is signiﬁcantly higher than that of the CNN, indicating that (as claimed) the C 8 -CNN is more equivariant with respect to individual channel rotations of 45 ◦ in both input and hidden representations (see Figure 7).
Revised: The channelwise C 8 -EED of the composition of the ﬁrst k blocks (where 1  k  6 ) of the C 8 -CNN is signiﬁcantly higher than that of the CNN, indicating that (as claimed) the C 8 -CNN is more equivariant with respect to individual channel rotations of 45  in both input and hidden representations (see Figure 7).

Original: Beyond that we see that equivariance decays for both models as input travels through additional blocks.
Revised: Beyond that we see that equivariance decays for both models as input travels through additional blocks.

Original: This is particularly true for the C 8 -CNN.
Revised: This is particularly true for the C 8 -CNN.

Original: We conjecture that this is likely caused by the accumulation of interpolation artifacts associated with rotation.
Revised: We conjecture that this is likely caused by the accumulation of interpolation artifacts associated with rotation.

Original: Perhaps even more interesting is the fact that for no layer of either model do the channelwise C 8 -EED values increase beyond a small jump at the beginning of training.
Revised: Perhaps even more interesting is the fact that for no layer of either model do the channelwise C 8 -EED values increase beyond a small jump at the beginning of training.

Original: This suggests that layerwise equivariance may not always be aligned with the learning objective and that learned invariance does not arise through the naive form of learned equivariance.
Revised: This suggests that layerwise equivariance may not always be aligned with the learning objective and that learned invariance does not arise through the naive form of learned equivariance.

Original: Both in terms of the Euclidean distance version of latent space C 8 -EED and softmax C 8 -EED, the
Revised: Both in terms of the Euclidean distance version of latent space C 8 -EED and softmax C 8 -EED, the

Original: C 8 -CNNs show more invariance than the conventional CNNs (see Figure 2) but the difference is less dramatic than it is for channelwise C 8 -EED.
Revised: C 8 -CNNs show more invariance than the conventional CNNs (see Figure 2) but the difference is less dramatic than it is for channelwise C 8 -EED.

Original: This suggests that the CNNs likely catch up in terms of C 8 -invariance using mechanisms distinct from layerwise C 8 -equivariance.
Revised: This suggests that the CNNs likely catch up in terms of C 8 -invariance using mechanisms distinct from layerwise C 8 -equivariance.

Original: Notable also is the fact that unlike channelwise C 8 -EED, which did not indicate increased C 8 -equivariance over the course of training, both latent space and softmax C 8 -EED decreased with training (suggesting learned invariance at these layers).
Revised: Notable also is the fact that unlike channelwise C 8 -EED, which did not indicate increased C 8 -equivariance over the course of training, both latent space and softmax C 8 -EED decreased with training (suggesting learned invariance at these layers).

Original: Most surprisingly, in Figure 8 (left) we see that the C 8 -CNNs are less invariant than the conventional
Revised: Most surprisingly, in Figure 8 (left) we see that the C 8 -CNNs are less invariant than the conventional

Original: CNNs with respect to the cosine similarity version of latent space C 8 -EED.
Revised: CNNs with respect to the cosine similarity version of latent space C 8 -EED.

Original: We conjecture two possible reasons for this.
Revised: We conjecture two possible reasons for this.

Original: The ﬁrst is based on the fact that C 8 -CNNs are designed to be equivariant on the nose , not up to scaling .
Revised: The ﬁrst is based on the fact that C 8 -CNNs are designed to be equivariant on the nose , not up to scaling .

Original: The structural constraint of exact equivariance may actually be misaligned with cosine similarity where vector magnitude no longer matters.
Revised: The structural constraint of exact equivariance may actually be misaligned with cosine similarity where vector magnitude no longer matters.

Original: From this perspective, projective representation theory, where symmetries are only taken up to scaling, might be a proﬁtable direction of future research in equivariant architectures.
Revised: From this perspective, projective representation theory, where symmetries are only taken up to scaling, might be a proﬁtable direction of future research in equivariant architectures.

Original: The second possible explanation arises from Figure 8 (right) which shows that in terms of absolute cosine similarity (that is, without the normalization term M in (6)), the C 8 -CNN is more invariant.
Revised: The second possible explanation arises from Figure 8 (right) which shows that in terms of absolute cosine similarity (that is, without the normalization term M in (6)), the C 8 -CNN is more invariant.

Original: It may be that while C 8 -CNNs indeed cluster orbits of points under the C 8 action closer together, the conventional CNNs are better at spreading other points further away in the latent space.
Revised: It may be that while C 8 -CNNs indeed cluster orbits of points under the C 8 action closer together, the conventional CNNs are better at spreading other points further away in the latent space.

Original: Summary: Equivariant architectures and nonequivariant architectures capture invariance in distinct ways.
Revised: Summary: Equivariant architectures and nonequivariant architectures capture invariance in distinct ways.

Original: Nonequivariant networks do not learn layerwise equivariance (at least with respect to the naive
Revised: Nonequivariant networks do not learn layerwise equivariance (at least with respect to the naive

Original: C 8 action given by rotating individual channels in a hidden representation).
Revised: C 8 action given by rotating individual channels in a hidden representation).

Original: Rather, their invariance seems to be captured by the ﬁnal layers.
Revised: Rather, their invariance seems to be captured by the ﬁnal layers.

Original: The level of invariance measured in the latent space depends on the underlying metric m which is used.
Revised: The level of invariance measured in the latent space depends on the underlying metric m which is used.

Original: 4.2 Does learned invariance hold for out-of-distribution data?
Revised: 4.2 Does learned invariance hold for out-of-distribution data?

Original: It was noted in Lyle et al.
Revised: It was noted in Lyle et al.

Original: [34] that while augmentation may be satisfactory for many tasks, there is a risk that learned invariance will not extend to out-of-distribution (OOD) data.
Revised: [34] that while augmentation may be satisfactory for many tasks, there is a risk that learned invariance will not extend to out-of-distribution (OOD) data.

Original: We investigate this question using G -EED metrics, studying the conventional CNN and C 8 -equivariant CNN from
Revised: We investigate this question using G -EED metrics, studying the conventional CNN and C 8 -equivariant CNN from

Original: Section 4.1 and a conventional CNN with untrained weights that can be used for comparison.
Revised: Section 4.1 and a conventional CNN with untrained weights that can be used for comparison.

Original: Note that because rotation invariance is at some level hardcoded into the architecture of the C 8 -CNN, our default assumption is that the C 8 -CNN models will tend to be more invariant on OOD data than models with learned augmentation.
Revised: Note that because rotation invariance is at some level hardcoded into the architecture of the C 8 -CNN, our default assumption is that the C 8 -CNN models will tend to be more invariant on OOD data than models with learned augmentation.

Original: Images of example OOD data as well as dataset descriptions can be found in Appendix A.2.
Revised: Images of example OOD data as well as dataset descriptions can be found in Appendix A.2.

Original: The left plot in Figure 3 shows the latent space C 8 -EED for the three model families that we tested.
Revised: The left plot in Figure 3 shows the latent space C 8 -EED for the three model families that we tested.

Original: We can see that random weights extract signiﬁcantly less invariant latent space representations compared to both the augmentation-trained CNNs and C 8 -CNNs.
Revised: We can see that random weights extract signiﬁcantly less invariant latent space representations compared to both the augmentation-trained CNNs and C 8 -CNNs.

Original: Although this difference is not surprising for the C 8 -CNNs, for the standard CNNs it indicates that augmentation does learn some rotation-invariant features that generalize to OOD data.
Revised: Although this difference is not surprising for the C 8 -CNNs, for the standard CNNs it indicates that augmentation does learn some rotation-invariant features that generalize to OOD data.

Original: Furthermore, while C 8 -CNNs do exhibit more latent space invariance than the augmentation-trained CNNs, the difference is insigniﬁcant compared to the difference between augmentation-trained CNNs and CNNs with random weights.
Revised: Furthermore, while C 8 -CNNs do exhibit more latent space invariance than the augmentation-trained CNNs, the difference is insigniﬁcant compared to the difference between augmentation-trained CNNs and CNNs with random weights.

Original: Note that in these OOD experiments, the normalization term M in (6) is calculated using the OOD data (rather than the training or test set).
Revised: Note that in these OOD experiments, the normalization term M in (6) is calculated using the OOD data (rather than the training or test set).

Original: This choice was made when considering situations in which a frozen network is used in combination with metric learning methods, as in Snell et al.
Revised: This choice was made when considering situations in which a frozen network is used in combination with metric learning methods, as in Snell et al.

Original: [42], to solve a task with data drawn from a shifted distribution.
Revised: [42], to solve a task with data drawn from a shifted distribution.

Original: As a showcase of how a single model can display different types of invariance, the CNNs with random weights are far more invariant in terms of softmax C 8 -EED than the trained C 8 -CNN, which is more invariant than the trained CNN (right plot, Figure 3).
Revised: As a showcase of how a single model can display different types of invariance, the CNNs with random weights are far more invariant in terms of softmax C 8 -EED than the trained C 8 -CNN, which is more invariant than the trained CNN (right plot, Figure 3).

Original: We suspect that invariance of the CNNs with random weights arises from the fact that an untrained network tends to be insensitive to input.
Revised: We suspect that invariance of the CNNs with random weights arises from the fact that an untrained network tends to be insensitive to input.

Original: This observation is useful to keep in mind, especially as the concept of invariance is frequently treated as a net beneﬁt to any model.
Revised: This observation is useful to keep in mind, especially as the concept of invariance is frequently treated as a net beneﬁt to any model.

Original: Invariance is useful when it is aligned with other metrics more directly related to the task the model was designed for.
Revised: Invariance is useful when it is aligned with other metrics more directly related to the task the model was designed for.

Original: Summary: Our experiments suggest that augmentation trained networks do learn invariance that mildly generalizes to OOD data.
Revised: Summary: Our experiments suggest that augmentation trained networks do learn invariance that mildly generalizes to OOD data.

Original: A single model can display differing kinds of invariance (an untrained network does not extract invariant features but through insensitivity may make invariant predictions).
Revised: A single model can display differing kinds of invariance (an untrained network does not extract invariant features but through insensitivity may make invariant predictions).

Original: In cases where invariance is critical and OOD data is expected, equivariant architectures may be a safer choice than training with augmentation.
Revised: In cases where invariance is critical and OOD data is expected, equivariant architectures may be a safer choice than training with augmentation.

Original: 4.3 How does the use of pretrained weights affect invariance and equivariance?
Revised: 4.3 How does the use of pretrained weights affect invariance and equivariance?

Original: It has become standard practice in computer vision to initialize a model using weights trained on a large, diverse image dataset such as ImageNet [13].
Revised: It has become standard practice in computer vision to initialize a model using weights trained on a large, diverse image dataset such as ImageNet [13].

Original: It is reasonable to ask how such a strategy affects the invariance and equivariance of the resulting models.
Revised: It is reasonable to ask how such a strategy affects the invariance and equivariance of the resulting models.

Original: We choose four different image classiﬁer architectures: ResNet50 [20], AlexNet [29], DenseNet121 [21], and LeViT192 [1].
Revised: We choose four different image classiﬁer architectures: ResNet50 [20], AlexNet [29], DenseNet121 [21], and LeViT192 [1].

Original: For each of these architectures, we initialized ﬁve models with random weights and ﬁve models with weights from either the Torchvision package [35] (ResNet50, AlexNet, and DenseNet121) or Timm [48] (LeViT192).
Revised: For each of these architectures, we initialized ﬁve models with random weights and ﬁve models with weights from either the Torchvision package [35] (ResNet50, AlexNet, and DenseNet121) or Timm [48] (LeViT192).

Original: We then trained all of these models on the xView Maritime training set.
Revised: We then trained all of these models on the xView Maritime training set.

Original: Next, we evaluated the latent space C 8 -EED and softmax C 8 -EED on the xView Maritime test set.
Revised: Next, we evaluated the latent space C 8 -EED and softmax C 8 -EED on the xView Maritime test set.

Original: It is important to note that pretrained weights, which were generated by training on ImageNet, might not be expected to have learned to extract fully rotationally invariant features.
Revised: It is important to note that pretrained weights, which were generated by training on ImageNet, might not be expected to have learned to extract fully rotationally invariant features.

Original: Indeed, the objects found in ImageNet mostly have a preferred orientation at which they generally are seen (there are very few instances of upside-down dogs or vehicles in ImageNet).
Revised: Indeed, the objects found in ImageNet mostly have a preferred orientation at which they generally are seen (there are very few instances of upside-down dogs or vehicles in ImageNet).

Original: Figure 4 shows the latent space C 8 -EED for all eight model types recorded every 200 iterations.
Revised: Figure 4 shows the latent space C 8 -EED for all eight model types recorded every 200 iterations.

Original: We see that in this experiment and for this speciﬁc metric, models trained from scratch extract more invariant features in their latent space.
Revised: We see that in this experiment and for this speciﬁc metric, models trained from scratch extract more invariant features in their latent space.

Original: Moreover, while the invariance of models trained from scratch tends to decrease slightly over the course of training (latent space C 8 -EED increases), the invariance of models trained using pretrained weights tends to increase slightly.
Revised: Moreover, while the invariance of models trained from scratch tends to decrease slightly over the course of training (latent space C 8 -EED increases), the invariance of models trained using pretrained weights tends to increase slightly.

Original: This may relate to ImageNet’s lack of object classes that appear at a wide range of orientations.
Revised: This may relate to ImageNet’s lack of object classes that appear at a wide range of orientations.

Original: The models with pretrained weights may need to learn additional rotation invariance.
Revised: The models with pretrained weights may need to learn additional rotation invariance.

Original: Contrast that with the weights trained from scratch that may learn non-robust rotation invariant features early which are reﬁned to less rotationally invariant features that better optimize the cross-entropy loss function later.
Revised: Contrast that with the weights trained from scratch that may learn non-robust rotation invariant features early which are reﬁned to less rotationally invariant features that better optimize the cross-entropy loss function later.

Original: This, along with the fact that models using pretrained weights tend to have slightly higher accuracy, points to a complicated dynamics between model robustness, model invariance, and model performance which likely requires further exploration.
Revised: This, along with the fact that models using pretrained weights tend to have slightly higher accuracy, points to a complicated dynamics between model robustness, model invariance, and model performance which likely requires further exploration.

Original: We also calculated the latent space D 8 -EED (where D 8 is the order 16 dihedral group) for these same models and dataset.
Revised: We also calculated the latent space D 8 -EED (where D 8 is the order 16 dihedral group) for these same models and dataset.

Original: The results are recorded in Figure 10.
Revised: The results are recorded in Figure 10.

Original: We ﬁnd the patterns to be fairly similar.
Revised: We ﬁnd the patterns to be fairly similar.

Original: On the other hand, Figure 16 in the Appendix shows that, in terms of softmax C 8 -EED, the invariance properties of pretrained networks vs. networks trained from scratch is somewhat more ambiguous.
Revised: On the other hand, Figure 16 in the Appendix shows that, in terms of softmax C 8 -EED, the invariance properties of pretrained networks vs. networks trained from scratch is somewhat more ambiguous.

Original: scratch’ and 5 independent trainings for ‘pretrained’.
Revised: scratch’ and 5 independent trainings for ‘pretrained’.

Original: Summary: Our experiments make it clear that the way in which invariances are learned differs between networks using pretrained weights and networks trained from scratch.
Revised: Summary: Our experiments make it clear that the way in which invariances are learned differs between networks using pretrained weights and networks trained from scratch.

Original: 4.4 The invariance of supervised and self-supervised models
Revised: 4.4 The invariance of supervised and self-supervised models

Original: In an additional experiment, we compared the invariance of supervised models to the invariance of self-supervised models.
Revised: In an additional experiment, we compared the invariance of supervised models to the invariance of self-supervised models.

Original: To do this we evaluated four different convolutional neural networks in one of the simplest possible settings where G is the order 2 group of reﬂections across the vertical axis.
Revised: To do this we evaluated four different convolutional neural networks in one of the simplest possible settings where G is the order 2 group of reﬂections across the vertical axis.

Original: The models we chose to test were a standard ResNet50 (we used the Torchvision pretrained weights)
Revised: The models we chose to test were a standard ResNet50 (we used the Torchvision pretrained weights)

Original: [20; 35], a Big Transfer ResNet50V2_101 [26] (with weights from ‘PyTorch Image Models’ [48]), a
Revised: [20; 35], a Big Transfer ResNet50V2_101 [26] (with weights from ‘PyTorch Image Models’ [48]), a

Original: ResNet50 trained using the self-supervised method DINO (we used the author’s pretrained weights) [4], and a ResNet50 trained using the self-supervised method SimCLR [7] (we used weights from [44]).
Revised: ResNet50 trained using the self-supervised method DINO (we used the author’s pretrained weights) [4], and a ResNet50 trained using the self-supervised method SimCLR [7] (we used weights from [44]).

Original: Note that the ﬁrst two models utilized supervised training (with different size training sets) and the second two utilized self-supervised training techniques.
Revised: Note that the ﬁrst two models utilized supervised training (with different size training sets) and the second two utilized self-supervised training techniques.

Original: Further, SimCLR is trained with a contrastive loss that directly optimizes for invariance of input to speciﬁc transformations (including reﬂection).
Revised: Further, SimCLR is trained with a contrastive loss that directly optimizes for invariance of input to speciﬁc transformations (including reﬂection).

Original: On the other hand, DINO uses ‘knowledge distillation’, without a contrastive loss.
Revised: On the other hand, DINO uses ‘knowledge distillation’, without a contrastive loss.

Original: We choose to concentrate on latent space G -EED in this experiment.
Revised: We choose to concentrate on latent space G -EED in this experiment.

Original: Our results can be found in Figure 5.
Revised: Our results can be found in Figure 5.

Original: Note that since all of these models have a 2048 -dimensional latent space, we can directly compare them.
Revised: Note that since all of these models have a 2048 -dimensional latent space, we can directly compare them.

Original: This is something we could not do in Section 4.3.
Revised: This is something we could not do in Section 4.3.

Original: We see that in terms of both versions of latent space G -EED (that which uses Euclidean distance and that which uses cosine similarity), the model trained using SimCLR has signiﬁcantly more invariance.
Revised: We see that in terms of both versions of latent space G -EED (that which uses Euclidean distance and that which uses cosine similarity), the model trained using SimCLR has signiﬁcantly more invariance.

Original: This is not surprising given that the contrastive loss that SimCLR uses explicitly optimizes for similarity between an image and its reﬂection.
Revised: This is not surprising given that the contrastive loss that SimCLR uses explicitly optimizes for similarity between an image and its reﬂection.

Original: DINO, which is also trained in a self-supervised manner, but which does not explicitly use the contrastive loss is less invariant (how it compares to the two supervised models depends on which metric is used).
Revised: DINO, which is also trained in a self-supervised manner, but which does not explicitly use the contrastive loss is less invariant (how it compares to the two supervised models depends on which metric is used).

Original: Summary: Use of contrastive loss can improve invariance but otherwise there is not strong evidence that self-supervision increases model invariance.
Revised: Summary: Use of contrastive loss can improve invariance but otherwise there is not strong evidence that self-supervision increases model invariance.

Original:  Limitations and Conclusion
Revised:  Limitations and Conclusion

Original: Although the G -EED family of metrics that we introduce is ﬂexible in many ways, it is not capable of capturing notions of invariance that do not have a known underlying symmetry group (e.g., changes in image background), do not come from the action of a group (e.g., scaling corresponding to a semigroup action), or (for the purpose of measuring equivariance of internal representations) do not have a known action on the hidden activations of a model (e.g., changes in color).
Revised: Although the G -EED family of metrics that we introduce is ﬂexible in many ways, it is not capable of capturing notions of invariance that do not have a known underlying symmetry group (e.g., changes in image background), do not come from the action of a group (e.g., scaling corresponding to a semigroup action), or (for the purpose of measuring equivariance of internal representations) do not have a known action on the hidden activations of a model (e.g., changes in color).

Original: An important next step would be to bring our metrics to these broader notions of invariance and equivariance.
Revised: An important next step would be to bring our metrics to these broader notions of invariance and equivariance.

Original: It would be particularly valuable if our metrics could be modiﬁed so that they can measure equivariance without explicitly specifying a group action in a hidden layer.
Revised: It would be particularly valuable if our metrics could be modiﬁed so that they can measure equivariance without explicitly specifying a group action in a hidden layer.

Original: This would enable us to measure
Revised: This would enable us to measure

Original: G -EED for emergent types of learned equivariance where the action of G on the output space is not speciﬁed by the user.
Revised: G -EED for emergent types of learned equivariance where the action of G on the output space is not speciﬁed by the user.

Original: In this paper we described a novel family of metrics meant to measure equivariance in deep learning models.
Revised: In this paper we described a novel family of metrics meant to measure equivariance in deep learning models.

Original: We use these metrics to suggest answers to questions related to the extent to which neural networks are or are not invariant or equivariant to different types of transformations.
Revised: We use these metrics to suggest answers to questions related to the extent to which neural networks are or are not invariant or equivariant to different types of transformations.

Original: Surprisingly, while invariance and equivariance are fundamental topics within machine learning, this is one of the ﬁrst works (to our knowledge) that tries to broadly measure these properties empirically in modern neural networks.
Revised: Surprisingly, while invariance and equivariance are fundamental topics within machine learning, this is one of the ﬁrst works (to our knowledge) that tries to broadly measure these properties empirically in modern neural networks.

Original: We hope that this work will open a conversation on this important topic that will ultimately lead to a better understanding of why deep learning models behave the way that they do.
Revised: We hope that this work will open a conversation on this important topic that will ultimately lead to a better understanding of why deep learning models behave the way that they do.

Original: Checklist
Revised: Checklist

Original: For all authors... (a) Do the main claims made in the abstract and introduction accurately reﬂect the paper’s contributions and scope?
Revised: For all authors... (a) Do the main claims made in the abstract and introduction accurately reﬂect the paper’s contributions and scope?

Original: [Yes] (b) Did you describe the limitations of your work?
Revised: [Yes] (b) Did you describe the limitations of your work?

Original: [Yes] See Section(c)
Revised: [Yes] See Section(c)

Original: Did you discuss any potential negative societal impacts of your work?
Revised: Did you discuss any potential negative societal impacts of your work?

Original: [No] As the work investigates how deep learning algorithms work in a non-application speciﬁc setting, we did not see this as relevant.
Revised: [No] As the work investigates how deep learning algorithms work in a non-application speciﬁc setting, we did not see this as relevant.

Original: (d) Have you read the ethics review guidelines and ensured that your paper conforms to them?
Revised: (d) Have you read the ethics review guidelines and ensured that your paper conforms to them?

Original: [Yes] 2.
Revised: [Yes] 2.

Original: If you are including theoretical results... (a) Did you state the full set of assumptions of all theoretical results?
Revised: If you are including theoretical results... (a) Did you state the full set of assumptions of all theoretical results?

Original: [Yes] In both Proposition 3.1 and Proposition 3.2 we give a rigorous and speciﬁc set of assumptions.
Revised: [Yes] In both Proposition 3.1 and Proposition 3.2 we give a rigorous and speciﬁc set of assumptions.

Original: (b) Did you include complete proofs of all theoretical results?
Revised: (b) Did you include complete proofs of all theoretical results?

Original: [Yes] See Appendix A. and A.
Revised: [Yes] See Appendix A. and A.

Original: If you ran experiments... (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)?
Revised: If you ran experiments... (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)?

Original: [Yes] We include explicit deﬁnitions for all metrics in Section 3.1 and include details that would allow the experiments to be recreated in Section 4 and Appendix A. (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)?
Revised: [Yes] We include explicit deﬁnitions for all metrics in Section 3.1 and include details that would allow the experiments to be recreated in Section 4 and Appendix A. (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)?

Original: [No] We specify all training and dataset details in Appendix A.1 and A.2 except for the training/test splits.
Revised: [No] We specify all training and dataset details in Appendix A.1 and A.2 except for the training/test splits.

Original: (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)?
Revised: (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)?

Original: [Yes] We include conﬁdence intervals in all of our ﬁgures.
Revised: [Yes] We include conﬁdence intervals in all of our ﬁgures.

Original: (d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)?
Revised: (d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)?

Original: [Yes] See Appendix A. 4.
Revised: [Yes] See Appendix A. 4.

Original: If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... (a) If your work uses existing assets, did you cite the creators?
Revised: If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... (a) If your work uses existing assets, did you cite the creators?

Original: [Yes] We cited all datasets and pretrained models that we used in our experiments.
Revised: [Yes] We cited all datasets and pretrained models that we used in our experiments.

Original: (b) Did you mention the license of the assets?
Revised: (b) Did you mention the license of the assets?

Original: [Yes] We cite licenses for MNIST, xView, CIFAR10, and Omniglot.
Revised: [Yes] We cite licenses for MNIST, xView, CIFAR10, and Omniglot.

Original: (c) Did you include any new assets either in the supplemental material or as a URL?
Revised: (c) Did you include any new assets either in the supplemental material or as a URL?

Original: [No] The only asset is our version of the public xView dataset, xView Maritime.
Revised: [No] The only asset is our version of the public xView dataset, xView Maritime.

Original: We do describe how we created our version of this dataset.
Revised: We do describe how we created our version of this dataset.

Original: (d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating?
Revised: (d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating?

Original: [N/A] (e) Did you discuss whether the data you are using/curating contains personally identiﬁable information or offensive content?
Revised: [N/A] (e) Did you discuss whether the data you are using/curating contains personally identiﬁable information or offensive content?

Original: [N/A] 5.
Revised: [N/A] 5.

Original: If you used crowdsourcing or conducted research with human subjects... (a) Did you include the full text of instructions given to participants and screenshots, if applicable?
Revised: If you used crowdsourcing or conducted research with human subjects... (a) Did you include the full text of instructions given to participants and screenshots, if applicable?

Original: [N/A] (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable?
Revised: [N/A] (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable?

Original: [N/A] (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation?[N/A] A Appendix A.1 Experimental Details
Revised: [N/A] (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation?

Original: All our models were trained on an Nvidia A100 using the Adam optimizer.

Original: Batch size, learning rate (LR), and weight decay hyperparameters are summarized in the table below.

Original: Recall from Sections 4.

Original: through 4.3 that we train the CNNs and C 8 -CNNs (architecture description below) on rotated MNIST and train AlexNet, ResNet50, DenseNet121, and LeViT192 on Maritime xView.

Original: Hyperparameters were chosen based on an informal search.

Original: Running our experiments with a more comprehensive hyperparameter search would be a worthwhile future exercise since it might yield insight into how different hyperparameters affect model invariance and equivariance.

Original: The standard CNN and C 8 -CNN used in Section 4.1 consist of 6 convolutional blocks, each containing a standard convolutional layer, a batch norm, a ReLU nonlinearity, and a pooling layer.

Original: The C 8 -CNN models have an analogous 6 block structure with the difference that each block uses C 8 -rotation equivariant, steerable convolutional layers and a so-called inner batch norm (a batch norm adapted for equivariant frameworks [45]).

Original: Both model types have a ﬁnal linear layer.

Original: [Table]
Revised: [N/A]

Original: A.2 Dataset Details

Original: The datasets used in our experiments include (i) rotated MNIST , which consists of images from

Original: MNIST rotated by random angles [14] (MNIST is covered by a Creative Commons Attribution-Share

Original: Alike 3.0 license) and (ii) xView maritime , a classiﬁcation dataset we constructed by cropping the bounding boxes of all maritime vessel classes found in xView [31], an overhead imaging dataset (xView is covered by an Attribution-Noncommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license).

Original: In our version of rotated MNIST we excluded the class 9 so that we could remove the drop in model accuracy resulting from the similarity of a 9 and an upside-down 6.

Original: We apply a circular mask to all images before using them as input to a model so that invariance is not broken by the artifacts introduced by rotating a rectangular image by θ degrees where θ (cid:54) = 0 ◦ , 90 ◦ , 180 ◦ , 270 ◦ .

Original: See the bottom right image in Figure 6 for an example of this.

Original: Below we describe our OOD datasets for Section 4.2.

Original: • MNIST Train:

Original: The original MNIST training images (with class 9 excluded).

Original: • CIFAR10:

Original: Grayscale versions of the CIFAR10 images [28] (CIFAR10 is covered under an MIT license).

Original: • MNIST (Noisy) 1-6: MNIST images perturbed by noise randomly sampled uniformly from intervals (1) [0 , 0 . 2] , (2) [0 , 0 . 4] , (3) [0 , 0 . 6] , (4) [0 , 0 . 8] , (5) [0 , 1 . 0] , and (6) [0 , 1 . 2] .

Original: Notice that any of these noise perturbations can push pixels outside of image bounds.

Original: We generally assume that images with more noise are farther OOD.

Original: • MNIST (blurry): MNIST images with Gaussian blur applied with a size 7 × 7 kernel with standard deviation .

Original: • Omniglot: Another image classiﬁcation dataset that contains characters [30] (Omniglot is covered under an MIT license).

Original: • Inverted MNIST: MNIST where each pixel has had the transformation f ( x ) =

Original: − x applied to it.

Original: This inverts the intensity of pixels to make the MNIST dataset look more like Omniglot (the background has high intensity and the digits have low intensity).

Original: A.3 How does invariance in a model’s latent space change when augmentation is or is not used?

Original: As in Section 4.3, we focus on the case where G = C 8 (the group generated by 45 ◦ rotations) and the dataset xView Maritime.

Original: We trained 5 ResNet50s, 5 AlexNets, and 5 DenseNet121s with and without rotation augmentation respectively.

Original: We then measured latent space C 8 -EED in all models.

Original: Our results can be found in Figure 11.

Original: We ﬁnd that models trained without augmentation indeed had consistently lower C 8 -EED both when we used our standard Euclidean distance metric and when we used the cosine similarity version.

Original: These experiments serve as evidence that our metrics are measuring the properties that we think they are measuring.

Original: A

Original: 4 Does learned equivariance involve re-ordering of tensor channels?

Original: Suppose that the function f (cid:96) : X → R C (cid:96) × H (cid:96) × W (cid:96) corresponds to the ﬁrst (cid:96) layers of a network, terminating with a 3 -tensor which has C (cid:96) channels of height H (cid:96) and width W (cid:96) .

Original: Suppose that G is a group that acts both on the input space X and the hidden space R C (cid:96) × H (cid:96) × W (cid:96) .

Original: The channelwise

Original: G -EED metric that we proposed in this paper, assumes that when we compare channels from f (cid:96) ( gx ) with channels from gf (cid:96) ( x ) , we should assume the trivial bijection.

Original: That is, we should compare the ﬁrst channel of f (cid:96) ( gx ) , [ f (cid:96) ( gx )] 1 , with the ﬁrst channel of gf (cid:96) ( x ) , [ gf (cid:96) ( x )] 1 , the second channel [ f (cid:96) ( gx )] 2 with the second channel [ gf (cid:96) ( x )] 2 , etc.

Original: On the other hand, in many equivariant CNN’s, the group action of g on f (cid:96) ( x ) not only changes individual channels, it also permutes their order.

Original: It is reasonable to ask whether CNNs trained with augmentation might learn some similar “emergent” structure not only within individual channels, but also among them.

Original: The channelwise G -EED metric would likely not detect this kind of equivariance.

Original: In this section we examine this possibility.

Original: Though we do not disprove its existence, we run several preliminary experiments that suggest that this is not likely.

Original: This is an area that would beneﬁt from additional study.

Original: In our preliminary investigation, we focus on the ﬁlters at each layer (rather than input and output).

Original: We chose to do this based off of the observation that in equivariant CNNs that utilize the regular representation and which are designed to display the phenomenon we are looking for, ﬁlters come in entire orbits.

Original: That is, if w is a ﬁlter in a layer, then so is each element in the orbit Gw (i.e., the orbit of w under the action of G ).

Original: In Figure 12 for example, four ﬁlters of a C 4 -equivariant convolutional layer [45] are displayed.

Original: The ﬁlters represent an orbit under the action of all 90 -degree rotations (e.g.,

Original: C 4 ).

Original: As a ﬁrst step towards identifying structured equivariance in augmentation trained CNNs, we compared all channels of each pair of ﬁlters at a given convolutional layer of an AlexNet CNN.

Original: However, comparing all the possible pairings is combinatorially prohibitive, even for simple architectures like

Original: AlexNet.

Original: In Figure 13, we plot the metric

Original: [Equation]

Original: (7) where w (cid:96),i,t is the height H (cid:48) (cid:96) and weight W (cid:48) (cid:96) 2 -tensor obtained by taking channel t from ﬁlter i in layer (cid:96) and g ( w (cid:96),i,t ) is the action of group element g on w (cid:96),i,t .

Original: It this case simply rotating by a multiple of 90 ◦ .

Original: We report the average of this metric over all convolutional layers of four different

Original: A network where some ﬁlters are rotations of others would be expected to achieve a value of 0 for (7).

Original: Indeed, we can see that this is what happens to the C 8 -equivariant network.

Original: We see that the other networks do not achieve zero.

Original: Indeed, with the exception of the pretrained AlexNet, for which (7) increases slightly over training, the other non-equivariant networks do not change signiﬁcantly at all.

Original: This indicates that this form of emergent equivariance does not emerge in this example.

Original: A.5 A Proof of Proposition 3.

Original: Proof.

Original: To prove this, consider the function f : R 2 → R deﬁned such that for ( x, y ) ∈

Original: Rf ( x, y ) =

Original: x + y.

Original: The order 2 cyclic group Z 2 = { 1 , σ } acts on R 2 by permuting coordinates.

Original: That is, the only nonidentity element σ acts on R 2 by sending ( x, y )

Original: (cid:55)→ ( y, x ) .

Original: It is clear that f is Z 2 -invariant.

Original: However, note that if f 1 : R 2 → R 2 is deﬁned by f 1 ( x, y )

Original: =

Original: (2 x, y ) and f 2 : R 2 → R is deﬁned by

Original: [Equation]

Original: then f = f 2 ◦ f 1 .

Original: But neither f 1 nor f 2 is Z 2 -equivariant to the actions described above.

Original: This proof follows easily from the deﬁnitions.

Original: Suppose that f 1 is G -invariant, then for any x ∈ X and g ∈ G , f 1 ( gx ) = f 1 ( x ) .

Original: Hence f ( gx ) =

Original: f 2 ( f 1 ( gx )) =

Original: f 2 ( f 1 ( x )) =

Original: f ( x ) .

Original: A.6 A Proof of Proposition 3.

Original: Proof.

Original: First note that for ﬁxed x and g , m ( f ( gx ) , g ˆ f ( x ))

Original: [-= 
-]
Revised: [-= 
-]

Original: if and only if f ( gx ) =

Original: gf ( x ) .

Original: This follows from the fact that since G acts faithfully on Y , ˆ f ( x ) =

Original: f

Original: ( x ) and from the fact that m is a metric.

Original: First assume that m ( f ( gx ) , g ˆ f ( x ))

Original: = 0 .

Original: Then, since m is a metric, f ( gx ) =

Original: g ˆ f ( x ) =

Original: gf ( x ) giving the desired result.

Original: Next, if f ( gx ) =

Original: gf ( x ) =

Original: g ˆ f ( x ) , then it again follows that m ( f ( gx ) , g ˆ f ( x ))

Original: = 0 .

Original: Next we recall the basic fact [17, proposition 2.16] from measure theory, which states that if h : W → [0 , ∞ ] is a non-negative measurable function on measure space ( W, ν ) , then

Original: [Equation]

Original: almost everywhere

Original: [Equation]

Original: Since ˆ f ( x ) = f ( x ) , let W =

Original: X × G with ξ = ν

Original: × µ be the product measure on W generated by

Original: Haar measure µ on G , and the probability measure ν associated with D .

Original: Note that f is measurable by virtue of being continuous, G acts linearly and hence is measurable, and m is measurable by virtue of being a metric.

Original: It follows that the function h : X × G → [0 , ∞ ] deﬁned by

Original: [Equation]

Original: is measurable.

Original: The result then follows from the observation that m is non-negative (and hence h is) and from (8).

Original: That is, if (3) is zero, then since m ( f ( gx ) , g ˆ f ( x )) is non-negative, then (8) tells us that m ( f ( gx ) , g ˆ f ( x ))) is zero almost-everywhere with respect to measure ξ .

Original: On the other hand, (8) also says that if m ( f ( gx ) , g ˆ f ( x )) is zero almost everywhere (including the case where this term is zero everywhere), then (3) is equal to zero.

Original: A.7 The Reason for Normalization of Latent Space G -EED

Original: We normalize E latent ( f, G ) by M because when we use (cid:96) 2 -distance to compute G -EED without normalization, it is sensitive to scaling in a way that is unrelated to downstream task performance.

Original: To illustrate, note that if f = f 2 ◦ f 1 is a model with feature extractor f 1 and classiﬁer f 2 , then by scaling f 1 by c > 1 , the unnormalized latent space G -EED increases, indicating a decrease in

Original: G -invariance.

Original: More precisely, if f (cid:48) 1 = cf 1 , then E ( f (cid:48) 1 , G )

Original: =

Original: c E ( f 1 , G ) .

Original: However, if we set f (cid:48) 2 = 1 c f 2 , then f (cid:48) 2 ◦ f (cid:48) 1 = f = f 2 ◦ f 1 .

Original: Thus, f 1 can be made to have arbitrarily large unnormalized latent space

Original: G -EED while the model f itself remains constant.

Original: A different but equally illustrative example is visualized in Figure 14.

Original: Two feature extractors have identical unnormalized latent space C 8 -EED for a single rotation orbit of an image of a 4 (average distance between blue points and their centroid), but the second feature extractor closely clusters points in the orbit relative to other instances from

Original: MNIST, while the ﬁrst feature extractor does not.

Original: We would argue that in most cases the second feature extractor should be called more invariant with respect to this particular task.

Original: Normalization mitigates this issue, giving a more reasonable notion of latent space invariance in the context of machine learning.

Original: A.8 Channelwise C 8 -EED for out-of-distribution datasets

Original: In this section we provide Figure 15, which shows the channelwise C 8 -EED for collections of: CNN models with random weights, CNN models that have been trained on MNIST, and C 8 -CNN models that have been trained on MNIST.

Original: In Figure 15 we show the channelwise C 8 -EED at layers 2 and 5 for each of the model types.

Original: Unsurprisingly, the C 8 -CNN has high C 8 -equivariance for all layers, whereas both the trained and untrained CNNs have substantially lower C 8 -equivariance.

Original: Across layers, the channelwise C 8 -EED remains fairly constant across datasets for the untrained models.

Original: However, the channelwise C 8 -EED for early layers of the trained CNNs differs across datasets (with equivariance on OOD datasets generally being less than the equivariance on the training set MNIST).

Original: In later layers, however, the difference in C 8 -equivariance between MNIST and an OOD dataset is negligible (Figure 15, right).

Original: This suggests that CNNs do learn some minimal amount of equivariance at early layers, but this equivariance either dissipates or becomes undetectable at later layers.

Original: Equivariance in earlier layers is also tied to image content.

Original: Images with high frequency signals tend to differ more signiﬁcantly when rotated (with at the extreme end, a constant valued image unchanged with rotation).