Source-linked AI summary
A Survey on Deep Hashing Methods
Xiao Luo, Haixin Wang, Daqing Wu, Chong Chen, Minghua Deng, Jianqiang Huang, Xian-Sheng Hua
TL;DR
Nearest neighbor search needs efficient retrieval over large, high-dimensional data, motivating hashing and deep hashing methods. This survey synthesizes supervised and unsupervised deep hashing, organizes their optimization and semantic-learning strategies, covers related settings and evaluation resources, and discusses research directions. It concludes that existing methods mainly focus on the surveyed deep hashing categories and related extensions.
Problem
Nearest neighbor search over large, high-dimensional data requires efficient representations, while hashing and deep learning methods have developed rapidly across different semantic-learning settings.
Method
The survey categorizes supervised hashing by pairwise, ranking-based, pointwise, and quantization similarity measurement, and unsupervised hashing by reconstruction, pseudo-label, and prediction-free self-supervised learning.
Results
The survey provides a comprehensive review spanning deep supervised and unsupervised hashing, related topics, public datasets, evaluation schemes, algorithm comparisons, and research directions.
Takeaways & Limitations
The taxonomy organizes deep hashing methods by their similarity measurement or semantic-learning manner, helping researchers understand their mechanisms and trends.
Takeaways & Limitations
Pseudo-label-based hashing can generate false pseudo-labels through coarse clustering, limiting retrieval performance on complicated datasets.
Abstract
from arXiv · showhide
Nearest neighbor search aims to obtain the samples in the database with the smallest distances from them to the queries, which is a basic task in a range of fields, including computer vision and data mining. Hashing is one of the most widely used methods for its computational and storage efficiency. With the development of deep learning, deep hashing methods show more advantages than traditional methods. In this survey, we detailedly investigate current deep hashing algorithms including deep supervised hashing and deep unsupervised hashing. Specifically, we categorize deep supervised hashing methods into pairwise methods, ranking-based methods, pointwise methods as well as quantization according to how measuring the similarities of the learned hash codes. Moreover, deep unsupervised hashing is categorized into similarity reconstruction-based methods, pseudo-label-based methods and prediction-free self-supervised learning-based methods based on their semantic learning manners. We also introduce three related important topics including semi-supervised deep hashing, domain adaption deep hashing and multi-modal deep hashing. Meanwhile, we present some commonly used public datasets and the scheme to measure the performance of deep hashing algorithms. Finally, we discuss some potential research directions in conclusion.
1 INTRODUCTION
The survey reviews deep hashing for efficient nearest neighbor search, focusing on supervised and unsupervised methods, their similarity-learning principles, datasets, evaluation, and research trends.
- High-dimensional exact nearest neighbor search is costly, motivating approximate search methods that reduce complexity while meeting practical retrieval needs.
- Hashing improves computational and storage efficiency by mapping high-dimensional features to compact codes that preserve similarity relationships.
- Deep hashing benefits from deep networks' representation capacity and end-to-end learning, enabling complex hash functions for retrieval.
- Deep supervised hashing: Deep supervised methods are categorized as pairwise, ranking-based, pointwise, or quantization according to how they measure hash-code similarities.
- Deep unsupervised hashing: Deep unsupervised methods are categorized as pseudo-label-based, similarity reconstruction-based, or prediction-free self-supervised methods, alongside semi-supervised, domain adaptation, and multimodal topics.
- The survey also presents public datasets, evaluation schemes, comparisons of key algorithms, and a comprehensive account of deep hashing mechanisms and trends.
2 BACKGROUND
Nearest neighbor search becomes difficult in high-dimensional spaces, while hashing and deep neural networks provide compact representations and efficient approximate retrieval.
- Nearest neighbor search: Nearest neighbor search seeks the closest database sample to a query under a distance metric, but exact search becomes costly in high-dimensional spaces.
- Approximate nearest neighbor search: Approximate nearest neighbor methods trade exactness for high-probability retrieval and include hashing-, product-quantization-, and graph-based approaches.
- Hashing-based search: Hashing-based search uses either hash-table lookup or hash-code ranking to improve search efficiency through compact binary representations.
- Hash-table lookup: Hash-table lookup groups points into buckets by hash code and aims to assign nearby original-space points to the same bucket.
- Hash-code ranking: Hash-code ranking selects candidates with smaller query-to-database Hamming distances and commonly reranks them using original features.
- Deep neural networks: Deep neural networks developed strong representation capacity for visual tasks, making them effective backbone architectures for deep hashing and image retrieval.
- Learning to hash: Learning to hash maps inputs to binary codes whose Hamming-space distance order should preserve the original-space distance order for nearest neighbor search.
3 DEEP SUPERVISED HASHING
Deep supervised hashing uses neural networks to learn end-to-end hash codes while preserving labeled similarity relationships through a pairwise similarity-matching framework.
- Deep supervised hashing is the foundation for subsequent deep unsupervised hashing techniques in the survey.
- A representative pairwise framework produces hash codes with a hashing network and matches their pairwise similarities to ground-truth similarities using a similarity-preserving loss.
3.1 Overview
The survey’s overview organizes deep supervised hashing around network architecture, similarity-preserving objectives, binarization, optimization, and additional loss components or regularization choices.
- 3.1 Overview: Deep supervised hashing addresses network architecture, similarity-preserving loss design, discretization optimization, and performance-enhancing techniques.
- 3.1 Overview: Deeper architectures generally improve search accuracy but increase inference time, while shallow or linear architectures reduce deep hashing to traditional hashing.
- Similarity measurement: Hamming-space similarity can be defined from binary-code Hamming distance, with code conventions determining its numerical range and form.
- Similarity measurement: Similarity in supervised hashing is commonly derived from semantic labels, with shared-label pairs treated as similar and nonshared pairs as dissimilar.
- Objective functions: Supervised objectives aim to minimize differences between similarities in the original and Hamming spaces, while also using regression, classification, or label-relation losses.
- Objective functions: Quantization and bit-balance losses encourage continuous network outputs to approach binary codes and avoid imbalanced bit values.
- Optimization Algorithm: Because sign activation causes vanishing gradients, methods relax it with sigmoid or tanh during training and apply sign later for binary evaluation codes.
- Summarization: The survey classifies supervised methods by Hamming-space similarity measurement into pairwise, ranking-based, pointwise, and quantization categories.
3.2 Pairwise Methods
Pairwise deep supervised hashing preserves similarity by matching relationships between original and Hamming spaces. The survey covers difference-based, likelihood-based, and related network designs and optimization strategies.
- Pairwise methods match similarities or distances between original and Hamming spaces to preserve similarity structure.
- Difference Loss Minimization: Difference-loss methods minimize discrepancies between pairwise similarities, using symmetric, asymmetric, product-form, or weighted-bit formulations.
- Likelihood Loss Minimization: Likelihood-loss methods model binary codes probabilistically and use negative log-likelihood so larger original-space similarities correspond to larger Hamming-space similarities.
- DSH enables end-to-end backpropagation by relaxing binary constraints and deriving evaluation codes with the sign function.
- SH-BDNN alternately optimizes network parameters and binary codes, but its non-convolutional, non-end-to-end design reduces efficiency on large-scale datasets.
3.3 Ranking-based methods
Ranking-based deep supervised hashing preserves relative similarity order rather than only pairwise similarity. The survey distinguishes triplet methods from list-wise methods that optimize ranking-oriented objectives.
- Ranking-based methods preserve similarity relationships among more than two examples in the original and Hamming spaces.
- Triplet Methods: Triplet losses keep sampled triplet rankings consistent by encouraging a positive code to be closer than a negative code, often with a margin.
- List-wise Methods: List-wise methods consider rankings across the whole dataset and can optimize Average Precision or Normalized Discounted Cumulative Gain.
- Triplet Methods: DNNH replaces Hamming distance with Euclidean distance in its triplet objective, making the loss convex and straightforward to optimize.
- Triplet Methods: DNNH combines sigmoid activation with a piece-wise threshold function that makes most outputs exactly 0 or 1, reducing quantization loss.
- Triplet Methods: DSRH adds a surrogate triplet loss and improves deep hashing especially on multi-label image datasets.
- List-wise Methods: HALR uses tie-aware continuous relaxations to optimize average precision and normalized discounted cumulative gain despite tied Hamming-distance ranks.
3.4 Pointwise Methods
Pointwise deep supervised hashing directly uses labels through classification-oriented objectives rather than constructing pairwise or ranking similarities. Later methods add semantic centers, quantization, balance, or probabilistic modeling.
- Pointwise methods directly exploit label information by mapping hash-like representations into label distributions with classification losses.
- DBH discretizes a sigmoid latent representation after ImageNet pre-training, but its limited code quality restricts the codes to coarse-level search.
- SSDpH adds quantization and bit-balance losses to DBH-like training to produce higher-quality hash codes for retrieval.
- SUBIC forms structured binary codes by concatenating one-hot blocks produced with block-softmax functions and supports instance retrieval and image classification.
- Semantic Hash Centers: CSQ maps supervised labels to semantic hash centers and trains outputs toward corresponding centroids, preserving global similarities between image pairs.
- Semantic Hash Centers: DPN’s polarization loss theoretically minimizes inter-class distances while maximizing intra-class Hamming distances through hash-center learning.
- Semantic Hash Centers: OrthHash compares outputs with corresponding and different-label centers, reducing quantization error and enabling end-to-end training with one classification objective.
3.5 Quantization
Quantization-based hashing learns compact representations by discretizing deep features, often with product or multi-codebook quantization. The surveyed methods combine quantization with semantic, similarity, ranking, or classification objectives.
- Quantization methods use deep networks to generate features and then apply product-quantization approaches for compact representations.
- Product Quantization: DQN partitions features into subspaces and quantizes each sub-vector independently into codewords using clustering.
- Product Quantization: DQN restricts feature-to-binary-code quantization error and can add pairwise similarity preservation; asymmetric quantizer distance supports approximate nearest neighbor search.
- Triplet Quantization: DTQ combines triplet similarity preservation with smooth orthogonality regularization and selects hard triplets through Group Hard.
- Semantic Quantization: DVsQ jointly uses visual representations and latent text-domain word embeddings, combining adaptive-margin ranking with semantic quantization in one framework.
- Product Quantization: DPQ uses deep representations, probabilistic sub-vector assignments, codebook centroids, and classification losses to optimize product-quantization clustering end to end.
- Multi-codebook Quantization: DSQ normalizes features onto a unit hypersphere and reduces reconstruction loss with multi-codebook quantization.
3.6 Other Techniques for Deep Hashing
Other deep hashing techniques improve retrieval through generative augmentation, ensemble learning, weighted hash tables, redundancy reduction, and alternative optimization strategies.
- Hashing with Generative Adversarial Networks: GAN-based methods synthesize semantically controlled images or pairwise-related training data to augment hashing and improve image retrieval.DSH-GAN combines representation, adversarial discrimination, hashing, and classification components, while HashGAN uses pair conditional WGAN augmentation.
- Ensemble Learning: Ensemble-based hashing trains multiple deep hashing models and concatenates their outputs into final codes for better retrieval performance.EbDSH varies datasets, training data, initialization, and network architectures; the strategy supports parallelization and incremental learning.
- Weighted Multi-deep Ranking Supervised Hashing: WMRSH combines bit-wise and table-wise weights across multiple hash tables while measuring similarity preservation and bit independence.Product loss measures similarity preservation for each bit, while inter-bit correlation measures independence before deriving table-wise weights.
- Other Techniques for Deep Hashing: NMLayer merges redundant bits and balances bit importance to produce more compact hash codes.
- Training Strategy for Deep Hashing: Greedy Hash replaces quantization error with a sign-based hash layer and transmits gradients to earlier layers to update all bits together.This design addresses the ill-posed gradient problem and prevents vanishing gradients from the sign function.
- Training Strategy for Deep Hashing: GAH uses derivative-based attention weights for individual hash bits to maximize loss decrease during optimization.A two-layer fully connected gradient attention network produces normalized weights applied during training.
4 DEEP UNSUPERVISED HASHING
Deep unsupervised hashing learns semantic information without labels and organizes methods by how they reconstruct similarities, generate pseudo-labels, or use prediction-free self-supervision. The survey reviews representative mechanisms and explains that more accurate semantic structures and transformation-aware objectives support hash-code learning.
- Overview: Deep unsupervised hashing derives semantic information without label annotations, using original-space relationships or deep features from pretrained networks.The central challenges are inferring semantic information and using it to learn hash codes.
- Similarity Reconstruction-based Methods: Similarity reconstruction methods first infer pairwise similarity from deep representations, then train a hashing network to produce similarity-preserving binary codes.This converts the unsupervised problem into one solvable with pairwise supervised methods.
- Similarity Reconstruction-based Methods: SSDH estimates two cosine-distance thresholds to label close pairs as similar and distant pairs as dissimilar, but its coarse structure can be unreliable and discard similarity signals.SSDH uses a VGG-F network and approximates cosine-distance distributions with two half-Gaussian distributions.
- Similarity Reconstruction-based Methods: DistillHash removes similarity signals with large local-structure variation, while DATE combines augmented-view distribution and cosine distances with contrastive learning.DistillHash improves over SSDH mainly by introducing local structures to distill confident signals; DATE uses augmented semantic information for image retrieval.
- Similarity Reconstruction-based Methods: MLS3RUDH uses random walks on nearest-neighbor graphs to measure manifold similarity, generating a more accurate structure that guides hashing-network optimization.TBH instead uses an adaptive code-driven graph with binary and continuous bottlenecks for similarity construction and reconstruction.
- Prediction-free self-supervised learning-based Methods: Prediction-free self-supervised objectives encourage transformation-invariant and robust hash codes by reducing cross-view differences while separating codes of distinct examples.The denominator also encourages a more uniform Hamming-space distribution and better use of hash-bit capacity.
5 RELATED IMPORTANT TOPICS
The survey covers semi-supervised, domain-adaptive, and multi-modal deep hashing as important extensions for using limited labels, transferring knowledge across domains, and retrieving across modalities.
- 5.1 Semi-supervised Deep Hashing: Semi-supervised deep hashing combines labeled and unlabeled data, typically addressing label scarcity with limited performance degradation compared with fully supervised and unsupervised methods.Representative approaches use pseudo-labeling, GANs, or other semi-supervised techniques.
- 5.1 Semi-supervised Deep Hashing: SSDH combines triplet ranking on labeled data, an online k-NN graph for all data, and pseudo-labels to guide pairwise similarity preservation.It was described as the first deep hashing method developed specifically in a semi-supervised fashion.
- 5.1 Semi-supervised Deep Hashing: Semi-supervised methods also include bipartite-graph learning, adversarial training, temporal ensembling, and alternating optimization of pseudo-labels with the hashing network.BGDH uses labeled–unlabeled relationships, while SSGAH and SSDPH exploit adversarial or teacher–student frameworks.
- 5.2 Domain Adaptive Deep Hashing: Domain-adaptive hashing addresses insufficient target-domain data by combining source supervision, target-domain learning, similarity preservation, and domain adaptation.Methods differ in how they reduce domain disparity, including entropy matching, adversarial learning, pseudo-labeling, and feature transformation.
- 5.2 Domain Adaptive Deep Hashing: GTH seeks domain-invariant hash projections but assumes similar domains have small projection discrepancies, an assumption that may not hold in most scenarios.Other methods use transformation, reconstruction, quantization, or adversarial objectives for cross-domain retrieval.
- 5.3 Multi-modal Deep Hashing: Multi-modal deep hashing projects text, audio, image, and video into a shared Hamming space with deep networks for cross-modal retrieval.Its framework is described as similar to that of general deep hashing methods.
6 EVALUATION PROTOCOLS
The survey evaluates deep hashing through retrieval accuracy, efficiency, and benchmark protocols, while comparing supervised and unsupervised methods across standard datasets. It also identifies limitations in commonly used supervised-hashing evaluation protocols.
- Evaluation Criteria: Hash-code storage cost depends on code length, while search efficiency is measured by average query time and can be reduced by weighted Hamming distance.Weighted Hamming distance prevents use of bit operations for efficiency.
- Evaluation Metrics: Precision, recall, precision-recall curves, and MAP are common metrics for evaluating hashing retrieval accuracy.MAP averages precision across ranked positions and queries, sometimes using a Hamming-radius threshold.
- Evaluation Limitations: Common supervised-hashing evaluation protocols can be unsatisfactory because encoding classifier outputs may produce a trivial solution that outperforms existing methods.A protocol based on unseen-class retrieval and transfer learning is proposed, although conventional protocols remain generally effective when classifier encoding is avoided.
- Supervised Methods: Deep supervised hashing generally outperforms traditional hashing, and pairwise or ranking information improves over early classification-transfer approaches.The survey also reports benefits from label information, regularization, bit balance, ensemble learning, and bit independence.
- Unsupervised Methods: Deep unsupervised hashing generally outperforms traditional approaches, while semantic exploration and more accurate similarity structures improve retrieval performance.Methods using contrastive learning, including CIBHash and DATE, achieve superb performance among the compared methods.
- Training Efficiency: OrthHash is the most effective method in the training-time comparison because it uses one brief optimization objective.The specific optimization manner has limited impact on computational cost in the reported comparison.
7 CONCLUSION
The survey organizes deep hashing research into supervised, unsupervised, and related categories, then identifies a gap between current benchmarks and nearest neighbor search applications. It recommends integrating downstream approximate nearest neighbor algorithms to develop more practical methods.
- Conclusion: The survey reviews deep supervised hashing, deep unsupervised hashing, and related semi-supervised, domain adaptation, and multi-modal topics.Supervised methods are divided into pairwise, ranking-based, pointwise, and quantization categories; unsupervised methods are grouped by semantic-learning strategy.
- Conclusion: Existing deep hashing methods mainly use public datasets designed for classification and detection, which do not fully address nearest neighbor search.The survey identifies this mismatch as a direction for future work.
- Conclusion: Future work could combine downstream approximate nearest neighbor search algorithms with deep hashing to design methods for real-world applications.The proposed direction is intended to make deep hashing more practical.