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

Inner Product Aware Quantization: Provably Fast, Accurate, and Adaptive Algorithms

Nathan White, Krish SingalNeurIPS 2026

TL;DR

When we compress vectors—whether for LLM weights or database search—we usually try to minimize simple geometric reconstruction error (Mean Squared Error). Yet what we actually do with those vectors downstream is take dot products with new, unseen inputs. This paper reframes vector quantization directly around preserving inner products, unlocking a deep mathematical link to 1D clustering that makes state-of-the-art adaptive quantization 2–10$\times$ faster without losing a drop of quality.

What Problem Does This Paper Address?

Vector quantization shrinks massive high-dimensional vectors by mapping their continuous numbers onto a tiny, discrete set of allowed values (say, squeezing a million-entry vector down to just 64 unique numbers).

In adaptive, unbiased quantization—specifically Adaptive Stochastic Quantization (ASQ)—we customize this set of quantization values for each individual vector and randomly round entries up or down so that, on average, there is zero systematic bias. Traditionally, ASQ chooses quantization points to minimize Mean Squared Error (MSE), keeping the compressed vector close to the original in Euclidean ($\ell_2$) space.

Here’s the catch: neural network layers and vector search engines don't just admire vectors in $\ell_2$ space; they multiply them with arbitrary query vectors. Low MSE doesn't automatically guarantee accurate dot products, especially if an incoming query aligns with your worst-quantized coordinates. Furthermore, adaptive quantization faces a steep practical tax: finding custom quantization points per vector takes serious compute time. Can we optimize directly for dot-product accuracy and make it fast enough for the real world?

Methods

Because the authors use unbiased rounding (standard stochastic quantization, where each entry rounds to an adjacent quantization point with probabilities proportional to its distance), the expected dot product is already exact. Preserving inner products therefore boils down to minimizing variance. They formulate two new objectives:

  1. Maximum Directional Variance (MDV): Minimizes dot-product variance against a worst-case unit vector.
  2. Average Directional Variance (ADV): Minimizes expected dot-product variance when inputs are drawn from a known distribution.

To solve these fast, the authors bridge quantization with classic computational geometry:

  • For ADV & ASQ: They show ADV is equivalent to weighted MSE, and its cost structure satisfies the "Concave Monge" property—the exact mathematical backbone of 1D $k$-means clustering. Instead of building dynamic programming tables from scratch like the prior state-of-the-art (QUIVER), they adapt the classic Wilber algorithm (which finds shortest paths in a directed acyclic graph using a Lagrangian penalty $\tau$ per quantization point). Better yet, they design a fast approximation algorithm to warm-start the binary search for $\tau$, converging almost immediately.
  • For MDV: Because optimal MDV points can actually be irrational numbers, exact finite-bit solutions are impossible. Instead, they build a near-linear-time $(1+\varepsilon)$-approximation algorithm. It buckets the vector’s range to extract a tiny "coreset" of extreme values, adaptively subdividing buckets on skewed data, and binary-searches for the minimal worst-case variance—without even needing to sort the full vector!

Datasets

The authors evaluate their algorithms on:

  • Synthetic workloads: Vectors up to $d = 10^7$ drawn from 33 different distributions (including $\text{LogNormal}(0,1)$ and mixtures of 16 Gaussians) to stress-test skewed and heavy-tailed regimes.
  • LLM Compression & Benchmarks: Quantizing the MLP weight matrices of the open-weight Qwen3.5-4B model, evaluated on WikiText-2 (for perplexity, KL divergence, and top-1 token agreement) and ARC-Challenge (science QA).
  • Vector Search: Preliminary maximum inner product search (MIPS) and $\ell_2$ search evaluations comparing against Product Quantization (PQ). (No new datasets were introduced.)

Key Insights and Ideas

  • Average dot-product preservation explains why MSE works: Mathematically, minimizing ADV over an input distribution $\mathcal{X}$ simplifies directly to minimizing MSE weighted by the second moments ($\mathbb{E}[x_i^2]$) of the inputs. This gives a clean theoretical explanation for why traditional ASQ works well downstream, while showing how to improve it when input coordinates aren't uniform.
  • Don't overthink the rounding distribution: Could correlated, joint rounding across coordinates beat simple independent rounding? For worst-case inputs (MDV), the authors prove standard independent rounding is already mathematically optimal. For average-case inputs (ADV), finding the optimal joint rounding is NP-Hard (via a reduction from Max-Cut). Independent stochastic rounding hits the exact sweet spot of tractability and optimality.
  • Worst-case optimization protects the whole tail: Optimizing MDV targets the single highest-variance coordinate, yet empirically it suppresses variance across the entire worst 0.05% of coordinates compared to ADV.
Figure 2: (a) Average variance VarSSQ[wi] of the worst k coordinates on vectors w drawn from LogNormal(0,1) over 100 trials. (b) Average absolute inner product error on vectors w drawn from a mixture of 16 Gaussians with variance 10 and means separated by 105. In both plots, the shaded regions show the 10–90% range across trials.

Key Results

  • 2–10$\times$ Exact Speedups: On 500,000-dimensional LogNormal vectors, their warm-started Wilber algorithm solves exact ASQ/ADV up to 10$\times$ faster than QUIVER, turning multi-second bottlenecks into sub-second operations, while also accelerating approximate QUIVER routines by ~2$\times$.
Figure 1: Figure comparing the runtime of the previous state-of-the-art algorithm for traditional ASQ with our faster algorithm (Wilber with Warm-Start Binary Search), on vectors drawn from LogNormal(0, 1). On the left, we fix s = 64 and vary the vector size d, while on the right we fix d = 500,000 and vary s. The shaded regions show the 10-90% range of runtimes across sampled vectors. Figure 3 is similar, with additional methods compared as well.
  • Blazingly Fast MDV: Their coreset-based MDV algorithm runs in $O(d \log(s/\varepsilon))$ time—faster than simply sorting the input vector—and reduces inner product error by orders of magnitude compared to non-adaptive baselines like QSGD, NUQSGD, and Round-to-Nearest.
  • LLM Weight Quantization: When quantizing Qwen3.5-4B MLP layers (to $s=32$ values), ADV achieves the best fidelity to the unquantized model, scoring 1.17$\times 10^{-2}$ KL divergence and 95.46% top-1 agreement per-row (and 2.29$\times 10^{-2}$ KL / 93.51% top-1 per-matrix), outperforming standard ASQ, $k$-means, TurboQuant, and uniform quantization.

Limitations and Future Work

  • Worst-case vs. the 1% tail: While MDV wins on the absolute worst coordinates, ADV often beats it on the broader worst 1% of tail events. Designing a hybrid objective that explicitly targets CVaR/tail percentiles (like the worst 1% of a distribution) is a natural next step.
  • Small codebook regimes: The massive 10$\times$ speedups over QUIVER shine brightest when the number of quantization points $s$ is large; narrowing the gap for tiny $s$ remains open.
  • Codebook overhead & approximations: Adaptive quantization requires storing a custom set of $s$ floats per vector, which adds memory overhead in vector search. Extending these fast algorithms to shared, multi-vector codebooks—and finding efficient approximate joint rounding distributions despite NP-hardness—are prime territory for future work.

Summary updated

BibTeX
@inproceedings{white2026inner,
  author = {Nathan White and Krish Singal},
  title = {{Inner Product Aware Quantization: Provably Fast, Accurate, and Adaptive Algorithms}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=60WCaegfit},
}
Figure