NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Distance Encoded Product Quantization

Jae-Pil Heo, Zhe Lin, Sung-Eui Yoon

Introduction

In the era of big data, searching through billions of high-dimensional vectors—such as image descriptors—requires efficient Approximate Nearest Neighbor (ANN) search. Product Quantization (PQ) has long been the standard approach, compressing vectors by partitioning them into subspaces and assigning each to a cluster center. However, PQ suffers from a fundamental limitation: it assumes every point in a cluster is located exactly at its center, leading to significant distance estimation errors for points on the periphery of a cluster.

The Distance Encoding Strategy

Distance Encoded Product Quantization (DPQ) addresses this bottleneck by rethinking bit allocation. Instead of using all available bits to identify a cluster center, DPQ reserves a small portion (typically 1 or 2 bits) to encode the distance of a point from its assigned center.

Comparison of standard Product Quantization (PQ) and the proposed Distance Encoded Product Quantization (DPQ). While PQ uses all bits for cluster indices, DPQ uses some bits to encode distance regions (concentric circles) within fewer, larger clusters.

By using fewer cluster centers, DPQ reduces the initial computational cost of encoding. The "saved" bits are then used to specify which "ring" or distance region a point falls into, effectively reducing the variance of distance estimates. This hybrid encoding strategy ensures that the bit budget is spent where it matters most: reducing the noise of points far from their centers.

Geometry-Based Distance Estimation

A key innovation of DPQ is its geometry-based distance metric. In high-dimensional spaces, the "concentration of measure" phenomenon implies that two random vectors are likely to be nearly orthogonal. DPQ leverages this by treating the vector from a cluster center to a data point as orthogonal to the vector connecting two cluster centers.

Geometric representation of distance estimation in DPQ. The distance between two points x and y is estimated using their respective cluster centers cx, cy and their distances from these centers rx, ry.

Using the Pythagorean theorem, the distance $d(x, y)$ can be approximated more accurately than standard PQ, which would simply use $d(c_x, c_y)$. This geometric approach significantly reduces the bias and noise inherent in traditional quantization methods by accounting for the displacement of points from their centroids.

Experimental Performance

The researchers evaluated DPQ on massive benchmarks, including GIST-1M and BoW-1M. Key findings include:

  • Improved Accuracy: DPQ consistently outperformed standard PQ and Optimized Product Quantization (OPQ) in Mean Average Precision (mAP) across various bit-lengths (16 to 128 bits).
  • Encoding Speed: On the GIST-960D benchmark, DPQ was approximately twice as fast at encoding data compared to standard PQ (94.34s vs 187.45s for 1 million points) because it searches against a smaller set of cluster centers.
  • Optimal Configuration: Allocating just 1-2 bits for distance quantization provided the best balance between cluster resolution and distance precision.

Conclusion

Distance Encoded Product Quantization represents a shift in how we approach vector compression for ANN search. By acknowledging that "farther is noisier" and utilizing high-dimensional geometric properties, DPQ achieves higher accuracy and faster encoding speeds than traditional methods, offering a more scalable and precise solution for large-scale image retrieval.

Summary updated

BibTeX
@inproceedings{heo2014distance,
  author = {Jae-Pil Heo and Zhe Lin and Sung-Eui Yoon},
  title = {{Distance Encoded Product Quantization}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2014},
  doi = {10.1109/cvpr.2014.274},
}
Figure