Group Equivariant Convolutional Networks
supplementary material

Taco S. Cohen
University of Amsterdam

T. S . COHEN @ UVA . NL

Max Welling
University of Amsterdam
University of California Irvine
Canadian Institute for Advanced Research

M . WELLING @ UVA . NLThis document contains supplementary material for the paper “T.S. Cohen, M. Welling, Group Equivariant Convolutional Networks. Proceedings of the International Conference on Machine Learning (ICML), 2016”.

4. Distributivity.

1. Equivariance Derivations

7. The definition of Lr .

We claim in the paper that planar correlation is not equivariant to rotations. Let f : R2 → RK be an image with Kchannels, and let ψ : R2 → RK be a filter. Take a rotationr about the origin. The ordinary planar correlation ? is notequivariant to rotations, i.e., [Lr f ] ? ψ 6= Lr [f ? ψ]. Instead
we have:XX[[Lr f ] ? ψ](x) =Lr fk (y)ψk (y − x)y∈Z2=XXy∈Z2

=y∈Z2

=y∈Z2

Using a similar line of reasoning, we can show that poolingcommutes with the group action:
P Lh f (g) = max Lh f (k)k∈gU= max f (h−1 k)k∈gU=fk (y)ψk (ry − x)
fk (y)ψk (r(y − r−1 x))

max f (k)k∈h−1 gU

= P f (h−1 g)
(1)

kXX

A visual proof can be found in (Dieleman et al., 2016).

hk∈gU

kXX

6. The definition of the correlation ?.

= max f (k)fk (r−1 y)ψk (y − x)

kXX
y∈Z2

=k

5. The definition of Lr .

fk (y)Lr−1 ψ(y − r−1 x))k= f ? [Lr−1 ψ](r−1 x)= Lr [f ? [Lr−1 ψ]](x)Line by line, we used the following definitions, facts andmanipulations:
1. The definition of the correlation ?.
2. The definition of Lr , i.e. Lr f (x) = f (r−1 x).
3. The substitution y → ry, which does not change thesummation bounds since rotation is a symmetry of thesampling grid Z2 .

= Lh P f (g)(2)

Group Equivariant Convolutional Networks

where the superscript ∗ denotes the involution

2. Gradients
To train a G-CNN, we need to compute gradients of a loss
function with respect to the parameters of the filters. If we
use the fast algorithm explained in section 7 of the main paper, we only have to implement the gradient of the indexing
operation (section 7.1, “filter transformation”), because the2D convolution routine and its gradient are given.
This gradient is computed as follows. The gradient of theloss with respect to cell i in the input of the indexing operation is the sum of the gradients of the output cells j thatindex cell i. On current GPU hardware, this can be implemented efficiently using a kernel that is instantiated foreach cell j in the output array. The kernel adds the valueof the gradient of the loss with respect to cell j to cell iof array that holds the gradient of the loss with respect tothe input of the indexing operation (this array is to be initialized at zero). Since multiple kernels write to the same
cell i, the additions must be done using atomic operations
to avoid concurrency problems.
Alternatively, one could implement the filter transformation using a precomputed permutation matrix. This is not
as efficient, but the gradient is trivial, and most computation graph / deep learning packages will have implemented
the matrix multiplication and its gradient.

3. G-conv calculus
Although the gradient of the filter transformation operationis all that is needed to do backpropagation in a G-CNN
for a split group G, it is instructive to derive the analyticalgradients of the G-correlation operation. This leads to an
elegant “G-conv calculus”, included here for the interested
reader.
Let feature map k at layer l be denoted fkl = f l−1 ? ψ lk ,where f l−1 is the stack of feature maps in the previouslayer. At some point in the backprop algorithm, we will
have computed the derivative ∂L/∂fkl for all k, and weneed to compute ∂L/∂fjl−1 (to backpropagate to lower layers) as well as ∂L/∂ψjlk (to update the parameters). We
find that,X ∂L∂fkl (h)∂L=∂fkl (h) ∂fjl−1 (g)∂fjl−1 (g)h,k
0X ∂LX ∂f l−1
k0 (h ) lk −1 0 =ψk0 (h h )
l (h)
l−1
∂f
∂f(g)
kjh,kh0 ,k0∂Lψ lk (h−1 g)l (g) j∂fkh,k∂Ll∗=? ψj (g)∂f l=X(3)ψ ∗ (g) = ψ(g −1 ),(4)and ψjl is the set of filter components applied to input feature map j at layer l:ψjl (g) = (ψjl1 (g), . . . , ψjlKl (g))(5)

To compute the gradient with respect to component j offilter k, we have to G-convolve the j-th input feature mapwith the k-th output feature map:
X ∂L ∂f l (h)∂Lk=lkl (h) ∂ψ lk (g)∂ψj (g)∂fjkh
lk −1 0X ∂LX∂ψ(hh)
0l−1=fk0 (h0 ) k lkl (h)∂f∂ψ(g)
j00khh ,k∂Lf l−1 (hg)l (h) j∂fkh∂Ll−1∗ fj(g)
=∂fkl
=X(6)

So we see that both the forward and backward passes involve convolution or correlation operations, as is the casein standard convnets.

References
Dieleman, Sander, De Fauw, Jeffrey, and Kavukcuoglu,Koray. Exploiting Cyclic Symmetry in Convolutional
Neural Networks. In International Conference on Machine Learning, 2016.