Supervised Deep Hashing for Hierarchical Labeled Data

Dan Wang, Heyan Huang, Chi Lu, Bo-Si Feng, Guihua Wen, Liqiang Nie, Xianling Mao

Abstract

In large-scale image retrieval, hashing techniques are essential for compressing high-dimensional data into efficient binary codes. However, standard supervised hashing methods typically treat labels as discrete, "flat" entities, failing to capture the inherent semantic relationships between categories. This paper introduces Supervised Hierarchical Deep Hashing (SHDH), a framework that integrates hierarchical label structures into the deep learning process. By employing a novel hierarchical similarity metric and a segmented hashing architecture, SHDH ensures that retrieved images are semantically closer to the query, even when an exact match is not found. Experimental results on CIFAR-100 and IAPRTC-12 demonstrate that SHDH significantly outperforms state-of-the-art flat hashing methods.

Introduction

The core challenge in image retrieval is efficiently finding similar images in massive datasets. Hashing addresses this by mapping images to short binary strings, allowing for rapid searches in Hamming space. Despite their efficiency, most existing supervised hashing methods ignore the taxonomic relationships between labels. For instance, in a flat labeling system, a "Rose" is considered equally different from a "Sunflower" as it is from a "Tiger." In reality, a sunflower is semantically closer to a rose as both belong to the "Plant" and "Flower" categories.

As shown in the figure above, ignoring this hierarchy leads to retrieval results that may be visually similar but semantically unrelated (e.g., returning a tiger for a rose query). SHDH addresses this by treating hierarchy as a prior, ensuring that "near-misses" are semantically meaningful.

Methodology

The SHDH framework consists of two primary innovations: a hierarchical similarity metric and a specialized neural network architecture.

1. Hierarchical Similarity Metric

Instead of a binary match/no-match approach, SHDH defines similarity based on the depth of the shared ancestor in a taxonomic tree. The authors introduce Level Weights, where errors at higher levels of the hierarchy (e.g., confusing a "Plant" with an "Animal") are penalized more heavily than errors at lower levels (e.g., confusing a "Rose" with a "Sunflower"). This weighting ensures the model prioritizes broad categorical accuracy.

2. Segmented Deep Hashing Architecture

The model utilizes a Convolutional Neural Network (CNN) based on the VGG-F architecture for feature extraction. The final hashing layer is unique: it is divided into $K$ segments, where $K$ corresponds to the number of levels in the label hierarchy. This design allows specific bits to represent different levels of abstraction—from broad categories to fine-grained details—creating a "coarse-to-fine" representation within a single binary string.

3. Optimization

The training objective optimizes two key factors:

  • Similarity Preservation: Minimizing the difference between the Hamming distance of hash codes and the calculated hierarchical similarity of the images.
  • Bit Maximization: Ensuring that each bit in the hash code is utilized effectively to maximize information entropy and reduce redundancy.

Experimental Results

The researchers evaluated SHDH on two major benchmarks: CIFAR-100 (3-level hierarchy) and IAPRTC-12 (7-level hierarchy).

On the CIFAR-100 dataset, SHDH achieved a relative improvement of 12.5% to 18.4% in Average Cumulative Gain (ACG) over leading competitors like DPSH and COSDISH. On the more complex IAPRTC-12 dataset, the model maintained a consistent performance advantage across various hash code lengths (48, 64, and 128 bits). Furthermore, using a specialized "Weighted Recall" metric, the authors confirmed that SHDH is significantly better at retrieving semantically related "near-misses" than traditional flat hashing methods.

Conclusion

SHDH demonstrates that hierarchical labels provide rich semantic information that can be leveraged to improve the quality of image retrieval. By segmenting hash codes and weighting hierarchical levels, the model learns a more nuanced representation of visual data. Future work includes exploring methods to automatically construct hierarchies for unlabeled datasets and further optimizing bit distribution to minimize redundancy in extremely long hash codes.

Summary updated

BibTeX
@inproceedings{wang2018supervised,
  author = {Dan Wang and Heyan Huang and Chi Lu and Bo-Si Feng and Guihua Wen and Liqiang Nie and Xianling Mao},
  title = {{Supervised Deep Hashing for Hierarchical Labeled Data}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2018},
  doi = {10.1609/aaai.v32i1.12247},
}
Figure