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

KVarN: Variance-Normalized KV-Cache Quantization Mitigates Error Accumulation in Reasoning Tasks

Lorenz K. Muller, Philippe Bich, Chiara Boretti, Hyun-Min Chang, Jiawei Zhuang, Lukas CavigelliarXiv 2026

TL;DR

As Large Language Models (LLMs) scale up their "test-time compute" to handle complex reasoning, their memory footprint explodes due to a rapidly growing Key-Value (KV) cache. KVarN solves this bottleneck with a calibration-free, 2-bit KV-cache quantization method that combines Hadamard rotation with dual-scaling variance normalization. By specifically suppressing token magnitude outlier errors, KVarN prevents error accumulation during long-horizon autoregressive decoding with a negligible 0.18% runtime overhead.

What Problem Does This Paper Address?

To solve hard math, coding, or logic problems, modern LLMs rely on long-horizon decoding (generating extensive chains of thought). However, storing the keys and values for every single token in a sequence creates a massive memory bottleneck. Compressing this KV-cache down to 2–4 bits via quantization is a popular solution, but existing methods suffer from a major evaluation blind spot: they are typically tested in "static prefill" settings where a long context is quantized all at once.

The authors show that in real-world autoregressive decoding—where tokens are generated one by one—quantization errors compound exponentially across timesteps and transformer layers. Standard quantization techniques fail to preserve per-token scales, leading to massive outlier errors that severely degrade the model's reasoning capabilities over long sequences.

Methods

KVarN introduces a novel, calibration-free preconditioning pipeline that prepares the KV-cache matrices ($K$ and $V$) for standard Round-to-Nearest (RTN) quantization:

  1. Hadamard Rotation (Incoherence Processing): Applied online to the channel dimension to smooth out extreme outliers, making the data distribution more uniform and Gaussian-like.
  2. Dual-Scaling Variance Normalization (VarN): An iterative, Sinkhorn-style balancing algorithm executed in the log-domain. It scales both the token and channel dimensions to achieve uniform variance, directly fixing the per-token magnitude inflation that introduces severe quantization noise.

The authors also introduce a "pseudo-decode" evaluation framework to accurately simulate and measure how quantization errors compound dynamically during step-by-step generation, rather than relying on static snapshots.

Datasets

KVarN was evaluated using state-of-the-art open models (Qwen3-4B, Llama-3.1-8B, and Phi-4-14B) across several demanding generative and long-context benchmarks:

  • MATH500 & AIME24: Competition-level mathematical reasoning tasks requiring extended chains of thought.
  • HumanEval: Standard Python code generation proficiency.
  • IFEval: Strict instruction-following and formatting constraints.
  • Line-Retrieval & Needle-in-a-Haystack (NiaH): Long-context information retrieval stress tests.

Key Insights and Ideas

  • Outliers Dominate Degradation: A tiny fraction of the largest quantization errors (the top 5%) is responsible for the vast majority of end-to-end model degradation (measured by KL-divergence), even though the remaining 95% of smaller errors actually contains more total Mean Squared Error (MSE).
Figure 3: Replacing the 5% worst out- lier errors with high precision values im- proves end-to-end KL-divergence more than fixing the other 95%, even though more MSE lies there (see Fig. 9).
  • Magnitude vs. Direction: By mathematically decomposing the quantization error, the authors discovered that these critical outlier errors are overwhelmingly caused by incorrect token magnitudes (scaling) rather than directional distortion.
  • The Synergy of Rotation and Normalization: While Hadamard rotation is highly effective for weight quantization, it fails for KV-caches on its own because it doesn't address token-wise scaling. Combining it with dual-scaling variance normalization tightly constrains token scales to the diagonal, eliminating extreme magnitude errors.
Figure 1: (a) What fraction of the top k% largest errors is due to magnitude rather than direction (decomposed as in Eq. 3). Large quantization errors in K are mostly due to incorrect token scaling. To fix outlier errors, the token magnitude needs to be better preserved. (b) Difference of per-token magnitude of quantized K to full-precision K matrix on Qwen3-4B under different 2-bit quantization methods (KIVI [19], HK: Hadamard rotated K, VarN(K): Variance-Normalized K, and KVarN: our proposed method). Variance normalization prevents the rounding process from scaling the norm of worst-case tokens; the effect synergizes with scale-error reduction by Hadamard rotation. KVarN effectively suppresses magnitude errors, which leads to better end-to-end test-time scaling.

Key Results

  • Near-Lossless 2-Bit Quantization: KVarN achieves an average of 2.3 bits per element (including metadata storage) while matching or nearly matching FP16 performance. On the grueling MATH500 benchmark with Phi-4-14B, KVarN scored 84.8%—virtually identical to the unquantized FP16 baseline (84.9%), whereas the popular KIVI baseline plummeted to 74.4%.
  • Robust Long-Context Retrieval: On the Line-Retrieval task, KVarN maintains high accuracy across long context windows (up to 600 lines) where other methods break down due to error accumulation.
  • Negligible Runtime Overhead: Implemented as a custom Triton kernel within the vLLM serving framework, KVarN's online variance normalization adds a mere 0.18% latency overhead during token generation, making it highly practical for production deployment.

Limitations and Future Work

  • Architecture Constraints: KVarN is explicitly designed for traditional attention-based KV-caches. It is not applicable to alternative architectures that eliminate the KV-cache entirely, such as State Space Models (e.g., Mamba).
  • Interaction with MLA: It remains unverified how this quantization approach interacts with models utilizing train-time KV compression, such as the Multi-Head Latent Attention (MLA) framework popular in DeepSeek architectures.
  • Ecosystem Support: Although the authors open-sourced their vLLM implementation, widespread adoption is currently bottlenecked by the fact that major public serving frameworks do not yet natively support 2-bit KV-cache layouts out of the box.

Summary updated

BibTeX
@misc{muller2026kvarn,
  author = {Lorenz K. Muller and Philippe Bich and Chiara Boretti and Hyun-Min Chang and Jiawei Zhuang and Lukas Cavigelli},
  title = {{KVarN: Variance-Normalized KV-Cache Quantization Mitigates Error Accumulation in Reasoning Tasks}},
  year = {2026},
  eprint = {2606.03458},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.03458},
}
Figure