[Paper Review] In What Ways Are Deep Neural Networks Invariant and How Should We Measure This?
This paper introduces G-EED (G-empirical equivariance deviation), a group-theoretic family of metrics to directly measure invariance and equivariance in deep neural networks. It reveals that data augmentation induces invariance through mechanisms other than learned equivariant layers, and that invariance does not always correlate with model performance—pretrained models show different invariance properties than randomly initialized ones.
It is often said that a deep learning model is "invariant" to some specific type of transformation. However, what is meant by this statement strongly depends on the context in which it is made. In this paper we explore the nature of invariance and equivariance of deep learning models with the goal of better understanding the ways in which they actually capture these concepts on a formal level. We introduce a family of invariance and equivariance metrics that allows us to quantify these properties in a way that disentangles them from other metrics such as loss or accuracy. We use our metrics to better understand the two most popular methods used to build invariance into networks: data augmentation and equivariant layers. We draw a range of conclusions about invariance and equivariance in deep learning models, ranging from whether initializing a model with pretrained weights has an effect on a trained model's invariance, to the extent to which invariance learned via training can generalize to out-of-distribution data.
Motivation & Objective
- To address the lack of direct, formal measurement of invariance and equivariance in deep learning models, which are often assessed indirectly via accuracy or loss.
- To formalize and quantify how deep neural networks achieve invariance and equivariance under known symmetry groups, such as reflections and rotations.
- To investigate whether commonly used techniques—data augmentation and equivariant architectures—actually induce the desired invariance and equivariance properties in practice.
- To examine how model initialization (random vs. pretrained weights) and training paradigms (supervised vs. self-supervised) affect learned invariance and equivariance.
- To evaluate the generalization of learned invariance to out-of-distribution data, including image corruptions and domain shifts.
Proposed method
- Proposes G-EED, a family of metrics based on group-theoretic principles to quantify the deviation of a model’s output from G-equivariance or G-invariance under a symmetry group G.
- Applies G-EED to both final model outputs and intermediate latent representations, using distance metrics such as Euclidean distance and cosine similarity.
- Employs a flexible framework that allows G-EED to be computed on different components of a neural network, including feature maps and final predictions.
- Uses G-EED to compare models trained with data augmentation, equivariant layers, and self-supervised contrastive loss, enabling direct comparison of invariance properties.
- Employs confidence intervals and multiple random seeds to ensure statistical robustness in evaluating invariance across different model variants.
- Applies G-EED to both in-distribution and out-of-distribution data, including ImageNet corruptions and domain-shifted images, to assess generalization of invariance.
Experimental results
Research questions
- RQ1To what extent does data augmentation induce true G-equivariance or G-invariance in deep neural networks, and is this due to learned equivariant layers or another mechanism?
- RQ2How do models initialized with pretrained weights differ in their invariance and equivariance properties compared to those trained from scratch?
- RQ3Does self-supervised training, particularly with contrastive loss, lead to stronger invariance than supervised training?
- RQ4How well does invariance learned via training generalize to out-of-distribution data, such as image corruptions or domain-shifted images?
- RQ5Can invariance be meaningfully measured independently of model accuracy or loss, and does high invariance correlate with better performance?
Key findings
- Training with data augmentation does not primarily induce invariance through learned equivariant layers; instead, invariance arises via other, less transparent mechanisms.
- Invariance learned through data augmentation generalizes mildly to common image corruptions but may be spurious for extreme out-of-distribution shifts, potentially due to model insensitivity rather than true invariance.
- Models with random weights can be more invariant (in the mathematical sense) than models with learned or hard-coded invariance, challenging the assumption that invariance correlates with performance.
- Models initialized with pretrained weights exhibit different invariance and equivariance properties than randomly initialized models, and the degree of invariance depends on the choice of distance metric.
- Self-supervised models trained with contrastive loss (e.g., SimCLR) show significantly higher invariance than those without, such as DINO, indicating that contrastive objectives directly promote invariance.
- Latent space G-EED reveals that SimCLR achieves the highest invariance among tested models, while DINO and supervised models show intermediate levels, depending on the distance metric used.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.