Capacity of Group-invariant Linear Readouts from Equivariant Representations: How Many Objects can be Linearly Classified Under All Possible Views?

Equivariance has emerged as a desirable property of representations of objects subject to identity-preserving transformations that constitute a group, such as translations and rotations. However, the expressivity of a representation constrained by group equivariance is still not fully understood. We address this gap by providing a generalization of Cover's Function Counting Theorem that quantifies the number of linearly separable and group-invariant binary dichotomies that can be assigned to equivariant representations of objects. We find that the fraction of separable dichotomies is determined by the dimension of the space that is fixed by the group action. We show how this relation extends to operations such as convolutions, element-wise nonlinearities, and global and local pooling. While other operations do not change the fraction of separable dichotomies, local pooling decreases the fraction, despite being a highly nonlinear operation. Finally, we test our theory on intermediate representations of randomly initialized and fully trained convolutional neural networks and find perfect agreement.

Introduction
============

The ability to robustly categorize objects under conditions and transformations that preserve the object categories is essential to animal intelligence, and to pursuits of practical importance such as improving computer vision systems. However, for general-purpose understanding and geometric reasoning, invariant representations of these objects in sensory processing circuits are not enough. Perceptual representations must also accurately encode their transformation properties.

One such property is that of exhibiting equivariance to transformations of the object. When such transformations are restricted to be an algebraic group, the resulting equivariant representations have found significant success in machine learning starting with classical convolutional neural networks (CNNs) [@NIPS1988_a97da629; @LeCun1989BackpropagationAT] and recently being generalized by the influential work of @Cohen2016GroupEC. Such representations have elicited burgeoning interest as they capture many transformations of practical interest such as translations, permutations, rotations, and reflections. Furthermore, equivariance to these transformations can be easily "hard-coded" into neural networks. Indeed, a new breed of CNN architectures that explicitly account for such transformations are seeing diverse and rapidly growing applications  [@Townshend2021GeometricDL; @Baek2021AccuratePO; @Satorras2021EnEN; @andersonCormorantCovariantMolecular2019; @BogatskiyLorentz2020; @Klicpera2020DirectionalMP; @Winkels2019PulmonaryND; @Gordon2020PermutationEM; @Sosnovik2021ScaleEI; @Eismann2020HierarchicalRN]. In addition, equivariant CNNs have been shown to capture response properties of neurons in the primary visual cortex beyond classical Gábor filter models [@ecker2018rotation]. While it is clear that equivariance imposes a strong constraint on the geometry of representations and thus of perceptual manifolds [@seung2000manifold; @dicarlo2007untangling] that are carved out by these representations as the objects transform, the implications of such constraints on their expressivity are not well understood. In this work we take a step towards addressing this gap. Our starting point is the classical notion of the (sometimes also known as the fractional memory/storage capacity) – a quantity fundamental to the task of object categorization and closely related to VC dimension [@Vapnik1971ChervonenkisOT]. Defined as the maximum number of points for which all (or 1-$\delta$ fraction of) possible binary label assignments (i.e. ) afford a hyperplane that separates points with one label from the points with the other, it can be seen to offer a quantification of the expressivity of a representation. Classical work on perceptron capacity focused on points in general position [@Wendel1962API; @Cover1965GeometricalAS; @Schlafli1950; @Gardner1987MaximumSC; @Gardner1988TheSO]. However, understanding the perceptron capacity when the inputs are not merely points, but are endowed with richer structure, has only recently started to attract attention. For instance, work by  @chungClassificationGeometryGeneral2018 [@pastoreStatisticalLearningTheory2020; @rotondoCountingLearnableFunctions2020; @cohenSeparabilityGeometryObject2020] considered general perceptual manifolds and examined the role of their geometry to obtain extensions to the perceptron capacity results. However, such work crucially relied on the assumption that each manifold is oriented randomly, a condition which is strongly violated by equivariant representations.

With these motivations, our particular contributions in this paper are the following:

-   We extend Cover's function counting theorem and VC dimension to equivariant representations, finding that both scale with the dimension of the subspace fixed by the group action.

-   We demonstrate the applicability of our result to $G$-convolutional network layers, including pooling layers, through theory and verify through simulation.

Related works
-------------

Work most related to ours falls along two major axes. The first follows the classical perceptron capacity result on the linear separability of points  [@Schlafli1950; @Wendel1962API; @Cover1965GeometricalAS; @Gardner1987MaximumSC; @Gardner1988TheSO]. This result initiated a long history of investigation in theoretical neuroscience, e.g.  [@brunel2004optimal; @Chapeton2012EfficientAM; @rigotti2013importance; @Brunel2016IsCC; @Rubin2017BalancedEA; @Pehlevan2017ResourceefficientPH], where it is used to understand the memory capacity of neuronal architectures. Similarly, in machine learning, the perceptron capacity and its variants, including notions for multilayer perceptrons, have been fundamental to a fruitful line of study in the context of finite sample expressivity and generalization  [@Baum1988OnTC; @Kowalczyk1997EstimatesOS; @Sontag1997ShatteringAS; @Huang2003LearningCA; @Yun2019SmallRN; @Vershynin2020MemoryCO]. Work closest in spirit to ours comes from theoretical neuroscience and statistical physics  [@chungClassificationGeometryGeneral2018; @pastoreStatisticalLearningTheory2020; @rotondoCountingLearnableFunctions2020; @cohenSeparabilityGeometryObject2020], which considered general perceptual manifolds, albeit oriented randomly, and examined the role of their geometry to obtain extensions to the perceptron capacity result.

The second line of relevant literature is that on group-equivariant convolutional neural networks (GCNNs). The main inspiration for such networks comes from the spectacular success of classical CNNs  [@LeCun1989BackpropagationAT] which directly built in translational symmetry into the network architecture. In particular, the internal representations of a CNN are approximately[^2] translation equivariant: if the input image is translated by an amount $t$, the feature map of each internal layer is translated by the same amount. Furthermore, an invariant read-out on top ensures that a CNN is translation invariant.  @Cohen2016GroupEC observed that a viable approach to generalize CNNs to other data types could involve considering equivariance to more general transformation groups. This idea has been used to construct networks equivariant to a wide variety of transformations such as planar rotations [@Worrall2017HarmonicND; @Weiler2018LearningSF; @Bekkers2018RotoTranslationCC; @Veeling2018RotationEC; @Smets2020PDEbasedGE], 3D rotations [@Cohen2018SphericalC; @Esteves2018LearningSE; @Worrall2018CubeNetET; @Weiler20183DSC; @Kondor2018ClebschGordanNA; @Perraudin2019DeepSphereES], permutations [@Zaheer2017DeepS; @Hartford2018DeepMO; @Kondor2018CovariantCN; @Maron2019InvariantAE; @Maron2020OnLS], general Euclidean isometries [@Weiler20183DSC; @Weiler2019GeneralES; @Finzi2020GeneralizingCN], scaling [@Marcos2018ScaleEI; @Worrall2019DeepSE; @Sosnovik2020ScaleEquivariantSN] and more exotic symmetries [@BogatskiyLorentz2020; @Shutty2020LearningIR; @Finzi2021APM] etc.

A quite general theory of equivariant/invariant networks has also emerged.  @Kondor2018OnTG gave a complete description of GCNNs for scalar fields on homogeneous spaces of compact groups. This was generalized further to cover the steerable case in [@cohenGeneralTheoryEquivariant2019] and to general gauge fields in [@Cohen2019GaugeEC; @Weiler2021CoordinateIC]. This theory also includes universal approximation results [@Yarotsky2018UniversalAO; @KerivenUniversal2019; @Sannai2019UniversalAO; @maron19a; @Segol2020OnUE; @ravanbakhsh20a]. Nevertheless, while benefits of equivariance/invariance in terms of improved sample complexity and ease of training are quoted frequently, a firm theoretical understanding is still largely missing. Some results however do exist, going back to [@ShaweTaylor1991ThresholdNL].  @MostafaHints made the argument that restricting a classifier to be invariant can not increase its VC dimension.  @sokolic17a extend this idea to derive generalization bounds for invariant classifiers, while  @Sannai2019ImprovedGB do so specifically working with the permutation group.  @ElesedyGeneralization show a strict generalization benefit for equivariant linear models, showing that the generalization gap between a least squares model and its equivariant version depends on the dimension of the space of anti-symmetric linear maps. Some benefits of related ideas such as data augmentation and invariant averaging are formally shown in [@Lyle2020OnTB; @ChenAugmentation]. Here we focus on the limits to expressivity enforced by equivariance.

Problem formulation {#sec:ProblemForm}
===================

Suppose $\vx$ abstractly represents an object and let $\vr(\vx) \in \mathbb{R}^N$ be some feature map of $\vx$ to an $N$-dimensional space (such as an intermediate layer of a deep neural network). We consider transformations of this object, such that they form a group in the algebraic sense of the word. We denote the abstract transformation of $\vx$ by element $g \in G$ as $g\vx$. Groups $G$ may be represented by invertible matrices, which act on a vector space $V$ (which themselves form the group $GL(V)$ of invertible linear transformations on $V$). We are interested in feature maps $\vr$ which satisfy the following group equivariance condition:

$$\begin{aligned}
    \vr( g \vx) = \pi(g) \vr(\vx),\end{aligned}$$

where $\pi : G \to GL(\mathbb{R}^N)$ is a linear of $G$ which acts on feature map $\vr(\vx)$. Note that many representations of $G$ are possible, including the trivial representation: $\pi(g)= \bm I$ for all $g$.

We are interested in perceptual object manifolds generated by the actions of $G$. Each of the $P$ manifolds can be written as a set of points $\{\pi(g) \vr ^ \mu: g\in G\}$ where $\mu \in [P] \equiv \{1,2,\dots,P\}$; that is, these manifolds are orbits of the point $\vr^{\mu} \equiv \vr (\vx^{\mu})$ under the action of $\pi$. We will refer to such manifolds as .[^3]

Each of these $\pi$-manifolds represents a single object under the transformation encoded by $\pi$; hence, each of the points in a $\pi$-manifold is assigned the same class label. A perceptron endowed with a set of linear readout weights $\vw$ will attempt to determine the correct class of every point in every manifold. The condition for realizing (i.e. linearly separating) the dichotomy $\{y^{\mu}\}_{\mu}$ can be written as $y^{\mu}\vw^{\top}\pi(g)\vr^{\mu} > 0$ for all $g\in G$ and $\mu \in [P]$, where $y^{\mu} = +1$ if the $\mu$^th^ manifold belongs to the first class and $y^{\mu} = -1$ if the $\mu$^th^ manifold belongs to the second class. The perceptron capacity is the fraction of dichotomies that can be linearly separated; that is, separated by a hyperplane.

For concreteness, one might imagine that each of the $\vr^\mu$ is the neural representation for an image of a dog (if $y^{\mu} = +1$) or of a cat (if $y^{\mu} = -1$). The action $\pi(g)$ could, for instance, correspond to the image shifting to the left or right, where the size of the shift is given by $g$. Different representations of even the same group can have different coding properties, an important point for investigating biological circuits and one that we leverage to construct a new GCNN architecture in .

Perceptron Capacity of Group-Generated Manifolds {#sec:perc-capacity}
================================================

Here we first state and prove our results in the general case of representations of compact groups over $\sR^N$. The reader is encouraged to read the proofs, as they are relatively simple and provide valuable intuition. We consider applications to specific group representations and GCNNs in Sections \[sec:ex-cyclic\] and \[sec:gcnns\] that follow.

Separability of π-manifolds {#sec:cap-red}
---------------------------

We begin with a lemma which states that classifying the $P$ $\pi$-manifolds can be reduced to the problem of classifying their $P$ centroids. For the rest of , we let $\pi: G \to \operatorname{GL}(\sR^N)$ be an arbitrary linear representation of a compact group $G$.[^4] We denote the average of $\pi$ over $G$ with respect to the Haar measure by $\avg{\pi(g)}_{g\in G}$; for finite $G$ this is simply $\frac{1}{|G|}\sum_{g\in G} \pi (g)$ where $|G|$ is the order (i.e. number of elements) of $G$. For ease of notation we will generally write $\langle \pi \rangle \equiv \langle \pi (g) \rangle_{g\in G}$ when the group $G$ being averaged over is clear.

\[thm:lemma-1\] A dataset $\{( \pi(g) \vr^\mu, y^\mu) \}_{g\in G, \mu \in [P]}$ consisting of $P$ $\pi$-manifolds with labels $y^{\mu}$ is linearly separable if and only if the dataset $\{( \avg{\pi} \vr^\mu, y^\mu) \}_{\mu \in [P]}$ consisting of the $P$ centroids $\avg{\pi} \vr^\mu$ with the same labels is linearly separable. Formally, $$\begin{aligned}
    \exists \vw \ \forall g \in G, \mu \in [P] :  y^\mu \vw^\top \pi(g) \vr^\mu  > 0 \iff \exists \vw \ \forall \mu \in [P] :   y^\mu \vw^\top \avg{\pi} \vr^\mu > 0.\end{aligned}$$

The forward implication is obvious: if there exists a $\vw$ which linearly separates the $P$ manifolds according to an assignment of labels $y^{\mu}$, that same $\vw$ must necessarily separate the centroids of these manifolds. This can be seen by averaging each of the quantities $y^\mu \vw^\top \pi(g) \vr^\mu$ over $g \in G$. Since each of these quantities is positive, the average must be positive. For the reverse implication, suppose $y^{\mu}\vw^{\top} \langle \pi \rangle \vr^{\mu}>0$, and define $\tilde{\vw} = \langle \pi \rangle^{\top} \vw$. We will show that $\tilde{\vw}$ separates the $P$ $\pi$-manfolds since $$\begin{aligned}
    y^{\mu} \tilde{\vw}^{\top} \pi (g)\vr^{\mu}&=y^{\mu} \vw^{\top}\langle \pi \rangle \pi (g)\vr^{\mu} \nonumber \ \  \text{(Definition of $\tilde{\vw}$)} 
\\
&=y^{\mu} \vw^{\top}\langle \pi(g') \pi (g)\rangle_{g'\in G}\vr^{\mu} \nonumber \ \  \text{(Definition of $\left< \pi \right>$ and linearity of $\pi (g)$)} 
\\
&= y^{\mu} \vw^{\top}\langle \pi \rangle\vr^{\mu} \ \  \text{(Invariance of the Haar Measure $\mu(S g) = \mu(S)$ for set $S$)}  \nonumber
\\
&>0 \ \ \ \  \text{(Assumption that $\vw$ separates centroids)}\end{aligned}$$ Thus, all that is required to show that $\tilde{\vw}$ separates the $\pi$-orbits are basic properties of a group representation and invariance of the Haar measure to $G$-transformations.

Relationship with Cover's Theorem and VC dimension
--------------------------------------------------

The fraction $f$ of linearly separable dichotomies on a dataset of size $P$ for datapoints in general position [^5] in $N$ dimensions was computed by @Cover1965GeometricalAS and takes the form $$\label{CoverThm}
    f(P,N) = 2^{1-P} \sum_{k=0}^{N-1} 
    \binom{P-1}{k}
    $$ where we take $\binom{n}{m}=0$ for $m>n$. Taking $\alpha = P/N$, $f$ is a nonincreasing sigmoidal function of $\alpha$ that takes the value 1 when $\alpha \leq 1$, 1/2 when $\alpha=2$, and approaches $0$ as $\alpha \to \infty$. In the thermodynamic limit of $P, N \to \infty$ and $\alpha=O(1)$, $f(\alpha)$ converges to a step function $
\label{GardnerThm}
\bar{f}(\alpha) = \lim_{P,N \to \infty, \alpha = P/N} f(P,N) =\Theta(2-\alpha)
$ [@Gardner1987MaximumSC; @Gardner1988TheSO; @shcherbina_rigorous_2003], indicating that in this limit all dichotomies are realized if $\alpha < 2$ and no dichotomies can be realized if $\alpha>2$, making $\alpha_c = 2$ a critical point in this limit.

The VC dimension [@Vapnik1971ChervonenkisOT] of the perceptron trained on points in dimension $N$ is defined to be the largest number of points $P$ such that all dichotomies are linearly separable for some choice of the $P$ points. These points can be taken to be in general position.[^6] Because $f(P,N)=1$ precisely when $P \leq N$, the VC dimension is always $N=P$ for any finite $N$ and $P$ (see @abu2012learning), even while the asymptotics of $f$ reveal that $f(P,N)$ approaches $1$ at any $N>P/2$ as $N$ becomes large. In this sense the perceptron capacity yields strictly more information than the VC dimension, and becomes comparatively more descriptive of the expressivity as $N$ becomes large. In our $G$-invariant storage problem, the relevant scale is $\alpha = P / N_0$ where $N_0$ is the dimension of the fixed point subspace (defined below). We are now ready to state and prove our main theorem.

\[thm:thm-1\] Suppose the points $\avg{\pi} \vr^{\mu}$ for $\mu \in [P]$ lie in general position in the subspace $V_0 = \range (\avg{\pi}) = \{\avg{\pi}\vx : \vx \in V\}$. Then $V_0$ is the fixed point subspace of $\pi$, and the fraction of linearly separable dichotomies on the $P$ $\pi$-manifolds $\{\pi (g) \vr^{\mu}: g \in G\}$ is $f(P,N_0)$, where $N_0 = \dim V_0$. Equivalently, $N_0$ is the number of trivial irreducible representations that appear in the decomposition of $\pi$ into irreducible representations.

The is the subspace $W=\{w \in V | gw=w \text{ ,} \forall g \in G\}$. The theorem and its proof use the notion of representations (irreps), which are in essence the fundamental building blocks for general representations. Concretely, any representation of a compact group over a real vector space decomposes into a direct sum of irreps [@NaimarkStern; @BumpLie]. A representation $\pi : G \to \operatorname{GL}(V)$ is irreducible if $V$ is not 0 and if no vector subspace of $V$ is stable under $G$, other than $0$ and $V$ (which are always stable under $G$). A subspace $W$ being stable (or invariant) under $G$ means that $\pi (g)\vw \in W$ for all $\vw \in W$ and $g \in G$. The condition that the points $\avg{\pi} \vr^{\mu}$ be in general position essentially means that there is no prescribed special relationship between the $\vr^{\mu}$ and between the $\vr^{\mu}$ and $\avg{\pi}$. Taking the $\vr^{\mu}$ to be drawn from a full-rank Gaussian distribution is sufficient to satisfy this condition.

By the theorem of complete reducibility (see @FultonHarris), $\pi$ admits a decomposition into a direct sum of irreps $\pi \cong \pi_{k_1} \oplus \pi_{k_2} \oplus ... \oplus \pi_{k_M}$ acting on vector space $V = V_1 \oplus V_2 \oplus ... V_M$, where $\cong$ denotes equality up to similarity transformation. The indices $k_j$ indicate the type of irrep corresponding to invariant subspace $V_j$. The fixed point subspace $V_0$ is the direct sum of subspaces where trivial $k_j=0$ irreps act: $V_0 = \bigoplus_{n: k_n = 0} V_n$. By the Grand Orthogonality Theorem of irreps (see @LiboffGOT) all non-trivial irreps average to zero $\left< \pi_{k,ij}(g) \right>_{g\in G} \propto \delta_{k,0}\delta_{i,j}$. Then, the matrix $\avg{\pi}$ simply projects the data to $V_0$. By the fraction of separable dichotomies on the $\pi$-manifolds is the same as that of their centroids $\avg{\pi} \vr^{\mu}$. Since, by assumption, the $P$ points $\avg{\pi} \vr^{\mu}$ lie in general position in $V_0$, the fraction of separable dichotomies is $f(P, \dim V_0)$ by .

**Remark:** A main idea used in the proof is that only nontrivial irreps average to zero. This will be illustrated with examples in below.

**Remark:** For finite groups, $N_0$ can be easily computed by averaging the trace of $\pi$, also known as the *character*, over $G$: $N_0 = \avg{ \Tr (\pi (g)) }_{g\in G} = \Tr (\avg{\pi})$ (see @serreLinearRepresentationsFinite2014). **Remark:** If the perceptron readout has a bias term $b$ i.e. the output of the perceptron is $\vw^{\top}\pi (g) \vr + b$, then this can be thought of as adding an invariant dimension. This is because the output can be written $\tilde{\vw}^{\top}\tilde{\pi} (g) \tilde{\vr}$ where $\tilde{\vw} = (\vw, b)$, $\tilde{\vr}=(\vr, 1)$, and $\tilde{\pi}(g) = \pi(g) \oplus 1$ is $\pi$ with an extra row and column added with a 1 in the last position and zeros everywhere else. Hence the fraction of separable dichotomies is $f(P, N_0+1)$.

These results extend immediately to a notion of VC-dimension of group-invariant perceptrons.

\[thm:corr-3\] Let the VC dimension for $G$-invariant perceptrons with representation $\pi$, $N_{VC}^{\pi}$, denote the maximum number $P$, such that there exist $P$ anchor points $\{ \vr^\mu \}_{\mu=1}^P$ so that $\{ (\pi(g) \vr^\mu, y^{\mu}) \}_{\mu \in [P], g \in G}$ is separable for all possible binary dichotomies $\{y^\mu\}_{\mu\in [P]}$. Then $N_{VC}^{\pi} = \text{dim}(V_0)$.

By theorem \[thm:thm-1\] and Equation \[CoverThm\], all possible dichotomies are realizable for $P \leq \text{dim}(V_0)$ provided the points $\left< \pi \right> \vr^\mu$ are in general position.

Our theory also extends immediately to subgroups. For example, strided convolutions are equivariant to subgroups of the regular representation.

\[thm:corr-2\] A solution to the the $G$-invariant classification problem necessarily solves the $G'$-invariant problem where $G'$ is a subgroup of $G$.

Assume that $y^\mu \vw^\top \vr(g \vx^\mu) > 0$ for $g \in G$. $G' \subseteq G$ $\implies$ $y^\mu \vw^\top \vr(g \vx^\mu) > 0$ $\forall g \in G'$.

Consequently, the $G'$-invariant capacity is always higher than the capacity for the $G$-invariant classification problem.

Example Application: The cyclic group Cm {#sec:ex-cyclic}
========================================

![$\pi$-manifolds for different $\pi$, illustrating that only the fixed point subspace contributes to capacity. In each panel two manifolds are plotted, with color denoting class label. Stars indicate the random points $\vr^{\mu}$ for $\mu \in \{1,2\}$ where the orbits begin, and closed circles denote the other points in the $\pi$-manifold. For (a) and (b) the group being represented is $G={Z_{4}}$ and for (c) $G={Z_{3}}$. (a) Here $\pi(g)$ is the $2 \times 2$ rotation matrix $\mR(2 \pi g / 4)$. The open blue circle denotes the fixed point subspace $\{{\bm 0} \}$. (b) Here $\pi(g)$ is the $3\times3$ block-diagonal matrix with the first $2\times2$ block being $\mR(2 \pi g / 4)$ and second $1\times1$ block being $1$. The blue line denotes the fixed point subspace $\vspan \{(0,0,1)\}$. (c) Here $\pi(g)$ is the $3 \times 3$ matrix that cyclically shifts entries of length-$3$ vectors by $g$ places. The blue line denotes the fixed point subspace $\vspan \{(1,1,1)\}$. <span data-label="fig:fig1"></span>](ICLR/cyclic_manifolds_examples.pdf){width="\linewidth"}

In this section we illustrate the theory in the case of the cyclic group $G = {Z_{m}}$ on $m$ elements. This group is isomorphic to the group of integers $\{0,1,...,m-1\}$ under addition modulo $m$, and this is the form of the group that we will consider. An example of this group acting on an object is an image that is shifted pixel-wise to the left and right, with periodic boundaries. In Appendix \[app:so3-example\] we show an application of our theory to the non-abelian Lie group $SO(3)$.

Rotation matrices
-----------------

The $2\times 2$ discrete rotation matrices $\mR(\theta_g) \equiv \begin{bmatrix} \cos(\theta_g) &  -\sin(\theta_g) \\
    \sin(\theta_g) & \cos(\theta_g)\end{bmatrix}$ where $\theta_g = 2 \pi g / m$ and $g\in {Z_{m}}$, are one possible representation of ${Z_{m}}$; in this case $V = \sR^2$. This representation is irreducible and nontrivial, which implies that the dimension of the fixed point subspace is $0$ (only the origin is mapped to itself by $\mR$ for all $g$). Hence the fraction of linearly separable dichotomies of the $\pi$-manifolds by is $f(P,0)$. This result can be intuitively seen by plotting the orbits, as in a for $m=4$. Here it is apparent that it is impossible to linearly separate two or more manifolds with different class labels, and that the nontrivial irrep $\mR$ averages to the zero matrix.

The representation can be augmented by appending trivial irreps, defining $\pi: G \to \operatorname{GL}(\sR ^ {N})$ by $\pi (g) = \mR(\theta_g) \oplus \mI \equiv \begin{bmatrix} \mR(\theta_g) &  0 \\
    0 & \mI \end{bmatrix}$ where $\mI$ is an $(N-2) \times (N-2)$-dimensional identity matrix. The number of trivial irreps is $N-2$, so that the capacity is $f(P, N-2)$. This is illustrated in b for the case $N=3$. Here we can also see that the trivial irrep, which acts on the subspace $\vspan \{ (0,0,1)\}$, is the only irrep in the decomposition of $\pi$ that does not average to zero. This figure also makes intuitive the result of that dichotomies are realizable on the $\pi$-manifolds if and only if the dichotomies are realizable on the centroids of the manifolds.

The regular representation of Cm
--------------------------------

Suppose $\pi: {Z_{m}} \to \operatorname{GL}(V)$ is the representation of ${Z_{m}}$ consisting of the cyclic shift permutation matrices (this is called the of ${Z_{m}}$). In this case $V=\sR^{m}$ and $\pi (g)$ is the matrix that cyclically shifts the entries of a length-$m$ vector $g$ places. For instance, if $m=3$ and $\vv=(1,2,3)$ then $\pi (2) \vv = (2, 3, 1)$.

In Appendix \[app:cyclic-irreps\] we derive the irreps of this representation, which consist of rotation matrices of different frequencies. There is one copy of the trivial irrep $\pi_0 (g) \equiv 1$ corresponding with the fixed point subspace $\vspan\{\vone_m\}$ where $\vone_m$ is the length-$m$ all-ones vector. Hence the fraction of separable dichotomies is $f(P,1)$. This is illustrated in c in the case where $m=3$. The average of the regular representation matrix is $\avg{\pi} = \frac{1}{|G|} \vone_m \vone_m^\top$, indicating that $\avg{\pi}$ projects data along $\vone_m$.

Direct sums of Regular Representations {#sec:ex-direct-sum}
--------------------------------------

For our last example we define a representation using the isomorphism ${Z_{m}} \cong {Z_{m_1}} \oplus {Z_{m_2}}$ for $m = m_1 m_2$ and $m_1$ and $m_2$ coprime[^7]. Let $\pi^{(1)} : {Z_{m_1}} \to \operatorname{GL}(\sR ^ {m_1})$ and $\pi^{(2)} : {Z_{m_2}} \to \operatorname{GL}(\sR ^ {m_2})$ be the cyclic shift representations (i.e. the regular representations) of ${Z_{m_1}}$ and ${Z_{m_2}}$, respectively. Consider the representation $\pi^{(1)} \oplus \pi^{(2)}: {Z_{m}} \to \operatorname{GL}(\sR^{m_1+m_2}) $ defined by $(\pi^{(1)} \oplus \pi^{(2)})(g) \equiv \pi^{(1)}(g \mod m_1) \oplus \pi^{(2)}(g \mod m_2)$, the block-diagonal matrix with $\pi^{(1)}(g \mod m_1)$ being the first and $\pi^{(2)}(g \mod m_2)$ the second block. There are two copies of the trivial representation in the decomposition of $\pi^{(1)} \oplus \pi^{(2)}$, corresponding to the one-dimensional subspaces $\vspan \{ (\vone_{m_1}, \vzero_{m_2})\}$ and $\vspan \{(\vzero_{m_1}, \vone_{m_2})\}$, where $\vzero_{m_1}$ is the length-$k$ vector of all zeros. Hence the fraction of separable dichotomies is $f(P,2)$. This reasoning extends simply to direct sums of arbitrary length $\ell$, yielding a fraction of $f(P,\ell).$[^8] These representations are used to build and test a novel G-convolutional layer architecture with higher capacity than standard CNN layers in Section \[sec:gcnns\].

These representations are analogous to certain formulations of grid cell representations as found in entorhinal cortex of rats [@haftingMicrostructureSpatialMap2005], which have desirable qualities in comparison to place cell representations [@sreenivasanGridCellsGenerate2011].[^9] Precisely, a collection $\{{Z_{m_k}} \times {Z_{m_k}}\}_k$ of grid cell modules encodes a large 2-dimensional spatial domain ${Z_{m}}\times {Z_{m}}$ where $m=\prod_k m_k$.

G-Equivariant Neural Networks {#sec:gcnns}
=============================

The proposed theory can shed light on the feature spaces induced by $G$-CNNs. Consider a single convolutional layer feature map for a finite[^10] group $G$ with the following activation $$\begin{aligned}
    a_{i,k}(\vx) = \phi( \vw_i^{\top} g_k^{-1} \vx ) \ , \  g_k \in G \ , \ i \in \{ 1,...,N \}\end{aligned}$$ for some nonlinear function $\phi$. For each filter $i$, and under certain choices of $\pi$, the feature map $\va_i(\vx) \in \mathbb{R}^{|G|}$ exhibits the equivariance property $\va_i(g_k \vx) = \pi(g_k) \va_i(\vx)$. We will let $\bm a(x) \in \mathbb{R}^{|G| N}$ denote a flattened vector for this feature map.

In a traditional periodic convolutional layer applied to inputs of width $W$ and length $L$, the feature map of a single filter $\va_i(\vx) \in \mathbb{R}^{|G|}$ is equivariant with the regular representation of the group $G = {Z_{W}} \times {Z_{L}}$ (the representation that cyclically shifts the entries of $W\times L$ matrices). Here the order of the group is $|G| = WL$. Crucially, our theory shows that this representation contributes exactly one trivial irrep per filter (see Appendix \[app:standard-cnn\]). Since the dimension of the entire collection of $N$ feature maps $\va(x)$ is $N|G|$ for finite groups $G$, one might naively expect capacity to be $P \sim 2 N |G|$ for large $N$ from @Gardner1987MaximumSC. However, Theorem \[thm:thm-1\] shows that for $G$-invariant classification, only the trivial irreps contribute to the classifier capacity. Since the number of trivial irreps present in the representation is equal to the number of filters $N$, we have $P \sim 2N$. We show in Figure \[fig:capacity\_plots\] that our prediction for $f(P,N)$ matches that empirically measured by training logistic regression linear classifiers on the representation. We perform this experiment on both (a) a random convolutional network and (b) VGG-11 [@Simonyan2015VeryDC] pretrained on CIFAR-10 [@krizhevskyLearningMultipleLayers2009] by [@kuangliu2021]. For these models we vary $\alpha$ by fixing the number of input samples and varying the number of output channels by simply removing channels from the output tensor. The convolutions in these networks are modified to have periodic boundary conditions while keeping the actual filters the same – see Appendix \[app:standard-cnn\] and for more information and the result of using non-periodic convolutions, which impact the capacity but not the overall scaling with $N_0$.

Other GCNN architectures can have different capacities. For instance, a convolutional layer equivariant to the direct sum representation of has double the capacity with $P \sim 4N$ (c), since each output channel contributes two trivial irreps. See Appendix \[app:direct-sum-cnn\] for an explicit construction of such a convolutional layer and a derivation of the capacity.

Pooling Operations
------------------

In convolutional networks, local pooling is typically applied to the feature maps which result from each convolution layer. In this section, we describe how our theory can be adapted for codes which contain such pooling operations. We will first assume that $\pi$ is an $N$-dimensional representation of $G$. Let $\mathcal P(\bm r) : \mathbb{R}^{N} \to \mathbb{R}^{N/k}$ be a pooling operation which reduces the dimension of the feature map. The condition that a given dichotomy $\{y^\mu\}$ is linearly separable on a pooled code is $$\begin{aligned}
    \exists \vw \in \mathbb{R}^{N/k} \  \forall \mu \in [P] , g\in G : y^\mu \vw^\top \mathcal P( \pi(g) \bm r^\mu ) > 0\end{aligned}$$ We will first analyze the capacity when $\mathcal P(\cdot)$ is a linear function (average pooling) before studying the more general case of local non-linear pooling on one and two-dimensional signals.

### Local Average Pooling {#sec:local_avg_pooling}

In the case of average pooling, the pooling function $\mathcal P(\cdot)$ is a linear map, represented with matrix $\mP$ which averages a collection of feature maps over local windows. Using an argument similar to Lemma \[thm:lemma-1\] (Lemma \[thm:lemma-A1\] and Theorem \[app:thm\_avg\_pool\_capacity\] in Appendix \[app:pooling\]), we prove that the capacity of a standard CNN is not changed by local average pooling: for a network with $N$ filters, local average pooling preserves the one trivial dimension for each of the $N$ filters. Consequently the fraction of separable dichotomies is $f(P,N)$.

### Local Nonlinear Pooling {#sec:local_max_pooling}

Often, nonlinear pooling operations are applied to downsample feature maps. For concreteness, we will focus on one-dimensional signals in this section and relegate the proofs for two-dimensional signals (images) to Appendix \[app:pooling\]. Let $\bm r(\bm x) \in \mathbb{R}^{N \times D}$ represent a feature map with $N$ filters and length-$D$ signals. Consider a pooling operation $\mathcal P(\cdot)$ which maps the $D$ pixels in each feature map into new vectors of size $D/k$ for some integer $k$. Note that the pooled code is equivariant to the subgroup $H = \mathbb{Z}^{D/k}$, in the sense that $\mathcal P( \pi(h) \bm r) = \rho(h) \mathcal P(\bm r)$ for any $h \in H$. The representation $\rho$ is the regular representation of the subgroup $H$. We thus decompose $G$ into cosets of size $D/k$: $g = j h$, where $j \in {Z_{k}}$ and $h \in {Z_{D/k}}$. The condition that a vector $\vw$ separates the dataset is $$\begin{aligned}
\label{eq:local_pooling}
    \forall \mu \in [P], j \in {Z_{k}}, h\in H : y^\mu \vw^\top \rho(h) \mathcal P\left( \pi(j)  \bm r^\mu \right) > 0.\end{aligned}$$ We see that there are effectively $k$ points belonging to each of the $P$ orbits in the pooled code. Since $\mathcal P\left( \cdot \right)$ is nonlinear, the averaging trick utilized in Lemma \[thm:lemma-1\] is no longer available. However, we can obtain a lower bound on the capacity, $f(P, \floor{N/k})$, from a simple extension of Cover's original proof technique as we show in Appendix \[app:lower\_and\_upper\_bound\_pool\]. Alternatively, an upper bound $f \leq f(P,N)$ persists since a $\bm w$ which satisfies must separate $\left< \rho(h) \right>_{h\in H} \mathcal{P}(\bm r^\mu)$. This upper bound is tight when all $k$ points $\left< \rho(h) \right>_{h\in H} \mathcal{P}(\pi(j) \bm r^\mu)$ coincide for each $\mu$, giving capacity $f(P,N)$. This is what occurs in the average pooling case where the upper bound $f \leq f(P,N)$ is tight. Further, if we are only interested in the $H$-invariant capacity problem, the fraction of separable dichotomies is $f(P,N)$, since $\rho$ is a regular representation of $H$ as we show in \[app:two\_dimensional\_pool\].

![Capacity of GCNN representations. Solid lines denote the empirically measured fraction $f(\alpha)$ of 100 random dichotomies for which a logistic regression classifier finds a separating hyperplane, where $\alpha = P/N_0$. Dotted lines denote theoretical predictions. Shaded regions depict 95% confidence intervals over random choice of inputs, as well as network weights in (a) and (c). (a) $f(\alpha)$ of a random periodic convolutional layer after ReLU (blue line) and followed by 2x2 max pool (orange line), with $P=40$ and $N_0 =$ \# output channels. Max pooling reduces capacity by a factor between 1/4 and 1 as predicted by our theory. (b) $f(\alpha)$ of VGG-11 pretrained on CIFAR-10 after a periodic convolution, batchnorm, and ReLU (blue line), followed by a 2x2 maxpool (orange line), and then another set of convolution, batchnorm, and ReLU (green line), with $P=20$ and $N_0 =$ \# output channels. Max pooling reduces capacity as predicted. (c) $f(\alpha)$ after a random convolutional layer equivariant to the direct sum representation of ${Z_{10}} \oplus {Z_{8}}$ as defined in , with $P=16$ and $N_0 =2$ (\# output channels). <span data-label="fig:capacity_plots"></span>](ICLR/capacity_plots.pdf){width="\linewidth"}

### Global pooling {#sec:results-3}

Lemma \[thm:lemma-1\] shows that linear separability of $\pi$-manifolds is equivalent to linear separability after global average pooling (i.e. averaging the representation over the group). This is relevant to CNNs, which typically perform global average pooling following the final convolutional layer, which is typically justified by a desire to achieve translation invariance. This strategy is efficient: Lemma \[thm:lemma-1\] implies that it allows the learning of optimal linear readout weights following the pooling operation, given only a single point from each $\pi$-manifold (i.e. no need for data augmentation). Global average pooling reduces the problem of linearly classifying $|G|P$ points in a space of dimension $N$ to that of linearly classifying $P$ points in a space of dimension $\dim V_0$. Note that by an argument similar to Section \[sec:local\_max\_pooling\], global max pooling may in contrast reduce capacity.

Induced representations {#sec:induced-reps}
-----------------------

Induced representations are a fundamental ingredient in the construction of general equivariant neural network architectures [@cohenGeneralTheoryEquivariant2019]. Here we state our result, and relegate a formal definition of induced representations and the proof of the result to Appendix \[app:induced-reps\].

\[thm:induced\] Let $\pi$ be a representation of a finite group induced from $\rho$. Then the fraction of separable dichotomies of $\pi$-manifolds is equal to that of the $\rho$-manifolds.

Discussion and Conclusion
=========================

Equivariance has emerged as a powerful framework to build and understand representations that reflect the structure of the world in useful ways. In this work we take the natural step of quantifying the expressivity of these representations through the well-established formalism of perceptron capacity. We find that the number of "degrees of freedom" available for solving the classification task is the dimension of the space that is fixed by the group action. This has the immediate implication that capacity scales with the number of output channels in standard CNN layers, a fact we illustrate in simulations. However, our results are also very general, extending to virtually any equivariant representation of practical interest – in particular, they are immediately applicable to GCNNs built around more general equivariance relations, as we illustrate with an example of a GCNN equivariant to direct sum representations. We also calculate the capacity of induced representations, a standard tool in building GCNNs, and show how local and global pooling operations influence capacity. The measures of expressivity explored here could prove valuable for ensuring that models with general equivariance relations have high enough capacity to support the tasks being learned, either by using more filters or by using representations with intrinsically higher capacity. We leave this to future work.

While the concept of perceptron capacity has played an essential role in the development of machine learning systems [@scholkopfLearningKernelsSupport2002; @cohenSeparabilityGeometryObject2020] and the understanding of biological circuit computations [@brunel2004optimal; @Chapeton2012EfficientAM; @rigotti2013importance; @Brunel2016IsCC; @Rubin2017BalancedEA; @Pehlevan2017ResourceefficientPH; @lanoreCerebellarGranuleCell2021; @froudarakis2020object], more work is wanting in linking it to other computational attributes of interest such as generalization. A comprehensive picture of the computational attributes of equivariant or otherwise structured representations of artificial and biological learning systems will likely combine multiple measures, including perceptron capacity. There is much opportunity, and indeed already significant recent work (e.g. @sokolic17a).

Reproducibility Statement {#reproducibility-statement .unnumbered}
=========================

Code for the simulations can be found at <https://github.com/msf235/group-invariant-perceptron-capacity>. This code includes an environment.yml file that can be used to create a python environment identical to the one used by the authors. The code generates all of the plots in the paper.

While the main text is self-contained with the essential proofs, proofs of additional results and further discussion can be found in the Appendices below. These include

Appendix \[app:glossary\]

:   a glossary of definitions and notation.

Appendix \[app:cyclic-irreps\]

:   a derivation of the irreps for the regular representation of the cyclic group $Z_{m}$.

Appendix \[app:so3-example\]

:   a description of the irreps for the group $SO(3)$ and the resulting capacity.

Appendix \[app:gcnn\]

:   a description of the construction of the GCNNs used in the paper, the methods for empirically measuring the fraction of linearly separable dichotomies, a description of local pooling, and complete formal proofs of the fraction of linearly separable dichotomies for these network representations (including with local pooling). This appendix also includes more description of the induced representation and a formal proof of the fraction of linearly separable dichotomies.

Appendix \[app:standard-cnn\] also contains an additional figure, .

Acknowledgements {#acknowledgements .unnumbered}
================

MF and CP are supported by the Harvard Data Science Initiative. MF thanks the Swartz Foundation for support. BB acknowledges the support of the NSF-Simons Center for Mathematical and Statistical Analysis of Biology at Harvard (award \#1764269) and the Harvard Q-Bio Initiative. ST was partially supported by the NSF under grant No. DMS-1439786.

Appendix
========

Notation and Glossary {#app:glossary}
---------------------

-   $\vx$: an abstract notation for an input object

-   $\vr(\vx)$: a feature map of the input to an $N$ dimensional vector space.

-   $\pi$: $N$ dimensional linear representation of group $G$. For each $g \in G$, $\pi(g) \in GL(\mathbb{R}^N)$ is an $N\times N$ invertible real matrix.

-   Equivariance property: $\vr(g \vx) = \pi(g) \vr(\vx)$ for all $g \in G$ and all $\vx$.

-   Invariant measure: a measure $\mu: G \to \mathbb{R}_+$ on $G$ with $\mu(g S) = \mu(S) = \mu(Sg)$. For finite groups, the uniform distribution. For locally compact topological groups, the Haar measure.

-   $\left< \cdot \right>_{g \in G}$: an average over the invariant measure of $G$

-   Irreducible representation (irrep): an irreducible representation $\rho$ on vector space $V$ satisfies $\rho(g) v \in  V$ for all $v \in  V, g \in G$.

-   Character $\chi(g)$: the trace of the representation $\chi(g) = \text{Tr} \ \pi(g)$.

-   Fixed point subspace: the subspace $V_0$ for which $\pi(g) v \in V_0$ for all $v \in V_0$.

-   General position: a collection of $P$ points in general position in an $N$ dimensional vector space have the property that any subset of $k \leq N$ points are linearly independent. These points are generic in the sense that they satisfy no more linear relationships than they must.

-   Dichotomy: a particular binary labeling $\{ y^\mu \}$ of $P$ points $\{\vx^\mu\}$.

-   $f(P,N)$: fraction of linearly separable dichotomies given by Cover's function counting theorem [@Cover1965GeometricalAS].

-   VC dimension: the largest possible integer $P$ such that there exist $P$ points where all possible dichotomies $\{y^\mu\}$ can be realized by the model @abu2012learning.

-   Capacity: the largest possible ratio $\alpha_c = P/N$ where $P$ points in general position can be linearly separated by a $N$ dimensional perceptron with probability $1$ in an asymptotic limit where $P,N \to \infty$ with $P/N = O_{N,P}(1)$. The classical result is $\alpha_c = 2$ [@Gardner1987MaximumSC; @shcherbina_rigorous_2003].

-   $\mathcal{P}(\cdot)$: a local pooling operation.

Irreps for the cyclic group {#app:cyclic-irreps}
---------------------------

Here we compute the irreps of representations $\pi: {Z_{m}} \to \operatorname{GL}(V)$ of the cyclic group ${Z_{m}}$ over a real vector space $V$ (see [@serreLinearRepresentationsFinite2014] for a derivation of the irreps when $\mV$ is a complex vector space). To find the irreps, one can use the form for the eigenvalues and eigenvectors for circulant matrices, since all the $\pi (g)$ are circulant. This results in the simultaneous diagonalization $\pi (g) = \mV \left(1 \oplus \mR(2 \pi g / m) \oplus \mR(4 \pi g / m) \oplus \cdots \oplus \mR((m-1) \pi g / m)\right) \mV^{\top}$ where $\mV$ is the real-valued version of the discrete Fourier transform matrix (the columns are proportional to cosines and sines of varying frequencies, along with a column proportional to $\vone_m$). Note that the $2x2$ rotation matrices $\mR (2 \pi g k / m)$ are irreps for $k \neq m/2$ and $k\neq 0$, since there is no one-dimensional subspace of $\sR^{2}$ that is invariant to $\mR (2 \pi g k / m)$ for all $g$. The exception for $k = m/2$ if $m$ is even, gives $\mR (2 \pi g k / m) = (-1)^g \mI$, which corresponds to rotation of 180 degrees. The subspace $\vspan\{(1,0)\}$ is invariant to this action, so that $\mR (2 \pi g k / m)$ is not an irrep. This representation can thus be reduced to an action on a one-dimensional subspace, represented by $(-1)^g$. The case $k=0$ gives the trivial representation.

SO(3): A Non-Abelian Lie Group {#app:so3-example}
------------------------------

The special orthogonal group $\text{SO}(3)$ on $3$ dimensions (rotation group), the $3\times 3$ orthogonal matrices with determinant $+1$, can also be analyzed within our theory. G-convolutional neural networks that are equivariant to $\text{SO}(3)$ rotations have become of high interest in the physical sciences and computer vision where the objects of interest often respect these symmetries [@andersonCormorantCovariantMolecular2019; @Cohen2018SphericalC; @Esteves2018LearningSE; @Kondor2018ClebschGordanNA] The irreducible representations have the form $\mB_{k_m}$ where $\bm B_{k_m}$ are $( 2k_m +1) \times (2k_m + 1)$ block matrices, known as Wigner $D$-matrices [@wignerGruppentheorieUndIhre1931]. The trivial irreps correspond to the one-dimensional irreps with $k=0$. Thus, the $\text{SO}(3)$-invariant classification capacity merely counts the number of trivial irreps which have $N_0 = \sum_{m} \delta_{k_m,0}$. The capacity is again $f(P,N_0)$.

G-equivariant convolutional layers {#app:gcnn}
----------------------------------

### Standard convolutional layers {#app:standard-cnn}

A convolutional layer consists of a set of $N$ $k\times k'$ filters $F_{i}$ that are convolved (technically cross-correlated) with a stack of $M$ $W \times L$ input tensors. Here $M$ is the number of input channels and $N$ the number of output channels. The convolution runs each filter (i.e. takes the dot product at all possible positions) over each of the $W \times L$ input tensors, and the result is averaged across the $M$ input channels to produce the output of one output channel. In the positions where the filters approach the edges of the input tensor, different choices can be made about how to handle these edge conditions. The standard choice is to pad the edges with some number of zeros depending on the desired shape of the output tensor and run the convolution out to the end of the padded image. Another possible choice is to loop the edges of the input tensor together, so that the filter is applied to the other side of the input tensor as it runs off the edge. This periodic boundary condition allows us to write the convolution formally in terms of group actions, and to apply our theory directly. When convolutions are not periodic, the resulting capacity increases somewhat but still follows the $P/N_0$ scaling of the periodic convolutions ().

For the random convolutional layers of a, the input tensors are size $10 \times 10$ and the number of input channels are $M=3$, as for standard color images. Each entry of these tensors is normally distributed with mean $0$. The filters are also of size $10 \times 10$ with periodic boundary conditions, and are initialized according to a normal Xavier distribution with parameters that are the default for Pytorch 1.9. The convolution is implemented via the Pytorch 1.9 implementation of Conv2d with padding\_mode="circular" and padding=0 in the case of periodic boundary conditions. The bias term of the convolution is set to zero and the convolution is followed by a ReLU nonlinearity (blue line). The resulting figures do not change appreciably for different choices of input tensor size, number of input channels, or size of filters (though note that the nonlinearity is essential for satisfying the general position condition of Theorem \[thm:thm-1\]; otherwise, the capacity would be determined by the number of input channels rather than number of output channels). The output of this convolution is then fed through a $2\times2$ max pooling layer (orange line in a), provided by Pytorch 1.9's MaxPool2d.

The pretrained VGG-11 layers used in b and are taken from @kuangliu2021. The first convolutional block (blue line) consists of $3 \times 3$ pretrained filters applied to CIFAR-10 image tensors randomly selected from the validation set and normalized in the same way they are normalized during training (see @kuangliu2021 for details). These images are of size $32 \times 32$ and have $M=3$ input channels, followed by a batch normalization layer in evaluation mode (fixed parameters), and then followed by a ReLU nonlinearity. The boundary conditions of these convolutions are set to be periodic in b and nonperiodic with a zero padding sizes of 1 in , and the bias term is set to zero. The batch normalization is an element-wise operation and so equivariant to the representations we consider – thus this operation is not expected and is not observed to affect the perceptron capacity. This convolutional block is then followed by a $2 \times 2$ max pooling layer (orange line). Finally, another convolutional block of $3\times3$ filters, batch normalization, and ReLU nonlinearity are applied (green line).

The fraction of linearly separable dichotomies is measured empirically by using the scikit-learn LogisticRegression implementation of logistic regression, with a tolerance value of tol=1e-18 and an inverse regularization value of C=1e8. The maximum number of iterations is set to 500. An intercept (i.e. bias) is not used for this fit.

To formally prove that the fraction of separable dichotomies is $f(P,N)$ for standard periodic convolutional layers, first note that the convolution is equivariant with respect to cyclic permutation of the inputs and of the outputs. The representation for cyclically permutating the output tensor can be written $\bigoplus_{k=1}^{N}\pi$ where $\pi$ is the representation that cyclically permutes the entries of $W \times L$ matrices. Since each copy of $\pi$ contains one trivial irrep in its decomposition into a direct sum of irreps, the direct sum $\bigoplus_{k=1}^{N}\pi$ contains $N$ trivial irreps in its decomposition. The final step to use Theorem \[thm:thm-1\] is to argue that the centroids of the manifolds are in general position. Since a nonlinearity (ReLU) is applied to the output of the convolution, and since there is no particular structure in the convolutional filters beyond possibly sparsity, we can generically expect this to be the case.

![The fraction of realizable dichotomies of non-periodic convolutional layers is higher than periodic convolutional layers, but still obeys the same scaling. Details are exactly as in b, but using non-periodic convolutions with a zero padding of size 1. Here the theory line refers to the theory for periodic convolutions.<span data-label="fig:non-periodic-conv"></span>](ICLR/capacity_plots_checks.pdf){width=".6\linewidth"}

### Local Pooling {#app:pooling}

First we prove an extension of Lemma \[thm:lemma-1\] to equivariant linear maps. This will be used to show that average pooling does not affect the capacity of the regular representation of ${Z_{m}}$.

\[thm:lemma-A1\] Let $\pi$ be a representation of the group $G$ and suppose the matrix $\mP$ is equivariant with respect to the restriction of $\pi$ to a subgroup $H \subseteq G$, so that for all $h\in H$ $\mP \pi(h) = \rho(h) \mP$ for some representation $\rho$ of $H$. Let $R$ denote a set of representatives of $G/H$. Then we have the following equivalence. $$\begin{aligned}
    \exists \vw \  &\forall \mu \in [P] , g\in G : y^\mu \vw^\top \mP \pi(g) \bm r^\mu  > 0 
    \\
    &\iff \exists \vw \  \forall \mu \in [P] \ \forall g' \in R \ : \  y^\mu \vw^\top \mP \avg{ \pi (h) }_{h\in H} \pi(g') \vr^\mu > 0.\end{aligned}$$

For the forward implication, we write the coset decomposition $g=hg'$ of $g$ and average over $H$ to find $$\begin{aligned}
    \forall g\in G : y^\mu \vw^\top \mP \pi(g) \bm r^\mu  > 0 & \iff \forall h\in H, g'\in R : y^\mu \vw^\top \mP \pi(h)\pi(g') \bm r^\mu  > 0 \\
    & \implies \forall g'\in R : y^\mu \vw^\top \mP \avg{\pi(h)}_{h\in H}\pi(g') \bm r^\mu  > 0.\end{aligned}$$

For the backward implication, suppose $y^{\mu}\vw^{\top} \mP \langle \pi(h) \rangle_{h \in H} \pi(g') \vr^{\mu}>0$ for all representatives $g' \in R$, and define $\tilde{\vw} = \avg{\rho(h)}_{h \in H}^{\top} \vw$. For any $g \in G$, take a coset decomposition $g = h g'$ for $h \in H$ and $g'\in R$. We then have $$\begin{aligned}
    y^\mu \tilde{\vw}^\top \mP \pi(g) \bm r^\mu &= y^\mu \tilde{\vw}^\top \mP \pi(h) \pi(g') \bm r^\mu \ \text{ (Coset decomposition)} \nonumber
    \\
    &= y^\mu \tilde{\vw}^\top \rho(h) \mP \pi(g') \bm r^\mu \ \text{($\mP$ is $H$-equivariant) } \nonumber
    \\
    &= y^\mu \vw^\top \left< \rho(h') \right>_{h' \in H} \rho(h) \mP \pi(g') \bm r^\mu \ \text{(Definition of $\tilde\vw$)} \nonumber
    \\
    &= y^\mu \vw^\top \left< \rho(h) \right>_{h \in H} \mP \pi(g') \bm r^\mu  \ \text{(Invariance of measure)} \nonumber
    \\
    &= y^\mu \vw^\top  \mP \left< \pi(h) \right>_{h \in H} \pi(g') \bm r^\mu \nonumber \ \text{($\mP$ is linear and $H$-equivariant) }
    \\
    &> 0 \  \text{(By assumption)}.\end{aligned}$$ The implication follows.

For the regular representation of $G = {Z_{D}}$, a local average pooling over windows of size $k$ generates a matrix $\mP$ which is equivariant with respect to the subgroup $H = {Z_{D/k}}$ with the property that $$\begin{aligned}
     \mP \avg{ \pi(h) }_{h \in H} = a \mP \avg{ \pi(g) }_{g \in G}
 \end{aligned}$$ where $a>0$ is a positive constant.

First, note that the new pooled code is the regular representation of $H$ since shifts of size $mk$ in the original feature map corresponds to shifts of length $m$ in the pooled code. Thus $\mP$ is equivariant to $H = {Z_{D/k}}$. Next we note the following two facts $$\begin{aligned}
        \mP \left< \pi(h) \right>_{h\in H} = a' \bm 1_{D/k} \bm 1_{D}^\top
        \\
        \mP \left< \pi(h) \right>_{g\in G} = a'' \bm 1_{D/k} \bm 1_D^\top
    \end{aligned}$$ $a'$ and $a''$ are positive constants and $\vone_D$ and $\vone_{D/k}$ are the $D$ and $D/k$ dimensional vector of all ones, respectively. Thus, we have that $\mP \avg{ \pi(h) }_{h\in H} = a\mP \avg{ \pi(g) }_{g \in G}$ where $a$ is a positive constant.

\[app:thm\_avg\_pool\_capacity\] The fraction of linearly separable dichotomies of a CNN pooling layer with $N$ filters after average pooling from feature maps with the size of the input image $W \times L$ to pooled feature maps of size $W / k \times L / k$ is $f(P,N)$, i.e. no capacity is lost due to local average pooling.

The CNN layer before pooling is a regular representation $\pi$ of the full group $G = {Z_{W}} \times {Z_{L}}$, applied to each of the $M$ input channels via a direct a sum $\bigoplus_{j=1}^{M} \pi$. The layer after pooling is a regular representation $\rho$ of the subgroup $H = {Z_{W/k}} \times {Z_{L/k}}$, also applied to the output channels via a direct sum $\bigoplus_{j=1}^{N} \rho$. Let $R$ be a set of representatives of $G/H$. Since $\mP$ is equivariant to $\pi$ and $\rho$ over $H$ we have by the previous two lemmas that $$\begin{aligned}
        \forall g\in G : y^\mu \vw^\top \mP  \pi(g) \bm r^\mu > 0 
        & \iff \forall  g'\in R : y^{\mu } \vw^\top \mP \avg{\pi(h)}_{h \in H} \pi(g') \bm r^\mu > 0 \\
                                & \iff \forall g'\in R : y^{\mu } \vw^\top \mP \avg{ \pi(g)}_{g \in G} \pi(g') \bm r^\mu > 0 \\
        & \iff y^{\mu } \vw^\top \mP \avg{ \pi(g)}_{g \in G} \bm r^\mu > 0 \\
        & \iff y^{\mu } \vw^\top \mP \avg{ \pi(h)}_{h \in H} \bm r^\mu > 0 \\
        & \iff y^\mu \vw^\top \avg{ \rho(h)}_{h \in H} \mP \bm r^\mu > 0
    \end{aligned}$$ Thus the capacity is determined by the rank of $\avg{\rho(h)}_{h\in H}$, assuming the $\avg{\rho(h)}_{h\in H} \mP \vr^{\mu}$ are in general position. Since each $\rho$ is a copy of the regular representation for $H$, the rank of $\avg{ \bigoplus_{j=1}^{N} \rho(h) }_{h\in H}$ is merely $N$. Thus the fraction of linearly separable dichotomies is $f(P,N)$, the same as the capacity before pooling.

Now we prove local pooling operations in a standard CNN preserve a regular representation of a subgroup of the cyclic group.

\[app:two\_dimensional\_pool\] Suppose $P$ is a local pooling operation on two-dimensional signals (CNN feature maps), and that $\pi$ is the regular representation of a group $G = {Z_{W}} \times {Z_{L}}$ on code $\bm a(\vx)$. A pooled feature map $\bm r = \mathcal P(\bm a)$ which acts on $k \times k$ windows of $\bm a$ is a regular representation of the subgroup $H={Z_{W / k }} \times {Z_{L / k}}$.

Suppose an equivariant feature map $\bm a(\bm x) \in\mathbb{R}^{W \times L \times N}$ has corresponding regular representation of the group $G = {Z_{W}} \times {Z_{L}}$ for each of the $N$ filters. Consider any local pooling operation $\mathcal P\left( \cdot \right)$ (such as average or maximum) which acts on $k \times k$ patches where $k$ divides both $W$ and $L$. $$\begin{aligned}
    r_{ij,h}(x) = \mathcal P\left( \{ a_{i',j',h}(x) \ | \ i' \in [i k,(i+1) k], j' \in [j k,(j+1)k]  \}  \right)\end{aligned}$$

Note that for $k>1$, $\bm r(x)$ is no longer equivariant to $G$ since the representation does not satisfy the homomorphism property for shifts with length $\ell$ not divisible by $k$. However, the new code is equivariant to a subgroup $H = {Z_{W/k}} \times {Z_{L/k}}$, namely vertical and horizontal shifts with length divisible by $k$. Let $\bm\pi^{\vx}_{nk,mk}$ represent a vertical shift of the image $\bm x$ by $nk$ pixels and horizontal shift by $mk$ pixels. Note that $a_{ij,h}(\bm\pi^{\vx}_{nk,mk} \vx) = a_{i+nk,j+mk}(\vx)$ since $\bm a(\vx)$ is equivariant. Then, the $h$-th pooled feature map transforms as $$\begin{aligned}
    r_{ij,h}(\bm\pi^{\vx}_{nk,mk} \bm x) &= \mathcal P\left( \{   a_{i',j',h}( \bm\pi^{\vx}_{nk,mk} x) \ | \ i' \in [ik,(i+1)k], j' \in [jk,(j+1)k]  \} \right) 
    \\
    &= \mathcal P\left( \{   a_{i'+nk,j'+mk,h}(\bm x) \ | \ i' \in [ik,(i+1)k], j' \in [jk,(j+1)k]  \} \right) \\
    & \qquad \quad \text{($\bm a$ is Equivariant to $\pi ^{x}$)} 
    \\
    &= \mathcal P\left( \{   a_{i',j',h}(\bm x) \ | \ i' \in [(n+i)k,(n+i+1)k], j' \in [(m+j)k,(m+j+1)k]  \} \right),
    \\ & \qquad \quad \text{($k$ divides $W,H$)} 
    \\
    &= r_{i+n,j+m,h}(\bm x) \ , \ \text{(Definition of $\bm r$)}\end{aligned}$$ We thus find that the code is a regular representation of the subgroup of the cyclic translations $H = \{(nk,mk)\}_{n \in [H/k], m\in [W/k]}$. This new group $G'$ has dimension $|H| = \frac{1}{k^2} |G|$.

### Lower Bound and Upper Bound on Capacity for Nonlinear Pooling {#app:lower_and_upper_bound_pool}

\[app:lower\_bound\_pooling\] Suppose a code which is equivariant to a finite group $G$ is pooled to a new code which is equivariant to a finite subgroup $H \subseteq G$. Suppose the number of trivial dimensions in the original $G$-equivariant code is $N_0$. Then the fraction of linearly separable dichotomies on the $G$-invariant problem for the pooled code is at least $f(P, \floor{N_0 / k})$ where $k = |G / H|$. Similarly the fraction is at most $f(P,N_0)$.

The pooled code, by assumption, has the property $\mathcal P(\pi(h g') \vr) = \rho(h) \mathcal P\left( \pi(g')\vr \right)$ for any $h \in H$ and $g' \in R$, where $R$ is a set of representatives of $G/H$. The $G$-invariant separability condition amounts to the proposition $$\begin{aligned}
    \exists \vw &\forall \mu \in [P] \ \forall h \in H, g' \in R : y^\mu \vw^\top \rho(h) \mathcal P( \pi(g') \vr^\mu ) > 0 
    \\
    &\iff \exists \vw \forall \mu \in [P] \ \forall g' \in R : y^\mu \vw^\top \left< \rho(h) \right>_{h \in H} \mathcal P( \pi(g') \vr^\mu ) > 0;\end{aligned}$$ in other words, a solution on the right hand side affords a solution over all of the manifolds generated in the input space. We see that, this requires considering if this particular dichotomy is linearly separble on the $P k$ anchor points $\left< \rho(h) \right>_{h\in H} \mathcal P(\pi(g') \vr^\mu)$. The simplest strategy to obtain an upper bound is to consider what happens when a single new manifold is added. We see that when a single new base point $\vr$ is added it corresponds to $k$ new points in the orbit $\left<\rho\right>\mathcal P(\pi(g') \vr)$ for all $g' \in R$. Suppose that $\left< \rho(h) \right>_{h \in H}$ has rank $N_0$. Let $C(P,N_0)$ represent the number of linearly separable dichotomies for $P$ $G$-orbits in $N_0$ trivial dimensions. Upon the addition of the $k$ new points ($P \to P+1$), we find that some of the pre-existing separable dichotomies give a new separable dichotomy. This can be guaranteed to occur when a $\vw$ separates the old dichotomy and has $\vw^{\top} \left< \rho \right> \cdot \mathcal P(\pi(g') \vr) = 0$ for the new anchor point $\vr$ (but this condition is not *necessary* for a new dichotomy to be separable). This condition means that the original dichotomy is separable in the $N_0 - k$ dimensional subspace $\{\vw : \vw \cdot \mathcal P(\pi(g') \vr) = 0 \}$. By making infinitesimal adjustment to this $\vw$ the correct label on this new orbit can be achieved without altering the labels on any other dichotomy. Since this argument gives a sufficient but not necessary condition to generate a new dichotomy, we obtain the following inequality $$\begin{aligned}
    C(P+1,N_0) \geq C(P,N_0) + C(P,N_0-k) .\end{aligned}$$ Solving this recursion gives the capacity $f_{Pooled}(P,N_0) \geq f_{Cover}(P, \floor{N_0/k})$. The greatest capacity occurs in the special case where $\left<\rho \right> \mathcal P(\pi(g') \vr) = \left< \rho \right> \mathcal P(\vr)$. In this case, the usual counting theorem applies giving a fraction of separable dichotomies of $f(P,N_0)$. This is achieved, for instance in average pooling as we showed in Theorem \[app:thm\_avg\_pool\_capacity\].

### Direct sum equivariant convolutional layers {#app:direct-sum-cnn}

Here we describe how to build a convolutional layer architecture that is equivariant with respect to the regular representation in the input space and the direct sum representations introduced in in the output space. For the following we assume that $m_1$ and $m_2$ are coprime, though see the footnote in for a discussion of how to loosen this requirement.

The input data is a $W \times L \times M$ tensor where $M$ is the number of input channels. The first step is to simply take the output of a standard convolution (in our simulations we also apply a ReLU nonlinearity) applied to this input with periodic boundary conditions, resulting in a $W \times L \times N$ tensor where $N$ is the number of output channels. The next step is to, for each of the output channels, take an average (or maximum) between entries spaced $m_1$ entries apart horizontally or vertically in the matrix, resulting in an $m_1 \times m_1$ matrix. In our simulations we took averages rather than maximums. This is repeated for the other number $m_2$, resulting in an $m_2 \times m_2$ matrix. This is repeated for every output channel, resulting in $N$ matrices of size $m_1 \times m_1$ and $N$ matrices of size $m_2 \times m_2$. Finally, the resulting matrices are flattened and appended into an $(m_1^2+m_2^2) \times N$ matrix, and the result is passed through a nonlinearity (ReLU).

As the input tensor is cyclically permuted according to a regular representation $\pi$ of ${Z_{m_1 m_2}}$, the output of this equivariant convolutional layer permutes according to the representation $\pi^{(1)} \oplus \pi^{(2)}$ where $\pi^{(1)}$ is the regular representation of ${Z_{m_1}}$ and $\pi^{(2)}$ is the regular representation of ${Z_{m_2}}$.

The proof that the fraction of separable dichotomies is given by $f(P, 2N)$ follows the same proof as for the standard periodic convolutions in Appendix \[app:standard-cnn\]. Instead of a direct sum $\bigoplus_{k=1}^{N}\pi$ we get a direct sum $\bigoplus_{k=1}^{N}(\pi^{(1)} \oplus \pi^{(2)})$. Each of the $\pi^{(1)} \oplus \pi^{(2)}$ contain two trivial irreps in its decomposition, so that the final fraction is $f(P, 2N)$.

### Induced representations {#app:induced-reps}

First we state the definition of an induced representation. Let $H$ be a subgroup of a finite group $G$ and let $\rho : H \to \operatorname{GL}(W)$ be a representation of $H$. Let $V$ be the vector space of functions $f : G \to W$ such that $f(gh) = \rho (h) f(g)$ for all $h \in H$ and $g \in G$. We now define the induced representation $\pi : G \to \operatorname{GL}(V)$ to be the representation which satisfies $(\pi (g') f) (g) = f (gg')$.

For intuition, note that every element of $g$ can be written $g = rh$ where $r$ is a representative for a coset in $G/H$ and $h \in H$. This is because the cosets $G/H$ partition $G$ and the action of $H$ stays within a coset; hence $r$ selects out the coset, and $h$ goes to the desired element of the coset: $g = rh$. With this decomposition, the action of $\pi$ is then $\pi (rh) f (g) = \rho (h) f (gr)$. Hence the $r$ component under $\pi$ has the effect of permuting to the new coset that $gr$ belongs in, and the $h$ component under $\pi$ then has the effect $\rho (h)$ on the resulting vector $f(gr)$ that we originally specified. This is the most natural way to get a representation of $G$ from a representation of $H$. In the case of finite groups, one can think of the $r$ component as permuting a set of isomorphic copies of $V$, each copy corresponding to a different coset.

To compute the capacity of induced representations, and so prove Proposition \[thm:induced\], we use Frobenius reciprocity of characters. Recall that the character $\theta$ of a representation $\pi: G \to \operatorname{GL}(V)$ is the map $\theta: G \to \sC$ induced by the trace: $\theta (g) = \Tr (\pi (g))$. Now let $\theta$ be the character of $\rho : H \to \operatorname{GL}(V)$ and let $\theta^G$ be the character of the induced representation. Then $\langle \theta^G(g)\rangle_{g\in G} = \langle \theta(h)\rangle_{h\in H}$ by Frobenius reciprocity of characters [@Mackey1970]. The average of the character is the number of trivial representations contained in the decomposition of the representation (see  @serreLinearRepresentationsFinite2014). Hence the capacity of the induced representation is equal to the capacity of $\rho$. The existence of extensions beyond finite groups is not clear to the authors, but we welcome information if such exists.

[^1]: These authors contributed equally.

[^2]: Some operations such as max pooling and boundary effects of the convolutions technically break strict equivariance, as well as the final densely connected layers.

[^3]: Note that for a finite group $G$, each manifold will consist of a finite set of points. This violates the technical mathematical definition of "manifold", but we abuse the definition here for the sake of consistency with related work [@chungClassificationGeometryGeneral2018; @cohenGeneralTheoryEquivariant2019]; to be more mathematically precise, one could instead refer to these "manifolds" as $\pi$-orbits.

[^4]: Note that our results extend to more general vector spaces than $\sR^N$, under the condition that the group be semi-simple.

[^5]: A set of $P$ points is in in $N$-space if every subset of $N$ or fewer points is linearly independent. This says that the points are "generic" in the sense that there aren't any prescribed special linear relationships between them beyond lying in an $N$-dimensional space. Points drawn from a Gaussian distribution with full-rank covariance are in general position with probability one.

[^6]: This is because linear dependencies decrease the number of separable dichotomies (see @hertz2018introduction).

[^7]: Two numbers are coprime if they have no common prime factor.

[^8]: Our results do not actually require that the $m_k$ be coprime, but rather that none of the $m_k$ divide one of the others. To see this, take $\tilde{m}$ and $\tilde{m}_k$, to be $m$ and the $m_k$ after being divided by all divisors common among them. Then ${Z_{\tilde{m}}}\cong \oplus_{k=1}^{\ell} {Z_{\tilde{m}_k}}$ and provided none of the $\tilde{m}_k$ are $1$, one still gets a fraction of $f(P, \ell)$.

[^9]: Place cells are analogous to standard convolutional layers.

[^10]: We consider finite groups here for simplicity, but the theory extends to compact Lie groups.

{'source': 'arXiv_out/2110'}