Abstract
In this paper we show how Group Equivariant Convolutional Neural Networks (GCNNs) use subsampling to learn to break equivariance to their symmetries. We focus on 2D rotations and reflections and investigate the impact of broken equivariance on network performance. We show that a change in the input dimension of a network as small as a single pixel can be enough for commonly used architectures to become approximately equivariant, rather than exactly. We investigate the impact of networks not being exactly equivariant and find that approximately equivariant networks generalise significantly worse to unseen symmetries compared to their exactly equivariant counterparts. However, when the symmetries in the training data are not identical to the symmetries of the network, we find that approximately equivariant networks are able to relax their own equivariant constraints, causing them to match or outperform exactly equivariant networks on common benchmark datasets.
Introduction
In deep learning, equivariance is a property where a transformation of the input (like rotating an image) results in a predictable transformation of the output. While standard Convolutional Neural Networks (CNNs) are equivariant to translation, they lack inherent rotation equivariance. Group Equivariant CNNs (GCNNs) were developed to address this, providing mathematical guarantees that the network will treat a rotated object consistently with the original.
However, a significant gap exists between theory and practice: most GCNNs employ subsampling layers (such as strided convolutions or pooling) to reduce feature map dimensionality. This paper investigates how these layers can "break" the equivariance guarantee depending on input dimensions, leading to a phenomenon where networks "abuse" this flexibility to adapt to dataset biases.
The Mechanics of Broken Equivariance
The authors provide a formal mathematical framework to determine when a subsampling layer preserves or breaks equivariance. For a layer to be exactly equivariant to $90^\circ$ rotations, the input dimension ($i$), kernel size ($k$), and stride ($s$) must satisfy the condition: $$(i - k) \mod s = 0$$
If this condition is not met, rotating the input causes the sampling grid of the pooling layer to shift by a pixel. This shift results in different numerical outputs, breaking the mathematical guarantee of equivariance.
This leads to two categories of networks:
- Exact Equivariant Networks: Those satisfying the condition at every layer.
- Approximate Equivariant Networks: Those failing the condition, often due to a single-pixel difference in input size.
Experimental Methodology
To measure the "equivariance error," the authors use Mean Squared Error (MSE) between the output of a rotated input and the rotated output of an original input. A critical challenge in measuring this is the presence of edge artifacts; rotating a square image introduces black corners that the network might use as features. To isolate architectural equivariance, the authors implement CircleCrop, applying a circular mask to the inputs.
The study evaluates these concepts across diverse benchmarks, including MNIST, RotMNIST, ImageNet, CIFAR-10/100, and PatchCamelyon (PCam).
Results: Generalization vs. Optimization
The research reveals a fundamental trade-off between exact and approximate equivariance.
The Generalization Superpower
On the RotMNIST dataset, exact GCNNs significantly outperformed approximate ones when generalizing to unseen rotations. The exact model's performance remains stable regardless of the rotation angle, whereas approximate models exhibit performance degradation as the rotation deviates from the training distribution.
The Optimization Advantage
Conversely, on datasets like CIFAR-10 and ImageNet, approximate $p4$-GCNNs often outperformed their exact counterparts. For instance, on CIFAR-10, the approximate model achieved 94.80% accuracy compared to the exact model's 93.41%.
This occurs because approximate networks can "abuse" broken symmetry to learn orientation-specific features. In datasets with a "gravity" bias (where "up" is usually "up"), approximate networks actually increase their equivariance error over time, relaxing their constraints to improve classification accuracy. This is particularly useful for distinguishing between similar objects that differ only by orientation, such as the digits "6" and "9".
Conclusion
This study demonstrates that a network's mathematical properties can be fundamentally altered by a single pixel. While exact equivariance is essential for generalizing to arbitrary rotations, approximate equivariance offers a flexible middle ground that allows networks to adapt to inherent biases in training data. Future work may explore "hybrid" architectures that transition from exact to approximate equivariance in deeper layers, potentially capturing the benefits of both approaches.
Summary updated