Individualized non-uniform quantization for vector search

Mariano Tepper, Ted WillkearXiv 2025 · OpenReview

Abstract

Embedding vectors are widely used for representing unstructured data and searching through it for semantically similar items. However, the large size of these vectors, due to their high-dimensionality, creates problems for modern vector search techniques: retrieving large vectors from memory/storage is expensive and their footprint is costly. In this work, we present NVQ (non-uniform vector quantization), a new vector compression technique that is computationally and spatially efficient in the high-fidelity regime. The core in NVQ is to use novel parsimonious and computationally efficient nonlinearities for building non-uniform vector quantizers. Critically, these quantizers are individually learned for each indexed vector. Our experimental results show that NVQ exhibits improved accuracy compared to the state of the art with a minimal computational cost.

Introduction

The proliferation of Large Language Models (LLMs) and Retrieval-Augmented Generation (RAG) has made high-dimensional embedding vectors a cornerstone of modern data retrieval. However, as vector dimensionality increases (e.g., to 1536 or more), the cost of storing and retrieving these vectors from memory or storage becomes a significant bottleneck. Standard Scalar Quantization (SQ) techniques typically employ uniform quantization, which divides the value range into equal-sized bins. This approach is suboptimal for embedding data, which often follows non-uniform, bell-shaped distributions, leading to wasted precision at the tails and insufficient detail at the distribution's center.

Methodology: Individualized Quantization (NVQ)

The proposed Non-uniform Vector Quantization (NVQ) framework shifts the paradigm from global quantization to individualized learning. For every vector inserted into the index, NVQ optimizes a unique non-uniform quantizer. This is achieved by applying a nonlinear mapping function $h$ that transforms the vector's distribution to be more uniform prior to rounding.

Parsimonious Nonlinearities

To minimize storage overhead, NVQ utilizes functions defined by only two parameters ($\alpha$ and $x_0$). Three variants are explored:

  1. Kumaraswamy: A highly flexible distribution capable of modeling various shapes.
  2. Logistic/Logit: Specifically tailored for the bell-shaped distributions common in neural embeddings.
  3. NQT (Not-Quite Transcendental): A computationally efficient variant that uses bit-manipulation to approximate logarithmic and exponential functions, avoiding expensive CPU cycles.
Optimization landscape and quantization error reduction for the Kumaraswamy, Log-Log, and NQT functions.

Optimization and Computational Cost

Since the quantization rounding step is non-differentiable, NVQ employs Separable Natural Evolution Strategies (SNES), a gradient-free stochastic optimizer. This allows for rapid convergence (typically within 50 iterations) to optimal parameters for each vector. The computational trade-offs between the proposed functions are summarized in the table below.

Comparison of encoding and decoding costs (in terms of operations like FMA, MUL, DIV) for the three NVQ variants.

Experimental Results

The researchers evaluated NVQ across multiple industry-standard datasets, including OpenAI (ada-002, v3), Cohere, and Google Gecko embeddings.

  • Compression and Accuracy: NVQ achieved storage reductions of 3.06x to 3.44x relative to FP32. Crucially, it reduced mean squared error (MSE) by 1.7x to 1.9x compared to standard uniform quantization.
  • Search Fidelity: In high-recall scenarios (>0.95), the impact on search accuracy was negligible (less than 0.01 recall loss), demonstrating that NVQ maintains high fidelity while significantly reducing hardware requirements.
  • Efficiency: The NQT variant proved particularly effective for production environments, offering a high-speed alternative to more complex transcendental functions without sacrificing significant accuracy.

Conclusion

NVQ demonstrates that "overfitting" a quantizer to an individual vector is a powerful strategy for high-fidelity compression. By leveraging parsimonious nonlinearities and efficient optimization, NVQ provides a scalable solution to the memory bottlenecks in modern vector search. Future research directions include the development of query-aware loss functions and the extension of individualized quantization to ultra-low bitrate regimes (1-2 bits).

Citation: Tepper, M., & Willke, T. (2025). Individualized non-uniform quantization for vector search. arXiv:2509.18471v1 [cs.LG].

Summary updated

BibTeX
@misc{tepper2025individualized,
  author = {Mariano Tepper and Ted Willke},
  title = {{Individualized non-uniform quantization for vector search}},
  year = {2025},
  eprint = {2509.18471},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.18471},
}
Figure