TL;DR
This paper introduces a novel, group-theoretic framework for directly measuring the invariance and equivariance of deep learning models, moving beyond indirect metrics like accuracy. Their proposed G-EED (G-Empirical Equivariance Deviation) metrics allow for a more nuanced understanding of how models learn and generalize these properties, revealing surprising insights into common training techniques.
What Problem Does This Paper Address?
Deep learning models are often described as "invariant" to certain transformations (e.g., rotation, translation). However, this term is used loosely, and there's a lack of rigorous, direct ways to quantify how invariant or equivariant a model truly is. Current methods often rely on indirect measures like task performance (accuracy, loss), which can obscure the underlying invariance properties. This makes it difficult to understand why certain architectures or training strategies work, or to reliably predict how well models will generalize to out-of-distribution data when transformations are involved. The authors aim to bridge this gap by providing a formal, empirical method to measure these crucial properties.
Methods
The core contribution is the G-Empirical Equivariance Deviation (G-EED), a family of metrics designed to quantify a model's G-equivariance (and by extension, G-invariance) with respect to a given group of symmetries G.
- Formal Definition: G-EED is based on group theory, defining how a group G acts on input and output spaces. A model is G-equivariant if its output transforms predictably when the input is transformed by G.
- Empirical Measurement: For practical application with finite datasets and models, G-EED is approximated. It involves comparing the model's output for an input
xwith its output for a transformed inputgx, and measuring the deviation from the expected transformation of the output. - Disentangling Metrics: G-EED is designed to be independent of task-specific metrics like loss or accuracy, allowing for a direct assessment of invariance/equivariance.
- Specific G-EED Variants: The paper defines several specific G-EED metrics tailored to different parts of a neural network:
- Channelwise G-EED: Measures equivariance of convolutional layer activations.
- Latent Space G-EED: Assesses invariance in the model's internal representations.
- Softmax G-EED: Evaluates invariance at the final classification layer.
Datasets
The paper utilizes several datasets for training and evaluation:
- Rotated MNIST: Standard MNIST digits rotated by random angles. Used for training and evaluating rotation invariance.
- xView Maritime: A subset of the xView object detection dataset, focusing on maritime vessels. Used for evaluating models on a more realistic, less controlled dataset with inherent rotational symmetry.
- Out-of-Distribution (OOD) Datasets: A suite of modified MNIST datasets to test generalization:
- MNIST (noisy) 1-6: MNIST images with varying levels of uniform noise.
- MNIST (blurry): MNIST images with Gaussian blur.
- Omniglot: A dataset of characters from various alphabets.
- Inverted MNIST: MNIST images with pixel intensities inverted.
- CIFAR10 (grayscale): Grayscale versions of the CIFAR10 dataset.
Key Insights and Ideas
- Invariance is Not Always Learned Equivariance: Training with data augmentation doesn't necessarily lead to learned equivariant layers. Instead, invariance seems to emerge through other mechanisms, possibly in later layers.
- Augmentation's Generalization is Mild: Invariance learned via data augmentation shows some generalization to mild out-of-distribution corruptions (like noise or blur), but apparent invariance on drastically different data might be due to model insensitivity rather than true learned invariance.
- Invariance Doesn't Guarantee Performance: Models with random weights can exhibit higher invariance than trained models, highlighting that invariance is not always a direct benefit and can even be detrimental if misaligned with the task.
- Pretrained Weights Have Nuanced Effects: Pretrained models show different invariance/equivariance profiles compared to randomly initialized ones, and whether they are "more invariant" depends heavily on the chosen metric.
- Self-Supervised Learning and Contrastive Loss: Self-supervised models don't inherently show more invariance, unless they are trained with a contrastive loss specifically designed for the relevant symmetry group.
Key Results
- C8-CNNs vs. Standard CNNs: C8-equivariant CNNs (C8-CNNs) demonstrate significantly higher channelwise C8-equivariance than standard CNNs, especially in earlier layers. However, this difference diminishes in later layers.
- Latent Space Invariance: Both trained CNNs and C8-CNNs show more latent space invariance than random-weight CNNs. The difference between trained CNNs and C8-CNNs is less dramatic, suggesting conventional CNNs learn invariance through mechanisms other than explicit layerwise equivariance.
- OOD Generalization: Augmentation-trained CNNs show mild generalization to OOD data, while C8-CNNs might be a safer choice when strong invariance is critical and OOD data is expected.
- Pretrained Models: Models trained from scratch on xView Maritime showed more latent space invariance (using C8-EED) than those initialized with ImageNet pretrained weights. This suggests that ImageNet's typical object orientations might not foster strong rotational invariance.
- Filter Equivariance: Experiments suggest that emergent filter equivariance (where filters are rotations of each other) is not readily learned by standard augmentation techniques in non-equivariant architectures.
Limitations and Future Work
- Group Specificity: The G-EED framework requires a known symmetry group and its action. It doesn't directly capture more abstract notions of invariance like changes in image background or scaling (which involve semigroups, not just groups).
- Action on Hidden Layers: Measuring equivariance of internal representations requires knowing the group's action on hidden activations, which isn't always obvious.
- Emergent Equivariance: The authors suggest future work should focus on developing metrics that can measure learned equivariance without explicitly specifying the group action in hidden layers, allowing for the study of emergent properties.
- Broader Notions of Invariance: Extending the metrics to handle more complex transformations and actions would be valuable.
Summary updated