Abstract
Locality-sensitive hashing (LSH) is a popular data-independent indexing method for approximate similarity search, where random projections followed by quantization hash the points from the database so as to ensure that the probability of collision is much higher for objects that are close to each other than for those that are far apart. Most high-dimensional visual descriptors for images exhibit a natural matrix structure. When visual descriptors are represented by high-dimensional feature vectors and long binary codes are assigned, a random projection matrix requires expensive complexities in both space and time. In this paper, we analyze a bilinear random projection method where feature matrices are transformed to binary codes by two smaller random projection matrices. We base our theoretical analysis on extending Raginsky and Lazebnik's result where random Fourier features are composed with random binary quantizers to form locality-sensitive binary codes. We demonstrate that bilinear random projections yield similarity-preserving binary codes with small bit covariance. Numerical experiments on MNIST and Flickr45K datasets confirm the validity of our method.
Introduction
Approximate Nearest Neighbor (ANN) search is critical for scaling computer vision tasks like image retrieval. Locality-Sensitive Hashing (LSH) is a go-to method for this, mapping similar data points to the same binary "buckets." However, modern visual descriptors (like VLAD or LLC) are extremely high-dimensional.
When these descriptors are flattened into vectors, standard LSH requires a projection matrix of size $d \times k$ (where $d$ is the dimension and $k$ is the code length). For a 100,000-dimensional descriptor, storing this matrix can require 40GB of RAM—a massive bottleneck for real-world systems. Furthermore, flattening ignores the natural matrix structure (spatial or feature-wise) inherent in many visual descriptors.
Bilinear Random Projections
The authors propose BLSH-SIK (Bilinear LSH for Shift-Invariant Kernels). Instead of the standard linear projection $h(x) = \text{sgn}(w^\top x + b)$, they use a bilinear form: $$h(X) = \text{sgn}(\cos(w^\top X v + b) + t)$$ where $X$ is the input feature matrix, and $w$ and $v$ are much smaller random projection vectors. Treating an image descriptor as a matrix rather than a flat vector allows for massive compression of the hashing model itself.
Theoretical Bounds and Covariance
A key technical contribution is the extension of Raginsky and Lazebnik’s work on Random Fourier Features (RFF) to the bilinear case. The authors prove that the expected Hamming distance between bilinear codes is still bounded by the underlying Gaussian kernel, ensuring similarity-preserving properties remain intact.
Unlike linear LSH, where bits are independent, bilinear bits share projection vectors ($w$ or $v$), leading to potential correlations. The authors analytically prove that this covariance is small, meaning the bits still carry unique information. To further break these correlations, they introduce a hyperparameter $m$ to over-sample bits and then randomly sub-sample them.
Experimental Evaluation
The method was evaluated on two widely-used benchmarks:
- MNIST: 70,000 handwritten digits (28x28 pixels).
- Flickr45K: 45,000 images represented by VLAD descriptors (originally 64,000 dimensions, reshaped into 250x256 matrices).
Key Results
- Memory & Speed: For high-dimensional data like Flickr45K, BLSH-SIK reduces memory consumption and computational time by orders of magnitude compared to standard LSH.
- Performance: Precision-recall curves show that BLSH-SIK (especially with the $m=5$ or $m=10$ heuristic) achieves performance nearly identical to standard linear LSH.
- Fixed-Time Superiority: When given the same computational budget, BLSH-SIK significantly outperforms linear LSH because it can utilize thousands of bits while the linear method is stuck with only a few hundred.
Conclusion
Bilinear random projections offer a powerful way to handle high-dimensional visual descriptors by leveraging their inherent matrix structure. While there is a slight theoretical trade-off in similarity preservation bounds, the practical gains in speed and memory efficiency make it a superior choice for large-scale retrieval systems. Future work includes exploring other shift-invariant kernels and more advanced decorrelation strategies.
Summary updated