Block Sphere Vector Quantization

Heesang Ann, Joongkyu Lee, Min-hwan OhNeurIPS 2026

TL;DR

Compressing massive high-dimensional vectors—like LLM KV-caches or search embeddings—usually involves randomly rotating them onto a sphere and chopping up each coordinate independently. This paper clears up long-standing confusion around existing rotation-based compressors, then introduces BlockQuant, an algorithm that groups coordinates into small blocks to stop wasting bits on "impossible" geometric corners. The result is sharper theoretical guarantees and near-lossless long-context LLM inference at a fraction of the memory cost.

What Problem Does This Paper Address?

Modern machine learning runs on giant collections of high-dimensional vectors. In large language models (LLMs), the "KV-cache" (the model's working memory of past tokens) balloons with context length and quickly becomes a memory bottleneck. Vector quantization solves this by squashing floating-point vectors into tiny bit-strings—ideally without needing dataset-specific calibration.

Recently, a clever trick has taken over calibration-free compression: random rotation. If you normalize a vector to unit length and multiply it by a random orthogonal matrix, the resulting vector lands uniformly on the surface of a high-dimensional sphere. Because points on a sphere follow a predictable statistical distribution, algorithms like EDEN, RabitQ, and TurboQuant can use pre-computed, universal codebooks to snap (quantize) these rotated vectors to nearby grid points.

However, comparing these methods has been a headache. Some papers measure average reconstruction error (Mean Squared Error, or MSE), others care about preserving dot products (crucial for attention and similarity search), and still others focus on worst-case, high-probability bounds. Because everyone used different yardsticks, it wasn't clear which method actually worked best—or how much geometric information was being left on the table.

Methods

First, the authors build a unified mathematical arena to evaluate EDEN, RabitQ, and TurboQuant side-by-side across MSE, inner-product error, and high-probability bit complexity.

Next, they spot a geometric flaw in standard coordinate-wise methods (EDEN and TurboQuant). When you quantize each coordinate independently using 1D scalar grids, the combined $d$-dimensional grid forms a hypercube of possibilities. Yet the rotated vectors live on a sphere—meaning combinations of large values across coordinates fall outside the feasible region, wasting precious bit-budget on empty space.

Conceptual comparison of codebooks in a 2D projection: Cartesian grids waste space outside the shaded disk, projected grids stay on the boundary, while BlockQuant places centroids directly inside the spherical block distribution.

To fix this, the authors propose Block-Sphere Quantization (BlockQuant):

  1. Rotate & Group: Randomly rotate the unit vector, then slice its $d$ coordinates into small blocks of size $p$ (typically $p=2$ or $3$).
  2. Exploit Exact Geometry: Any $p$-dimensional slice of a uniform $d$-sphere lands inside a $p$-dimensional unit ball following an exact, known probability density (related to the Beta distribution).
  3. Optimize & Rescale: Offline, BlockQuant runs K-means on this exact block-ball distribution to place $2^{bp}$ centroids right where the data actually lives (using a fast lookup-table approximation at runtime). During decoding, it applies a simple scalar rescaling factor ($\rho$, the alignment between original and quantized vectors) tailored either for minimum MSE or unbiased dot products.

Datasets

Because these quantizers are calibration-free, no datasets are used for training. Evaluation spans two domains:

  • Nearest-Neighbor Retrieval: Tested on GloVe ($d=200$) and OpenAI3 / DBpedia embeddings ($d=1536$ and $3072$).
  • Long-Context LLM KV-Cache Quantization: Evaluated using Llama-3.1-8B-Instruct on the Needle-In-A-Haystack benchmark (up to 104k tokens) and LongBench-E (covering QA, summarization, few-shot learning, synthetic tasks, and code). No new benchmarks were introduced.

Key Insights and Ideas

  • No single baseline rules them all: Under the unified framework, EDEN and TurboQuant win on average MSE, EDEN dominates expected inner-product estimation, and RabitQ offers the tightest high-probability guarantees.
  • Don't spend bits on bias-correction: TurboQuant's inner-product mode sacrifices 1 full bit per coordinate to run a separate bias-correction algorithm (QJL). Simply using all bits for reconstruction and rescaling by $1/\rho$ (as EDEN and BlockQuant do) cuts expected inner-product error roughly fourfold.
  • Correcting the theoretical speed limit: Previous work applied Shannon's distortion lower bound directly to ambient $d$-dimensional space—where a thin spherical shell has zero volume and undefined differential entropy. By projecting onto the sphere's $d-1$ intrinsic dimensions, the authors derive a corrected lower bound involving the exponent $\frac{bd}{d-1}$ instead of $b$, proving that as block size $p \to d$, BlockQuant approaches theoretical optimality.

Key Results

The theoretical improvements in distortion constants translate cleanly into practice:

  • Sharper Theoretical Bounds: In the high-bit regime, BlockQuant ($p=3$) drops the asymptotic MSE and inner-product constant to $1.770 \cdot 4^{-b}$, beating EDEN and TurboQuant ($2.721 \cdot 4^{-b}$), and crushing TurboQuant's inner-product constant ($17.09 \cdot 4^{-b}$).
Comparison of MSE distortion across rotation-based quantizers, showing BlockQuant achieving the lowest error across bit-widths.
  • Embedding Retrieval: At 4-bit compression on GloVe and OpenAI3, BlockQuant achieves the highest Recall@1@k, shining brightest at small $k$ where tiny dot-product errors easily scramble top search results.
  • LLM KV-Cache Compression: Compressing Llama-3.1-8B's key cache to 3.5 bits and value cache to 2 bits, BlockQuant scores 0.962 on Needle-In-A-Haystack—virtually tied with the 16-bit full-precision baseline (0.965) and ahead of EDEN (0.953), RabitQ (0.944), and TurboQuant (0.933). On LongBench-E, it averages 43.93 (vs. 44.15 full-precision), matching EDEN (43.87) and beating RabitQ (43.52) and TurboQuant (43.20).

Limitations and Future Work

  • Exponential codebook growth: Because a block of size $p$ at $b$ bits requires $2^{bp}$ centroids, practical block sizes are kept very small ($p=2$ or $3$), necessitating a lookup-table approximation for fast centroid assignment.
  • Criterion trade-offs: While BlockQuant advances expected distortion, RabitQ remains the go-to design for strict high-probability bit-complexity control.
  • Generic LLM application: Currently, BlockQuant treats KV-cache vectors as generic embeddings (aside from basic outlier-channel splitting). The authors note a promising next step is tailoring block-spherical designs directly to the unique statistical quirks of attention caches.

Summary updated

Abstract

Vector quantization is a fundamental primitive for scalable machine learning systems, enabling memory-efficient storage, fast retrieval, and compressed inference. Recent rotation-based quantizers such as EDEN, RabitQ, and TurboQuant have introduced strong guarantees and empirical performance, but the surrounding comparisons have been difficult to interpret because they rely on different distortion criteria, probability regimes, and implementation assumptions. As our first contribution, we provide a unified theoretical comparison of these methods and show that their relative advantages are criterion-dependent rather than absolute: TurboQuant and EDEN are favorable for MSE distortion, EDEN is also effective for expected inner-product distortion, and RabitQ provides strong high-probability control. This comparison clarifies the design principles behind each advantage and shows that no existing method uniformly dominates across the relevant measures. As our second contribution, we introduce *Block-Sphere Quantization* (**BlockQuant**), a new rotation-based block quantization algorithm designed around the spherical geometry of randomly rotated vectors. Unlike coordinate-wise quantizers, **BlockQuant** quantizes blocks on the sphere, preserving the geometry of rotated embeddings more faithfully. We prove that this block-spherical design improves expected distortion performance, including both reconstruction MSE and expected inner-product distortion. Experiments on real embedding data support these theoretical improvements.
BibTeX
@inproceedings{ann2026block,
  author = {Heesang Ann and Joongkyu Lee and Min-hwan Oh},
  title = {{Block Sphere Vector Quantization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=U13XD8SxhN},
}
Figure