Introduction
In the era of big data, efficient image retrieval is critical. Searching through massive datasets requires converting high-dimensional images into compact binary "hash codes" to minimize storage and maximize search speed. While Deep Convolutional Neural Networks (DCNNs) have significantly advanced feature learning, they face a fundamental conflict: the tension between learning discriminative features and the subsequent quantization into binary codes.
Most existing deep hashing methods attempt to minimize "quantization error"—the distance between continuous neural network outputs and their final binary values (e.g., -1 or 1). However, forcing features into these binary "corners" often distorts the natural distribution of the data, destroying subtle similarity relationships and reducing retrieval accuracy. This paper introduces Locality-Constrained Deep Supervised Hashing (LCDSH), a novel framework that preserves the original feature distribution and pair-wise similarities.
Methodology
The LCDSH framework treats hashing as a problem of maximizing the posterior probability of pair-wise labels given the hash codes.
Architecture
The model utilizes a Siamese-like architecture consisting of two identical DCNN streams (based on CNN-F or CNN-M) that share weights. It processes pairs of images ($x_i, x_j$) and their corresponding similarity labels.
Loss Function
The core of LCDSH is a novel objective function $L = L_1 + \lambda L_2$, which avoids traditional quantization penalties:
- Discriminative Loss ($L_1$): Ensures that similar image pairs have a high inner product in the feature space, while dissimilar pairs have a low one.
- Locality Constraint ($L_2$): This constraint ensures that the similarity between continuous features ($u$) is consistent with the similarity between the resulting binary hash codes ($b$). By preserving this "locality," the model maintains the neighborhood structure of the original data.
Key Insights: Preserving Feature Distributions
A primary contribution of this work is the observation that standard quantization is a "distribution killer." Traditional methods that minimize $\|u - \text{sgn}(u)\|_2^2$ force the continuous features into two sharp spikes at the binary boundaries. This distortion removes the discriminative power inherent in the continuous feature space.
As shown in the figure above, LCDSH (c) maintains a distribution much closer to the original DCNN features (a) compared to traditional quantization (b). This preservation of locality ensures that the relationship between two points remains stable after hashing, which is more important for retrieval than perfect binarization during training.
Experimental Results
The authors evaluated LCDSH on standard benchmarks, including CIFAR-10 and NUS-WIDE.
- Accuracy: On CIFAR-10, LCDSH outperformed state-of-the-art methods like DPSH and DTSH by over 6% in Mean Average Precision (MAP) across various bit lengths (12 to 48 bits).
- Efficiency: The method is significantly faster to train, achieving up to 10x speedups over competing frameworks like DBEN and NINH. For instance, training on CIFAR-10 with a CNN-F backbone took only 0.5 hours, whereas NINH required 174 hours.
- Inference: The model is highly efficient for real-time applications, capable of processing over 1,200 images per second on a single GTX980-Ti.
Conclusion
LCDSH demonstrates that moving away from rigid quantization error minimization in favor of locality preservation leads to superior image retrieval performance. By maintaining the natural distribution of learned features, the model achieves higher accuracy and significantly faster convergence, making it a robust solution for large-scale image search.
Summary updated