Understanding Image Representations by Measuring Their Equivariance and Equivalence

Karel Lenc, Andrea Vedaldi · DOI

Introduction

Despite the massive success of Convolutional Neural Networks (CNNs), our theoretical understanding of their internal mechanics remains thin. While concepts like "invariance"—the ability of a model to recognize an object regardless of its orientation—are frequently discussed, precise tools to measure these properties across different layers or architectures have been lacking. This research introduces a formal framework to explore the "black box" of image representations, from traditional descriptors like HOG to modern deep CNNs. By utilizing "transformation layers" and "stitching layers," the authors quantify how representations respond to geometric changes (equivariance) and determine if different architectures learn fundamentally similar visual information (equivalence).

Methods

The study proposes two primary diagnostic tools to probe neural network representations:

Transformation Layers

To study equivariance, the researchers attempt to learn a simple linear map ($M_g$) that predicts the features of a transformed image based solely on the features of the original image. If a transformation (like a rotation or flip) can be modeled by a simple linear operation—such as a permutation or a small local filter—the representation is considered equivariant. This is implemented using a Siamese network architecture to learn these maps efficiently.

A transformation layer represented as a linear convolution operation between feature spaces.

Stitching Layers

To study equivalence, the authors create "Franken-CNNs." By taking the bottom half of one network (e.g., AlexNet) and "stitching" it to the top half of another (e.g., VGG) via a simple linear 1x1 convolutional layer, they can test compatibility. If the hybrid network maintains the performance of the original models, it indicates that both architectures share a common internal "language" at the stitch point.

Key Insights and Ideas

The application of these diagnostic tools revealed several fundamental properties of deep representations:

  • Equivariance is Linear: A key finding is that complex geometric warps in image space are often modeled as simple linear transformations in feature space. This suggests that CNNs "untangle" the manifold of image transformations into a flatter, more manageable structure.
  • Invariance is Earned: CNNs do not possess inherent invariance. Instead, they progressively build invariance to transformations encountered during training (e.g., horizontal flips via data augmentation). They remain highly sensitive (equivariant) to unseen transformations, such as vertical flips or 90-degree rotations.
Comparison of feature maps under various geometric transformations, showing the effectiveness of learned equivariance maps.
  • Resolution and Compatibility: When stitching networks, spatial resolution (stride relative to input) is a better predictor of compatibility than layer depth. Layers with matching resolutions are often interchangeable.
  • Generic vs. Specific Layers: Early layers across diverse architectures (AlexNet, VGG, ResNet) are highly equivalent. However, as depth increases, representations become increasingly specialized to the specific architecture and training task.

Key Results

The practical utility of this framework was demonstrated through several experiments using benchmarks like ILSVRC12 and PASCAL VOC 2007:

  1. Accelerated Pose Estimation: By leveraging learned equivariance maps, the authors achieved a 22x speedup in cat face pose estimation. Instead of processing multiple rotated versions of an image through the full CNN, they processed the image once and used linear maps to predict features for all other rotations.
  2. Architecture Dominance: Experiments showed that VGG16 is powerful enough to "cover" AlexNet—a VGG base can feed an AlexNet top with minimal performance loss—but the reverse is not true.
  3. HOG vs. CNNs: Traditional HOG features showed surprisingly high equivariance to similarity transformations, rivaling early CNN layers, though they lack the learned invariance found in deeper neural networks.

Limitations and Future Work

This study primarily focused on geometric transformations. Future research is needed to explore photometric transformations, such as changes in lighting and contrast. Additionally, while the linear "stitching" method is highly effective, it may miss non-linear information sharing between models. Extending these probes to architectures like Transformers or studying the dynamics of these properties during training remains an open area for investigation.

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