Quantization Beyond Uniform Bit Allocation

K. S. Sreeramji, Sabyasachi Basu, Ravishankar Krishnaswamy, Kirankumar Shiragur, Yujia WangarXiv 2026

TL;DR

Traditional vector quantization treats all embedding dimensions equally, wasting precious bits on low-information data. This paper introduces a variable bit allocation framework tailored for Matryoshka embeddings, greedily concentrating storage on high-information leading dimensions to boost retrieval recall by up to 18% under the exact same memory budget.

What Problem Does This Paper Address?

Modern large language models and retrieval systems rely heavily on high-dimensional vector embeddings. However, storing billions of these vectors (often spanning thousands of dimensions each) creates massive storage bottlenecks and computational challenges for nearest neighbor search.

To mitigate this, engineers use compression techniques like Product Quantization (PQ) and Scalar Quantization (SQ). The catch? Standard quantization methods are "embedding-agnostic"—they allocate the same number of bits to every single dimension. This uniform allocation is highly inefficient for modern embeddings trained with Matryoshka Representation Learning (MRL). MRL intentionally packs the vast majority of an embedding's geometric structure and information into its leading dimensions. Treating all dimensions equally means wasting storage on the less important "tail" while starving the critical "head" of the vector.

Methods

The authors propose a data-driven Greedy Bit Allocation Framework designed to exploit the non-uniform importance of embedding dimensions:

  1. Bucket Partitioning: The total embedding dimensionality $D$ is divided into $K$ contiguous, equal-sized buckets.
  2. Greedy Local Search: The algorithm initializes with a uniform byte allocation across all buckets. It then iteratively evaluates the marginal utility of adding more memory to specific regions. In each iteration, it temporarily increases a bucket's budget by a fixed increment ($\delta$ bytes) and measures the resulting retrieval recall on a validation set. The bucket that yields the highest recall improvement permanently wins those bits.
  3. Quantization Instantiation:
  4. Greedy PQ: Applies standard Product Quantization locally within each bucket, dynamically adjusting the number of subvectors based on the bucket's assigned byte budget.
  5. Greedy SQ: Assigns specific bit-widths (chosen from $\{0, 2, 4, 8\}$ bits) to dimensions within a bucket, using a uniform stride allocation to distribute sparse bits evenly and prune low-value dimensions entirely (0 bits).

Datasets

The framework was evaluated using standard text retrieval datasets from the BEIR/MTEB benchmark, utilizing embeddings generated by OpenAI’s text-embedding-3-large (3072 dimensions) and Cohere’s embed-v4 (1536 dimensions):

  • MS Marco (Asymmetric sentence-to-paragraph retrieval)
  • DBpedia-Entity (Entity search)
  • Quora (Symmetric duplicate question detection)
  • FiQA (Financial opinion QA)
  • SciDocs (Document-to-document citation retrieval)
  • SciFact (Scientific claim verification)

Key Insights and Ideas

  • Variance as a Proxy for Importance: The authors discovered a clear physical property in MRL embeddings: variance decays sharply as the dimension index increases. High variance in early dimensions means they mimic the "leading digits" of a numerical value, carrying the core signal of the vector.
Figure 2: Observed variance differences by dimension in em- beddings produced by two different embedding models: Ope- nAI’s text-embedding-3-large and Cohere’s embed-v4. We plot the rolling window average variance per dimension across different datasets and observe very prominent iso- variance “levels” across the dimensions. The rolling window is 128 dimensions in length.
  • Automatic Structure Recovery: Even though the greedy algorithm is not explicitly told that the embeddings possess the Matryoshka property, the data-driven search naturally "recovers" it, automatically allocating significantly more bits to the initial buckets.
  • The Sub-1 Bit Regime: Uniform quantization fails catastrophically when compressed below 1 bit per dimension because it forces the system to drop or severely degrade all dimensions. Variable allocation solves this by completely discarding the low-variance tail (0 bits) to preserve high-precision representations for the vital leading dimensions.

Key Results

  • At identical storage footprints, the variable bit allocation scheme consistently outperformed uniform baselines across all datasets.
  • The most significant improvements occurred in the low-bit regime (sub-1 bit per dimension), where variable allocation improved absolute recall by up to 8% for Product Quantization and up to 18% for Scalar Quantization.
Figure 1: A comprehensive account of the gains in recall across different datasets. We compare gains on embeddings generated using OpenAI’s text-embedding-3-large and Cohere’s embed-v4 models, using both Product Quantization (PQ) and Scalar Quantization (SQ). In addition to the relative recall improvement, we also present the absolute 100-recall@100 achieved by the uniform and variable allocation schemes.
  • The gains were more pronounced for OpenAI embeddings than Cohere embeddings, matching the sharper, more distinct "iso-variance levels" observed in OpenAI's embedding architecture.

Limitations and Future Work

The authors highlight several open challenges for transitioning this method to production systems:

  1. Computational Overhead: The greedy search strategy requires training and evaluating multiple local codebooks across numerous iterations, making it too slow and inefficient for massive scale-up.
  2. Coarse Bucketing Constraints: The current approach relies on fixed, discrete buckets. Finer or dynamically sized buckets could yield better quantization boundaries but would drastically increase search complexity.
  3. Hardware and Systems Challenges: Modern hardware (like SIMD architectures) relies on uniform data layouts for highly parallelized, low-latency processing. Introducing custom, variable-sized data types breaks this uniformity, posing a difficult systems-engineering hurdle for real-time query latency.
  4. Lack of Closed-Form Theory: While variance decay works well as an empirical proxy, a rigorous mathematical framework directly linking the MRL loss function to an optimal closed-form bit allocation formula has yet to be derived.

Summary updated

BibTeX
@misc{sreeramji2026quantization,
  author = {K. S. Sreeramji and Sabyasachi Basu and Ravishankar Krishnaswamy and Kirankumar Shiragur and Yujia Wang},
  title = {{Quantization Beyond Uniform Bit Allocation}},
  year = {2026},
  eprint = {2608.19388},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.19388},
}
Figure