SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Figure 6: Illustration of how a VGG11 encodes the horizontal flipping symmetry. The 128 filters in the second convolutional layer of a VGG11-net trained on CIFAR10 are shown, where each filter is next to a filter in a permuted version of the horizontally flipped convolution kernel. Both the input and output channels of the flipped convolution kernel are permuted, as described in Section 3. The 64 input channels are projected by a random projection matrix to 3 dimensions for visualization as RGB. The net is trained with horizontal flipping data augmentation. This net is quite close to a GCNN structure, but the permuted filters are less close to each other than in Figure 5
Table 4: Statistics for merging VGG11 nets that where trained in different manners.
Model 1	Model 2	Barrier
CNN	CNN	5.08·10-2± 5.7·10-3
CNN	CNN + inv-loss	4.87·10-2± 4.5·10-3
CNN	GCNN	6.50·10-2± 8.9·10-3
CNN + inv-loss	CNN + inv-loss	3.73·10-2± 4.1·10-3
CNN + inv-loss	GCNN	7.53·10-2± 9.6·10-3
GCNN	GCNN	6.59·10-2± 7.7·10-3
Figure 7: Illustration of how a GCNN-VGG11 encodes the horizontal flipping symmetry. The 64 filters in the first convolutional layer of a GCNN-VGG11-net trained on CIFAR10 are shown, where each filter is next to a filter in a permuted version of the horizontally flipped convolution kernel.
Figure 8: Illustration of how a GCNN-VGG11 encodes the horizontal flipping symmetry. The 128 filters in the second convolutional layer of a GCNN-VGG11-net trained on CIFAR10 are shown, where each filter is next to a filter in a permuted version of the horizontally flipped convolution kernel. Both the input and output channels of the flipped convolution kernel are permuted, as described in Section 3. The 64 input channels are projected by a random projection matrix to 3 dimensions for visualization as RGB.
Figure 9: Left: Visualization of the filters in the first layer of a ResNet50. Right: The same filters but horizontally flipped and permuted to align with the original filters to the right.
A.2 ResNet50 on ImageNet
We show the first layer filters of the torchvision new recipe ResNet50 in Figure 9.
A.2.1 The peculiarities of image size 224
As mentioned in footnote 2, a convolution layer with stride 2 can not be equivariant to horizontal flipping if the input has even width. This problem has been discussed previously by [28, 30]. All the methods in Table 3 except for the new Torchvision recipe use image size 224 for training and all use it for testing. It so happens that 224 can be halved 5 times without remainder meaning that all feature spaces in a ResNet50 will have even width. As luck would have it, if we use image size 225, then all feature spaces have odd width instead. Therefore we report results for a few methods with image size 225 in Table 5, this table contains all numbers from Table 3 as well for convenience. We see that the simple change of image size lowers the invariance score and GCNN barrier. However it does not seem to influence the accuracy much, meaning that the networks seem to learn to compensate for the non-equivariance with image size 224.
A.2.2 Training details
We train on NVIDIA A100 GPUs on a computing cluster. Each run was on either 4 or 8 parallel GPUs. For the supervised net, training took around between 9 and 13 hours depending on image size and whether invariance loss was applied. For the Simsiam training, the self-supervised pre-training took 23 hours and training the supervised linear head took 15 hours. In total this gives an upper bound of  $13 \cdot 8 \cdot 3 + (15 + 23) \cdot 8 = 616$  GPU hours.
Table 5: Results for ResNet50's trained using various methods on ImageNet. The models with an asterisk are trained by us. The last five are self-supervised methods. Flip-Accuracy is the accuracy of a net with all conv-filters horizontally flipped. For the accuracy and barrier values w/o REPAIR we still reset batch norm statistics after merging by running over a subset of the training data.
Training Method	Invariance	Halfway Accu-racy w/o RE-PAIR	Halfway Accu-racy	GCNN Barrier w/o RE-PAIR	GCNN Barrier
Error	Accuracy	Flip-Accuracy
Torchvision new	0.284	0.803	0.803	0.731	0.759	0.0893	0.0545
Torchvision old	0.228	0.761	0.746	0.718	0.725	0.0467	0.0384
*Torchvision old + inv-loss	0.0695	0.754	0.745	0.745	0.745	0.00636	0.0054
*Torchvision old + img size 225	0.162	0.764	0.764	0.714	0.722	0.0657	0.0558
*Torchvision old + inv-loss + img size 225	0.00235	0.744	0.745	0.744	0.744	9.4·10-5	6.72·10-5
BYOL	0.292	0.704	0.712	0.573	0.624	0.19	0.118
DINO	0.169	0.753	0.744	0.611	0.624	0.184	0.166
Moco-v3	0.16	0.746	0.735	0.64	0.681	0.136	0.0805
Simsiam	0.174	0.683	0.667	0.505	0.593	0.252	0.121
*Simsiam + img size 225	0.113	0.68	0.68	0.535	0.611	0.213	0.103
B Layerwise equivariance of ReLU-networks - proofs and further results
B.1 Proof of Lemma 2.2
We will use the following notation. For a scalar  $a$ , we can uniquely write it as  $a = a^{+} - a^{-}$  where  $a^{+} \geq 0$  and  $a^{-} \geq 0$ , and either  $a^{+} = 0$  or  $a^{-} = 0$ . Similarly for matrices (elementwise),  $A = A^{+} - A^{-}$ .
Proof. As the equation  $\operatorname{ReLU}(Ax) = B\operatorname{ReLU}(x)$  should hold for all  $x$ , we can start by setting  $x = -e_k$  where  $e_k$  is the canonical basis. Then, as  $\operatorname{ReLU}(-e_k) = 0$ , we get that  $\operatorname{ReLU}(-Ae_k) = A_k^- = 0$ . Hence,  $A^- = 0$  and consequently  $A = A^+$ . Inserting  $x = e_k$  into the equation, we can conclude that  $A = B = A^+$ .
Now suppose that two elements on the same row are non-zero, say  $A_{ik} > 0$  and  $A_{ik'} > 0$  on row  $i$  for some  $k \neq k'$ . Let's see what happens when we set  $x = A_{ik}e_{k'} - A_{ik'}e_k$ . On the left hand side, the  $i$ :th element simply becomes  $\mathsf{ReLU}(A_{ik}A_{ik'} - A_{ik'}A_{ik}) = 0$  whereas on the right hand side we get  $A\mathsf{ReLU}(A_{ik}e_{k'} - A_{ik'}e_k) = A\mathsf{ReLU}(A_{ik}e_{k'}) = A_{ik}A_{k'}$ , that is, the  $i$ :th element is  $A_{ik}A_{ik'} \neq 0$  which is a contradiction. Hence, we can conclude that each row has at most one positive element and since the matrices  $A$  and  $B$  are non-singular, they will have exactly one positive element in each row and we can conclude that they must be scaled permutation matrices.
B.2 A result on layerwise equivariance given an invariant network
Next we are going to look at two-layer networks  $f: \mathbb{R}^m \to \mathbb{R}$ , which are invariant, that is,  $G$ -equivariant with  $\rho_2(g) = I$ . Now, if  $f(x) = W_2 \operatorname{ReLU}(W_1x)$ , one can without loss of generality assume that it is only the signs of the elements in  $W_2$  that matter, and move the magnitudes into  $W_1$  and write  $f(x) = [\pm 1 \quad \ldots \quad \pm 1] \operatorname{ReLU}(\tilde{W}_1x)$ . Also, one can sort the indices such that  $W_2 = [1 \quad \ldots \quad 1 \quad -1 \quad \ldots \quad -1]$ . This leads to a convenient characterization of invariant two-layer networks.
Proposition B.1. Consider the case of a two-layer network  $f: \mathbb{R}^m \to \mathbb{R}$ ,
$$
f (x) = W _ {2} \mathrm {R e L U} (W _ {1} x),
$$
where  $\mathrm{ReLU}$  is applied point-wise. Assume that the matrix  $W_{1} \in \mathbb{R}^{m \times m}$  is non-singular and that  $W_{2} \in \mathbb{R}^{m \times 1}$  has the form  $[1 \ldots 1 \ldots -1 \ldots -1]$  with  $m_{+}$  positive elements and  $m_{-}$  negative elements ( $m = m_{+} + m_{-}$ ). Further, assume  $\rho_{2}(g) = I$  for the output, that is, the trivial representation. Then,  $f$  is  $G$ -equivariant with  $\rho_{0}: G \to \mathrm{GL}(\mathbb{R}^{m})$  if and only if
$$
\rho_ {0} (g) = W _ {1} ^ {- 1} \left[ \begin{array}{c c} P _ {+} (g) & 0 \\ 0 & P _ {-} (g) \end{array} \right] W _ {1},
$$
where  $P_{+}(g)$  is an  $m_{+} \times m_{+}$  permutation matrix and  $P_{-}(g)$  an  $m_{-} \times m_{-}$  permutation matrix. Furthermore, the network  $f$  is layerwise equivariant with  $\rho_{1}(g) = \begin{bmatrix} P_{+}(g) & 0 \\ 0 & P_{-}(g) \end{bmatrix}$ .
Proof. The condition for invariance is that the following equation should hold for all  $g \in G$  and all  $x \in \mathbb{R}^m$ ,
$$
W _ {2} \operatorname {R e L U} \left(W _ {1} x\right) = W _ {2} \operatorname {R e L U} \left(W _ {1} \rho_ {0} (g) x\right).
$$
Now, let  $y = W_{1}x$  and  $A = W_{1}\rho_{0}(g)W_{1}^{-1}$ , we get that the following equivalent condition
$$
W _ {2} \operatorname {R e L U} (y) = W _ {2} \operatorname {R e L U} (A y)
$$
should hold for all  $A = A(g) = W_{1}\rho_{0}(g)W_{1}^{-1}$ . In particular, it should hold for  $y = e_k - \lambda e_{k'}$  for  $k \neq k'$  and  $\lambda > 0$ . For this choice, the left hand side is equal to  $\pm 1$  and hence the right hand side should also be independent of  $\lambda$ . The right hand side has  $m_{+}$  positive terms and  $m_{-}$  negative terms,
$$
\sum_ {i = 1} ^ {m _ {+}} \left(A _ {i k} - \lambda A _ {i k ^ {\prime}}\right) ^ {+} - \sum_ {i = m _ {+} + 1} ^ {m} \left(A _ {i k} - \lambda A _ {i k ^ {\prime}}\right) ^ {+}.
$$
One possibility is that one of the positive terms cancels out a negative one. However, this would imply that  $A$  would contain two identical rows, making  $A$  singular, which is not feasible. Now, if  $A_{ik'} < 0$ , then for sufficiently large  $\lambda$ , it would follow that  $(A_{ik} - \lambda A_{ik'})^+ = A_{ik} - \lambda A_{ik'}$  which makes the right hand side dependent on  $\lambda$ , a contradiction. Hence, all the elements of  $A$  must be positive. Now, if both  $A_{ik} >$  and  $A_{ik'} > 0$ , then for sufficiently small  $\lambda$ , we get  $(A_{ik} - \lambda A_{ik'})^+ = A_{ik} - \lambda A_{ik'}$ , again a contradiction. Therefore, at most one element can be positive on each row. By also checking  $y = e_k$ , one can draw the conclusion that  $A$  must be a permutation matrix of the required form and the result follows.
C Answer to an open question by Elesedy and Zaidi
A question which was proposed by Elesedy and Zaidi [12, Sec. 7.4] is whether non-layerwise equivariant nets can ever be better at equivariant tasks than layerwise equivariant nets. We saw in Example 2.1 that they can be equally good, but not whether they can be better.
We formulate the question as follows.
(C.Q) Given a  $G$ -invariant data distribution  $\mu$ , and a ground truth equivariant function  $s: \mathbb{R}^{m_0} \to \mathbb{R}^{m_L}$ , can we ever have for neural networks of the form (1) that
$$
\inf_{W_{j}\in \mathbb{R}^{m_{j} - 1\times m_{j}}}\mathbb{E}_{x\sim \mu}\| f_{\{W_{j}\}}(x) - s(x)\| <  \inf_{\substack{W_{j}\in \mathbb{R}^{m_{j} - 1\times m_{j}},\\ W_{j}\text{equivariant}}}\mathbb{E}_{x\sim \mu}\| f_{\{W_{j}\}}(x) - s(x)\| ?
$$
Here we assume that the layer dimensions  $m_j$  are fixed and equal on both hand sides. We write  $f_{\{W_j\}}$  to make the parameterisation of  $f$  in terms of the linear layers explicit.
We will now give a simple example showing that the answer to the question is yes.
Example C.1. Let  $\mu$  be a distribution on  $\mathbb{R}$  that is symmetric about the origin and let  $s: \mathbb{R} \to \mathbb{R}$  be given by  $s(x) = |x|$ .  $s$  is invariant to changing the sign of the input, i.e., equivariant to  $S_2 = \{i, h\}$
Figure 10: Illustration of what we term cooccurrence of equivariant features. We imagine training a network to classify the two depicted classes. Both classes consist of images containing a shape and horizontally flipped copies of the same shape – in particular, every image contains the shape in both orientations. On this data, a network only recognising the existence of the shape  $\langle$  in this orientation) will be invariant to horizontal flips of the input. However, such a network is not invariant to horizontal flips of general data and can hence not be written as a layerwise equivariant network.
with representation choice  $\rho_0(h) = -1$  on the input and  $\rho_{2}(h) = 1$  on the output. Now, we consider approximating  $s$  with a neural network  $f$ :
where  $W_{1}$  and  $W_{2}$  are both scalars. Recall (from Section 2.1) that for ReLU to be equivariant, the representation acting on the output of  $W_{1}$  has to be a scaled permutation representation. The only one-dimensional permutation representation is the trivial representation, but this means that  $W_{1} = 0$  and so  $f$  is constant 0. Also consider the non-equivariant net  $\tilde{f}$  with  $\tilde{W}_{1} = 1, \tilde{W}_{2} = 1$ . Since  $\tilde{f}(x) = f(x)$  for  $x \leq 0$  and  $\tilde{f}(x) = s(x)$  for  $x > 0$ , it is clear that
$$
\mathbb {E} _ {x \sim \mu} \| \tilde {f} (x) - s (x) \| = \frac {1}{2} \mathbb {E} _ {x \sim \mu} \| f (x) - s (x) \|,
$$
showing that in this example, non-equivariant nets outperform the layerwise equivariant  $f$ .
The reason that non-equivariant nets outperform equivariant ones in Example C.1 is that the capacity of the net is so low that requiring equivariance leads to a degenerate net. If we increase the intermediate feature dimension from 1 to 2, then equivariant nets can perfectly fit  $s(x) = |x|$  (by taking  $W_{1} = (1 - 1)^{T}, W_{2} = (1 - 1)$ ). In the next section we take this idea of insufficient capacity for equivariance a step further and give a less rigorous but more practically relevant example of a scenario where non-equivariant nets outperform equivariant nets on an equivariant task. The idea is that when features cooccur with group transformed versions of themselves, it can suffice for a network to recognize a feature in a single orientation. The network can then still be equivariant on data which has such cooccurring features, but it can be smaller than a layerwise equivariant network which would be forced to be able to recognize features in all group transformed orientations.
C.1 Cooccurrence of equivariant features
Here we give a more practical example to answer the question (C.Q) by Elesedy and Zaidi [12].
Example C.2. This example is illustrated in Figure 10. We consider image classification using a CNN. For simplicity we will consider invariance to horizontal flipping of the images, but the argument works equally well for other transformations. For the sake of argument, assume that our CNN has very limited capacity and can only pick up the existence of a single local shape in the input image. The CNN might consist of a single convolution layer with one filter, followed by ReLU, and spatial average pooling. As shown in Figure 10, if the identifiable features in the images always cooccur in an image with horizontally flipped versions of themselves, then it suffices to recognise a feature in a single orientation for the feature detector to be invariant to horizontal flips on the data. We refer to this type of data as having cooccurrence of equivariant features. Since a layerwise equivariant CNN with a single filter has to have a horizontally symmetric filter, it can not be as good as the non-equivariant CNN on this task.
The reader might consider Example C.2 to be somewhat artificial. However, we note that it has been demonstrated [17] that CNN image classifiers often look at mostly textures to identify classes. Textures such as the skin of an elephant will often occur in multiple orientations in any given image of an elephant. A network might hence make better use of its limited capacity by being able to identify multiple textures than by being able to identify a single texture in multiple orientations.
D Rewriting networks to be layerwise equivariant
The aim of this section is to investigate when we can, given an equivariant net, rewrite the net to be layerwise equivariant. I.e., given an equivariant find a functionally equivalent layerwise equivariant net with the same layer dimensions as the original. We first give a result for small two-layer networks showing that for them we can always do this. Then we look at the problem more generally in Section D.1. Unfortunately the conclusion there will not be as clear. While we can view an equivariant network as a composition of equivariant functions in a certain sense, it remains unclear whether we can rewrite it as a layerwise network with the same layer structure as the original.
Proposition D.1. Consider the case of two-layer networks
where  $\mathrm{ReLU}$  is applied point-wise, the input dimension is 2, the output dimension 1 and the intermediate dimension 2 so that  $W_{1} \in \mathbb{R}^{2 \times 2}$ ,  $W_{2} \in \mathbb{R}^{1 \times 2}$ . Any such  $f$  that is invariant to permutations of the two input dimensions must be equivalent to a layerwise equivariant network with the same layer dimensions as  $f$ .
Proof. Note that non-negative constants factor through ReLU so that
$$
W _ {2} \left( \begin{array}{c c} \alpha & 0 \\ 0 & \beta \end{array} \right) \operatorname {R e L U} (W _ {1} x) = W _ {2} \operatorname {R e L U} \left(\left( \begin{array}{c c} \alpha & 0 \\ 0 & \beta \end{array} \right) W _ {1} x\right),
$$
for any  $\alpha \geq 0$ ,  $\beta \geq 0$ . Hence we can assume that  $W_{2}$  only contains elements  $1, -1$  by factoring the non-negative constants into  $W_{1}$ . So (WLOG) we will only have to consider  $W_{2} = (1 \pm 1)$ .
$$
J = \left( \begin{array}{c c} 0 & 1 \\ 1 & 0 \end{array} \right)
$$
be the permutation matrix that acts on the input. It will also be convenient to introduce the notation  $f_{2}(x) = W_{2}\mathsf{ReLU}(x)$  for the last part of the network so that we can write the invariance condition  $\forall x\in \mathbb{R}^2:f(Jx) = f(x)$  as  $\forall x\in \mathbb{R}^2:f_2(W_1Jx) = f_2(W_1x)$ .
We first consider the case when  $W_{1}$  has full rank. In this case  $\forall x \in \mathbb{R}^2 : f_2(W_1Jx) = f_2(W_1x)$  is equivalent to
$$
\forall x \in \mathbb {R} ^ {2}: f _ {2} \left(W _ {1} J W _ {1} ^ {- 1} x\right) = f _ {2} (x). \tag {5}
$$
For convenience we set
$$
W _ {1} J W _ {1} ^ {- 1} = A = \left( \begin{array}{c c} a & b \\ c & d \end{array} \right)
$$
which satisfies  $A^2 = I$  ( $A$  is an involution)<sup>4</sup>. It is easy to show that this means that either
$$
A = \left( \begin{array}{c c} a & b \\ c & - a \end{array} \right),
$$
$$
a ^ {2} + b c = 1, \tag {6}
$$
or  $A = \pm I$ . However, the  $A = \pm I$  case is easy to rule out since it implies
$$
\pm W _ {1} = W _ {1} J,
$$
meaning that the columns of  $W_{1}$  are linearly dependent, but we assumed full rank. Explicitly writing out (5) with  $W_{1}JW_{1}^{-1} = A$ , we get that for all  $x \in \mathbb{R}^2$  we must have
$$
W _ {2} \operatorname {R e L U} (A x) = W _ {2} \operatorname {R e L U} (x). \tag {7}
$$
Now we divide into two cases depending on the form of  $W_{2}$ . The strategy will be to plug in the columns of  $A$  as  $x$  and use the fact that  $A^2 = I$ .
Here we note that since  $(W_{1}JW_{1}^{-1})^{2} = I$ , the map  $\rho (J) = W_1JW_1^{-1}$  actually defines a representation of  $S_{2}$  on  $\mathbb{R}^2$ . We are hence now trying to find for which representations  $\rho$  of  $S_{2}$ ,  $f_{2}$  is invariant.
- Case I:  $W_{2} = (1 - 1)$ . By plugging  $x = (a c)^{T}$  into (7) we see that
$$
1 = \operatorname {R e L U} (a) - \operatorname {R e L U} (c),
$$
meaning that  $a \geq 1$ . Similarly, plugging in  $x = (b - a)^T$  we see that
$$
- 1 = \operatorname {R e L U} (b) - \operatorname {R e L U} (- a),
$$
implying that  $a \leq -1$ . We have reached a contradiction and can conclude  $W_{2} \neq (1 - 1)$ .
- Case II:  $W_{2} = (1 \quad 1)$ . This time we will need four plug-and-plays with (7).
1.  $x = (-a - c)^T$  yields
$$
0 = \operatorname {R e L U} (- a) + \operatorname {R e L U} (- c),
$$
so  $a\geq 0$  and  $c\geq 0$
2.  $x = (-b\quad a)^T$  yields
$$
0 = \operatorname {R e L U} (- b) + \operatorname {R e L U} (a),
$$
so  $a \leq 0$  and  $b \geq 0$ . From this and the previous we conclude  $a = 0$ .
3.  $x = (a\quad c)^T$  yields
$$
1 = \operatorname {R e L U} (a) + \operatorname {R e L U} (c),
$$
which implies  $c\leq 1$
4.  $x = (b - a)^T$  yields
$$
1 = \operatorname {R e L U} (b) + \operatorname {R e L U} (- a),
$$
which implies  $b \leq 1$ .
From  $a = 0$  and  $(b, c) \in [0,1]^2$  we conclude from (6) that  $b = c = 1$ . Thus, if  $W_2 = (1 \quad 1)$ , then  $A = J$ , which means that
$$
W _ {1} J W _ {1} ^ {- 1} = J.
$$
But this is precisely the equivariance condition on  $W_{1}$ , and since  $W_{2}$  is invariant we have a layer-wise equivariant network.
Next, we consider the case when  $W_{1}$  has rank 1. We can then write  $W_{1} = uv^{T}$  for some vectors  $u, v$  in  $\mathbb{R}^2$ . If  $v$  contains two equal values, then  $W_{1}$  is row-wise constant, so permutation invariant, and thus the network is layer-wise equivariant. If  $u$  contains a zero, then a row of  $W_{1}$  is zero and the statement to prove reduces to the case of a network with  $W_{1} \in \mathbb{R}^{1 \times 2}$ ,  $W_{2} \in \{-1, 1\}$  in which case it is easy to show that  $W_{1}$  has to be permutation invariant for the network to be invariant.
Finally if  $v$  contains two different values and  $u$  does not contain a zero, let WLOG  $v_{1} \neq 0$  and consider the following two cases for the invariance equation below
$$
W _ {2} \operatorname {R e L U} (u v ^ {T} x) = W _ {2} \operatorname {R e L U} (u v ^ {T} J x).
$$
- Case I:  $u$  contains two values with the same sign. We plug in  $x_{1} = v_{1} - v_{2}$ ,  $x_{2} = v_{2} - v_{1}$  and find that  $uv^{T}x = (v_{1} - v_{2})^{2}u$ , while  $uv^{T}Jx = -(v_{1} - v_{2})^{2}u$ . One of those is mapped to 0 by ReLU and the other one isn't, implying that  $W_{2}$  has to map it to 0, so  $W_{2} = (1 - 1)$  and the two values in  $u$  are the same. This leads to a zero network which can be equivalently written layer-wise equivariant.
- Case II:  $u_{1}$  and  $u_{2}$  have different signs. WLOG let  $u_{1} > 0$ . Plugging in the same values as above, we find that  $W_{1} = (1 - 1)$  and  $u_{2} = -u_{1}$ . Next, we plug in  $x_{1} = \mathrm{sign}(v_{1})$ ,  $x_{2} = 0$  yielding  $uv^{T}x = |v_{1}|u$  and  $uv^{T}Jx = \mathrm{sign}(v_{1})v_{2}u$ . Since  $v_{2} \neq v_{1}$  we must now have that  $v_{2} = -v_{1}$ . However,  $u_{2} = -u_{1}$  and  $v_{2} = -v_{1}$  in fact yields an equivariant
$$
W _ {1} = \left( \begin{array}{c c} u _ {1} v _ {1} & - u _ {1} v _ {1} \\ - u _ {1} v _ {1} & u _ {1} v _ {1} \end{array} \right)
$$
and since  $W_{2}$  is invariant, we have a layer-wise equivariant network.
D.1 Equivariant composition of functions
In this section we switch to a more abstract formulation of layerwise equivariance to see what it means for individual functions  $\phi$  and  $\psi$  if their composition  $\psi \circ \phi$  is equivariant. For a related discussion of equivariance under general group actions we refer the reader to [32].
Definition D.2. Given a group  $G$  and a set  $X$ , a group action  $\alpha$  of  $G$  on  $X$  is a function
$$
\alpha : G \times X \to X
$$
such that for the identity element  $i$  of  $G$  and any  $x \in X$  we have
$$
\alpha (i, x) = x. \tag {8}
$$
and for any two  $g, h \in G$  and any  $x \in X$  we have
$$
\alpha (h g, x) = \alpha (h, \alpha (g, x)). \tag {9}
$$
First of all it is practical to recall that invertible functions transfer group actions from domain to codomain and vice versa.
Lemma D.3. Given a group  $G$  and an invertible function  $\phi : X \to Y$ .
1. If there is a group action  $\alpha_{X}$  on  $X$ , then we can define a group action  $\alpha_{Y}$  on  $Y$  by
$$
\alpha_ {Y} (g, y) = \phi \left(\alpha_ {X} (g, \phi^ {- 1} (y))\right)
$$
and  $\phi$  is equivariant with respect to this group action. Furthermore, this is the unique group action on  $Y$  that makes  $\phi$  equivariant.
2. Similarly, if there is a group action  $\alpha_{Y}$  on  $Y$ , then we can define a group action  $\alpha_{X}$  on  $X$  by
$$
\alpha_ {X} (g, x) = \phi^ {- 1} (\alpha_ {Y} (g, \phi (x)))
$$
and  $\phi$  is equivariant with respect to this group action. Furthermore, this is the unique group action on  $X$  that makes  $\phi$  equivariant.
Proof. We prove 1., the proof of 2. is analogous. If there is a group action  $\alpha_{Y}$  on  $Y$  making  $\phi$  equivariant, then we must have
$$
\alpha_ {Y} (g, \phi (x)) = \phi (\alpha_ {X} (g, x)),
$$
for all  $x\in X$  . So by a change of variable  $x\sim \phi^{-1}(t)$
$$
\alpha_ {Y} (g, t) = \phi \left(\alpha_ {X} (g, \phi^ {- 1} (t))\right),
$$
for all  $t \in X$ . This proves uniqueness. Finally,  $\alpha_{Y}$  is a group action as