Grounding inductive biases in natural images: invariance stems from variations in data

Diane Bouchacourt, Mark Ibrahim, Ari S. Morcos

In the quest to build robust computer vision models, researchers have long debated the best way to achieve invariance—the ability of a model to recognize an object regardless of its position, size, or lighting. We typically rely on three "levers": architectural design (like the translation invariance built into CNNs), data augmentation (like cropping and flipping), and the raw diversity of the training data itself.

Paths to Invariance and Transformation Summary

This NeurIPS 2021 paper from Facebook AI Research (FAIR) takes a deep dive into these levers to see which one is actually doing the heavy lifting. Their findings challenge some common intuitions about how our most popular models and augmentations work.

TL;DR

The researchers demonstrate that model invariance is primarily learned from the training data itself, rather than being "built-in" by architecture or solely forced by augmentations. Surprisingly, the ubiquitous Random Resized Crop (RRC) augmentation succeeds mostly because it introduces translation, not scale. Furthermore, standard models trained on ImageNet are often more sensitive to appearance (color/brightness) than geometry.

What Problem Does This Paper Address?

Deep learning models often fail when they encounter "out-of-distribution" samples—like a bus turned upside down. To fix this, we try to bake in inductive biases. For example, Convolutional Neural Networks (CNNs) are designed to be translation-invariant by nature.

However, we don't fully understand the relative importance of these biases. Does a ResNet perform well because of its convolutional layers, or because we trained it with heavy data augmentation? Furthermore, while we use synthetic datasets to study these properties, we haven't had a clear picture of what the "natural factors of variation" (the ways images naturally change) actually look like in massive real-world datasets like ImageNet.

Methods

The authors employed several clever experimental setups to isolate these factors:

  1. Decomposing RRC: They broke down the standard Random Resized Crop into two parts: RandomSizeCenterCrop (which changes scale but keeps the object centered) and FixedSizeRandomCrop (which keeps the scale constant but moves the object around).
  2. Invariance Metrics: They developed a metric to measure how much a model's internal representation (embeddings) changes when an image is transformed. If the embedding stays the same, the model is invariant.
  3. Similarity Search for Data Factors: To find the "natural" variations in ImageNet, they created a SimChange metric. They tested which transformations (like rotating or changing brightness) made two different images of the same class look more similar to each other in the model's eyes.
  4. Cross-Architecture Comparison: They compared the ResNet18 (a CNN with built-in geometric bias) against the Vision Transformer (ViT) (which has very little built-in geometric bias).

Key Insights and Results

Translation is the Secret Sauce of RRC

While "Resized" is in the name, the performance gain from Random Resized Crop is driven almost entirely by the "Crop" (translation). Adding scale variation to a translating model barely helps, but adding translation to a scaling model helps immensely.

  • No Augmentation: 63.49% Top-1 accuracy.
  • Translation-only Augmentation: 69.14%.
  • Full RRC (Translation + Scale): 70.05%.
  • Takeaway: Translation accounts for the vast majority of the RRC "boost."

Data Trumps Architecture

Even though CNNs are designed for translation invariance, Vision Transformers (ViTs) achieve similar or even better translation invariance after training. This suggests that the training data is the primary source of invariance, and the specific architecture matters less than we thought.

Translation Invariance Across Architectures

Training consistently increases invariance to the transformations that actually appear in the data (translation and appearance) but can actually decrease invariance to transformations that don't (like extreme rotation or shearing).

ImageNet is an "Appearance" Dataset

When looking for what makes images of the same class similar, the authors found that 78% of the top factors were appearance-based (like color and solarization) rather than geometric (like rotation or shear). For over 98.4% of ImageNet classes, the transformation that most increased similarity between class members was an appearance change, not a geometric one.

Invariance is Class-Specific

Factors of variation aren't universal. For example, rotation is a major factor for "textile" classes (like velvet or rugs) because they have no canonical "up," but it's less relevant for "buildings."

Limitations and Future Work

  • Embedding-Based Metrics: The study relies on cosine similarity in the penultimate layer. While standard, this might not capture all the nuances of how a model "understands" an image.
  • The Scaling Mystery: While the paper shows translation is more important than scale in RRC, the role of scale remains somewhat obscure and difficult to isolate perfectly.
  • Future Direction - Per-Class Augmentation: Since the factors of variation are class-specific, the authors suggest that future research should move away from "one-size-fits-all" data augmentation and toward strategies tailored to specific types of objects.

Summary updated

BibTeX
@inproceedings{bouchacourt2021grounding,
  author = {Diane Bouchacourt and Mark Ibrahim and Ari S. Morcos},
  title = {{Grounding inductive biases in natural images: invariance stems from variations in data}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=p7GujbewmRY},
}
Figure