Super-Bit Locality-Sensitive Hashing

Jianqiu Ji, Jianmin Li, Shuicheng Yan, Bo Zhang, Qi Tian

Introduction

Super-Bit Locality-Sensitive Hashing (SBLSH) is a simple yet powerful enhancement to the classic sign-random-projection method used for estimating angular similarity. By orthogonalizing random projection vectors in batches, SBLSH significantly reduces estimation variance while remaining theoretically unbiased. This leads to much more accurate similarity searches using the same binary code length.

The Problem: Variance in SRP-LSH

In large-scale data retrieval—such as finding similar images in a database of millions—Locality-Sensitive Hashing (LSH) is a standard tool. LSH converts high-dimensional data into short binary codes. If two items are similar, their binary codes should have a small Hamming distance (few differing bits).

For many types of data, like text documents or SIFT image features, the "natural" similarity is the angle between vectors (angular similarity). The standard approach for this is Sign-Random-Projection (SRP-LSH). While SRP-LSH is unbiased, it suffers from high variance. Because the random projection vectors are chosen independently, they can often be nearly redundant or "clumped" together. Consequently, many bits in the resulting hash provide very little new information. To get an accurate estimate, standard SRP-LSH requires very long bit-codes, which increases both storage and computation costs.

The Super-Bit Method

To address this redundancy, the authors introduce the concept of a Super-Bit. The core idea is to replace independent random projections with batches of orthogonal ones.

  1. Batching: Instead of picking $K$ random vectors independently, the vectors are divided into $L$ batches of size $N$ (where $N$ is the "Super-Bit depth").
  2. Orthogonalization: Within each batch, the Gram-Schmidt process is applied to ensure all $N$ vectors are perfectly orthogonal (at 90-degree angles) to each other.
  3. Hashing: The algorithm then proceeds as usual, taking the sign of the dot product between the data and these new orthogonalized vectors to generate bits.
Illustration of the SBLSH process: random vectors are orthogonalized in batches to produce Super-Bit projection vectors.

The "Super-Bit" is the set of $N$ bits produced by one orthogonal batch. Standard SRP-LSH is actually just a special case of this method where the batch size $N=1$.

Theoretical Insights

  • Orthogonality is Information: By forcing vectors to be orthogonal, the algorithm ensures that each bit in a Super-Bit explores a different, non-overlapping direction in the data space. This reduces redundancy and packs more information into fewer bits.
  • Preserving the "Unbiased" Property: A major theoretical contribution of the paper is proving that even though the vectors are no longer independent, the expected value of the Hamming distance still maps linearly to the angle between data points. The authors use the geometry of Grassmann manifolds to prove this property.
  • The Depth Factor ($N$): The closer the Super-Bit depth $N$ is to the actual dimension of the data $d$, the greater the variance reduction. Essentially, batches should be as large as the dimensionality of the space allows.

Experimental Results

The researchers evaluated SBLSH on several computer vision benchmarks, including the Photo Tourism Patch Dataset (Notre Dame, Half Dome, and Trevi sets using 128-dimensional SIFT descriptors) and MIR-Flickr (25,000 images with 3125-dimensional bag-of-SIFT-feature histograms). They also tested mean-centered versions of these datasets.

  • Error Reduction: SBLSH achieved up to a 30% reduction in Mean Squared Error (MSE) compared to standard SRP-LSH when estimating pairwise angular similarity.
  • Better Retrieval: In Approximate Nearest Neighbor (ANN) experiments, SBLSH consistently outperformed both SRP-LSH and E2LSH. For example, on the Notre Dame dataset, SBLSH achieved a precision of ~0.78 compared to SRP-LSH's ~0.75.
  • Efficiency: Because it produces more informative bits, SBLSH can achieve the same level of accuracy as standard methods using significantly shorter binary codes.

Limitations

  • Computational Overhead: Performing Gram-Schmidt orthogonalization adds a pre-processing cost of $O(N^2 d)$. While this is a one-time cost for generating the hash functions, it could be expensive if the data dimension $d$ is extremely high.
  • High-Dimensional Diminishing Returns: In very high-dimensional spaces, random vectors are already "nearly orthogonal" by chance. Therefore, the deliberate orthogonalization of SBLSH might offer less dramatic improvements in those specific scenarios.
  • Theoretical Gap: While the variance reduction is mathematically proven for angles between $0$ and $\pi/2$, the formal proof for larger angles (up to $\pi$) is left for future work, although empirical experiments suggest it still performs well.

Summary updated

BibTeX
@inproceedings{ji2012super,
  author = {Jianqiu Ji and Jianmin Li and Shuicheng Yan and Bo Zhang and Qi Tian},
  title = {{Super-Bit Locality-Sensitive Hashing}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2012},
}
Figure