Abstract
Hashing is very useful for fast approximate similarity search on large database. In the unsupervised settings, most hashing methods aim at preserving the similarity defined by Euclidean distance. Hash codes generated by these approaches only keep their Hamming distance corresponding to the pairwise Euclidean distance, ignoring the local distribution of each data point. This objective does not hold for k-nearest neighbors search. In this paper, we firstly propose a new adaptive similarity measure which is consistent with k-NN search, and prove that it leads to a valid kernel. Then we propose a hashing scheme which uses binary codes to preserve the kernel function. Using low-rank approximation, our hashing framework is more effective than existing methods that preserve similarity over arbitrary kernel. The proposed kernel function, hashing framework, and their combination have demonstrated significant advantages compared with several state-of-the-art methods.
Introduction: The Challenge of Non-Uniform Data
In large-scale image retrieval, hashing is the standard for converting high-dimensional data into compact binary codes. However, traditional unsupervised methods typically preserve global Euclidean distances. This approach assumes a uniform data distribution, which is rarely the case in real-world datasets. In dense regions, a fixed-radius search may return too many neighbors, while in sparse regions, it may return none.
To address this, we propose an adaptive similarity measure that "stretches" or "shrinks" based on local data density, ensuring consistent $k$-nearest neighbor ($k$-NN) results across the entire feature space.
Proposed Methodology
1. Normalized Gaussian Kernel ($\kappa_{Gn}$)
We introduce a Normalized Gaussian Kernel that adapts to local distributions. By clustering the data using $k$-means, we can estimate local density and normalize the kernel accordingly. This ensures that the retrieval radius is adaptive: expanding in sparse regions and contracting in dense ones. Crucially, we prove that this measure remains a valid Positive Semi-Definite (PSD) kernel, allowing it to be used in various kernel-based learning frameworks.
2. Kernel Reconstructive Hashing (KRH)
To enable fast searching with this adaptive kernel, we developed Kernel Reconstructive Hashing (KRH). The core idea is to learn binary codes such that their Hamming distance (or inner product) reconstructs the original kernel values.
- Efficiency via Nyström: To handle large-scale data, we employ the Nyström method for low-rank approximation, reducing the computational complexity from $O(n^3)$ to linear time relative to the dataset size.
- Optimized Quantization: We use an iterative Orthogonal Procrustes approach to minimize quantization loss. By learning an optimal rotation and a scaling factor, we ensure the binary codes represent the continuous kernel values as accurately as possible.
Experimental Evaluation
We tested our approach on two benchmarks: SIFT-1M (1 million local descriptors) and CIFAR-10 (60,000 images).
Key Results
The combination of the adaptive kernel and the KRH framework yielded significant performance gains. As shown in the precision-recall curves below, the normalized Gaussian kernel consistently outperforms the standard Gaussian kernel across different datasets.
Beyond accuracy, KRH is highly efficient. For instance, on CIFAR-10, training 128-bit codes took only 14.2 seconds, compared to over 900 seconds for competing methods like Binary Reconstructive Embedding (BRE).
Conclusion
By making hashing "density-aware," we significantly improve the precision of $k$-NN retrieval in non-uniform datasets. The Kernel Reconstructive Hashing framework provides a scalable, efficient way to map these complex similarities into binary space, outperforming state-of-the-art unsupervised hashing methods in both speed and accuracy.
Summary updated