Papers
Topics
Authors
Recent
Search
2000 character limit reached

QK-Normed MLA: QK normalization without full key caching

Published 15 Jun 2026 in cs.LG and cs.CL | (2606.16310v1)

Abstract: Query-key (QK) normalization stabilizes attention by controlling the scale of queries and keys before the dot product, but is not immediately compatible with Multi-head Latent Attention (MLA). MLA achieves efficient decoding by caching low-dimensional latent states instead of full keys, whereas post-projection QK RMSNorm appears to require the fully projected key for every cached token. We show this apparent incompatibility is an implementation artifact, not an architectural constraint. RMSNorm decomposes into a static affine weight and a dynamic scalar RMS statistic. The static key-side weight can be absorbed into the MLA query-side projection; the dynamic key statistic reduces to one inverse-RMS scalar per token and KV group. The resulting formulation is exactly equivalent to explicit post-projection QK RMSNorm in exact arithmetic and preserves MLA's latent decode path. In our 400M runs trained for up to 100B tokens, QK-Normed MLA achieves lower training loss and better downstream accuracy than QK clipping, while H800 decode benchmarks show less than 2% latency overhead up to 256k context. These results make QK normalization a practical stabilization option for MLA models without requiring full-key caching.

Summary

  • The paper introduces a method that integrates post-up-projection QK RMSNorm into MLA, effectively absorbing static affine weights to stabilize training.
  • It demonstrates that caching per-token, per-KV-group scalar RMS statistics preserves cache efficiency with less than 2% memory overhead.
  • Experimental results show lower training loss and improved benchmarks compared to QK-Clip, achieving negligible decode latency overhead.

QK-Normed MLA: Enabling Post-Up-Projection QK Normalization in MLA Without Full Key Caching

Motivation and Context

The paper presents QK-Normed MLA, a method for integrating post-up-projection Query-Key (QK) normalization, specifically RMSNorm, into the Multi-head Latent Attention (MLA) mechanism without requiring full key caching. Modern transformer-based LLMs face dual pressures: maintaining the efficiency of KV-cache during decoding and ensuring training stability by controlling attention-logit scale. MLA achieves cache efficiency by storing low-dimensional latent states rather than full keys, while QK normalization stabilizes training. However, standard QK RMSNorm—requiring fully projected keys—appears incompatible with MLA’s latent caching.

This work addresses the compatibility gap by demonstrating that QK normalization can be algebraically and computationally reconciled with MLA’s cache design. The static affine weights in RMSNorm can be absorbed into MLA’s query-side projection, and the dynamic key RMS statistics reduce to a per-token, per-KV-group scalar, greatly minimizing cache size overhead.

Methodology

RMSNorm Integration in MLA

The core technical contribution is an exact, implementation-oriented formulation for post-up-projection QK RMSNorm within MLA. RMSNorm decomposes into static affine weights and dynamic RMS statistics. The static component is handled by embedding it in the query-side latent space projection, while the dynamic component (inverse RMS) is cached as one scalar per token and KV group. This avoids materializing full keys, preserving MLA’s memory advantage.

The paper formally derives how logits computed under this absorbed formulation are algebraically identical to the explicit QK RMSNorm path, up to floating-point roundoff. The decode and cache layout remains dominated by the latent state, with only minor additions—a scalar RMS cache that constitutes less than 2% of the latent cache overhead in benchmark configurations.

Blockwise vs. Unified QK RMSNorm

The implementation uses blockwise normalization—separately normalizing the content and RoPE (rotary position embedding) components of the query and key. Unified normalization, which normalizes the concatenated vector, introduces data dependencies and synchronization points that degrade kernel efficiency and complicate MLA’s fused compute pipeline. Blockwise normalization preserves the natural separation between latent content and materialized positional components, crucial for high-performance kernel fusion.

Experimental Results

Training Loss and Stability

On 400M-parameter MLA models trained for 100B tokens, the QK-Normed MLA variant consistently yielded lower training loss than QK-Clip, a baseline that clips QK attention logits post-dot-product. The loss gap persists throughout training, confirming that QK normalization’s scale control is persistent and robust. Diagnostic metrics show that QK-Normed MLA maintains max-logit statistics within a lower range, and gradient norm profiles are more stable, with fewer large spikes relative to QK-Clip.

Downstream Evaluation

QK-Normed MLA outperforms QK-Clip in downstream task accuracy on seven out of eight benchmarks, increasing average accuracy from 44.75 to 46.33 and lowering LAMBADA perplexity from 16.28 to 14.18. These improvements validate the benefit of normalization as a mechanism for alleviating attention-induced instabilities.

Decode-Time Overhead

Benchmarks on H800 GPUs demonstrate less than 2% latency overhead for QK-Normed MLA across context sizes up to 256k tokens. The scalar cache represents only a minor increase in memory footprint (≈1.5%). The method does not compromise MLA’s decode efficiency, confirming that the absorbed formulation and score-stage scaling are practical and negligible in cost.

Stress Testing

Under high learning rate (2×10−22 \times 10^{-2}), QK-Normed MLA remained stable while QK-Clip exhibited gradient NaNs and divergent loss. This stress test underscores the superior stability properties of preemptive normalization compared to post-hoc clipping.

Theoretical and Practical Implications

The paper demonstrates that QK RMSNorm can be algebraically merged with MLA’s cache-efficient decoding. This enables deployment of high-stability normalization recipes in highly memory-constrained LLM serving configurations, without significant overhead. It provides a rigorous mechanism-level framework for logit-scale control, mitigating catastrophic loss spikes without relying on reactive clipping.

System-level implications include:

  • Preservation of latent cache dominance in MLA, enabling efficient long-context decoding.
  • Compatibility with fused, pipelined attention kernels due to blockwise normalization.
  • Minimal additional synchronization or memory traffic required.

Theoretically, the results substantiate that QK normalization is not merely a training heuristic, but an algebraically exact transformation compatible with efficient attention architectures. This may catalyze further integration of normalization and stabilization mechanisms in future transformer designs, particularly as model sizes and context lengths scale.

Limitations and Future Directions

Empirical validation is restricted to 400M-parameter models trained for 100B tokens. Extrapolation to frontier-scale models is warranted; the persistence of training loss and downstream advantages should be validated at billion-parameter scale. Although the algebraic transformation is exact, practical speed depends critically on kernel integration. Efficient fusion of scalar factors in the attention path remains essential.

Future developments may explore:

  • Unified normalization schemes compatible with fused kernel architectures.
  • Extension to additional normalization forms (e.g., LayerNorm, GroupNorm) within latent attention mechanisms.
  • Application to broader KV-cache-efficient architectures and further reductions in memory requirements.

Conclusion

QK-Normed MLA provides an exact, cache-efficient mechanism for post-up-projection QK normalization in MLA architectures. By absorbing static RMSNorm weights in the query-side projection and caching only per-token, per-KV-group key RMS scalars, it enables practical training stabilization without sacrificing decode efficiency. Empirical results confirm lower training loss, improved downstream accuracy, and negligible overhead relative to QK clipping alternatives. This establishes QK normalization as a practical, implementation-compatible option for MLA models and lays the groundwork for further research on normalization-centric training and large-scale memory-efficient attention mechanisms.

Paper: "QK-Normed MLA: QK normalization without full key caching" (2606.16310)

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 2 tweets with 15 likes about this paper.