MoEZip: Routing-Aware KV Cache Compression for Sparse Mixture-of-Experts LLMs
Organizations: Korea University · SK Telecom
Abstract
Mixture-of-Experts (MoE) language models scale model capacity efficiently by activating a small subset of parameters per token. However, in long-context inference, memory remains a major bottleneck because the KV cache grows linearly with sequence length. Existing KV cache compression methods reduce this cost for dense transformers, but overlook a problem specific to MoE: KV eviction can change which experts are selected during answer generation, degrading the generation quality. We propose MoEZip, a routing-aware KV cache compression for sparse MoE language models. To estimate the sensitivity of expert routing to perturbation, we propose a novel metric based on the Fisher information matrix of routing distributions. MoEZip combines this metric with attention weights for routing-aware scoring of contexts. Finally, we compose a complementary scoring system that combines eviction methods for dense and sparse-MoE architectures. Experiments show that MoEZip achieves robust performance under aggressive cache compression on various benchmarks. At a KV retention ratio of 10%, MoEZip improves over the SoTA baseline by +24 and +20 points on average on LongBench and RULER, corresponding to 2.3 and 4.9 higher scores, respectively.
Figures & tables
| Method | Reusable cache | Keep 0.2 | Keep 0.1 |
|---|---|---|---|
| KVZip | Yes | 29.25 | 19.51 |
| MoEZip-Recon | Yes | 45.14 | 41.95 |
| MoEZip | No | 49.59 | 44.89 |
| Metric | Retained set | Full KV | Compressed | Oracle routing | |
|---|---|---|---|---|---|
| NLL | KVZip | 4.22 | 5.67 | 4.97 | |
| MoEZip | 4.22 | 4.79 | 4.52 | ||
| LongBench | KVZip | 53.7 | 19.5 | 29.7 | |
| MoEZip | 53.7 | 44.9 | 46.2 |
| Corrected sites | Answer NLL | Normalized recovery |
|---|---|---|
| 0% | 5.670 | 0.0% |
| 25% | 23.8% | |
| 50% | 56.7% | |
| 75% | 80.5% | |
| 100% | 4.970 | 100.0% |
Appendix figures & tables25 assets
Supplementary material from the paper’s appendix.
Appendix
| Task | Q1 | Q2 | Q3 | Q4 | Q5 | Q5/Q1 |
|---|---|---|---|---|---|---|
| MuSiQue | .103 | .144 | .223 | .275 | .429 | 4.17 |
| 2WikiMQA | .085 | .127 | .168 | .210 | .340 | 4.00 |
| PsgRetrieval | .142 | .207 | .265 | .369 | .503 | 3.54 |
| RepoBench-P | .185 | .302 | .375 | .475 | .609 | 3.29 |
| MultiFieldQA | .217 | .337 | .455 | .556 | .704 | 3.24 |
| Qasper | .230 | .355 | .472 | .575 | .723 | 3.14 |
| Dataset | Keep ratio | Spearman | Pearson |
|---|---|---|---|
| HotpotQA | 0.7 | 0.26 | 0.28 |
| HotpotQA | 0.5 | 0.31 | 0.39 |
| HotpotQA | 0.3 | 0.50 | 0.54 |
| HotpotQA | 0.1 | 0.70 | 0.68 |
| Qasper | 0.7 | 0.41 | 0.40 |
| Qasper | 0.5 | 0.54 | 0.52 |
| Dataset | |||||
|---|---|---|---|---|---|
| Keep 0.1 | Keep 0.3 | Keep 0.1 | Keep 0.3 | ||
| QMSUM | |||||
| MultiFieldQA | |||||
| Task | KVZip | Instruction | Answer oracle | Recovery | Jaccard |
|---|---|---|---|---|---|
| PsgRetrieval | 3.5 | 63.3 | 65.1 | .97 | .96 |
| HotpotQA | 22.8 | 48.6 | 52.3 | .87 | .88 |
| Qasper | 8.6 | 18.3 | 31.2 | .43 | .71 |
| QMSUM | 16.8 | 17.5 | 20.3 | .20 | .64 |
| Macro / aggregate | 12.9 | 36.9 | 42.2 | .82 | .80 |
| Task | Keep | KVZip | Instruction | Oracle | Recovery | Jaccard |
|---|---|---|---|---|---|---|
| NIAH-single-2 | .2 | 15.4 | 100.0 | 100.0 | 1.00 | .94 |
| NIAH-multikey-1 | .2 | 10.6 | 86.0 | 94.0 | .90 | .76 |
| NIAH-multiquery | .2 | 10.0 | 77.0 | 77.0 | 1.00 | .81 |
| NIAH-single-2 | .1 | 10.2 | 72.0 | 88.0 | .79 | .52 |
| NIAH-multikey-1 | .1 | 10.4 | 44.0 | 60.0 | .68 | .44 |
| Method | Avg. Scoring Time (s) | Additional Time (s) |
|---|---|---|
| KVZip (base) | 9.36 | - |
| MoEZip (+Fisher score) | 10.24 | 0.88 |
| Comparison | Keep 0.1 | Keep 0.3 | Keep 0.5 |
|---|---|---|---|
| MoEZip KVZip | [ , ] | [ , ] | [ , ] |
| MoEZip SnapKV | [ , ] | [ , ] | [ , ] |
| MoEZip PyramidKV | [ , ] | [ , ] | [ , ] |
| Comparison | Keep 0.1 | Keep 0.3 | Keep 0.5 |
|---|---|---|---|
| MoEZip KVZip | [ , ] | [ , ] | [ , ] |
| MoEZip SnapKV | [ , ] | [ , ] | [ , ] |
| MoEZip PyramidKV | [ , ] | [ , ] | [ , ] |
| Method | Reusable cache | Keep 0.2 | Keep 0.1 |
|---|---|---|---|
| KVZip | Yes | 29.25 | 19.51 |
| MoEZip-Recon | Yes | 45.14 | 41.95 |
| MoEZip | No | 49.59 | 44.89 |
| Evaluation | Global | Per-layer | Per-GQA |
|---|---|---|---|
| LongBench 12-task macro | 44.9 | 36.3 | 39.3 |
| Gap relative to global | — | ||
| Tasks won by global | — | 12/12 | 11/12 |
| Task | Overlap | New / 128 |
|---|---|---|
| RULER QA-1 | 15% | 108 |
| NIAH-single-2 | 16% | 108 |
| NIAH-multikey-1 | 16% | 107 |
| NIAH-multiquery | 16% | 107 |
| LCC | 17% | 106 |
| TREC | 20% | 103 |
| Method | HotpotQA | PsgRet | Qasper | QMSUM | Macro |
|---|---|---|---|---|---|
| Uncompressed | 57.0 | 100.0 | 46.9 | 23.6 | 56.9 |
| KVZip | 35.2 | 4.0 | 10.9 | 16.8 | 16.7 |
| Attention-only | 31.4 | 38.8 | 11.0 | 15.0 | 24.1 |
| MoEZip | 45.6 | 61.5 | 17.5 | 17.3 | 35.5 |
| Task | KVZip | MoEZip | |
|---|---|---|---|
| PsgRet | 4.0 | 61.5 | |
| TREC | 16.0 | 50.0 | |
| LCC | 28.8 | 55.9 | |
| MultiFieldQA | 20.7 | 35.6 | |
| TriviaQA | 75.5 | 86.9 | |
| HotpotQA | 35.2 | 45.6 |
| Diagnostic | Qwen3-30B | Qwen3-235B |
|---|---|---|
| Fisher Q5/Q1 flip-rate ratio | ||
| Anchor Jaccard: HotpotQA | .88 | .92 |
| Anchor Jaccard: PsgRetrieval | .96 | .97 |
| Method / quantity | BF16 | INT8 | Change |
| KVZip | 12.8 | 12.5 | |
| MoEZip | 26.4 | 25.8 | |
| MoEZip KVZip |
| Conditional probability | Value |
|---|---|
| .448 | |
| .270 |
KV-Cache Compression
Key-value cache compression reduces the memory and bandwidth needed to retain attention states during long-context inference.
See all 269 papers