EarlySelectKV: Anticipatory KV Selection via Cross-Layer Query Proxies

Yuhao Liu, Yuehao Li, Linghe Zhang, Gaobin Huang, Junran Li +2 more
11/1/2026
cs.CL

Official code: sea-with-sakura/EarlySelectKV (5 stars, Python, Apache-2.0, last commit 2026-08-30).

Abstract

Query-conditioned sparse KV selection reduces long-context inference cost by attending to a subset of historical KV entries at each decoding step. Existing selectors must wait for the target-layer query before scoring candidates and generating indices, placing routing on the immediate pre-attention path.

Show full abstract

We introduce EarlySelectKV, a training-free transformation that uses proxy queries from earlier hidden states to precompute selected KV indices while retaining the real target-layer query for final attention. Tests with RocketKV, Quest, and Loki show no consistent pattern of quality degradation across the evaluated settings. In the primary RocketKV evaluation, ES-RocketKV differs by +0.018 points on LongBench, approximately -0.01 points on RULER, and +0.25 percentage points on representative NIAH/Passkey settings. In a TensorRT-LLM deployment with CPU-offloaded routing, ES-RocketKV improves end-to-end output throughput by up to 12.4% and reduces GPU-resident memory by 11.1% of the combined KV/K-summary pool. This makes routing timing an explicit optimization target alongside KV subset selection in sparse long-context decoding. Code is available at https://github.com/sea-with-sakura/EarlySelectKV.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Official implementation of EarlySelectKV, a training-free framework for anticipatory KV selection via cross-layer query proxies. Accepted to EMNLP 2026 Main Conference.

50Python, ShellAug 27, 20263 months agoApache-2.0

Similar Papers

Cite this paper

@article{liu2026earlyselectkv,
  title  = {EarlySelectKV: Anticipatory KV Selection via Cross-Layer Query Proxies},
  author = {Yuhao Liu and Yuehao Li and Linghe Zhang and Gaobin Huang and Junran Li and Hongchang Wang and Haifang Jian},
  year   = {2026},
  eprint = {2611.01715},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2611.01715v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2611.01715.svg)](https://codeofpaper.com/paper/2611.01715)

Discussion