Compression Does Not End at Selection: Post-Selection Positional Geometry for Sparse KV Caches
Organizations: National Key Laboratory of Parallel and Distributed Computing College of Computer Science and Technology National University of Defense Technology, Changsha, China.
Abstract
Sparse KV compression reduces long-context inference costs by retaining selected historical states, yet these states typically keep their coordinates from the full history. Under Rotary Position Embedding (RoPE), gaps left by evicted tokens continue to affect query-key matching, potentially limiting the use of retained evidence. We study post-selection positional geometry on a fixed selector-produced cache, examining how positional organization affects the use of retained information and which coordinate and continuation rules improve answer quality. To reorganize this geometry, we propose RoPERelay, which assigns compact, order-preserving RoPE coordinates, relocates cached key phases through inverse rotation and re-rotation, and synchronizes the current query and subsequent generation. It reuses existing K/V without renewed selection, historical re-prefill, or additional cache budget. Across 36 comparisons spanning two models, six sparse selectors, and three long-term memory tasks, RoPERelay improves answer quality in 32 cases. For Llama-3.1-8B-Instruct with BM25 on LongMemEval-S, accuracy increases from 23.6% to 35.4%. Measured complete-request time overhead is approximately 1%-3% in the evaluated configurations. These findings establish positional organization as a distinct optimization dimension for sparse KV caches after content selection.
Figures & tables
| Model | Method | LongMemEval-S | LongMTBench+ | PersonaMem-128K |
|---|---|---|---|---|
| Llama-3.1-8B-Instruct | FullKV | 27.40 | 36.36 | 42.00 |
| BM25 | 23.60 35.40 | 38.64 44.32 | 45.00 47.00 | |
| SnapKV | 13.80 14.60 | 28.41 22.73 | 44.00 44.50 | |
| PyramidKV | 23.80 26.40 | 27.27 30.68 | 43.00 44.00 | |
| H2O | 17.60 19.20 | 25.00 28.41 | 38.50 46.00 | |
| CaM | 11.80 14.60 | 17.05 15.91 | 30.50 42.50 |
| Task | Original | RoPERelay |
|---|---|---|
| Long dialogue QA | 16.00 | 20.00 |
| Long-book choice | 62.00 | 68.00 |
| Long-book QA | 26.07 | 31.23 |
| Budget | BM25 | SnapKV | PyramidKV |
|---|---|---|---|
| B2048 | +1.34% | +1.39% | +1.92% |
| B8192 | +2.43% | +1.92% | +2.70% |
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Selector | Main parameters |
|---|---|
| BM25 | , , protect the first and last four tokens |
| SnapKV | Observation window 8, pooling kernel 7 |
| PyramidKV | Observation window 8, pooling kernel 5, recent window 32, |
| ChunkKV | Observation window 64, pooling kernel 5, chunk length 20 |
| H2O | Recent window 64, score-query chunk size 16 |
| CaM | Observation window 8, merge start ratio 0.1, seed 20260930 |
| Question type | O | T | ||
|---|---|---|---|---|
| User facts | 70 | 14.29 | 28.57 | +14.29 |
| Assistant facts | 56 | 21.43 | 23.21 | +1.79 |
| Preferences | 30 | 0.00 | 0.00 | +0.00 |
| Cross-session | 133 | 6.77 | 9.77 | +3.01 |
| Knowledge updates | 78 | 33.33 | 41.03 | +7.69 |
| Temporal reasoning | 133 | 10.53 | 15.79 | +5.26 |
| LME500 | Persona200 | ||
|---|---|---|---|
| Method | F1 | Judge | Accuracy |
| BM25 + RoPERelay | 10.47 | 35.40 | 47.00 |
| PyramidKV + RoPERelay | 10.06 | 26.40 | 44.00 |
| ChunkKV + RoPERelay | 10.24 | 27.60 | 47.50 |
| FINCH | 9.24 | 26.20 | 42.00 |
| Model | Selector | LongMemEval-S | LongMTBench+ | PersonaMem-128K |
|---|---|---|---|---|
| Llama-3.1 8B-Instruct | BM25 | |||
| SnapKV | ||||
| PyramidKV | ||||
| H2O | ||||
| CaM | ||||
| ChunkKV |
| (a) Accuracy (%) | |||||
|---|---|---|---|---|---|
| Selector | Model | O | R | T | |
| BM25 | Llama | 24.0 | 38.5 | 38.5 | 0.0 |
| BM25 | Qwen | 21.0 | 36.0 | 36.0 | 0.0 |
| PyramidKV | Llama | 21.5 | 21.5 | 22.5 | +1.0 |
| PyramidKV | Qwen | 13.0 | 10.5 | 20.5 | +10.0 |
| (b) Token-F1 (%) | |||||
| Metric | FullKV | Original | RoPERelay |
|---|---|---|---|
| 24 | 24 | 24 | |
| Quality | 0.8834 | 0.7279 | 0.7324 |
| Factuality | 0.9583 | 0.7188 | 0.7188 |
| Coverage | 0.9375 | 0.7500 | 0.7604 |
| Tokens | 737.5 | 659.7 | 680.0 |
| Rep4 | 0.1789 | 0.2005 | 0.2542 |
| Source | Original | RoPERelay | ||
|---|---|---|---|---|
| Blogs | 4 | 0.6667 | 0.7708 | |
| Reports | 6 | 0.7778 | 0.8125 | |
| News | 4 | 0.7917 | 0.7812 | |
| Long dialogues | 4 | 0.7321 | 0.6964 | |
| Academic articles | 6 | 0.6736 | 0.6181 |
| Selector | Qwen | gpt-oss | gpt-oss O T |
|---|---|---|---|
| BM25 | +8.60 | +10.20 | 28.00 38.20 |
| SnapKV | +6.20 | +1.80 | 18.60 20.40 |
| PyramidKV | +5.80 | +2.20 | 18.00 20.20 |
| H2O | +4.60 | +4.00 | 11.20 15.20 |
| CaM | +5.00 | +0.20 | 9.60 9.80 |
| ChunkKV | +9.40 | +6.40 | 20.00 26.40 |
| Setting. BM25, 1% retention, 111,992 historical tokens and 1,098 retained states. The selected cache includes the 27th parameter: “Sound effects (e.g., ambient, diegetic, non-diegetic, etc.).” | |
| Question. “I remember you provided a list of 100 prompt parameters that I can specify to influence your output. Can you remind me what was the 27th parameter on that list?” | |
| Reference. “The 27th parameter was ‘Sound effects (e.g., ambient, diegetic, non-diegetic, etc.)’.” | |
| Original | RoPERelay |
| “I don’t have the ability to recall previous conversations or maintain a memory of specific lists. …” | “The 27th parameter on the list of 100 prompt parameters was ‘ Sound effects (e.g., ambient, diegetic, non-diegetic, etc.)’.” |
| Observation. The supporting fact is already retained. Original treats it as unavailable, while RoPERelay answers from the same cache without renewed retrieval or additional budget. | |
KV-Cache Management
Key-value (KV) cache management reduces and coordinates Transformer attention state to make long-context inference faster and more memory-efficient.
See all 201 papers