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

MoEZip: Routing-Aware KV Cache Compression for Sparse Mixture-of-Experts LLMs

Minsang Kim, Seung Jun BaekNeurIPS 2026

TL;DR

Compressing a language model's memory (KV cache) to handle long contexts works surprisingly well for standard "dense" models, yet often causes sparse Mixture-of-Experts (MoE) models to fall off a cliff. Why? Throwing away cached tokens subtly alters internal representations, tricking the MoE's traffic cops (routers) into sending tokens to the wrong sub-networks. MoEZip solves this by mathematically identifying which context tokens keep the routers stable and locking them in as "anchors," boosting accuracy by up to 4.9$\times$ under extreme 90% memory compression.

What Problem Does This Paper Address?

Sparse Mixture-of-Experts (MoE) models scale efficiently by activating only a tiny fraction of specialized sub-networks ("experts") per token. However, when processing massive documents or agent histories, MoEs hit the exact same memory wall as dense transformers: the KV cache—the model’s working memory of past token representations—grows linearly with sequence length.

Normally, we shrink this footprint via KV cache eviction, keeping tokens with high attention scores and tossing the rest. While dense models shrug off aggressive pruning, MoE models suffer catastrophic quality drops. In an MoE, each layer’s "router" inspects a token's post-attention representation to decide which experts to wake up. Evicting KV entries perturbs that attention output, causing router perturbation: the router flips its decision and activates the wrong experts during generation. Standard compression methods look only at context saliency, remaining completely blind to this MoE-specific failure mode.

Figure 1: Router instability is associated with answer-quality degradation. As KV compression becomes more aggressive, ex- pert selection changes more often, and per- formance drops accordingly.

Methods

Ideally, we would protect the KV entries that keep routing stable while generating the answer—except we haven't generated the answer yet when we compress the cache. The authors bridge this gap with MoEZip, a lightweight plug-in layer that pairs with existing dense scorers (like KVZip or SnapKV):

  1. Measuring Routing Fragility: Using the prompt's instruction tokens as a stand-in for future answer tokens, MoEZip measures how close a router is to flipping its decision. It computes the trace of the Fisher information matrix of the router’s probability distribution (derived neatly in $O(E)$ time for both standard softmax and independent sigmoid routers). Intuitively, this captures how sensitive the router's output is to small random nudges in its input logits.
  2. Propagating to Context Anchors: MoEZip multiplies each instruction token's fragility score by its max-pooled attention weight back to the context tokens. Context positions heavily attended to by "fragile" instruction tokens receive high scores and are reserved as routing-aware anchors.
  3. Complementary Budgeting: Rather than guessing a fixed split, MoEZip calculates overall sample fragility to adaptively allocate a slice of the memory budget to anchors, letting a standard base scorer fill the remaining slots for general context meaning. A query-agnostic variant (MoEZip-Recon) even computes this using a fixed reconstruction prompt so compressed caches can be reused across different user queries.
Figure 2: Overview of MoEZip. MoEZip estimates routing fragility from instruction-token router states, transfers it to context positions via instruction-to-context attention, and reserves the top-scoring positions as routing-aware anchors. The base scorer fills the remaining budget, and thus the final cache size and decoding procedure remain unchanged.

Datasets

Because MoEZip operates strictly at inference time, no training datasets are used. The authors evaluate across three established long-context benchmarks (4K to 32K context lengths), introducing no new datasets:

  • LongBench (12 tasks spanning multi-hop QA, summarization, retrieval, few-shot learning, and code completion).
  • RULER (13 synthetic retrieval and reasoning tasks).
  • Needle in a Haystack (NIAH) (testing retrieval across varying document depths and lengths).

Key Insights and Ideas

  • Instruction tokens are a crystal ball for answer routing: As compression gets more aggressive, the rate at which experts "flip" on instruction tokens tracks—and converges with—the flip rate on future answer tokens. Because instruction tokens are available before eviction, they act as an early warning system for generation failure.
  • Routing flips are a causal culprit, not just a symptom: In a clever intervention at a 10% keep ratio, the authors froze a poorly compressed KVZip cache and only overwrote the instruction-token expert choices with ground-truth full-cache routing. Without restoring a single evicted memory token, LongBench scores jumped by +10.2 points (versus just +1.3 for MoEZip, which had already preserved the right routing).
  • Peak attention beats average attention: When linking fragile routers back to context tokens across attention heads, max-pooling noticeably outperforms mean-pooling—catching a single specialized head screaming about a vital token matters more than the crowd's average.

Key Results

Tested across Qwen3-30B-A3B, Qwen3-235B-A22B (softmax routers), and GLM-4.7-Flash (sigmoid routers), MoEZip shines brightest when memory is tightest:

  • Extreme Compression Gains: Retaining just 10% of the KV cache on Qwen3-30B, MoEZip beats the state-of-the-art KVZip baseline by +24 points on LongBench (2.3$\times$ higher score) and +20 points on RULER (4.9$\times$ higher).
  • Scale & Architecture Generalization: On the massive Qwen3-235B model at a 10% budget, LongBench macro scores jump from 27.6 (KVZip) to 44.7. Strong gains also hold on sigmoid-routed GLM-4.7-Flash and when bolted onto SnapKV.
  • Reusable Caches & Low Overhead: At a 10% keep ratio, the query-agnostic MoEZip-Recon scores 41.95 on LongBench (versus KVZip's 19.51), capturing 88% of full MoEZip's gains while keeping the cache reusable across queries. Selection adds ~0.86–0.88 seconds of wall-clock overhead.
Figure 5: Average performance on 13 RULER tasks across different KV cache ratios.

Limitations and Future Work

  • White-box requirement: MoEZip needs internal access to router logits and instruction-to-context attention weights during prefill. It cannot be used in black-box API environments or rigid inference engines that fuse away these intermediate states without exposing them.
  • Future directions: The authors view routing fragility as an underexplored principle and suggest extending routing-aware compression to broader sparse model architectures beyond standard MoE layers.

Summary updated

BibTeX
@inproceedings{kim2026moezip,
  author = {Minsang Kim and Seung Jun Baek},
  title = {{MoEZip: Routing-Aware KV Cache Compression for Sparse Mixture-of-Experts LLMs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=R8hTibgKBX},
}
Figure