Inverting Visual Representations with Convolutional Networks

Alexey Dosovitskiy, Thomas Brox

Introduction

Modern computer vision relies heavily on feature representations—transformations of raw pixels into vectors that facilitate tasks like object recognition. While these representations (e.g., HOG, SIFT, or deep neural network activations) are effective, they often function as "black boxes." Understanding what information these features preserve and what they discard is crucial for model interpretability. This paper introduces a novel method to "invert" these representations, reconstructing the original images to visualize the internal "view" of the model.

Methodology: The Up-Convolutional Decoder

Traditional feature inversion typically involves slow optimization processes that require differentiable features. The authors propose a more flexible and efficient approach: training a dedicated up-convolutional neural network (or decoder) to learn the direct mapping from feature space back to image space.

Comparison of SIFT reconstruction: (a) original image, (b) SIFT features, (c) previous optimization-based reconstruction, and (d) the proposed up-convolutional reconstruction.

By minimizing the Mean Squared Error (MSE) between the original and reconstructed images, the network learns to predict the "expected pre-image"—a weighted average of all natural images that could correspond to a specific feature vector. This approach is not only faster (taking ~5ms per image) but also works for non-differentiable features like Local Binary Patterns.

Analysis: What do Features "See"?

The inversion process reveals that standard features are surprisingly "leaky." Even grayscale descriptors like HOG and SIFT preserve enough information for the network to reconstruct high-contrast, colorized images. The network utilizes a "natural image prior" learned during training to fill in missing details, such as correctly coloring grass green or the sky blue based on semantic context.

Visualizing information loss: Reconstructions from HOG, SIFT, and AlexNet layers (CONV3 and FC8) demonstrate how semantic information is preserved while spatial detail is discarded.

As the inversion moves from shallow layers to deep layers (like AlexNet's FC8), the reconstructions become increasingly abstract. While fine spatial details are lost, the core semantic layout and color distribution often remain, proving that even class probabilities (FC8) retain a rough "ghost" of the original scene's geometry.

Key Results and Insights

  • Superior Accuracy: The proposed method significantly outperforms previous optimization techniques. For HOG features, it achieved a normalized reconstruction error of 0.24, compared to the previous state-of-the-art of 0.61.
  • Binarization Invariance: In deep layers (FC6/FC7), the specific activation values are less critical than the binary pattern of firing neurons. Reconstructions from binarized features are nearly identical to those from full-precision features.
  • Semantic Morphing: Interpolating between images in deep feature space results in smooth semantic transitions (e.g., one object shape morphing into another) rather than simple pixel-wise cross-fading.

Conclusion

By providing a fast, accurate tool for feature inversion, this research offers a new lens through which to debug and understand visual representations. It demonstrates that deep networks preserve a significant amount of low-level information even in their most abstract layers, while also highlighting the specific points where spatial detail is sacrificed for category-level invariance.

Summary updated

BibTeX
@inproceedings{dosovitskiy2016inverting,
  author = {Alexey Dosovitskiy and Thomas Brox},
  title = {{Inverting Visual Representations with Convolutional Networks}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2016},
  doi = {10.1109/cvpr.2016.522},
}
Figure