EquiMod: An Equivariance Module to Improve Visual Instance Discrimination

Alexandre Devillers, Mathieu LefortICLR 2023

Self-supervised learning (SSL) has revolutionized visual representation, but standard approaches often force models to discard valuable information. EquiMod, introduced at ICLR 2023, is a plug-and-play module that moves beyond simple "invariance" by teaching models to predict how specific augmentations displace an image in the latent space. This preserves critical features and leads to significant performance boosts on benchmarks like ImageNet and CIFAR10.

The Problem with Pure Invariance

Most modern self-supervised visual representation methods—such as SimCLR, BYOL, or Barlow Twins—rely on instance discrimination. The standard recipe takes an image, creates two "views" using random augmentations (like cropping, flipping, or color jittering), and trains the model to map both views to the exact same point in a latent space. This property is known as invariance.

However, this creates a hidden trade-off. To prevent the model from finding "shortcuts" (e.g., matching images solely based on a color histogram), researchers apply aggressive augmentations. By forcing total invariance across these augmentations, we teach the model to become "blind" to potentially useful features. For instance, color is vital for classifying birds or flowers, and spatial positioning is crucial for object detection. Standard invariance discards this information entirely.

The EquiMod Solution: From Invariance to Equivariance

To capture the information usually suppressed by invariance tasks, the authors introduce EquiMod. While invariance dictates that an augmented image and an original image share the exact same representation, equivariance dictates that a transformation in the pixel space should correspond to a predictable transformation in the latent space.

The Architecture

EquiMod functions as a secondary "branch" added to standard SSL architectures:

  1. Encoder & Invariance Head: The standard pathway that learns to make different views similar.
  2. Equivariance Head: A separate projection head that maps representations into a distinct "equivariant" latent space.
  3. Equivariance Predictor: The core innovation. It takes the embedding of the original image and a numerical encoding of the augmentation parameters (e.g., crop coordinates or color shift intensity). It then predicts where the augmented image will land in the latent space.
EquiMod architecture adding an equivariance predictor branch to standard SSL.

The model is trained with a joint loss: the standard invariance loss combined with the EquiMod loss (a variant of NT-Xent), which encourages the predicted augmented embedding to match the actual augmented embedding.

Key Insights and Performance Gains

EquiMod was evaluated as a complement to three major baselines (SimCLR, BYOL, and Barlow Twins) on CIFAR10 and ImageNet. The results revealed several compelling insights:

  • Predictable Displacements: By structuring the latent space so that differences are predictable, EquiMod forces the encoder to retain the "how" and "why" of an image's transformation, rather than just allowing embeddings to vary randomly.
  • Automatic Sensitivity Tuning: The model does not collapse into trivial invariance. Instead, it naturally "chooses" which augmentations to be sensitive to. For example, the model becomes highly sensitive to color jitter and cropping but remains relatively indifferent to horizontal flips.
Relative equivariance across different augmentations on ImageNet and CIFAR10.
  • Plug-and-Play Genericity: EquiMod improves performance across fundamentally different SSL approaches, including contrastive learning, bootstrapping, and redundancy reduction.
  • Consistent Accuracy Boosts: The addition of EquiMod consistently improved Top-1 accuracy under linear evaluation. For instance, SimCLR on ImageNet improved from 71.57% to 72.30%, and on CIFAR10 from 90.96% to 92.79%. BYOL saw a massive boost on ImageNet during shorter 100-epoch training runs (62.09% to 65.55%).

Limitations and Future Directions

While highly effective, EquiMod does have limitations. Adding a second head and a predictor increases the memory footprint and training time, introducing a non-negligible computational overhead. Furthermore, while EquiMod significantly helped BYOL in shorter training runs, the benefit vanished at 1000 epochs on ImageNet, suggesting that equivariance tasks might eventually interfere with primary invariance goals in very long training regimes.

Future work may explore EquiMod as a standalone model—removing the invariance task entirely—and testing its performance on specialized downstream tasks like fine-grained classification, where preserved color and spatial information could provide an even larger edge.

Summary updated

BibTeX
@inproceedings{devillers2023equimod,
  author = {Alexandre Devillers and Mathieu Lefort},
  title = {{EquiMod: An Equivariance Module to Improve Visual Instance Discrimination}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
}
Figure