WorksComputer Science
SD-Cache: Learnable Memory Consolidation with State-Guided Dynamic Caching
Abstract
Large language models (LLMs) are increasingly deployed as persistent services that must reason over large volumes of external knowledge. Retrieval-augmented generation (RAG) grounds model responses in relevant documents, but the retrieved content must still be encoded and stored in the key-value (KV) cache. As this content accumulates, the cache grows linearly, increasing memory consumption and inference cost. Existing memory-compression methods address this problem either by retaining a subset of cached states or by learning context compressors that map documents to compact latent representations. Despite these advances, consolidating information under tight memory budgets while preserving its usefulness for future queries remains challenging. We investigate how the model's native KV states can be selectively consolidated into a fixed-size working memory without access to future queries. To this end, we introduce SD-Cache (State-guided and Dynamically updated Cache), a query-agnostic KV-memory consolidation framework that operates alongside a frozen generator LLM. SD-Cache learns to consolidate layer-wise KV states into fixed-size memory through selective anchor-based pooling and state-guided refinement, processing new contexts in a single forward pass without context-specific optimisation. Experiments on retrieval-augmented question answering and synthetic long-context benchmarks show that SD-Cache maintains competitive downstream performance under constrained memory budgets.
Introduction
Large language models (LLMs) have demonstrated remarkable capabilities as general-purpose systems, powering a wide range of applications, including virtual customer-service assistants [8], code generation [42], and mathematical problem solving [20, 27]. Many are deployed as interactive services that rely on retrieval-augmented generation (RAG) [26] to access evolving domain-specific knowledge, with retrieved content encoded and retained in the key-value (KV) cache.
This reliance on KV-cache storage creates a scaling bottleneck: the cache grows linearly with context length, increasing memory consumption and limiting inference throughput [17, 12]. These costs are compounded across successive interactions, where customer-service systems may repeatedly retrieve and re-encode overlapping policy documents and database records, increasing pre-fill latency [25, 40]. Context compression therefore offers a practical way to reduce the KV storage required for subsequent generation.
Existing KV-cache compression methods fall broadly into training-free and learning-based approaches. Training-free methods commonly retain a subset of KV states using positional heuristics [41] or attention-based importance estimates [46, 28]. Beyond token selection, context-specific optimisation constructs compact KV representations that approximate the attention behaviour of the original cache [47, 12]. Although these methods require no additional model training, they rely on predefined heuristics or context-specific optimisation. Under aggressive compression (e.g., above ), tokenselection methods may suffer substantial information loss, as information carried exclusively by discarded states is lost rather than consolidated into the retained cache [5].
Learning-based approaches aim to amortise the cost of context processing across multiple queries through reusable compressed representations. These representations are either optimised for a specific corpus [12] or generated by shared compressors that can be applied to unseen documents [37, 7, 32]. Such compressors can encode documents as continuous embeddings [30] or generate document-specific parameter updates through hypernetworks [4, 18, 22]. However, approaches based on soft tokens or document-specific parameter updates learn alternative representations of the input context for subsequent reuse, rather than directly consolidating the layer-wise KV states already formed by the frozen LLM.
In neuroscience, memory consolidation refers to the time-dependent stabilisation and reorganisation of newly encoded memories into durable representations [38]. Inspired by this process, we explore context compression for RAG as a memory-consolidation problem. Specifically, we ask: Can we learn to maintain a fixed-size KV working memory by selectively consolidating contextual information, without access to future queries? To address this question, we introduce SD-Cache, a query-agnostic framework that augments a frozen generator LLM with an auxiliary Transformer-based network (Figure 1). SD-Cache learns a consolidation operation that dynamically constructs compact KV memory for new contexts in a single forward pass, without context-specific optimisation. Motivated by the clustering structure observed in per-head KV representations, we design an anchor-pooling module (APM) that initialises memory slots from the KV states of the first tokens and refines them through novelty-guided pooling and gated updates, progressively consolidating the sequence within a fixed memory budget. The resulting attention weights jointly pool the incoming keys and values, preserving key-value correspondence as the slots evolve. To capture key–value associations that slot-wise pooling may overlook, a recurrent state-guided correction module builds an associative state directly from the original KV states and uses it to refine the updated slots. SD-Cache thereby maintains a query-agnostic memory whose size remains fixed as the context grows. Our main contributions are:
Figure 1. Conceptual comparison of SD-Cache with existing training-free (e.g., KV cache eviction [28]) and learning-based compression (e.g., soft-token compression [30]) paradigms. SD-Cache instead learns to consolidate KV states into a fixed-budget memory, retaining model-native representations while supporting selective layer-wise updates.
We formulate query-agnostic KV-cache compression as a learnable memory-consolidation problem and introduce SD-Cache, which maintains a fixed memory budget while leaving the generator LLM frozen.
We develop a two-stage consolidation mechanism that combines anchor-based pooling to selectively integrate key–value pairs with state-guided correction to capture chunk-level key–value associations that slot-wise pooling may overlook.
We demonstrate on RAG-based question answering [36, 30] and synthetic long-context benchmarks [21, 44] that SD-Cache maintains strong downstream performance at high compression ratios.
Related Work
KV Cache Eviction Methods. KV cache eviction methods [41, 46, 33, 28, 3, 44, 16] formulate memory management as an active forgetting [10] problem, typically implemented through a scoring-and-selection rule. Given cached keys and values , where , , and denote the sequence length, number of KV heads, and per-head feature dimension, respectively, an eviction policy assigns each cache position an importance score . Under a budget of positions, the retained indices are selected as , yielding and . Retention policies typically use positional [41], attention-based [46, 33, 28], or predictability-based signals [16]. Beyond retention criteria, cache budgets can be allocated unevenly across layers to accommodate differences in attention sparsity [3], while information from evicted tokens can be encoded into an auxiliary latent memory [44]. These strategies preserve selected token states or compensate for eviction losses, but do not learn to consolidate information from evicted states directly into the retained KV cache.
Learnable Context Compression Methods. Learnable compression maps a context to a compact representation , where and is a trainable compressor. Many methods encode contexts into soft embeddings or memory tokens that condition subsequent generation [7, 14, 6, 37, 30]. Others operate directly on internal KV representations [12], including approaches that combine learned token selection with parameter-efficient adaptation to consolidate information into retained states [5]. Concurrent work uses per-layer compactors to synthesise compact KV states from the original cache [32]. While these approaches achieve context compression, our work focuses on learning to selectively consolidate incoming KV states into an existing memory under a fixed budget with a single pass.
Method
Given a frozen -layer Transformer, a context of length induces per-layer key and value states where , denotes the number of KV heads and the head dimension. We denote the full KV state induced by the context as . A memory consolidation operator transforms the growing KV state into a compact memory , where and . Formally, we define a consolidation operator
which maintains a fixed memory budget while preserving the information required for future model computation. Given an unknown future query , let denote the output produced by the frozen Transformer from the full KV state. The desired consolidated memory should induce model behaviour close to that obtained from the full KV state:
where denotes the distribution of future queries. Importantly, consolidation is designed to be query-agnostic: the future query is not available to when is constructed, as depicted in Figure 2. Let denote the KV states induced by the incoming context chunk at update step , and let denote the consolidated memory retained from the preceding context. For the arriving context, we extend this formulation by allowing the operator to update the existing consolidated memory with newly observed KV states

Figure 2. Illustration of our SD-Cache method. The overall SD-Cache pipeline can be summarised in three major steps when starting from scratch: 1) initialise the memory with the KV states of the first document tokens, which serve as anchors; 2) selectively update the existing memory as new context KV states arrive, while maintaining a fixed budget of slots; and 3) use the updated memory together with the system and user prompts to generate a response with the frozen decoder. The right panel details the memory update mechanism: performs novelty-guided pooling and gated slot updates, while refines the pooled KV representations using an associative state accumulated from the original KV stream.
where and remains constrained to a fixed budget of slots for all .
Anchor-Pooling Module (O-APM)
APM pools native KV states into compact memory slots, with its design motivated by the structured geometry of Transformer representations. As illustrated in Figure 3, key representations exhibit highly structured, head-specific geometry that remains readily identifiable across layers, with similar structure observed for query representations. These observations suggest that the model’s native KV states provide a natural basis for constructing compact memory representations. For clarity, we omit the layer and KV-head indices below and describe the update for a single set of KV states. At update step , let denote the current memory of slots, and let denote the KV states induced by . APM follows a novelty-aware write procedure consisting of novelty estimation, anchor pooling, and selective slot update. We index the first update by and initialise using the KV states of the first context tokens, which serve as the initial anchors.
Figure 3. Visualisation of the PCA projection [1] of pre-RoPE keys at layer 18 (Figure 3a) and comparison of the mean cosine similarities of keys and queries to their own-head centre and nearest other-head centre across layers (Figure 3b). The plots are produced using Qwen3-4B [42] with 9,204 natural-language tokens sampled from GoodWiki [9].
Coverage-Aware Novelty Estimation. Before modifying the memory, each incoming key first queries the existing memory to estimate how well it is already represented. For the key in the incoming key states , we compute and reconstruct it from a stop-gradient copy of the current memory:
A lightweight MLP then predicts a scalar novelty score from the incoming representation, its reconstruction, and their residual:
Intuitively, an incoming state that is already well represented by the existing anchors should require little additional memory capacity, whereas poorly reconstructed states provide stronger evidence for updating the memory. We stop gradients through the memory during this read operation to prevent the anchors from artificially increasing the reconstruction error to obtain a larger novelty score.
Novelty-Guided Pooling. The current memory keys initialise a set of write queries, , which are refined by attending to the incoming keys. We update these queries using a stack of Perceiver-style blocks ([23]). For the -th block,
where is a learnable scalar. Each block consists of a pre-normalised cross-attention layer followed by a pre-normalised feed-forward network. The novelty scores are added directly to the cross-attention logits, biasing the write queries towards incoming keys that are poorly represented by the current memory. After blocks, forms the refined write queries used to pool the incoming KV states. We compute a single set of attention weights and apply it to both keys and values:
Using the same weights for both keys and values ensures that each pooled KV pair aggregates information from the same context positions.
Selective Slot Update. Finally, a shared per-slot gate determines how much newly pooled information is incorporated into each memory slot: . The same gate is shared between the key and value of each slot, preserving their correspondence:
The gate is initialised to favour retaining the existing memory, allowing the slots to gradually learn to incorporate new information during training. The resulting form the provisional consolidated memory produced by APM.
State-Guided Correction (O-SGC)
SGC complements APM with a compact associative state [43, 19] constructed directly from the original, uncompressed KV stream. Importantly, the state is updated from the raw KV states rather than from the pooled memory, providing an information path decoupled from the slot-pooling process. Within each KV head, the state represents a key-to-value associative map accumulated over the original stream. For each token in , we first normalise its key as and predict a data-dependent write strength , where denotes the corresponding hidden representation. Starting from , the state first absorbs the anchor tokens with , and the associative state is then updated using a gated delta rule [19]:
This update continuously absorbs key–value associations from the original KV chunk, while the coupled decay stabilises the state over long sequences. After processing the KV states, we use the resulting associative state to refine the updated slots produced by APM. Their keys are first normalised and used to query the state:
Since defines only a key-to-value mapping, we use the same readout to predict both key and value corrections through lightweight learned heads:
where and are zero-initialised layer-specific projections. The corrected memory is then
The state matrix is only maintained during the update and is discarded afterwards, leaving no additional persistent state beyond the compact KV memory.
Training Objective
We keep the parameters of the underlying Transformer frozen and optimise only the parameters of . For each training example, we first decode the target sequence using the full KV state . SD-Cache is then trained to reproduce this full-cache output using only the consolidated memory with
This objective encourages the estimated memory to preserve the information required to reproduce the behaviour of the full KV.
Experiments
Evaluation Protocols. Our primary benchmark is retrieval-augmented question answering (RA-QA) Benchmark [30]. The training data of this benchmark is taken from questions from multiple sources of QA datasets [30]1, which contain 453,000 samples. Similar to PISCO [30], we also use the response from a teacher model2 as the supervision signal of the next token prediction loss. The evaluation includes five popular QA datasets including: Natural Questions [24], TriviaQA (Joshi et al., 2017), PopQA [31], ASQA [39], and HotpotQA [45]. Our main evaluation metric is the answer matching accuracy in the QA context, which we define as correct prediction if the normalised label is found within the normalised prediction [30]. We adapt Mistral-7B-v0.2 (Jiang et al., 2023) as the backbone for this benchmark. We additionally report results on RULER [21] at a context length of 4096 to further evaluate the model’s long-context retrieval and reasoning capabilities, including needle-in-a-haystack (NIAH), multi-hop tracing, and frequency-based aggregation tasks. For this benchmark, we adapt and augment the RA-QA training data with synthetic retrieval, frequency, and tracking tasks, and use Qwen3-8B [42], Mistral-7B-v0.3 (Jiang et al., 2023), and Llama-3.1-8B [17] as generator backbones. Following the official protocol we score every task with the reference string_match implementation and report the unweighted mean over tasks as the aggregated score. Implementation details are provided in Appendix § 8.§ 1.
Results on RA-QA Benchmark
Tab. 1 compares SD-Cache with existing methods on five RA-QA datasets. At a compression ratio of , SD-Cache achieves the highest average accuracy among the compared compression methods, reaching 68.67% and outperforming PISCO by 0.73 percentage points (pp) at the same compression ratio. SD-Cache improves over PISCO on four of the five datasets, with the largest gains on ASQA and Natural Questions (+2.01 pp and +1.34 pp, respectively), while maintaining comparable performance on other datasets. Its average accuracy also remains within approximately 3 pp of the uncompressed Mistral-7B baseline. At compression, SD-Cache also outperforms
| Rate | ASQA | HotpotQA | NQ | TriviaQA | POPQA | Average | |
| Mistral-7B without Compression | |||||||
| Closed-book ([30]) | - | 51.00 | 34.00 | 46.00 | 79.00 | 29.00 | 47.80 |
| Full KV ([30]) | - | 74.00 | 51.00 | 69.00 | 92.00 | 70.00 | 71.00 |
| Compression Models | |||||||
| xRAG† ([6]) | x128 | 34.00 | 27.00 | 32.00 | 77.00 | 33.00 | 40.00 |
| A.C.†‡ ([7]) | x4 | 57.00 | 31.00 | 35.00 | 70.00 | 24.00 | 43.00 |
| ICAE‡ ([14]) | x4 | 47.00 | 29.00 | 42.00 | 78.00 | 43.00 | 48.00 |
| DODO‡ ([35]) | x10 | 52.00 | 38.00 | 48.00 | 82.00 | 47.00 | 53.00 |
| COCOM ([37]) | x16 | 63.00 | 46.00 | 58.00 | 89.00 | 48.00 | 61.00 |
| PISCO⋆ ([30]) | x16 | 71.09 | 48.06 | 64.58 | 90.17 | 65.83 | 67.94 |
| SD-Cache (Ours) | x16 | 73.10 | 47.48 | 65.92 | 90.81 | 66.06 | 68.67 |
| PISCO ([30]) | x128 | 68.00 | 46.00 | 61.00 | 89.00 | 55.00 | 63.80 |
| SD-Cache (Ours) | x128 | 71.84 | 44.75 | 63.73 | 89.58 | 57.41 | 65.46 |
Table 1. Answer-matching accuracy (%) on five RA-QA datasets ([30]). Using five retrieved documents per query, SD-Cache achieves the highest average accuracy among the compared compression methods at a compression ratio. † methods limited to one context. ‡ methods using Llama-2 7B. ⋆ use official checkpoint to reproduce the results.
PISCO ([30]) by 1.66 pp in average accuracy, further highlighting its effectiveness under aggressive compression. These results indicate that SD-Cache preserves information useful for downstream question answering under substantial context compression.
Performance under Different Compression Ratios. We further investigate the effect of compression on answer-matching accuracy using Qwen3-4B-Instruct ([42]) on the Natural Questions (NQ) ([36]) development set. As shown in Figure 4a, SD-Cache’s advantage over Attention Matching ([47]) grows as the compression ratio increases. At and compression, SD-Cache achieves accuracies of 65.74% and 62.8%, exceeding Attention Matching by 4.24 pp and 11.0 pp. At compression, the gap increases to 21.7 pp, with SD-Cache retaining 59.2% accuracy compared with 37.5% for Attention Matching. We further demonstrate the accuracy-memory trade-off between our method and Attention Matching ([47]) in its fastest configuration. We report Bjøntegaard-Delta rate ([2]) applied to KV-cache budgets (BD-KV) to measure the average relative change in KV budget at matched accuracy over the shared quality range, with negative values indicating memory savings. In Figure 4b, we plot the relative KV budget difference at matched accuracy, where negative values indicate lower KV requirements for SD-Cache. Over the shared Match range of 59.18%-66.89%, SD-Cache achieves a BD-KV of −58.70%. Its memory advantage decreases as the target accuracy increases and reverses near the upper end of this range. Details about BD-KV are provided in Appendix A.2. These results indicate that SD-Cache is particularly effective under tight memory budgets, but it falls slightly behind Attention Matching at the largest evaluated KV budget. One possible explanation is that learned compression may lose fine-grained information that could otherwise be retained when more KV cacapacity is available. This motivates exploring an adaptive hybrid method that combines selective KV retention with learned compression under a fixed memory budget in the future.
Figure 4. (a) Performance on RA-QA. (b) KV Cost at Equal Match Score. Performance comparison on NQ in RA-QA benchmark ([36]) under (4a) four compression settings (e.g., 1/8, 1/16, 1/32 and 1/128) and (4b) the average relative change in KV budget at matched accuracy.
Compaction Efficiency. We analytically estimate computational costs in TFLOPs [30], separating context preparation (Compact, including context pre-fill) from subsequent inference; Total sums both stages, shown in Table 3. On Mistral-7B, SD-Cache requires 1.79 TFLOPs for inference after preparation, while its compaction overhead increases the total cost to 13.95 TFLOPs, compared with 11.82 for Full KV and 12.88 for PISCO. On Llama-3.1-8B with a 4K context, SD-Cache requires 80.70 TFLOPs in total, substantially less than AM-fast (172.18), but more than SnapKV (68.53). For more results, please refer to Appendix § 9.§ 4. These estimates quantify the additional computation required to construct SD-Cache’s compact KV representations. When the prepared context can be reused across queries, this preparation cost can be amortised, yielding an average cost of for queries sharing the same context.
| Computational cost (TFLOPs) | ||||
| Method | Inference | Compact | Total | |
| Mistral-7B / RAG-QA | ||||
| FullKV | 1.79 | 10.03 | 11.82 | |
| AutoCompressor | 2.98 | 10.42 | 13.40 | |
| PISCO | 2.89 | 9.99 | 12.88 | |
| SD-Cache (Ours) | 1.79 | 12.16 | 13.95 | |
| Llama-3.1-8B / 4K context | ||||
| FullKV | 2.74 | 65.97 | 68.71 | |
| SnapKV | 2.42 | 66.11 | 68.53 | |
| AM-fast | 2.29 | 169.90 | 172.18 | |
| SD-Cache (Ours) | 2.43 | 78.27 | 80.70 |
Table 3. Analytical computational cost.
Results on RULER Benchmark
Tab. 2 reports the average accuracy across the 13 RULER tasks with a 4096 token context using Llama-3.1-8B [17]. SD-Cache achieves the highest reported accuracy at every non-zero cache reduction ratio. At 75% and 90% reduction, it surpasses the second-best method by 0.7 pp and 5.01 pp, respectively. Its advantage is particularly pronounced at the two highest reduction ratios: at 96.88% and 98.44%, SD-Cache achieves accuracies of 55.17% and 53.78%, exceeding KeyDiff [34], the strongest baseline with available results in these settings, by 20.48 pp and 37.20 pp, respectively. Furthermore, SD-Cache’s accuracy decreases by only 1.66 pp as the cache reduction increases from 93.75% to 98.44%. These results indicate that SD-Cache preserves useful information for long-context tasks even under severe KV cache compression. See Appendix § 9.§ 2 for results on additional backbones. These results highlight the value of learning to compress KV states while preserving task performance under tight memory budgets. Hence, a promising direction for future work is to combine learned consolidation with training-free token selection to draw on the complementary strengths of both approaches.
Ablation Studies and Analysis
Contributions of Individual Components. We first analyse the contributions of SD-Cache’s key components on Natural Questions (NQ) within the RA-QA benchmark, using Qwen3-4B-Instruct-25073 as the backbone at a fixed retention ratio of 1/16. A simple baseline that compresses text into soft tokens achieves a score of 61.72%. The anchor pooling module (APM) variant improves this score to 64.44%, yielding a gain of 2.72 pp. Incorporating state-guided correction (SGC) further increases the score to 65.74%, providing an additional gain of 1.3 pp. Full SD-Cache improves upon the soft-token baseline by 4.02 pp, highlighting the incremental contributions of APM compression and SGC.
Figure 6. Length generalisation on RULER QA with slots. RR: recurrent rolling; SCR: skip-connected rolling. “Iter” denotes the number of writes.
Length Generalisation under a Fixed Memory Budget. We evaluate length generalisation on RULER QA by increasing the context length from 4K to 8K and 16K while keeping the memory budget fixed at slots. Starting from a model trained on 4K-token contexts with a single write, we compare current single write setting with two streaming strategies: recurrent rolling (RR), which passes the updated slots to the next write, and skip-connected rolling (SCR), which adds skip connections between subsequent writes. The two strategies perform similarly at 8K with two writes (26.7% vs. 25.7%), but diverge at 16K. RR degrades sharply and often produces gibberish responses, with accuracy falling to 9.9% after three updates and 1.7% after four. In contrast, SCR retains 28.5% and 26.9%, respectively. These results show that SD-Cache supports iterative writing, but maintaining accuracy across repeated updates remains challenging, motivating future work on more robust update strategies and training data tailored to multi-step writing.
Analysis of State-Guided Correction. To understand where SGC helps, we ablate guidance strength and correction target using models trained on RA-QA (Louis et al. [30]) and evaluated on 201 NQ samples. We divide the experiments into two groups (Figure 5): 1) applying correction to , , both, or neither; and 2) retaining only the component of the applied key correction parallel (“rescale”) or orthogonal (“rotate”) to the provisional slot key , while keeping value correction unchanged. The parallel component scales the existing key, whereas the orthogonal component adjusts its direction. Most of the performance gain comes from key correction (). The “rotate” arm preserves this gain, while “rescale” performs worse than disabling correction. These results suggest that SGC improves query–slot matching primarily by adjusting slot-key directions.
Figure 5. State-guided correction ablations: correction targets (left) and parallel (“rescale”) versus orthogonal (“rotate”) key-correction components (right).
Discussion and Conclusion
We introduced SD-Cache, a learnable memory consolidation framework that maintains a budget-constrained KV cache through selective and state-guided updates. We then proposed an anchor-pooling module that compresses long KV sequences into a fixed number of memory slots while preserving key-value correspondence. We further introduced state-guided correction to refine the pooled KV representations using global key-value associations accumulated from the original KV stream, supporting access to relevant information during query decoding. Our method demonstrated competitive performance and computational cost compared with baselines on retrieval-augmented question answering and long-context benchmarks, covering tasks such as question answering, needle-in-a-haystack, variable tracing and aggregation. These results suggest that SD-Cache can be a valuable step towards learnable memory consolidation for LLMs.
Limitations and Future Work. A current limitation is that our method does not explicitly optimise layer-wise memory allocation, and maintaining performance across multi-step streaming updates remains challenging. Future work will explore adaptive allocation and more sophisticated reward functions to align memory updates with downstream task requirements. We will also investigate hybrid approaches combining learned consolidation with training-free token selection, alongside more robust update strategies and training data tailored to multi-step writing.
AI USE STATEMENT
In this work, we used generative AI tools to implement and edit Python code for the proposed method, create or modify scientific figures, prototypes of methodology diagrams, visualise examples and edit the manuscript to improve its clarity and readability. We also used AI tools to retrieve and identify related works. We did not use generative AI tools to generate synthetic datasets or to develop theoretical models. No other required-disclosure uses were applicable to this work. All AI-assisted outputs, including text, code, and figures, were reviewed by the authors, and the generated or modified code was tested for correctness. The authors take full responsibility for the final content of this work, including all text, claims, code, and other artefacts produced with the assistance of generative AI.
REPRODUCIBILITY STATEMENT
We support reproducibility by providing a detailed description of SD-Cache and its components in § 3. The appendix documents the model training details, hyperparameters and additional evidence used in our experiments. We also report the backbone models, datasets, memory budgets, and evaluation metrics for each benchmark. We will publicly release the source code, configuration files, and training and evaluation scripts in the camera-ready version.
Additional Details
Implementation Details
Our consolidation network follows the Perceiver architecture: the slot queries cross-attend to the key-value tensor through 8 pre-norm Perceiver like blocks, each with 8 cross-attention heads and a FFN expansion, operating at the backbone’s key-value width. A single anchor pooling module (APM) is shared across all layers. Each layer also has a lightweight projector comprising copies of its frozen key and value projections, each initialised from the corresponding original weights and augmented with rank-16 LoRA adapters (). This amounts to approximately 142M trainable parameters, 1.7% of an 8B backbone, which remains frozen throughout. We set fixed correction strengths . The computed memory slots are kept in pre-RoPE space; the -th slot is rotated at the position of the anchor token it was initialised from, and the query and generated tokens are positioned directly after the slots. We train for five epochs using AdamW [29] with a learning rate of , a linear learning rate schedule with 3% warmup, and bf16 precision. Depending on the context length, we use effective batch sizes of 128 or 64, with corresponding per-device batch sizes of 4 or 1 and gradient accumulation. Training runs under DeepSpeed ZeRO-2 on four RTX 6000 Ada GPUs; the per-layer trunk calls are gradient-checkpointed, which leaves the computed gradients unchanged and is what fits the largest memory budget into 48 GB. For the experiments, we do not include KV-Distill [5] in our RULER [21] comparison because no public implementation was available at the time of our experiments, making faithful reproduction difficult. We also omit STILL [32] because its peak training memory requirements (e.g., NVIDIA H200 GPUs) exceeded our available hardware budget.
BD-KV Computation
We adapt the Bjøntegaard-Delta rate metric [2] by using the nominal retained KV fraction as the rate variable and Match as the quality variable. While BD-Rate is typically applied in image and video compression, recent work has argued for its use to evaluate LLM compression methods [15]. For each method , we construct Piecewise Cubic Hermite Interpolating Polynomial (PCHIP [13]) interpolants through the measured points , where denotes Match and denotes the retained KV fraction. The relative KV difference at a target quality is
We restrict evaluation to the intersection of the observed quality ranges:
For , we compute
For SD-Cache versus attention matching, the shared interval is [59.18, 66.89]% Match, yielding BD-KV = −58.70%. Negative values indicate a lower KV budget for SD-Cache at equal quality.
The solid curve shows , while the horizontal dashed line indicates BD-KV. This summary averages log-rate differences before converting back to a percentage; it is therefore not the arithmetic mean of the plotted percentage differences. We use the FAU-LMS bjontegaard4 implementation and do not extrapolate beyond the shared quality interval. KV cost is measured by the nominal token/slot budget, rather than total device memory; model weights and auxiliary state are excluded.
Additional Results
Low-Rank Structure within KV Heads
To examine the low-rank structure that motivates the anchor pooling module (APM), we analyse token variation within each KV head of Qwen3-4B Instruct. Each document contains 768 tokens, with the initial attention-sink position removed. We extract pre-RoPE keys from k_norm and values from v_proj across all 36 layers and 8 KV heads per layer (). For each document and head, we subtract the mean token vector from each representation matrix and apply singular value decomposition (SVD) to the residuals. We accumulate the squared singular values in descending order and normalise by their total sum to obtain the cumulative explained variance. Centring is performed separately for each document because slot pooling summarises one context at a time. For each layer-head pair, we first average the curves over the 12 documents, then report the median and inter-quartile range across the 288 pairs. An isotropic Gaussian matrix of the same size undergoes the same centring and SVD steps as a reference. As shown in Figure 7, the median curves reach 90% explained variance at 43 directions for keys and 77 for values, compared with 103 for the isotropic reference. The concentrated key variation supports the motivation for APM, while the higher effective rank of values suggests that preserving their variation may require more capacity.
Figure 7. Visualisation of cumulative explained variance for mean-centred pre-RoPE keys (K) and values (V) in Qwen3-4B Instruct Yang et al., [42]. Curves are averaged over 12 documents per layer-head pair, where solid lines and shaded bands show the median and inter-quartile range across 288 pairs. The dashed curve shows an isotropic Gaussian reference of the same size. Dots mark 90% explained variance for K and V.
Additional Results on RULER Benchmark
We further evaluate SD-Cache on RULER-4K [21] using two additional backbones: Qwen3-8B [42] and Mistral-7B-v0.3 (Jiang et al., 2023). Table 4 and Table 5 report the average accuracy across the 13 RULER tasks with a 4096-token context. SD-Cache achieves the highest reported accuracy at every non-zero cache reduction ratio on both backbones.
Table 4. Average accuracy (%) across the 13 RULER-4K tasks [21] under different KV cache reduction ratios, using Qwen3-8B [42] as the base model. A reduction ratio of 0% denotes the full, uncompressed KV cache.
| Model | Method | 0.00% | 90.00% | 93.75% | 96.88% | 98.44% |
| Mistral 7B-v0.3 | PyramidKV [3] | 92.10 | 19.90 | 13.71 | 8.43 | 4.10 |
| Mistral 7B-v0.3 | SnapKV [28] | 92.10 | 19.80 | 13.75 | 8.40 | 3.59 |
| Mistral 7B-v0.3 | TOVA [33] | 92.10 | 29.20 | 14.93 | 6.67 | 3.77 |
| Mistral 7B-v0.3 | KeyDiff [34] | 92.10 | - | 45.26 | 26.61 | 14.08 |
| Mistral 7B-v0.3 | IndexMem [44] | 92.10 | 41.50 | - | - | - |
| Mistral 7B-v0.3 | SD-Cache (Ours) | 92.10 | 52.17 | 47.12 | 44.41 | 37.23 |
Table 5. Average accuracy (%) across the 13 RULER-4K tasks [21] under different KV cache reduction ratios, using Mistral-7B (Jiang et al., 2023) as the base model. A reduction ratio of 0% denotes the full, uncompressed KV cache.
On Qwen3-8B [42], SD-Cache outperforms IndexMem [44] at 90% reduction and KeyDiff [34] at 93.75% reduction, the strongest available baselines in these settings, by 15.35 pp and 34.40 pp, respectively. At the two highest reduction ratios of 96.88% and 98.44%, SD-Cache achieves accuracies of 57.32% and 56.39%, exceeding KeyDiff by 42.71 pp and 47.49 pp, respectively. Its accuracy decreases by only 3.41 pp as the reduction increases from 93.75% to 98.44%, indicating robustness to increasingly aggressive compression.
On Mistral-7B-v0.3 (Jiang et al., 2023), SD-Cache achieves accuracies of 52.17% and 47.12% at 90% and 93.75% reduction, outperforming the same respective baselines by 10.67 pp and 1.86 pp. At 96.88% and 98.44% reduction, it achieves 44.41% and 37.23% accuracy, surpassing KeyDiff by 17.8 pp and 23.15 pp, respectively. These results suggest that SD-Cache preserves useful information under severe KV cache compression across different LLM backbones.
Task Group Analysis. We group the RULER-4K tasks into four categories: needle-in-a-haystack (NIAH), question answering (QA), variable tracking (VT), and aggregation (AGG), where AGG comprises common words extraction (CWE) and frequent words extraction (FWE). Figure 9 and Figure 8 present results on Qwen3-8B and Mistral-7B-v0.3, respectively, with VT and AGG reported jointly as VT+AGG. While KeyDiff shows competitive results on NIAH at 16× compression, SD-Cache outperforms all evaluated baselines across all three reported groups at 32× and 64× compression on both backbones. These results show that SD-Cache is generally more robust to aggressive KV cache compression than the other baselines.
Figure 8. RULER-4K [21] performance by task group on Mistral-7B-Instruct-v0.3 (Jiang et al., 2023) under different KV cache compression rates.
Figure 9. RULER-4K [21] performance by task group on Qwen3-8B [42] under different KV cache compression rates.
Ablation of the Novelty-Guided Write
We evaluate SD-Cache trained on RA-QA [30] with a Qwen3-4B-Instruct [42] backbone on 948 ASQA dev questions at a 16× compression ratio, using Match as the metric. Without retraining, we test three inference-time variants: removing the novelty bias, shuffling novelty scores across tokens within each passage, and replacing the slot gate with its layer-wise mean. To evaluate the validity of the novelty-guided write module, we additionally design a shuffling experiment that preserves the distribution of novelty scores but breaks their correspondence with the tokens, thereby testing whether assigning higher scores to the appropriate tokens matters. The full model achieves 71.5% Match, compared with 69.5% without the novelty bias, 67.2% with shuffled novelty scores, and 68.1% with a static gate. These results support the contributions of both token-specific novelty information and input-dependent slot gating.
Computational-cost estimation
In Table 6, we additionally report analytical estimates of computational cost under the RULER compression budgets. We count each multiply-accumulate as two FLOPs and treat attention products as dense rectangular matrix multiplications. The estimates cover major matrix operations and follow each method’s input formatting and generation procedures. They are not GPU measurements or dataset-wide averages. “Inference” () denotes question pre-fill and answer generation after preparation; “Compact” () denotes context or representation preparation, including context pre-fill; and “Total” () denotes first-use cost. For a fixed context whose prepared representation can be reused unchanged across questions, the amortised cost per question over questions is . This accounting does not imply that persistent reuse has been implemented for every method. For Llama3.1-8B-Instruct, the KV cache of the 4096-token context occupies 0.50 GiB (128 KiB per token in bf16). Reducing the context slots by 75%, 90%, 93.75%, 96.88% and 98.44% shrinks it to 0.125, 0.050, 0.031, 0.016 and 0.008 GiB, respectively, i.e. to smaller. The only exception is ExpectedAttention + AdaKV, whose masking implementation retains the full physical cache and therefore stays at 0.50 GiB.
| Target context-slot reduction | Method | Inference | Compact | Total |
| 0.00% | Full KV | 2.74 | 65.97 | 68.71 |
| 75.00% | SnapKV | 2.48 | 66.11 | 68.59 |
| 75.00% | KeyDiff | 2.48 | 65.97 | 68.45 |
| 75.00% | ExpectedAttention + AdaKV5 | 2.78 | 70.65 | 73.43 |
| 75.00% | AM-fast6 | 2.35 | 188.75 | 191.10 |
| 75.00% | SD-Cache (Ours) | 2.50 | 83.46 | 85.96 |
| 90.00% | SnapKV | 2.43 | 66.11 | 68.54 |
| 90.00% | KeyDiff | 2.43 | 65.97 | 68.40 |
| 90.00% | ExpectedAttention + AdaKV5 | 2.78 | 70.65 | 73.43 |
| 90.00% | AM-fast6 | 2.30 | 172.11 | 174.41 |
| 90.00% | SD-Cache (Ours) | 2.45 | 79.39 | 81.84 |
| 93.75% | SnapKV | 2.42 | 66.11 | 68.53 |
| 93.75% | KeyDiff | 2.42 | 65.97 | 68.39 |
| 93.75% | ExpectedAttention + AdaKV5 | 2.78 | 70.65 | 73.43 |
| 93.75% | AM-fast6 | 2.29 | 169.90 | 172.18 |
| 93.75% | SD-Cache (Ours) | 2.43 | 78.27 | 80.70 |
| 96.88% | SnapKV | 2.41 | 66.11 | 68.52 |
| 96.88% | KeyDiff | 2.41 | 65.97 | 68.38 |
| 96.88% | ExpectedAttention + AdaKV5 | 2.78 | 70.65 | 73.43 |
| 96.88% | AM-fast6 | 2.27 | 168.64 | 170.91 |
| 96.88% | SD-Cache (Ours) | 2.42 | 77.30 | 79.73 |
| 98.44% | SnapKV | 2.40 | 66.11 | 68.51 |
| 98.44% | KeyDiff | 2.40 | 65.97 | 68.37 |
| 98.44% | ExpectedAttention + AdaKV5 | 2.78 | 70.65 | 73.43 |
| 98.44% | AM-fast6 | 2.27 | 168.21 | 170.48 |
| 98.44% | SD-Cache (Ours) | 2.42 | 76.81 | 79.23 |
Table 6. Estimated computational cost of Llama-3.1-8B-Instruct under the RULER compression budgets. We use a controlled workload of 4096 context tokens, 128 question tokens and 32 output tokens, with a batch size of one and no separate system prefix. These costs are not averaged over RULER evaluation samples. 5ExpectedAttention uses the AdaKV masking implementation associated with the archived accuracy results, which retains the full physical KV cache. Its costs are rounded analytical upper-bound estimates for successful execution paths with 1000 search iterations per call. 6AM-fast uses off-policy repeat queries and uniform budgets. Its costs include reference-query preparation and analytically estimated QR solver costs. Computational cost (TFLOPs) ↓
Figure 10. Distribution of estimated slot update strengths.
Non-uniform Layer Budget
To visualise the contribution of the slot update strength at each layer, we examine the learned gate values in Eq. (8) across all layers. The gate magnitudes exhibit a non-uniform distribution, with several intermediate layers showing stronger updates than the early and final layers. This suggests that SD-Cache learns to vary the degree of memory update across different layers. Motivated by this layer-wise heterogeneity, we further investigate whether the memory budget itself can be distributed non-uniformly across layers.
Our SD-Cache design naturally supports non-uniform layer-wise KV cache budgets, allowing different numbers of cache slots to be assigned to different layers. Specifically, we divide the layers into two early groups (layers 0-7 and 8-11), a middle group (layers 12-22), and a late group (layers 23-31), allocating 15.6%, 13.1%, 51.6%, and 19.7% of the total KV cache budget to these four groups, respectively. This allocation concentrates more capacity in the middle layers while preserving the same total budget as the uniform baseline. As shown in Figure 11, non-uniform allocation yields modest but consistent improvements across all five datasets, increasing the average Match score by 0.39 pp. The largest gains are observed on PopQA (Mallen et al., [31]) and NQ (Kwiatkowski et al., [24]), with improvements of 1.03 pp and 0.57 pp, respectively. These results highlight the flexibility of SD-Cache in supporting non-uniform layer-wise budgets, while leaving the exploration of more effective budget allocation strategies to future work.

Figure 11. Uniform vs. non-uniform layer budgets.
Memory Updates as the Context Changes
We use short fictional stories to examine whether SD-Cache’s answers reflect changes in the context. Each story introduces a fact and later updates it, with unrelated documents interleaved. We first write background documents that do not contain the answer into a fixed memory of slots. The first story chunk contains background information, the initial fact and two unrelated documents; the subsequent chunk contains one update and one unrelated document. All chunks are written into the same slots. After each write, the frozen decoder answers the question using only the current memory. Figure 12 shows the text written at each step and the corresponding decoded answer. This example illustrates SD-Cache’s ability to adaptively update its memory as the context changes.
Figure 12. Visualisation of decoding from memory as the context changes. The top row shows the text written into memory at each step, with unrelated documents indicated in grey. The bottom row shows the first sentence of the answer generated by greedy decoding after each write, reproduced verbatim. Colours indicate successive states.
Consolidated Memory Visualisation
To examine what SD-Cache stores and how the frozen decoder uses it, we trace memory writes and decoder reads back to the context tokens. For WRITE, we sum each token’s contribution across slots using the anchor weights and pooling weights in Eq. (8). For READ, we collect the decoder’s attention to the slots while generating the answer tokens, map query heads to their corresponding KV heads, and propagate the attention through the same pooling weights. As shown in Figure 13 and Figure 14, the READ maps place greater emphasis on answer-related content than the WRITE maps. These examples illustrate how SD-Cache consolidates information without knowing the question and allows the decoder to selectively access relevant content during decoding.

Figure 13. Visualisation of the information SD-Cache stores in memory and reads when answering question #456 from the KILT-NQ dev set.
Figure 14. Visualisation of the information SD-Cache stores in memory and reads when answering question #1443 from the KILT-NQ dev set.
References
- [1]Hervé Abdi and Lynne J Williams. Principal component analysis. Wiley interdisciplinary reviews: computational statistics, 2(4):433–459, 2010.
- [2]Gisle Bjontegaard. Calculation of average psnr differences between rd-curves. ITU SG16 Doc. VCEG-M33, 2001.
- [3]Zefan Cai, Yichi Zhang, Bofei Gao, Yuliang Liu, Yucheng Li, Tianyu Liu, Keming Lu, Wayne Xiong, Yue Dong, Junjie Hu, et al. Pyramidkv: Dynamic kv cache compression based on pyramidal information funneling. arXiv preprint arXiv:2406.02069, 2024.arxiv.org/abs/2406.02069
- [4]Rujikorn Charakorn, Edoardo Cetin, Shinnosuke Uesaka, and Robert Tjarko Lange. Doc-to-lora: Learning to instantly internalize contexts. arXiv preprint arXiv:2602.15902, 2026.arxiv.org/abs/2602.15902
- [5]Vivek Chari, Guanghui Qin, and Benjamin Van Durme. Kv-distill: Nearly lossless learnable context compression for llms. arXiv preprint arXiv:2503.10337, 2025.arxiv.org/abs/2503.10337
- [6]Xin Cheng, Xun Wang, Xingxing Zhang, Tao Ge, Si-Qing Chen, Furu Wei, Huishuai Zhang, and Dongyang Zhao. xrag: Extreme context compression for retrieval-augmented generation with one token. Advances in Neural Information Processing Systems, 37:109487–109516, 2024.arxiv.org/abs/2405.13792
- [7]Alexis Chevalier, Alexander Wettig, Anirudh Ajith, and Dami Chen. Adapting language models to compress contexts. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pp. 3829–3846, 2023.arxiv.org/abs/2305.14788
- [8]Zina Chkirbene, Ridha Hamila, Ala Gouissem, and Unal Devrim. Large language models (llm) in industry: A survey of applications, challenges, and trends. In 2024 IEEE 21st International Conference on Smart Communities: Improving Quality of Life using AI, Robotics and IoT (HONET), pp. 229–234. IEEE, 2024.DOI
- [9]Euirim Choi. Goodwiki dataset. https://www.github.com/euirim/goodwiki, September 2023.
- [10]Ronald L Davis and Yi Zhong. The biology of forgetting—a perspective. Neuron, 95(3):490–503, 2017.DOI
- [12]Sabri Eyuboglu, Ryan Ehrlich, Simran Arora, Neel Guha, Dylan Zinsley, Emily Liu, Atri Rudra, James Y Zou, Azalia Mirhoseini, and Christopher Re. Cartidges: Lightweight and general-purpose long context representations via self-study. In International Conference on Learning Representations, volume 2026, pp. 42642–42687, 2026.
- [13]Frederick N Fritsch and Ralph E Carlson. Monotone piecewise cubic interpolation. SIAM Journal on Numerical Analysis, 17(2):238–246, 1980.
- [14]Tao Ge, Jing Hu, Lei Wang, Xun Wang, Si-Qing Chen, and Furu Wei. In-context autoencoder for context compression in a large language model. arXiv preprint arXiv:2307.06945, 2023.arxiv.org/abs/2307.06945
- [15]Cameron Gordon, Yiping Ji, Hemanth Saratchandran, Paul Albert, and Simon Lucey. SineloraΔ: Sine-activated delta compression. In Proceedings of the AAAI Conference on Artificial Intelligence, pp. 21333–21342, 2026.
- [16]Stephen Gould and Anton van den Hengel. Back from the future: Key-value cache management by counter-causal surprise. arXiv preprint arXiv:2607.27600, 2026.arxiv.org/abs/2607.27600
- [17]Aaron Grattafiori, Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Alex Vaughan, et al. The llama 3 herd of models. arXiv preprint arXiv:2407.21783, 2024.arxiv.org/abs/2407.21783
- [18]David Ha, Andrew M. Dai, and Quoc V. Le. Hypernetworks. CoRR, abs/1609.09106, 2016. URL http://arxiv.org/abs/1609.09106.
- [19]Ali Hatamizadeh, Yejin Choi, and Jan Kautz. Gated deltanet-2: Decoupling erase and write in linear attention. arXiv preprint arXiv:2605.22791, 2026.arxiv.org/abs/2605.22791
- [20]Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt. Measuring mathematical problem solving with the math dataset. arXiv preprint arXiv:2103.03874, 2021.
- [21]Cheng-Ping Hsieh, Simeng Sun, Samuel Kriman, Shantanu Acharya, Dima Rekesh, Fei Jia, Yang Zhang, and Boris Ginsburg. Ruler: What’s the real context size of your long-context language models? arXiv preprint arXiv:2404.06654, 2024.arxiv.org/abs/2404.06654
- [22]Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. Lora: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685, 2021.arxiv.org/abs/2106.09685
- [23]Andrew Jaegle, Felix Gimeno, Andy Brock, Oriol Vinyals, Andrew Zisserman, and Joao Carreira. Perceiver: General perception with iterative attention. In International conference on machine learning, pp. 4651–4664. PMLR, 2021.arxiv.org/abs/2103.03206
- [24]Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, et al. Natural questions: a benchmark for question answering research. Transactions of the Association for Computational Linguistics, 7:453–466, 2019.DOI
- [25]Tiziano Labruna, Giovanni Bonetta, and Bernardo Magnini. Task-oriented dialogue systems through function calling. In Proceedings of the 15th International Conference on Recent Advances in Natural Language Processing-Natural Language Processing in the Generative AI Era, pp. 614–622, 2025.DOI
- [26]Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, et al. Retrieval-augmented generation for knowledge-intensive nlp tasks. Advances in neural information processing systems, 33:9459–9474, 2020.arxiv.org/abs/2005.11401
- [27]Aitor Lewkowycz, Anders Andreassen, David Dohan, Ethan Dyer, Henryk Michalewski, Vinay Ramasesh, Ambrose Slone, Cem Anil, Imanol Schlag, Theo Gutman-Solo, et al. Solving quantitative reasoning problems with language models. Advances in neural information processing systems, 35:3843–3857, 2022.
- [28]Yuhong Li, Yingbing Huang, Bowen Yang, Bharat Venkitesh, Acyc Locatelli, Hanchen Ye, Tianle Cai, Patrick Lewis, and Deming Chen. Snapkv: Llm knows what you are looking for before generation. Advances in Neural Information Processing Systems, 37:22947–22970, 2024.arxiv.org/abs/2404.14469
- [29]Ilya Loshchilov and Frank Hutter. Fixing weight decay regularization in adam. ArXiv, abs/1711.05101, 2017. URL https://api.semanticscholar.org/CorpusID:3312944.
- [30]Maxime Louis, Hervé Déjean, and Stéphane Clinchant. Pisco: Pretty simple compression for retrieval-augmented generation. In Findings of the Association for Computational Linguistics: ACL 2025, pp. 15506–15521, 2025.
- [31]Alex Mallen, Akari Asai, Victor Zhong, Rajarshi Das, Daniel Khashabi, and Hannaneh Hajishirzi. When not to trust language models: Investigating effectiveness of parametric and non-parametric memories. In Proceedings of the 61st annual meeting of the association for computational linguistics (volume 1: Long papers), pp. 9802–9822, 2023.
- [32]Charles O’Neill, Alex Sandomirsky, Harry Partridge, Mudith Jayasekara, and Max Kirkby. Still: Amortized kv cache compaction in a single forward pass. arXiv preprint arXiv:2606.07878, 2026.
- [33]Matan el Oren, Michael Hassid, Nir Yarden, Yossi Adi, and Roy Schwartz. Transformers are multi-state rnns. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pp. 18724–18741, 2024.
- [34]Junyoung Park, Dalton Jones, Matthew Morse, Raghavv Goel, Mingu Lee, and Christopher Lott. Keydiff: Key similarity-based kv cache eviction for long-context llm inference in resource-constrained environments. Advances in Neural Information Processing Systems, 38:5983–6019, 2026.arxiv.org/abs/2504.15364
- [35]Guanghui Qin, Corby Rosset, Ethan Chau, Nikhil Rao, and Benjamin Van Durme. Dodo: Dynamic contextual compression for decoder-only lms. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 9961–9975, 2024.DOI
- [36]David Rau, Hervé Déjean, Nadezhda Chirkova, Thibault Formal, Shuai Wang, Stéphane Clinchant, and Vassilina Nikoulina. Bergen: A benchmarking library for retrieval-augmented generation. In Findings of the Association for Computational Linguistics: EMNLP 2024, pp. 7640–7663, 2024a.
- [37]David Rau, Shuai Wang, Hervé Déjean, and Stéphane Clinchant. Context embeddings for efficient answer generation in rag. arXiv preprint arXiv:2407.09252, 2024b.arxiv.org/abs/2407.09252
- [38]Larry R Squire, Lisa Genzel, John T Wixted, and Richard G Morris. Memory consolidation. Cold Spring Harbor perspectives in biology, 7(8):a021766, 2015.DOI
- [39]Ivan Stelmakh, Yi Luan, Bhuwan Dhingra, and Ming-Wei Chang. Asqa: Factoid questions meet long-form answers. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pp. 8273–8288, 2022.arxiv.org/abs/2204.06092
- [40]Xin Tian, Yingzhan Lin, Mengfei Song, Siqi Bao, Fan Wang, Huang He, Shuqi Sun, and Hua Wu. Q-tod: A query-driven task-oriented dialogue system. In Proceedings of the 2022 conference on empirical methods in natural language processing, pp. 7260–7271, 2022.arxiv.org/abs/2210.07564
- [41]Guangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han, and Mike Lewis. Efficient streaming language models with attention sinks. In International Conference on Learning Representations, volume 2024, pp. 21875–21895, 2024.arxiv.org/abs/2309.17453
- [42]An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Chengen Huang, Chenxu Lv, et al. Qwen3 technical report. arXiv preprint arXiv:2505.09388, 2025.arxiv.org/abs/2505.09388
- [43]Songlin Yang, Bailin Wang, Yu Zhang, Yikang Shen, and Yoon Kim. Parallelizing linear transformers with the delta rule over sequence length. Advances in neural information processing systems, 37:115491–115522, 2024.arxiv.org/abs/2406.06484
- [44]Xintong Yang, Hao Gu, Binxing Xu, Lujun Li, Bei Liu, Jiacheng Liu, Qiyuan Zhu, Yike Guo, and Sirui Han. Indexmem: Learned kv-cache eviction with latent memory for long-context llm inference. arXiv preprint arXiv:2605.25475, 2026.arxiv.org/abs/2605.25475
- [45]Zhilin Yang, Peng Qi, Saizheng Zhang, Yoshua Bengio, William Cohen, Ruslan Salakhutdinov, and Christopher D Manning. Hotpotqa: A dataset for diverse, explainable multi-hop question answering. In Proceedings of the 2018 conference on empirical methods in natural language processing, pp. 2369–2380, 2018.arxiv.org/abs/1809.09600
- [46]Zhenyu Zhang, Ying Sheng, Tianyi Zhou, Tianlong Chen, Lianmin Zheng, Ruisi Cai, Zhao Song, Yuandong Tian, Christopher Ré, Clark Barrett, et al. H2O: Heavy-hitter oracle for efficient generative inference of large language models. Advances in neural information processing systems, 36:34661–34710, 2023.arxiv.org/abs/2306.14048
- [47]Adam Zweiger, Xinghong Fu, Han Guo, and Yoon Kim. Fast kv compaction via attention matching. arXiv preprint arXiv:2602.16284, 2026.arxiv.org/abs/2602.16284










