Abstract
Traditional vector quantization (VQ) methods are designed to minimize Euclidean reconstruction error, which does not directly translate to optimal performance in Maximum Inner Product Search (MIPS). This paper introduces Norm-Explicit Quantization (NEQ), a general framework that decomposes quantization into direction and norm components. By explicitly quantizing a "relative norm" that compensates for direction quantization errors, NEQ prioritizes norm accuracy—the primary driver of inner product error. Experimental results on large-scale benchmarks like SIFT100M and ImageNet demonstrate that NEQ consistently enhances the performance of existing VQ algorithms (e.g., PQ, RQ) and outperforms state-of-the-art hashing methods.
Introduction
Vector Quantization (VQ) is essential for scaling similarity search to massive datasets. While methods like Product Quantization (PQ) excel at Euclidean distance search, they are often suboptimal for Maximum Inner Product Search (MIPS), a core task in recommendation systems and image retrieval. The discrepancy arises because MIPS is highly sensitive to vector magnitudes (norms), whereas standard VQ treats all dimensions equally to minimize total distance. This paper identifies "norm error" as a critical bottleneck and proposes a simple, additive framework to rectify it.
Methodology: Norm-Explicit Quantization
The proposed NEQ framework improves MIPS by separately handling vector directions and norms. The process involves three main steps:
- Direction Quantization: The input vector $x$ is normalized to a unit vector, which is then quantized using a standard VQ technique (e.g., PQ or OPQ) to produce a quantized direction $\bar{x}$.
- Relative Norm Calculation: Instead of quantizing the original norm $\|x\|$, NEQ computes a relative norm $l_x = \|x\|/\|\bar{x}\|$. This relative norm effectively "absorbs" the norm error introduced during the direction quantization step.
- Norm Quantization: The scalar $l_x$ is quantized using a dedicated codebook.
This decomposition ensures that the final reconstructed vector $\tilde{x} = \hat{l}_x \bar{x}$ (where $\hat{l}_x$ is the quantized relative norm) has a magnitude very close to the original. Crucially, NEQ does not increase search-time complexity, as the approximate inner product calculation remains a series of lookups and additions.
Theoretical and Empirical Insights
The core motivation for NEQ is the observation that norm errors impact MIPS performance much more severely than angular (direction) errors. Theoretical analysis shows that a 1% error in the norm leads to a 1% error in the inner product, whereas a 1% angular error typically has a negligible effect.
As shown in Figure 4, the inner product error scales linearly with norm error (the red line), while angular error (the black line) results in much lower overall error. This confirms that norm is the "high-order bit" for MIPS accuracy.
Experimental Results
NEQ was evaluated on benchmarks including Netflix, Yahoo!Music, ImageNet, and SIFT100M. Key findings include:
- Universal Improvement: NEQ variants (NE-PQ, NE-OPQ, NE-RQ) consistently outperformed their base counterparts. The gains were particularly significant for PQ and OPQ.
- Scalability: On the 100-million-vector SIFT dataset, NE-RQ maintained a substantial lead over standard RQ, with the performance gap widening as the search space increased.
- Competitive Performance: NE-PQ outperformed state-of-the-art Locality Sensitive Hashing (LSH) methods and showed competitive recall-time trade-offs against graph-based indices like ip-NSW.
Conclusion
Norm-Explicit Quantization provides a powerful, easy-to-implement paradigm for improving MIPS. By recognizing the disproportionate impact of norm errors and explicitly addressing them through relative norm quantization, NEQ offers a performance boost to nearly any existing quantization method without increasing search complexity. Future work includes integrating NEQ as a distance estimator within proximity graphs to further enhance large-scale retrieval.
Summary updated