Understanding image representations by measuring their equivariance and equivalence

Karel Lenc, Andrea Vedaldi

In the evolution of computer vision, the field has transitioned from meticulously hand-crafted features like HOG and SIFT to the automated hierarchy of deep Convolutional Neural Networks (CNNs). However, while CNNs dominate performance benchmarks, our theoretical understanding of their internal mechanics has often lagged behind. In this CVPR 2015 paper, Karel Lenc and Andrea Vedaldi introduce a rigorous mathematical framework to quantify two fundamental properties of image representations: equivariance and equivalence.

The Core Challenge: Peeking Inside the Black Box

While terms like "invariance" (the representation remains constant under transformation) and "discriminability" (the ability to distinguish between classes) are frequently used, they are often poorly defined in the context of deep learning. This research addresses three pivotal questions:

  1. Equivariance: If an input image is rotated or flipped, does its internal representation change in a predictable, linear way?
  2. Invariance: At what depth in a neural network does a representation become truly invariant to specific transformations?
  3. Equivalence: Do different networks, trained on disparate datasets (e.g., objects vs. scenes), learn the same underlying visual concepts?

Methodology: Linear Mappings and Stitching Layers

To formalize these concepts, the authors model the relationship between a transformed image $gx$ and its representation $\phi(gx)$ as a linear mapping: $\phi(gx) \approx M_g \phi(x)$.

Learning Equivariance

Finding the mapping $M_g$ is treated as a regression problem. The authors utilize sparse regression and structured sparsity to ensure the model respects the convolutional nature of the networks. By forcing the mapping to operate only within local spatial "neighborhoods," they mimic the local connectivity of CNN layers. For deep networks, $M_g$ is implemented as a specialized layer consisting of a permutation followed by linear filters.

Testing Equivalence via "Franken-CNNs"

To determine if two representations are equivalent, the researchers developed a "stitching" technique. They take the initial layers of one network (e.g., Network A) and connect them to the later layers of another (Network B) using a simple linear stitching layer. If this hybrid network maintains the performance of the original models, the representations at the stitch point are considered equivalent.

Key Insights and Findings

Visualization of Conv1 and Conv2 filters under various geometric transformations.

Representations are Highly Predictable

One of the most striking findings is that even in highly non-linear deep networks, the way a representation transforms is largely linear. As shown in the visualization of filters across transformations, the geometry of the image is preserved in a simple, predictable manner throughout the network's depth.

The Gradient of Invariance

Invariance is not a binary state but a property that builds gradually. Interestingly, the study found that the very first layer (Conv1) can sometimes appear more invariant than the second (Conv2). This occurs because early spatial pooling can "wash out" minor transformations before subsequent layers re-introduce complexity.

Universal Early Vision

The stitching experiments revealed that early layers (Conv1 through Conv2) are almost perfectly interchangeable across different networks. A network trained on MIT Places (scenes) can be successfully stitched to one trained on ImageNet (objects). This suggests that the initial stages of artificial vision are "universal" across different visual tasks.

Quantitative Results and Applications

Performance (AP) across rotation and scale transformations using different mapping techniques.

Performance Stability

The researchers demonstrated that their proposed mapping methods—specifically Least Squares (LS), Ridge Regression (RR), and Feature Selection (FS)—allow the network to maintain high Average Precision (AP) across a wide range of rotations and scales. Without these mappings, performance drops significantly as the transformation deviates from the training distribution.

Computational Efficiency

Understanding equivariance has immediate practical benefits. In tasks like 3D pose estimation for cat heads, the authors achieved speedups of 8x to 22x. By computing features once and mathematically "warping" them to account for different orientations, they eliminated the need to re-run heavy feature extractors for every possible object pose.

Conclusion and Future Directions

While this framework provides a powerful tool for analyzing geometric transformations (flips, rotations, and scaling), the authors note that photometric transformations—such as changes in lighting or color—remain an area for future study. Additionally, while linear assumptions hold surprisingly well, non-linear relationships may exist that require more complex modeling. Nonetheless, this work moves us closer to a principled understanding of the internal logic of deep visual representations.

Summary updated

BibTeX
@inproceedings{lenc2015understanding,
  author = {Karel Lenc and Andrea Vedaldi},
  title = {{Understanding image representations by measuring their equivariance and equivalence}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2015},
  doi = {10.1109/cvpr.2015.7298701},
}
Figure