Abstract
Hashing methods have attracted much attention for large scale image retrieval. Some deep hashing methods have achieved promising results by taking advantage of the strong representation power of deep networks recently. However, existing deep hashing methods treat all hash bits equally. On one hand, a large number of images share the same distance to a query image due to the discrete Hamming distance, which raises a critical issue of image retrieval where fine-grained rankings are very important. On the other hand, different hash bits actually contribute to the image retrieval differently, and treating them equally greatly affects the retrieval accuracy of image. To address the above two problems, we propose the query-adaptive deep weighted hashing (QaDWH) approach, which can perform fine-grained ranking for different queries by weighted Hamming distance. First, a novel deep hashing network is proposed to learn the hash codes and corresponding class-wise weights jointly. Second, a query-adaptive image retrieval method is proposed, which rapidly generates hash bit weights for different query images by fusing its semantic probability and the learned class-wise weights. Experiments on four widely used datasets show that the proposed approach outperforms eight state-of-the-art hashing methods.
Introduction
In large-scale image retrieval, hashing is the preferred technique for achieving high-speed searches. It maps complex, high-dimensional images into short binary codes. Similarity is then measured using the Hamming distance—a simple count of differing bits. However, traditional deep hashing methods suffer from two significant limitations that hinder retrieval precision: the "tie" problem and the assumption of bit equality.
The Limitations of Standard Hashing
The first major issue is the "Tie" Problem. Because Hamming distances are discrete integers (e.g., 0, 1, 2...), many images in a large database will inevitably share the same distance from a query image. This makes it impossible to provide a fine-grained ranking among these "tied" results.
Secondly, standard methods operate under the Bit Equality Myth, treating every bit in a hash code as equally important. In reality, different bits capture different semantic features; a bit that is highly discriminative for identifying "vehicles" might be irrelevant noise when searching for "animals."
The QaDWH Framework
To address these challenges, the authors introduce Query-adaptive Deep Weighted Hashing (QaDWH). This approach moves beyond simple binary codes by jointly learning hash codes and class-specific bit weights within an end-to-end deep learning framework.
Dual-Stream Architecture
The QaDWH model utilizes a dual-stream network based on the VGG-19 architecture:
- Hash Stream: This branch learns to produce binary codes and includes a class-wise weight layer. It learns a matrix where each row represents the importance of each hash bit for a specific semantic class.
- Classification Stream: This branch predicts the probability that an image belongs to various categories.
Query-Adaptive Weighting
At retrieval time, the system performs "query-adaptive" magic. When a new query image is presented, the network predicts its class probabilities (e.g., 70% flower, 30% plant). It then fuses the learned "flower weights" and "plant weights" to create a unique, query-specific weight vector. This vector is used to calculate a Weighted Hamming Distance, which provides a continuous distance metric that effectively breaks ties and enables precise ranking.
Experimental Results
The approach was rigorously tested on four benchmark datasets: CIFAR-10, NUS-WIDE, MIRFLICKR, and ImageNet. QaDWH consistently outperformed eight state-of-the-art methods, including NINH and DRSCH.
- Accuracy: On the CIFAR-10 dataset, QaDWH achieved a Mean Average Precision (MAP) of 0.884 at 48 bits, a significant improvement over standard deep hashing baselines.
- Efficiency: Despite the added complexity of weighting, the system remains highly efficient. By applying weighted re-ranking only to the top candidates identified by a standard Hamming search, the testing time per image remains under 25ms even on the massive ImageNet dataset.
Conclusion
QaDWH represents a significant step forward in deep hashing for image retrieval. By acknowledging that not all bits are created equal and adapting weights to the specific semantic content of a query, it overcomes the inherent limitations of discrete Hamming space. This results in a retrieval system that is both faster than previous adaptive methods and more accurate than traditional fixed-weight hashing.
Summary updated