A survey on deep hashing for image retrieval

Xiaopeng Zhang

Abstract

Hashing has been widely used in approximate nearest search for large-scale database retrieval for its computation and storage efficiency. Deep hashing, which devises convolutional neural network architecture to exploit and extract the semantic information or feature of images, has received increasing attention recently. In this survey, several deep supervised hashing methods for image retrieval are evaluated and I conclude three main different directions for deep supervised hashing methods. Several comments are made at the end. Moreover, to break through the bottleneck of the existing hashing methods, I propose a Shadow Recurrent Hashing(SRH) method as a try. Specifically, I devise a CNN architecture to extract the semantic features of images and design a loss function to encourage similar images projected close. To this end, I propose a concept: shadow of the CNN output. During optimization process, the CNN output and its shadow are guiding each other so as to achieve the optimal solution as much as possible. Several experiments on dataset CIFAR-10 show the satisfying performance of SRH.

Introduction

In the era of big data, efficient image retrieval is paramount. Hashing techniques address this by transforming high-dimensional image data into short, compact binary codes. This transformation enables lightning-fast searches in Hamming space and significant reductions in storage requirements. However, the integration of hashing with deep learning presents a fundamental mathematical challenge: the discrete constraint.

The Challenge of Discrete Optimization

Neural networks are typically optimized using gradient-based methods, which require continuous and differentiable functions. Binary codes, however, are inherently discrete ($\{-1, 1\}$ or $\{0, 1\}$).

General architecture of a deep hashing network, illustrating the pipeline from input images to binary-like outputs and the associated loss functions.

Traditionally, researchers have employed "relaxation" strategies, using non-linear functions like sigmoid or tanh to push network outputs toward binary values. While functional, these methods often suffer from vanishing gradients as the outputs approach the boundaries, leading to slow convergence and potential loss of semantic information.

Taxonomy of Deep Supervised Hashing

Current research in deep supervised hashing can be categorized into three primary directions:

  1. Gradient Fixes: These methods focus on overcoming the non-differentiability of the sign function, often by approximating gradients during the backward pass.
  2. Loss Function Design: Innovation here involves creating objective functions—such as triplet losses or those based on Cauchy distributions—that ensure semantically similar images are mapped to nearby points in Hamming space.
  3. Architectural Innovation: This involves designing specialized network layers to improve the quality of the learned hash codes.
Examples of architectural innovations, including (a) the divide-and-encode module and (b) fully-connected alternation strategies.

For instance, the "divide-and-encode" module aims to reduce redundancy between individual bits of the hash code, ensuring each bit captures unique information.

Shadow Recurrent Hashing (SRH)

To address the optimization bottleneck, this paper proposes Shadow Recurrent Hashing (SRH). The core idea is the introduction of an auxiliary "shadow" variable ($u_i$) that acts as a binary target for the continuous CNN output ($b_i$).

The optimization process is decoupled into two alternating steps:

  • Step 1: The CNN weights are updated to minimize the distance between the continuous output $b_i$ and its current binary shadow $u_i$.
  • Step 2: The shadow $u_i$ is updated by taking the sign of the current $b_i$.

This recurrent guidance allows the network to converge toward a binary state smoothly, avoiding the "jumps" and flat gradients associated with standard relaxation methods.

Experimental Results

The SRH method was evaluated on the CIFAR-10 dataset, a benchmark of 60,000 images across 10 categories. Using 12-bit hash codes, the performance was measured via Mean Average Precision (mAP).

The results highlight the importance of balancing the shadow guidance ($\alpha$) against quantization and bit-balancing constraints ($\beta$). The optimal performance (mAP of 0.6166) was achieved when the ratio $\alpha/\beta = 1$. Excessive shadow guidance (e.g., $\alpha/\beta = 100$) was found to be detrimental (mAP of 0.1935), as it forces binarization before the network has learned sufficiently discriminative features.

Discussion and Future Directions

While deep hashing has made significant strides, several challenges remain:

  • Spatial Information Loss: Deep pooling layers often discard spatial details. Future architectures should aim to recover this information to capture both "what" and "where" in the hash code.
  • Asymmetric Methods: Some methods learn database codes without direct feature extraction for queries, which can lead to suboptimal performance for new images.
  • Cross-Modal Retrieval: Moving beyond image-to-image search to multi-modal contexts (e.g., text-to-image) is a critical next step for real-world applications.

Summary updated

Abstract

Hashing has been widely used in approximate nearest search for large-scale database retrieval for its computation and storage efficiency. Deep hashing, which devises convolutional neural network architecture to exploit and extract the semantic information or feature of images, has received increasing attention recently. In this survey, several deep supervised hashing methods for image retrieval are evaluated and I conclude three main different directions for deep supervised hashing methods. Several comments are made at the end. Moreover, to break through the bottleneck of the existing hashing methods, I propose a Shadow Recurrent Hashing(SRH) method as a try. Specifically, I devise a CNN architecture to extract the semantic features of images and design a loss function to encourage similar images projected close. To this end, I propose a concept: shadow of the CNN output. During optimization process, the CNN output and its shadow are guiding each other so as to achieve the optimal solution as much as possible. Several experiments on dataset CIFAR-10 show the satisfying performance of SRH.
BibTeX
@misc{zhang2020survey,
  author = {Xiaopeng Zhang},
  title = {{A survey on deep hashing for image retrieval}},
  year = {2020},
  eprint = {2006.05627},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2006.05627},
}
Figure