LGAIOct 5, 2025

PatternKV: Flattening KV Representation Expands Quantization Headroom

arXiv:2510.05176v1h-index: 11
Originality Highly original
AI Analysis

This work addresses the inference bottleneck in large language models for applications requiring long contexts and test-time scaling, representing a novel method for a known bottleneck.

The paper tackles the memory and bandwidth bottleneck of KV cache in autoregressive LLMs during inference by proposing PatternKV, a pattern-aligned residual quantization scheme that flattens the KV distribution to improve low-bit quantization fidelity, resulting in consistent 2-bit gains, a 0.08% average 4-bit drop relative to FP16, 10% average test-time scaling accuracy improvement, and 1.4x throughput increase with 1.25x larger batch support.

KV cache in autoregressive LLMs eliminates redundant recomputation but has emerged as the dominant memory and bandwidth bottleneck during inference, notably with long contexts and test-time scaling. KV quantization is a key lever for reducing cache cost, but accuracy drops sharply as the native KV distribution lacks flatness and thus maintains a wide quantization range. Prior work focuses on isolating outliers, which caps their error but fails to flatten the overall distribution, leaving performance fragile under low-bit settings. In this work, we show that the K cache maintains a stable structure that evolves gradually with context, while the V cache carries latent semantic regularities. Building on these insights, we propose PatternKV, a pattern-aligned residual quantization scheme. It mines representative pattern vectors online, aligns each KV vector to its nearest pattern, and quantizes only the residual. This reshaping of the KV distribution flattens the quantization target and narrows its range, thereby improving the fidelity of low-bit KV quantization. Across long-context and test-time scaling settings on multiple backbones, PatternKV delivers consistent 2-bit gains, with a 0.08% average 4-bit drop relative to FP16, improves test-time scaling accuracy by 10% on average, and raises throughput by 1.4x while supporting 1.25x larger batches.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes