Learning Binary Codes for High-Dimensional Data Using Bilinear Projections

Yunchao Gong, Sanjiv Kumar, Henry A. Rowley, Svetlana LazebnikCVPR 2013

Abstract

Recent advances in visual recognition indicate that to achieve good retrieval and classification accuracy on large-scale datasets like ImageNet, extremely high-dimensional visual descriptors, e.g., Fisher Vectors, are needed. We present a novel method for converting such descriptors to compact similarity-preserving binary codes that exploits their natural matrix structure to reduce their dimensionality using compact bilinear projections instead of a single large projection matrix. This method achieves comparable retrieval and classification accuracy to the original descriptors and to the state-of-the-art Product Quantization approach while having orders of magnitude faster code generation time and smaller memory footprint.

Introduction

In modern computer vision, high-dimensional descriptors such as Fisher Vectors (FV) or VLAD are essential for achieving state-of-the-art accuracy on massive datasets. However, these descriptors, which can reach hundreds of thousands of dimensions, present a significant challenge for large-scale similarity search. Storing them in raw form requires prohibitive amounts of RAM, and computing distances between them is computationally expensive.

The standard solution is to convert these real-valued vectors into compact binary codes through hashing. However, traditional hashing methods like Iterative Quantization (ITQ) encounter a "dimensionality wall." For a 64,000-dimensional descriptor, a standard projection matrix would require approximately 16GB of memory just for storage, and the computation time for a single image could exceed one second—rendering real-time applications impossible.

The Bilinear Projection Trick

To bypass this bottleneck, we propose Bilinear Projection-Based Binary Codes (BPBC). The core insight is that high-dimensional visual descriptors are not merely random lists of numbers; they typically possess an inherent 2D structure. For instance, a VLAD descriptor is often formed by concatenating 128-dimensional SIFT descriptors across 500 visual codewords.

The natural matrix structure of visual descriptors, such as SIFT dimensions mapped against visual codewords, which the bilinear method exploits.

Instead of treating a descriptor as a single long vector $x \in \mathbb{R}^d$, we reorganize it into a matrix $X \in \mathbb{R}^{d_1 \times d_2}$ (where $d = d_1 \times d_2$). Rather than multiplying the vector by one massive projection matrix $R$, we apply two smaller rotation matrices, $R_1$ and $R_2$, to either side of the data matrix:

$$H(X) = \text{sgn}(R_1^T X R_2)$$

This bilinear approach is mathematically equivalent to a full rotation using a Kronecker product ($R = R_2 \otimes R_1$), but it is vastly more efficient. The time complexity for code generation drops from $O(d^2)$ to $O(d_1^2 d_2 + d_1 d_2^2)$. In practical terms, for a 64k-dimensional feature, the memory required for the projection parameters drops from 16GB to just 1MB.

Learning the Rotations

We adapt the Procrustes analysis framework to learn these $R_1$ and $R_2$ matrices from data. We employ an iterative block coordinate ascent algorithm that alternates between updating the binary codes to minimize quantization error and updating the rotation matrices. This ensures that the compact codes preserve the similarity structure of the original high-dimensional space.

Experimental Results

We evaluated BPBC on large-scale benchmarks, including the Holiday + Flickr1M dataset (using 64,000-dimensional VLAD) and ILSVRC2010 (using 105,000-dimensional LLC descriptors).

Comparison of NN search recall and storage requirements between the proposed BPBC and standard ITQ across various code sizes.

Speed and Memory Efficiency

BPBC is 100x to 1000x faster at generating codes than standard Locality Sensitive Hashing (LSH) or Product Quantization (PQ) for very high dimensions. On a 128x1000 VLAD task, BPBC required only 3.88 MB to store projection parameters, compared to over 62 GB for LSH or RR+PQ. This efficiency allows high-dimensional search to run on mobile devices rather than requiring high-end server clusters.

Retrieval Accuracy

Despite the restricted degrees of freedom in a bilinear rotation, BPBC matched or exceeded the accuracy of state-of-the-art methods. On the Holiday dataset, it achieved a Mean Average Precision (mAP) of ~40.1, which is nearly identical to the original uncompressed descriptors (39.0). Crucially, BPBC makes "long" codes (16k–64k bits) computationally feasible, which are necessary to preserve the discriminative power of high-dimensional data.

Conclusion

Bilinear Projection-Based Binary Codes offer a scalable solution for high-dimensional similarity search. By exploiting the natural matrix structure of visual data, BPBC overcomes the memory and computational barriers of traditional hashing, enabling efficient, large-scale visual recognition without sacrificing accuracy.

Summary updated

BibTeX
@inproceedings{gong2013learning,
  author = {Yunchao Gong and Sanjiv Kumar and Henry A. Rowley and Svetlana Lazebnik},
  title = {{Learning Binary Codes for High-Dimensional Data Using Bilinear Projections}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2013},
  url = {https://openreview.net/forum?id=SkbK9yzO-r},
}
Figure