Contrastive-Equivariant Self-Supervised Learning Improves Alignment with Primate Visual Area IT

Thomas Edward Yerxa, Jenelle Feather, Eero P Simoncelli, SueYeon ChungNeurIPS 2024

This paper explores the intersection of computer vision and neuroscience, proposing a novel approach to training self-supervised models that better mimic how the primate brain processes visual information.

The Challenge of Invariance in Self-Supervised Learning

In recent years, task-optimized Deep Neural Networks (DNNs) have become the gold standard for predicting how neurons in the primate visual system—specifically the Inferior Temporal (IT) cortex—respond to images. While supervised models were the first to succeed in this domain, Self-Supervised Learning (SSL) has recently caught up.

However, a conceptual gap remains: most SSL methods are built on the principle of invariance. They teach a network that a "dog" is a "dog" regardless of whether the image is zoomed in, flipped, or turned grayscale. While this strict invariance is excellent for classification tasks, biological neurons in Area IT are not perfectly invariant. Instead, they encode a wealth of "category-orthogonal" information, such as an object’s pose, lighting, and position.

The authors argue that by forcing AI models to be perfectly invariant, we are making them less like the biological brains we aim to model. The challenge is to encourage "structured variability" (equivariance) without requiring labels for every possible transformation.

Introducing Contrastive-Equivariant SSL (CE-SSL)

To address this, the authors introduce Contrastive-Equivariant Self-Supervised Learning (CE-SSL).

Equivariance over Invariance

In a strictly invariant model, the representation of an image stays identical after a transformation. In an equivariant model, the representation changes in a predictable, structured way that corresponds directly to the applied transformation.

Paired Augmentations and Dual-Head Architecture

Standard SSL typically takes one image and creates two different random "views" of it. CE-SSL modifies this process through a paired augmentation strategy:

  1. Split the Batch: The dataset batch is split into two halves.
  2. Apply Identical Transforms: Corresponding images in both halves are subjected to the exact same random transformations.
  3. Dual-Head Loss Function: The model utilizes a dual-head architecture. One head (the invariant head) uses standard SSL losses (like Barlow Twins or SimCLR). The second head (the equivariant head) applies a "contrastive-equivariant" loss. This loss encourages the difference between two views of Image A to be similar to the difference between two views of Image B.
Overview of the Contrastive-Equivariant Self-Supervised Learning (CE-SSL) architecture.

Crucially, this method is entirely unsupervised. The network learns that "zooming in" looks a certain way across all images without ever being explicitly told what a "zoom" is or what the specific crop parameters were.

Key Insights and Emergent Properties

  • Biologically Realistic Structured Variability: The brain organizes visual noise rather than simply ignoring it. By allowing the network to track transformations in a dedicated subspace, the model becomes a significantly better predictor of biological neural firing rates.
  • Emergent Factorization: Even though the loss function does not explicitly separate "what" from "where," CE-SSL models naturally learn to factorize image content from image transformations. Spatial variability (e.g., crops) and photometric variability (e.g., color shifts) become separated in the representation space.
  • Linear Decodability: In CE-SSL models, transformation parameters (like the exact hue shift or crop size) can be "read out" using a simple linear regressor much more accurately than in standard SSL models, suggesting the network has successfully untangled these variables.

Key Results and Brain Alignment

The models were pretrained on ImageNet-1k and ImageNet-100, and evaluated primarily using Brain-Score against four specific electrophysiology datasets of macaque IT responses (Majaj-Hong, Sanghavi-Jozwik, Sanghavi, and Sanghavi-Murty).

  • Top-Tier Brain Alignment: CE-SSL models demonstrated a systematic increase in their ability to predict responses in the macaque IT cortex. The best-performing model (based on Barlow Twins) reached the top 10 of approximately 250 models on the Brain-Score IT leaderboard.
  • Significant Gains: The improvement in neural predictivity gained by adding the equivariant loss was roughly four times larger than the difference observed when simply switching between different base SSL objectives (e.g., from SimCLR to Barlow Twins).
Neural predictivity across macaque IT datasets for different SSL base models and equivariance weights (λ).
  • Generalization: On the ImageNet-100 benchmark, CE-SSL models showed improved transfer learning performance on out-of-distribution tasks like the Flowers-102 dataset, where color information—often discarded by standard SSL—is vital for accurate classification.

Limitations and Future Directions

While promising, the method introduces a hyperparameter ($\lambda$) to balance the invariant and equivariant losses. Finding this "sweet spot" is essential, as excessive equivariance can degrade the model's core ability to recognize objects. Additionally, while transfer learning gains were clear on ImageNet-100, they were less pronounced when scaling up to ImageNet-1k, possibly because the larger dataset inherently provides enough diversity to partially overcome invariance issues.

Looking forward, the authors suggest moving away from synthetic augmentations and toward video. Learning from temporally adjacent frames in natural video would provide a more ecologically plausible way to learn equivariance, closely mirroring how primates learn by observing objects moving in the real world.

Summary updated

BibTeX
@inproceedings{yerxa2024contrastive,
  author = {Thomas Edward Yerxa and Jenelle Feather and Eero P Simoncelli and SueYeon Chung},
  title = {{Contrastive-Equivariant Self-Supervised Learning Improves Alignment with Primate Visual Area IT}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=AiMs8GPP5q},
}
Figure