Deep Reinforcement Learning with Label Embedding Reward for Supervised Image Hashing

Zhenzhen Wang, Weixiang Hong, Junsong YuanarXiv 2020

Abstract

Traditional deep hashing methods often suffer from quantization loss and train-test inconsistency due to the continuous relaxation of discrete binary codes. This paper presents DRLH (Deep Reinforcement Learning based Hashing), a novel framework that treats binary code generation as a sequential decision-making process. By navigating the vertices of a binary hypercube using a Deep Q-Network (DQN) and leveraging error-correcting BCH codes for rewards, DRLH achieves superior retrieval performance on standard benchmarks like CIFAR-10 and NUS-WIDE.

Introduction

In large-scale image retrieval, hashing is essential for efficient storage and fast search. Most deep hashing techniques utilize a convolutional neural network (CNN) followed by a continuous activation function (e.g., sigmoid or tanh) to approximate binary bits. However, this approach introduces a significant gap between the continuous values learned during training and the discrete bits used during inference, leading to suboptimal performance.

The DRLH Framework: Navigating the Hypercube

The core innovation of DRLH is formulating hashing as a Markov Decision Process (MDP). Instead of predicting all bits simultaneously, an agent learns to iteratively refine a binary code by moving between vertices of a binary hypercube.

Concept of navigating the binary hypercube for image hashing.

MDP Formulation

  • State: The state at each step includes the visual features of the input image, the current binary code, and the history of previous actions.
  • Action: The agent can choose to flip a specific bit in the current code or terminate the process.
  • Reward: To guide the agent, the authors employ Bose-Chaudhuri-Hocquenghem (BCH) codes. These error-correcting codes serve as "anchors" in the binary space. By mapping image labels to specific BCH codes, the system ensures high inter-class variance. The agent receives a positive reward for moving closer to the target BCH code associated with the image's label.

Deep Q-Network Architecture

The agent's policy is governed by a Deep Q-Network (DQN). The architecture integrates multiple information streams to predict the Q-values for each possible bit-flip action.

The DQN architecture for DRLH, incorporating image features, current codes, and action history.

As shown in the architecture, the network processes a 4096-dimensional image feature alongside the current binary state and action history. This information is passed through several fully connected layers (1024-d) to output the Q-values for $b+1$ possible actions (flipping one of $b$ bits or stopping).

Experimental Evaluation

The DRLH model was tested against state-of-the-art (SOTA) supervised hashing methods, including HashNet and DSDH, on the CIFAR-10 and NUS-WIDE datasets.

  • CIFAR-10: DRLH achieved a Mean Average Precision (mAP) of 0.955 at 48 bits, outperforming the previous SOTA of 0.942.
  • NUS-WIDE: On this complex multi-label dataset, DRLH reached an mAP of 0.842 at 48 bits, demonstrating its robustness in diverse retrieval scenarios.

Discussion and Limitations

While DRLH offers a powerful alternative to continuous relaxation, it faces certain challenges. Experiments with larger action spaces (flipping two bits at once) showed a decrease in performance, suggesting that the increased complexity makes the RL optimization significantly harder. Additionally, the current reward structure treats all incorrect classes as equally distant, which does not account for semantic correlations between similar categories (e.g., "car" vs. "truck").

Conclusion

DRLH demonstrates that reinforcement learning can effectively bridge the gap between continuous feature learning and discrete hashing. By treating binary codes as reachable states on a hypercube and using structured label embeddings for rewards, the method provides a more direct and robust approach to supervised image hashing.

Citation: Wang, Z., Hong, W., & Yuan, J. (2020). Deep Reinforcement Learning with Label Embedding Reward for Supervised Image Hashing. arXiv:2008.03973v1 [cs.CV].

Summary updated

BibTeX
@misc{wang2020deep,
  author = {Zhenzhen Wang and Weixiang Hong and Junsong Yuan},
  title = {{Deep Reinforcement Learning with Label Embedding Reward for Supervised Image Hashing}},
  year = {2020},
  eprint = {2008.03973},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2008.03973},
}
Figure