Scalable Image Retrieval by Sparse Product Quantization

Qingqun Ning, Jianke Zhu, Zhiyuan Zhong, Steven C. H. Hoi, Chun Chen

TL;DR

This paper introduces Sparse Product Quantization (SPQ), a novel method for accelerating approximate nearest neighbor (ANN) search in high-dimensional image datasets. SPQ improves upon existing Product Quantization (PQ) by using sparse representations to reduce quantization errors, leading to significantly better accuracy while maintaining comparable computational efficiency.

What Problem Does This Paper Address?

Large-scale image retrieval relies heavily on efficient methods for searching through massive databases of high-dimensional image features. Traditional exact nearest neighbor (NN) search is computationally infeasible for such datasets due to the "curse of dimensionality." Approximate Nearest Neighbor (ANN) search techniques aim to find a near-optimal match much faster. Product Quantization (PQ) is a popular ANN method that decomposes high-dimensional feature spaces into smaller subspaces, quantizing each independently. However, PQ's "hard assignment" quantization can introduce significant errors, limiting its accuracy. This paper addresses this limitation by proposing a method that reduces quantization distortion, thereby improving search accuracy.

Methods

The core innovation is Sparse Product Quantization (SPQ). It builds upon Product Quantization (PQ) by introducing a "soft assignment" approach. Instead of assigning a feature vector segment to a single codeword (hard assignment), SPQ represents it as a sparse linear combination of multiple codewords. This is achieved by:

  • Sparse Vector Quantization (SVQ): This technique relaxes the hard assignment constraint of traditional Vector Quantization (VQ). It allows a feature vector to be approximated by a linear combination of a small, fixed number of codewords (controlled by a "sparse level" parameter, L). This is formulated as a sparse optimization problem, solved efficiently using algorithms like Orthogonal Matching Pursuit (OMP).
  • Extending to Product Quantization: SPQ applies SVQ to each subspace of the PQ framework. This means each sub-vector of the high-dimensional feature is represented sparsely using its corresponding sub-codebook.
  • Efficient Distance Computation: SPQ enables efficient estimation of distances between query and database vectors through precomputed lookup tables and optimized calculations, leveraging SIMD instructions.

Datasets

The authors evaluated their method on several datasets:

  • SIFT dataset: One million local SIFT features (128-dimensional).
  • GIST dataset: 960-dimensional global features.
  • MNIST: 784-dimensional image set of handwritten digits.
  • LabelMe dataset: 512-dimensional GIST descriptors.
  • Synthetic dataset: 128-dimensional vectors from independent Gaussian distributions.

They also performed experiments on the Oxford 5K dataset for image retrieval.

Key Insights and Ideas

  • Sparse representation reduces quantization error: The key insight is that representing feature vectors sparsely, as a combination of multiple codewords rather than a single one, significantly reduces the quantization distortion. This is analogous to how soft assignments in other contexts can lead to more nuanced and accurate representations.
  • SPQ is more accurate than PQ: By minimizing quantization errors, SPQ achieves higher accuracy (measured by mAP, precision, and recall) compared to standard PQ and other VQ-based methods.
  • SPQ is competitive in speed: Despite the added complexity of sparse representation, SPQ's computational cost for search is comparable to PQ, especially when using inverted file structures.
  • Robustness to codebook learning: The SPQ method is shown to be effective regardless of the codebook learning method used (e.g., random, K-means, or dictionary learning), highlighting its flexibility.
  • Memory trade-off: SPQ requires more memory than hard-assignment methods like PQ due to storing sparse coefficients, but this is justified by the significant gain in precision.

Key Results

  • State-of-the-art performance: SPQ achieves state-of-the-art results on ANN search across multiple public datasets, outperforming PQ, OPQ, CK-means, and hashing-based methods like ITQ, OPH, and SH.
  • Improved accuracy: For example, on the SIFT dataset, SPQ achieves significantly higher mAP compared to PQ and other methods.
  • Comparable search time: SPQ's search time is comparable to PQ, and in some cases, it is faster than FLANN for similar precision levels.
  • Reduced memory footprint: SPQ requires significantly less memory than tree-based methods like FLANN.
  • Effective for image retrieval: The method demonstrates strong performance on the Oxford 5K dataset for image retrieval tasks.

Limitations and Future Work

  • Memory overhead: The paper acknowledges that SPQ, like other soft-assignment methods, incurs a higher memory cost than hard-assignment approaches due to storing sparse coefficients.
  • Future work: The authors suggest exploring methods to compress these coding coefficients. They also plan to extend the SPQ technique to other tasks, such as object retrieval.

Summary updated

BibTeX
@article{ning2017scalable,
  author = {Qingqun Ning and Jianke Zhu and Zhiyuan Zhong and Steven C. H. Hoi and Chun Chen},
  title = {{Scalable Image Retrieval by Sparse Product Quantization}},
  journal = {IEEE Trans. Multimedia},
  year = {2017},
  doi = {10.1109/tmm.2016.2625260},
}
Figure