Using very deep autoencoders for content-based image retrieval

Alex Krizhevsky, Geoffrey E. HintonESANN 2011

Introduction

Content-Based Image Retrieval (CBIR) faces a fundamental trade-off between speed and accuracy. Comparing raw pixels or low-level features often fails to capture the "semantics" of an image, while performing full linear searches across billions of images is computationally impossible. In this 2011 paper, Alex Krizhevsky and Geoffrey Hinton explore how very deep autoencoders can solve these scale problems by compressing images into short binary "fingerprints."

Methodology

The core approach relies on deep autoencoders trained in two main phases. First, unsupervised pre-training is conducted by stacking Restricted Boltzmann Machines (RBMs). Each layer is trained to model the activities of the layer below, initializing weights in a way that allows very deep networks to be trained effectively—a significant breakthrough in the pre-AlexNet era. Second, the stack is "unrolled" and fine-tuned using backpropagation to minimize reconstruction error.

To create searchable codes, the central bottleneck layer uses logistic units that are rounded to 0 or 1 during the forward pass. This technique, called semantic hashing, allows for $O(1)$ image retrieval by treating binary codes as memory addresses. To handle image translations, the authors use a "retina" to sample 81 overlapping patches, combining search results to improve robustness.

Experimental Setup

The models were trained on the 80 Million Tiny Images dataset ($32 \times 32$ color images). Quantitative evaluation was performed on the CIFAR-10 dataset, a labeled subset of 60,000 images. The authors found that training directly on raw pixels yielded better results than using pre-computed GIST descriptors, which acted as a bottleneck.

Results and Discussion

The deep autoencoder significantly outperformed both Spectral Hashing and raw Euclidean distance in pixel space.

Quantitative Analysis

As shown in Figure 1, the "multi 28-bit + 256-bit deep" method achieves the highest "same category hit rate" across various result set sizes. The authors suggest a two-stage pipeline: using 28-bit codes for lightning-fast candidate pruning followed by 256-bit codes for high-precision ranking.

Retrieval precision: Same category hit rate vs. result set size for various encoding methods.

Qualitative Comparison

Qualitatively, the autoencoder captures the "gist" of the image. While standard Euclidean distance often retrieves images that are globally similar in color but semantically unrelated, the 256-bit deep codes find much more consistent matches. Figure 2 illustrates this difference, showing how the deep model identifies semantic categories like faces or specific scenes more reliably than Spectral Hashing or Euclidean distance.

Qualitative comparison of retrieval results for 256-bit deep autoencoders, 256-bit spectral hashing, and Euclidean distance.

Conclusion

By leveraging unsupervised pre-training and semantic hashing, Krizhevsky and Hinton demonstrated a powerful method for large-scale image retrieval. Despite the high training cost—taking approximately two days on an NVIDIA GTX 285 GPU—the resulting binary fingerprints allow for near-instantaneous searching across massive databases while maintaining high semantic accuracy.

Summary updated

BibTeX
@inproceedings{krizhevsky2011using,
  author = {Alex Krizhevsky and Geoffrey E. Hinton},
  title = {{Using very deep autoencoders for content-based image retrieval}},
  booktitle = {ESANN},
  year = {2011},
}
Figure