Skip to content

How to Compress KV Cache in RL Post-Training? Shadow Mask Distillation for Memory-Efficient Alignment

May 2026 · arXiv.org · Vol abs/2605.06850 · 2 citations · 34 references
Computer Science

TL;DR

This work states that the sampler generates responses under a sparse context, whereas the learner updates parameters using the full, dense context, whereas the sampler updates parameters using the full, dense context of the RL framework.

Abstract

Reinforcement Learning (RL) has emerged as a crucial paradigm for unlocking the advanced reasoning capabilities of Large Language Models (LLMs), encompassing frameworks like RLHF and RLAIF. Regardless of the specific optimization algorithm (e.g., PPO, GRPO, or Online DPO), online RL inherently requires an exploratory trajectory generation (rollout) phase. However, for long-context reasoning tasks, this rollout phase imposes a severe ``memory wall''due to the exorbitant Key-Value (KV) cache footprint. While applying KV cache compression during rollouts mitigates this memory overhead, it induces a critical off-policy bias. Although modern KV compression is often nearly lossless during standard inference, even minuscule approximation errors are drastically amplified by the inherent instability of RL optimization. Specifically, the sampler generates responses under a sparse context, whereas the learner updates parameters using the full, dense context. Existing statistical solutions, such as importance reweighting, struggle to correct this magnified bias, suffering from high gradient variance and severe sample inefficiency.

View source

Similar papers

#artificial intelligence Preprint Sep 2026

KV-Kaizen: Learning Context-Adaptive Cache Compression Choices

This work learns a selector that is able to produce, based on context, a per-layer cache configuration towards an overall compression budget, and achieves the Pareto frontier of accuracy against cache size, against learning-free and post-hoc baselines.

João Monteiro, Louis Béthune, A. Filippova et al. · 1 citation
#artificial intelligence Preprint Oct 2026

NgramRL: Accelerating RL Post-Training for Structured Generation via Rollout-Aware N-gram Speculative Decoding

Reinforcement learning (RL) post-training improves the reasoning capabilities of large language models, but its cost is dominated by autoregressive rollout generation, which can exceed 70% of training time. Existing speculative-decoding methods are poorly suited to this setting: model-based drafters consume scarce GPU...

N. Pandey, Jangseon Park, Jason Kong et al. · 0 citations
#artificial intelligence Preprint Sep 2026

ARM: Attention with Routed-Memory for Learnable Sparse Control

Attention with Routed Memory is proposed a novel KV caching structure that introduces a fully differentiable, fixed-size memory system organized as a hierarchical router that achieves superior performance and efficiency compared to fixed KV-caching approaches, while remaining efficient and scalable in terms of both mem...

Qiu-Hao Zeng, Jerry M. Huang, Peng Lu et al. · 0 citations
#machine learning Preprint Oct 2026

Latent Compaction with Test-Time Training

Long contexts enlarge key--value (KV) caches, increasing memory use and attention costs during generation. Compressing these caches must preserve information for unseen questions. We introduce **Latent Compaction**, which learns a compact document-specific cache through test-time training. We initialize cache entries u...

Yingfa Chen, Xing-Yu Shen, Chao-Jun Xiao et al. · 1 citation · ⚡1
#machine learning Preprint Sep 2026

Cartridges++: KV Cache Compression without Off-Context Derailment

This study investigates the crucial deployment question of whether Cartridges and other CKVs can handle off-context queries, and proposes Cartridges++, simple modifications to cartridges that retain off-context abilities at small or negligible cost.

Sonia Laguna, João Monteiro, Marco Cuturi et al. · 1 citation
#artificial intelligence Open access Sep 2026

FlexEE: Self-Speculative and KV-Compatible Early Exiting for Offloading-Aware LLM Inference

Large language model (LLM) inference is often constrained by both computation and memory, especially in offloading-based deployments where model weights are transferred across memory hierarchies during autoregressive decoding. In this setting, reducing the number of executed layers can lower per-token latency while als...

Qi-Hu Xie, Zi-Wei Li, Yi Kang · 0 citations

Related blog posts

MIT News · Artificial Intelligence Sep 29, 2026

Who we become when we talk to machines

Professor Sherry Turkle’s new book, “Artificial Intimacy,” offers a withering critique of chatbots and the antisocial dynamics she believes they encourage.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.