Fast Supervised Hashing with Decision Trees for High-Dimensional Data

Guosheng Lin, Chunhua Shen, Qinfeng Shi, Anton van den Hengel, David Suter

Abstract

Supervised hashing methods have demonstrated superior performance in large-scale image retrieval by leveraging label information to generate discriminative binary codes. However, existing state-of-the-art methods often rely on computationally expensive kernel functions, limiting their scalability to high-dimensional features and massive datasets. This paper introduces FastHash, a supervised hashing framework that replaces kernels with boosted decision trees. By formulating binary code inference as a sub-modular optimization problem solvable via GraphCut, FastHash achieves high retrieval accuracy while significantly reducing training and evaluation costs. Experimental results across multiple datasets, including CIFAR-10 and SUN397, demonstrate that FastHash is orders of magnitude faster and more accurate than previous supervised hashing techniques.

Introduction

In the era of big data, efficient image retrieval relies on mapping high-dimensional features (e.g., SIFT, GIST) into compact binary hash codes. This transformation enables rapid similarity searches using Hamming distance. While supervised hashing methods—which use semantic labels to ensure similar items have similar codes—are generally more accurate than unsupervised ones, they face a significant scalability gap.

Current leading methods, such as Kernel-based Supervised Hashing (KSH), utilize non-linear kernel functions to achieve high precision. However, kernels are computationally intensive to train and slow to evaluate, particularly as feature dimensions scale into the tens of thousands. FastHash addresses this bottleneck by combining efficient binary code inference with non-linear hash functions based on decision trees.

Methodology

The FastHash framework operates through a two-step iterative process:

1. Binary Code Inference

To learn $k$ bits, the framework solves a binary quadratic optimization problem. While discrete optimization is typically NP-hard, the authors identify that grouping data points into "blocks" of similar items renders the problem sub-modular. This allows for the use of GraphCut (specifically a Block GraphCut search) to efficiently find high-quality binary codes, avoiding the loose approximations common in spectral methods.

Algorithm for binary code inference using GraphCut.

2. Hash Function Learning

Once binary codes are inferred, hash functions are trained to map original features to these codes. FastHash utilizes Adaboost with decision trees instead of kernels. Decision trees are inherently non-linear, perform implicit feature selection, and are extremely fast to evaluate due to simple comparison operations at each node. The algorithm iterates between these two steps, allowing learned functions to refine the inference of subsequent bits.

Experimental Setup

FastHash was evaluated on five diverse datasets:

  • CIFAR-10: 60,000 images across 10 classes.
  • SUN397: A large-scale scene dataset with over 100,000 images and 397 categories.
  • IAPRTC12, ESPGAME, and MIRFLICKR: Datasets with 20k–25k images using tag-based similarity.

Testing involved both low-dimensional (512D GIST) and high-dimensional (up to 22,400D) features.

Results and Discussion

FastHash demonstrates significant improvements in both speed and accuracy over competing methods like KSH, TSH, and BRE.

Precision-Recall and Precision curves across CIFAR-10, IAPRTC12, and MIRFLICKR datasets.

Key Performance Metrics:

  • Speed: On CIFAR-10 with 11,200D features, FastHash trained approximately 30x faster than KSH while utilizing 10x more training data.
  • Accuracy: FastHash consistently outperformed baselines. On the SUN397 dataset, it achieved a precision of 0.165, nearly five times that of KSH (0.034).
  • Scalability: The framework successfully scaled to 1024-bit codes on the 100k-image SUN397 dataset, a task that causes most other supervised methods to fail due to memory or time constraints.

The shift from kernels to trees is the primary driver of this efficiency. Trees handle high-dimensional data gracefully by selecting only the most relevant features for each split. Furthermore, techniques like feature quantization and weight trimming in Adaboost further optimize performance.

Conclusion

FastHash bridges the gap between high-precision supervised hashing and large-scale computational efficiency. By leveraging sub-modularity for code inference and decision trees for hash functions, it enables supervised hashing on high-dimensional datasets that were previously inaccessible. Future work may explore more sophisticated block construction for optimization and the integration of this tree-based logic into deep learning architectures.

Summary updated

BibTeX
@inproceedings{lin2014fast,
  author = {Guosheng Lin and Chunhua Shen and Qinfeng Shi and Anton van den Hengel and David Suter},
  title = {{Fast Supervised Hashing with Decision Trees for High-Dimensional Data}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2014},
  doi = {10.1109/cvpr.2014.253},
}
Figure