PaperHub
7.3
/10
Poster4 位审稿人
最低4最高5标准差0.5
4
5
4
5
3.8
置信度
创新性2.5
质量2.8
清晰度3.0
重要性2.8
NeurIPS 2025

Efficient Low Rank Attention for Long-Context Inference in Large Language Models

OpenReviewPDF
提交: 2025-05-12更新: 2025-10-29
TL;DR

Use lighweight low rank (q K) to help indexing offloaded KVCached

摘要

As the length of input text grows, the key-value (KV) cache in LLMs imposes prohibitive GPU memory costs and limits long‐context inference on resource‐constrained devices. Existing approaches, such as KV quantization and pruning, reduce memory usage but suffer from numerical precision loss or suboptimal retention of key-value pairs. We introduce Low Rank Query and Key attention (LRQK), a two‐stage framework that jointly decomposes the full‐precision query and key matrices into compact rank-\(r\) factors during the prefill stage, and then uses these low-dimensional projections to compute proxy attention scores in \(\mathcal{O}(lr)\) time at each decode step. By selecting only the top-\(k\) tokens and a small fixed set of recent tokens, LRQK employs a mixed GPU–CPU cache with a hit-and-miss mechanism that transfers only missing full-precision KV pairs, thereby preserving exact attention outputs while reducing CPU–GPU data movement. Extensive experiments on the RULER and LongBench benchmarks with LLaMA-3-8B and Qwen2.5-7B demonstrate that LRQK matches or surpasses leading sparse-attention methods in long context settings, while delivering significant memory savings with minimal loss in accuracy. Our code is available at https://github.com/tenghuilee/LRQK.
关键词
LLMKV cacheLow rank decompositionLong context inference

评审与讨论

审稿意见
4

The paper introduces LRQK, a low-rank attention method that reduces KV cache memory in LLMs during long-context inference. It approximates attention using low-rank query/key projections and retrieves only necessary full-precision KV pairs via a GPU–CPU cache. LRQK achieves strong memory savings with minimal accuracy loss, outperforming existing sparse attention methods on long-context benchmarks.

优缺点分析

Strengths

  • This paper is well-written and easy to follow.
  • The proposed LRQK framework introduces a low-rank approximation of query and key matrices during the prefill stage. This reduces the attention computation to a lightweight proxy form during decoding, enabling efficient token selection with significantly lower overhead.
  • The approach is empirically validated on strong long-context benchmarks (RULER and LongBench) with language models like LLaMA-3-8B and Qwen2.5-7B.

Weaknesses

  • The observations regarding singular values and key-value decomposition are not novel; similar findings have already been reported in prior work such as Loki [1].

  • The proposed method introduces a two-stage approximation involving proxy attention scores and hierarchical cache management, which adds notable complexity to the inference pipeline. However, the paper does not adequately address the implementation or integration overhead.

  • Although the authors acknowledge in the Limitations section that the method requires careful hyperparameter tuning, no concrete strategies or guidelines are provided—this significantly limits its practical usability.

[1] Loki: Low-rank Keys for Efficient Sparse Attention

问题

Please refer to the Weakness.

局限性

Yes

最终评判理由

Most of my concerns have been addressed. The authors have provided a detailed response clarifying the distinction between their work and a related prior study, and have also included practical guidelines for real-world use.

格式问题

N/A

作者回复

We thank the reviewer for the constructive feedback. Below are our detailed responses to each concern raised.

W 1: The observations regarding singular values and key-value decomposition are not novel; similar findings have already been reported in prior work such as Loki [1].

[1] Loki: Low-rank Keys for Efficient Sparse Attention

Thank you for highlighting this important context. You are correct that low-rank properties of attention matrices have been explored in prior work, such as Loki [1]. However, the key distinction lies in how we operationalize this property:

  • Loki decomposes the key matrix (K\mathbf{K}) individually to exploit its low-rank structure.
  • Our method performs simultaneous low-rank decomposition of both Q\mathbf{Q} and K\mathbf{K}, leveraging the property of matrix multiplication:
rank(QK)min(rank(Q),rank(K)). \text{rank}(\mathbf{Q}\mathbf{K}^{\top}) \leq \min(\text{rank}(\mathbf{Q}), \text{rank}(\mathbf{K})).

This enables a tighter approximation:

QKA_QA_K, \mathbf{Q}\mathbf{K}^{\top} \approx \mathbf{A}\_{Q} \mathbf{A}\_{K}^{\top},

where A_Q\mathbf{A}\_Q and A_K\mathbf{A}\_K are low-rank proxies for Q\mathbf{Q} and K\mathbf{K}.

By jointly approximating Q\mathbf{Q} and K\mathbf{K}, we avoid the limitations of isolated decomposition. This design, combined with a proxy approximation strategy (rather than direct filling), leads to superior performance in both efficiency and accuracy compared to Loki.

W 2: The proposed method introduces a two-stage approximation involving proxy attention scores and hierarchical cache management, which adds notable complexity to the inference pipeline. However, the paper does not adequately address the implementation or integration overhead.

We acknowledge this important concern and will provide comprehensive implementation details in the revision. The implementation and integration overhead analysis are as follows:

Implementation overhead:

  • Prefill stage: Need to add a cost to compute low-rank projections on top of standard attention (increase computation). After projection, we can pick the most relevant tokens and compute attention based on the selected tokens (reduce computation).
  • Generation stage: Additional computation for low-rank matrices updates (increase computation). Since the number of selected tokens are limited, the computation cost of attention is reduced (reduce computation).
  • Cache management: The KV caches are offloaded to CPU, which requires additional lookup in memory and CPU-GPU transfer (increase computation). Additional computation is required to manage the cache (increase computation).

Integration overheads: There is a brief version of the code in supplementary material, which shows the basic idea of our implementation. A brief overview of the implementation is as follows:

  • The implementation is based on the standard huggingface transformers library.
  • The original attention mechanism is replaced by our proxy attention mechanism.
  • The cache management is following transformers.cache_utils.Cache, which makes it easier to integrate into existing transformer architectures.

W3: Although the authors acknowledge in the Limitations section that the method requires careful hyperparameter tuning, no concrete strategies or guidelines are provided—this significantly limits its practical usability.

Thank you for this valuable comment. We will address this concern by providing guidelines for hyperparameter selection.

Rank (r)(r): The low-rank approximation of matrices Q\mathbf{Q} and K\mathbf{K} is calculated for each attention head separately. Typically, the dimension of each head is 128128, allowing for a range of rr values between 11 and 128128. For practical purposes, common choices for the rank rr are {8,16,32,48}\{8, 16, 32, 48\}, offering a balance between approximation quality and computational efficiency.

Top-kk Tokens: Select and retain the kk tokens with the highest attention scores in the GPU cache. The choice of kk is pivotal in balancing the sequence length and memory usage. Short sequences typically require a smaller kk, while longer sequences necessitate a larger kk to manage memory efficiently. In the experiment, k=256k=256 is used for a 4K token context, and the maximum is k=2048k=2048, applying for context longer than 32K.

Number of Lite Tokens: This hyperparameter determines the number of most recent tokens that are kept in the GPU. It has some flexibility in its choice; common values are 16, 32, or 64. This choice does not significantly increase the computation.

Number of Iterations and Tolerance: These two parameters are introduced in Algorithm 1 and 2. The number of iterations refers to the number of loops for updating all related low-rank matrices. Typically, a few iterations, such as 2 or 3, is sufficient for the task. The tolerance is the threshold for the convergence of the low-rank matrices, which is defined as the mean square error between the current and previous matrices. The tolerance is usually set to a small number, for example 10210^{-2} or 10310^{-3}.

Tips: If no prior knowledge, it is recommended to start with the default values, r=32,k=2048r=32, k=2048, 64 lite tokens and 2 iterations with tolerance 10210^{-2}. Then, we can adjust the parameters based on the performance and memory usage.

评论

Dear reviewer 43cG,

Thank you for your valuable feedback. We appreciate your attention to detail and the suggestions for improvement. We have carefully considered your comments. A brief overview of our response is as follows:

  • Low-rankness of key-value matrices: We will provide a more detailed discussion on the low-rankness of key-value matrices in the revision. The main difference is on how to utilize this feature. The proposed method decompose QKAQAK\mathbf{Q} \mathbf{K}^{\top} \approx \mathbf{A}_{Q} \mathbf{A}_{K}^{\top}, while Loki[1] decompose K\mathbf{K}.
  • Overheads: Both implementation overhead and integration overheads are considered are carefully discussed. We will provide a more detailed discussion on the overheads in the revision.
  • Hyperparameter tuning: This valueable comment is acknowledged and the detailed guidelines for hyperparameter selection, such as rank, top-k tokens, number of lite tokens, number of iterations and tolerance, are provided in the response. We hope this will help users to use the proposed method more effectively.

If you have any further questions or need additional information, please do not hesitate to ask. We are committed to providing you with the best possible response.

评论

Thank you for your deatiled response. Most of my concerns are addressed and I will adjust the score accordingly.

评论

We would like to thank you for their thoughtful and insightful feedback. Your specific insights on distinguishing our low rank approach from prior work, clarifying implementation overheads, and emphasizing the importance of providing actionable hyperparameter guidelines were crucial. We appreciate the care you took in evaluating our work and are glad that our responses addressed your concerns.

审稿意见
5

This work proposes Low Rank Query and Key attention (LRQK), a two-stage framework decomposing query and key matrices into low-rank factors during prefill and using them for proxy attention scores in decode, with a hierarchical GPU-CPU cache to reduce data movement. It balances memory efficiency, precision, and latency by selecting top-k and recent tokens, preserving exact attention outputs.

优缺点分析

Strengths

  1. Joint Low-Rank Approximation: Unlike prior methods that focus solely on key matrix decomposition, LRQK jointly factorizes both query and key matrices into low-rank components. This approach reduces computational complexity per decode step while maintaining representation accuracy, avoiding expensive SVD operations.
  2. Precision Preservation: LRQK uses low-rank proxies for attention score estimation but retains original query, key, and value vectors for final attention computation. This ensures mathematical fidelity and minimal accuracy loss compared to full-precision attention.
  3. Hierarchical Cache Management: The hybrid GPU-CPU cache with a hit-and-miss mechanism selectively transfers only missing full-precision KV pairs, reducing data movement by ~60% on average. A recency buffer in the GPU cache further optimizes hit rates by leveraging attention’s locality bias.

Weakness:

  1. Hyperparameter Sensitivity: The method requires careful tuning of rank and top-k token counts, which vary across model architectures and tasks. Optimal values demand extensive grid searches, increasing implementation overhead.
  2. The paper lacks performance analysis. It would be better if the authors could compare their method with baselines in terms of throughput and TTFT.

问题

Mention in weakness

局限性

yes

最终评判理由

Although most of my concerns have been addressed, I prefer to raise my rating.

格式问题

no

作者回复

We appreciate the reviewer's thoughtful evaluation and recognition of the proposed method. Below, we address your specific concerns:

W1. Hyperparameter Sensitivity: The method requires careful tuning of rank and top-k token counts, which vary across model architectures and tasks. Optimal values demand extensive grid searches, increasing implementation overhead.

Thank you for pointing out the sensitivity to hyperparameters. To achive better performance, careful tuning is indeed required. Nevertheless, the search space is relatively small, and there is a recommend configuration: r=32,k=2048r=32, k=2048, 64 lite tokens and 2 iterations with tolerance 10210^{-2}. We can further turn based on this. The detailed guideline for hyperparameter are as follows:

Rank rr: The matrices Q\mathbf{Q} and K\mathbf{K} are approximated using low-rank decomposition for each attention head independently. Given that each head usually has a dimension of 128128, the rank rr can vary from 11 to 128128. In practice, common choices for rr are {8,16,32,48}\{8, 16, 32, 48\}, which balance between the quality of approximation and computational efficiency.

Top-kk Tokens: This hyperparameter involves selecting and retaining the kk tokens with the highest attention scores in the GPU cache. The selection of kk is crucial for balancing the sequence length and memory usage. Shorter sequences generally require a smaller kk, while longer sequences may need a larger kk for efficient memory management. Experimentally, k=256k=256 is suitable for a 4K token context, with k=2048k=2048 used for contexts exceeding 32K tokens.

Number of Lite Tokens: This parameter specifies the count of the most recent tokens maintained in the GPU. Common values are 16, 32, or 64, and this choice does not substantially impact computational overhead.

Iterations and Tolerance: These parameters are integral to Algorithms 1 and 2. The iteration count denotes the number of cycles required to update the low-rank matrices. Generally, 2 or 3 iterations suffice. Tolerance is the convergence threshold for the low-rank matrices, calculated as the mean squared error between successive matrices, typically set to a small value like 10210^{-2} or 10310^{-3}.

W2. The paper lacks performance analysis. It would be better if the authors could compare their method with baselines in terms of throughput and TTFT.

We provide comprehensive timing results on single NVIDIA A100 40GB with Llama-3-8B-1M.

Main Results: The GPU only method can provide the fastest TTFT (Time To First Token; Prefill time) and TPOT (Time To First Token; Prefill time), but will reach out of memory (OOM) when context is too long (64K). CPU offload method can handle longer context but will suffer from limited GPU bandwidth and result in slow decoding speed, expecially for long context. The default proposed method can support longer context and provide a stable throughput. The proposed method without hit/miss mecanism is slower than the default in decoding. Further details can be found in the supplemental material. The following table shows the results.

Method4K4K8K8K16K16K32K32K64K64K
TTFTTPOTTTFTTPOTTTFTTPOTTTFTTPOTTTFTTPOT
GPU only37500.2935.4037734.1935.6433649.7935.3632111.4535.77OOMOOM
CPU offload6945.104.316984.354.327073.532.404849.190.984131.000.50
LRQK default7120.495.687280.395.726379.915.495436.665.364103.056.80
LRQK no hit/miss7180.642.506747.192.535317.062.314920.022.484163.861.95
评论

Dear Reviewer 7jqo,

Thank you for your valuable feedback. We appreciate your interest in our work and are committed to addressing your concerns. A brief summary of your comments and our responses is provided below:

  • Hyperparameter Sensitivity: We have carefully considered your concern regarding the sensitivity of the proposed method to hyperparameters. We have provided detailed guidelines for tuning the rank, top-k tokens, number of lite tokens, and iterations and tolerance. These guidelines should help users achieve optimal performance without extensive grid searches.
  • System Performance Metrics: We have included detailed timing results on a single NVIDIA A100 40GB with Llama-3-8B-1M to demonstrate the performance of our method. The results show that our method can handle longer contexts while maintaining a stable throughput.

If you have any further questions or require additional information, please do not hesitate to ask. We are here to assist you in any way we can.

评论

Thanks for your response and my concern is well addressed. I would raise my rating.

评论

Thank you for your insightful feedback and for taking the time to carefully evaluate our work. We truly appreciate your constructive comments on hyperparameter tuning and performance metrics. Your suggestions directly helped us strengthen the paper with more practical guidelines and detailed timing results. We’re grateful for your openness to our responses and for raising your score. Your support means a lot.

审稿意见
4

This paper proposes Low Rank Query and Key attention (LRQK), a two-stage framework for efficient long-context inference in large language models. LRQK jointly factorizes the query and key matrices into low-rank bases during the prefill stage, and then uses these to compute proxy attention scores for top-k token selection during decoding. A hierarchical GPU–CPU caching mechanism with a hit/miss policy transfers only missing key-value pairs, preserving exact attention outputs while reducing memory and data movement costs. Extensive experiments on RULER and LongBench benchmarks with LLaMA-3 and Qwen2.5 models show LRQK achieves comparable or superior accuracy to strong sparse attention baselines while substantially lowering GPU memory consumption.

优缺点分析

Strength

  1. The paper addresses a real and pressing bottleneck in LLM inference: the GPU memory consumption of KV caches for long contexts. Efficient memory strategies are highly relevant for widespread LLM deployment, especially on resource-constrained devices.

Weakness:

  1. The empirical comparisons primarily involve sparse/dynamic attention and offloading methods, but the selection of baselines does not cover some of the most recent quantization methods (e.g., PALU [9], which is only referenced).

[1] Efficient Low Rank Attention for Long-Context Inference in Large Language Models

[2] Scalable Efficient Training of Large Language Models with Low-dimensional Projected Attention

  1. While sensitivity to rank and top-k is shown (Tables 3, 4), there is limited discussion of the overhead and tuning effort required, particularly when considering different LLM architectures

  2. Results are only shown for LLaMA-3-8B and Qwen2.5-7B (Tables 1-2), lacking validation on other popular architectures.

  3. Please elaborate further on the differences with other methods focusing on efficient attention for long-context inference.

  4. While the paper claims to balance trade-offs between memory efficiency, numerical precision, and computational latency, it lacks experimental validation of these specific trade-offs.

问题

List in the Weakness part

局限性

1.Although presented algorithms are clear, actual running times, cache sizes (absolute MB/GB), and detailed hardware utilization are not given beyond high-level statements about GPU/CPU. Code is not referenced as available, and implementation details are not provided.

最终评判理由

Most of my concerns have been addressed. I would like to retain my original positive rating.

格式问题

na

作者回复

We thank the reviewer for the detailed and insightful comments.

W1. The empirical comparisons primarily involve sparse/dynamic attention and offloading methods, but the selection of baselines does not cover some of the most recent quantization methods (e.g., PALU [9], which is only referenced).

Thank you for this kindness suggestion. We acknowledge that direct comparison with PALU requires more careful consideration due to the differences in methodology. PALU decomposes KRl×d\mathbf{K} \in \mathbb{R}^{l \times d} in dimension dd, while our method and the comparison methods reduce both dimension dd and ll. Following the your valuable suggestion, KVQuant is applied to both the vanilla model (meta-llama/Llama-3.1-8B-Instruct, Qwen/Qwen2.5-7B-Instruct) and the proposed method with default parameters. The results are shown in the table:

RULER 32Kllama +KVQuantllama +LRQK +KVquantQwen +KVQuantQwen +LRQK +KVQuant
fwe89.5885.0094.0090.33
niah_single_1100.00100.00100.00100.00
niah_single_2100.00100.00100.0099.00
niah_multikey_1100.00100.0096.00100.00
niah_multikey_295.0096.0076.0056.00
niah_multivalue95.3196.7570.5093.50
niah_multiquery89.0089.0097.0099.25
qa_squad83.0082.0073.0074.00
qa_hotpotqa56.2551.0052.0053.00
vt87.5095.4095.4090.60

The suggested reference paper [2] is a great paper on applying low rank features on LLM training, which inspires us to explore the training side of the LLM. We will consider this in the future work. Thank you for this suggestion.

W2. While sensitivity to rank and top-k is shown (Tables 3, 4), there is limited discussion of the overhead and tuning effort required, particularly when considering different LLM architectures

We appreciate this concern and provide comprehensive overhead analysis:

Overhead and Tuning Efforts: Different model and dataset should have their own optimal hyperparameters. However, based on our experiments, there is an default choisece: r=32r=32, top-kk = 2048, and 64 lite tokens. We can further tune the hyperparameters based on this default choice.

W3. Results are only shown for LLaMA-3-8B and Qwen2.5-7B (Tables 1-2), lacking validation on other popular architectures.

Thank you for this valuable feedback. We have extended our evaluation to include two additional popular models: mistralai/Mistral-7B-Instruct-v0.3 and microsoft/Phi-3-mini-128k-instruct. For these experiments, we used the default hyperparameters of LRQK. Due to memory constraints on the A6000 (48GB), the Phi-3-mini model is evaluated in 16K. The results are summarized in below.

RULER 32KMistralMistral +LRQKRULER 16KPhi-3Phi-3 +LRQK
fwe67.0093.00fwe92.0091.00
niah_single_198.0097.00niah_single_1100.00100.00
niah_single_291.00100.00niah_single_2100.00100.00
niah_multikey_183.0097.00niah_multikey_196.0096.00
niah_multikey_263.0051.00niah_multikey_2100.00100.00
niah_multivalue85.7595.00niah_multivalue90.0090.25
niah_multiquery83.7593.00niah_multiquery90.5087.50
qa_squad59.0063.00qa_squad80.0081.00
qa_hotpotqa45.0047.00qa_hotpotqa51.0051.00
vt98.4096.40vt99.6099.60

W4. Please elaborate further on the differences with other methods focusing on efficient attention for long-context inference.

Thank you for this important suggestions. A comparison table highlighting key methodological differences is provided below:

MethodsLokiInfiniGenShadowKVProposed
DecomposeK(0:s) <- K P_, _,A = SVD(Q)A B = SVD(K)QKTAQAKTQ K^{T} \approx A_{Q} A_{K}^{T}
Device KGPU(low rank)GPUGPU(A, B)CPU(all) + GPU(hit)
Device VGPU(low rank)GPUCPU(all)CPU(all) + GPU(hit)
Selection Prefilltop-k of (qP)(KP)T(qP) (K P)^{T}W_Q,W_KW'\_Q, W'\_{K} <- top-k columns in W_Q,W_K\lvert W\_Q \rvert, \lvert W\_K\rverttop-k chunkstop-k of qKT;kq' K'^{T}; k'
Selection Decodetop-k of (qP)(KP)T(q P) (KP)^{T}attention score of qKTq' K'^{T} > (max - α\alpha)top-k chunks for each KV headtop-k of q[K;k]Tq' [K'; k']^{T}
Attention qqPq Pqqq
Attention K[KP]_Ω[K P]\_{\Omega}KΩK_{\Omega}[A_ΩB;K_decode;Koutlier][ A\_{\Omega} B; K\_{decode}; K^{outlier}]K_ΩK\_{\Omega}
Attention VV_ΩV\_{\Omega}VΩV_{\Omega}[V_Ω;V_decode;Voutlier][ V\_{\Omega}; V\_{decode}; V^{outlier}]V_ΩV\_{\Omega}
CPU <- GPUselected K_Ω,V_ΩK\_{\Omega}, V\_{\Omega}selected VΩV_{\Omega}hited K_Ω,hitK\_{\Omega, hit}, V_Ω,hitV\_{\Omega, hit}
NotesP: PCA projection matrixmodified W_QW\_Q, W_KW\_KExtra tokens KoutlierK^{outlier}, VoutlierV^{outlier}

Distinctions: 1. Joint decomposition, 2. Hierarchical caching, 3. Exact attention preservation.

W5. While the paper claims to balance trade-offs between memory efficiency, numerical precision, and computational latency, it lacks experimental validation of these specific trade-offs.

Thank you for the feedback. We evaluated the trade-offs on a text summarization task using 20 samples from LongBench (context: 32K, output: up to 128 tokens), with meta-llama/Llama-3.1-8B-Instruct. The time and resource usage are measured (Nvidia 3090 24G) and shown as below:

MethodTime (s)tokens/sAverage GPU Util (%)Max GPU Util (%)GPU Memory (GB)GPU power (W)
vanilla17.871775.7038.61; 48.3899.95; 100.016.94; 17.56187.24; 233.21
r=32, k=204864.84489.3963.64100.019.82203.98
r=16, k=204857.04556.2265.29100.018.85211.96
r=32, k=102452.62603.0556.86100.019.51199.59
r=16, k=102457.04646.3351.15100.019.33199.85

L1. Although presented algorithms are clear, actual running times, cache sizes (absolute MB/GB), and detailed hardware utilization are not given beyond high-level statements about GPU/CPU. Code is not referenced as available, and implementation details are not provided.

We acknowledge this limitation and will provide detailed implementation metrics:

  • Cache in GPU: 1. The most recently accessed KV cache, 2. Low rank matrices A_K,B_K,B_Q\mathbf{A}\_{K}, \mathbf{B}\_{K}, \mathbf{B}\_{Q}, 3. The weights of LLM.
  • Cache in CPU: 1. The full KV cache.
  • Actual running times: Please refer to response W5.
  • Implementation: A lightweight version of our code is provided in the supplementary material. Key aspects include:
    • Built on the standard Hugging Face transformers library.
    • The original attention mechanism is replaced with our proxy attention mechanism.
    • A self-defined buff session is introduced to manage the cache.
    • Two core algorithms are further compiled with torch.compile.
评论

We sincerely thank you for your thoughtful and constructive feedback. Your detailed questions and suggestions were instrumental in improving the clarity, completeness of this paper. Your engagement with the revisions has helped us refine the paper significantly. We deeply appreciate your time, expertise, and fair assessment, and we are truly thankful for the opportunity to address your concerns. Thank you for being part of this process.

评论

Thank you for your response and for addressing my questions. After reading the authors’ response, many of my earlier concerns have been resolved. Here is my updated assessment of the concerns I raised earlier:

Q1: The baseline comparison lacks recent quantization methods such as PALU.

Now: Almost resolved. The authors not only acknowledged the issue but provided new experiments.

Q2: Limited discussion of overhead and tuning costs for different architectures.

Now: Not a concern. The authors provided practical defaults.

Q3: Evaluation is limited to LLaMA3-8B and Qwen2.5-7B.

Now: Not a concern.

Q4: Please elaborate on differences from other efficient attention methods.

Now: Not a concern.

Q5: Claims about trade-offs are not empirically supported.

Now: Resolved. Authors provided quantitative data covering all trade-off dimensions, strengthening practical claims.

L1: No concrete runtime/cache/hardware info or code reference.

Now: Implementation info is reasonably clear.

审稿意见
5

The paper proposes Low-Rank Query and Key attention (LRQK), a two-stage framework for reducing the KV-cache memory footprint during long-context inference in decoder-only large language models (LLMs). For a long prompt, the full-precision query (Q) and key (K) matrices are jointly factorised into rank-r bases by minimising a reconstruction loss (Eq. 3). At each generation step, low-rank projections estimate “proxy” attention scores in O(ℓr) time; only the top-k tokens plus a small recency buffer are kept on-GPU, while the rest of the cache resides on CPU. A hit/miss mechanism fetches full-precision KV rows for missed indices, guaranteeing exact attention on the selected subset. Experiments with LLaMA-3-8B-1M and Qwen-2.5-7B on RULER-128 K and LongBench show that LRQK matches or beats shadow-KV, InfiniGen, QUEST and Loki on most tasks, e.g., +2 pp on QA-SQuAD versus the 8B baseline while cutting CPU↔GPU transfers by ≈60 % on WikiText-2 . Hyper-parameter sweeps reveal favourable rank/top-k trade-offs (r = 32 and k = 1024 give near-lossless accuracy)

优缺点分析

Strengths:

  1. This paper provides a novel and innovate approach to solving the memory constraints in long context inference. Unlike many eviction or sparsity methods, the hit/miss fetch ensures identical outputs to full attention on the retained tokens—no approximation error.
  2. The paper is generally well written and each technique introduced comes with proper motivation. This paper is timely and looks at some key memory issues with kv-caching.
  3. Authors provide strong results. With LLaMA-3-8B-1M at 128 K tokens, LRQK matches or beats strong baselines (ShadowKV, Quest, InfiniGen, Loki) on many RULER tasks and improves Passage-Retrieval and LCC on LongBench (Table 1). I also found the memory-transfer savings results interesting like on WikiText-2 the hit/miss cache cuts CPU ↔ GPU KV transfers by ≈60 % across a broad grid of settings (mean miss-rate ≈0.40, Fig. 5) Moreover, authors have done extensive ablations on rank r, active-set size k, miss-rate, and cache policy across two architectures and multiple long-context benchmarks.
  4. Authors promised to open source the code which will be valuable to the community.

Weaknesses:

  1. Experiments list the hardware (A100) but omit tokens/s throughput, wall-clock latency, and peak/resident GPU memory, making it hard to judge real deployment benefits
  2. All results use LLaMA-3-8B-1M and Qwen-2.5-7B; the method’s scalability to 30 B + or MoE LLMs, where KV caches are a bigger bottleneck, remains unverified. The authors themselves flag that rank r and active-set size k require dataset/model-specific tuning, and optimal values can vary across tasks. I am concerned about the ease of adoption of this technique for more general use cases.
  3. Equation 3 formulation is internally inconsistent. The hard constraints Q=AQBQ,K=AKBKQ=A_QB_Q, K=A_KB_K in Eq. 3 cannot hold for low rank r<dr<d and are immediately relaxed in the Lagrangian; also, the interaction term omits BQBKTB_QB_K^T. This is mostly cosmetic but weakens the mathematical presentation.

问题

  1. Section 5 reports “≈ 60 % reduction in CPU↔GPU transfers” but gives no tokens-per-second or latency figures on the A100 node you mention (lines 210-216). Could you provide end-to-end throughput (tokens/s) and peak GPU memory for LRQK vs. ShadowKV, InfiniGen and vanilla attention at 128 K tokens?

  2. All experiments use 7-8 B parameters. Are there bandwidth or PCIe limits that prevent LRQK from scaling to 30 B+ or mixture-of-experts LLMs where KV memory dominates? Even a profiling statement would help assess significance.

  3. Since LRQK already uses low-rank factors, can the retained full-precision KV rows be post-quantised to 8-bit or 4-bit (à la KVQuant) without harming accuracy? Discussing complementarity with quantisation would broaden impact.

局限性

The authors candidly notes that rank r and active-set size k require task-specific tuning and that optimal values differ across architectures. However, the societal-impact section is missing. Please add a brief discussion on potential misuse (e.g., enabling cheaper deployment of disinformation bots) and mitigation strategies.

最终评判理由

The authors have sufficiently addressed all the concerns I have raised during the rebuttal. I think this paper tackles a timely challenge of solving the memory constraints in long context inference. The novel techniques and the findings presented in the paper will be valuable for the entire community.

格式问题

N/A

作者回复

Thank the reviewer for insightful comments.

W1. Experiments list the hardware (A100) but omit tokens/s throughput, wall-clock latency, and peak/resident GPU memory, making it hard to judge real deployment benefits

Thank you for this valuable feedback. We provide comprehensive timing results on single NVIDIA A100 40GB with Llama-3-8B-1M. The following table shows the results. Further details can be found in the supplemental material.

Method4K4K8K8K16K16K32K32K64K64K
TTFTTPOTTTFTTPOTTTFTTPOTTTFTTPOTTTFTTPOT
GPU only37500.2935.4037734.1935.6433649.7935.3632111.4535.77OOMOOM
CPU offload6945.104.316984.354.327073.532.404849.190.984131.000.50
LRQK default7120.495.687280.395.726379.915.495436.665.364103.056.80
LRQK no hit/miss7180.642.506747.192.535317.062.314920.022.484163.861.95

W2. All results use LLaMA-3-8B-1M and Qwen-2.5-7B; the method’s scalability to 30 B + or MoE LLMs, where KV caches are a bigger bottleneck, remains unverified. The authors themselves flag that rank r and active-set size k require dataset/model-specific tuning, and optimal values can vary across tasks. I am concerned about the ease of adoption of this technique for more general use cases.

Thank you for this insightful question. We provide further validation on larger models: Qwen/Qwen2.5-14B-Instruct (64K context) and Qwen/Qwen2.5-32B-Instruct (16K context). YaRN is applied on 64K context. LRQK use default settings. Results are shown below.

RULER 64KQwen 14BQwen 14B +LRQKRULER 16KQwen 32bQwen 32B +LRQK
fwe90.3378.33fwe94.6794.00
niah_single_157.0099.00niah_single_1100.00100.00
niah_single_255.0096.00niah_single_2100.00100.00
niah_multikey_146.0080.00niah_multikey_1100.00100.00
niah_multikey_224.0022.00niah_multikey_299.0099.00
niah_multivalue54.0082.25niah_multivalue100.00100.00
niah_multiquery49.7588.50niah_multiquery100.00100.00
qa_squad64.0050.00qa_squad86.0086.00
qa_hotpotqa41.0036.00qa_hotpotqa66.0066.00
vt57.8097.20vt86.4082.60

The table shows that the proposed method can be applied to larger models.

W3. Equation 3 formulation is internally inconsistent. The hard constraints Q=A_QB_Q,K=A_KB_KQ=A\_Q B\_Q, K = A\_K B\_K in Eq. 3 cannot hold for low rank r<dr<d and are immediately relaxed in the Lagrangian; also, the interaction term omits B_QB_KTB\_Q B\_K^T. This is mostly cosmetic but weakens the mathematical presentation.

We acknowledge the reviewer's concern and provide the following clarification: You are correct that the hard constraints Q=A_QB_QQ = A\_Q B\_Q and K=A_KB_KK = A\_K B\_K cannot hold exactly when r<dr < d. The formulation should indeed reflect that these are approximation constraints. We will revise the formulation to be more mathematically precise:

argminA_Q,B_Q,A_K,B_K12QKTA_QA_KTF2,where QA_QB_Q,KA_KB_K.\mathop{argmin}_{A\_{Q}, B\_{Q}, A\_{K}, B\_{K}} \dfrac{1}{2} || Q K^T - A\_{Q} A\_{K}^T ||_F^2, \text{where } Q \approx A\_{Q} B\_{Q}, K \approx A\_{K} B\_{K}.

Regarding the interaction term omitting B_QB_KTB\_Q B\_K^T: The key insight is that we are not approximating QKTQ K^T as (A_QB_Q)(A_KB_K)T=A_QB_QB_KTA_KT(A\_Q B\_Q)(A\_K B\_K)^T = A\_Q B\_Q B\_K^T A\_K^T.

Instead, our approach recognizes that:

  1. Both QQ and KK have low-rank structure individually
  2. Their product QKTQ K^T can be approximated more efficiently by directly learning compact representations A_QA\_Q and A_KA\_K such that QKTˆA_QA_KTQ K\^T \approx A\_Q A\_K^T

We will revise the manuscript to clarify these mathematical details and ensure the formulation is both precise and well-motivated.

Q1. Section 5 reports “≈ 60 % reduction in CPU <-> GPU transfers” but gives no tokens-per-second or latency figures on the A100 node you mention (lines 210-216). Could you provide end-to-end throughput (tokens/s) and peak GPU memory for LRQK vs. ShadowKV, InfiniGen and vanilla attention at 128 K tokens?

Thank you for this important question. We provide a timing results on NVIDIA 3090 24GB under text summarization task (20 samples from LongBench, context 32K, output up to 128 tokens) with meta-llama/Llama-3.1-8B-Instruct as the base model. Due to time limit, we evaluate the vanilla attention (2 GPUs) and ShadowKV (1 GPU), and the proposed method (1 GPU). Average results are shown below:

MethodTime (s)tokens/sAverage GPU Util (%)Max GPU Util (%)GPU Memory (GB)GPU power (W)
vanilla17.871775.7038.61; 48.3899.95; 100.016.94; 17.56187.24; 233.21
shadowkv29.291083.5558.00100.017.93243.85
LRQK(r=32, k=2048)64.84489.3963.64100.019.82203.98
LRQK(r=16, k=2048)57.04556.2265.29100.018.85211.96
LRQK(r=32, k=1024)52.62603.0556.86100.019.51199.59
LRQK(r=16, k=1024)57.04646.3351.15100.019.33199.85

Q2. All experiments use 7-8 B parameters. Are there bandwidth or PCIe limits that prevent LRQK from scaling to 30 B+ or mixture-of-experts LLMs where KV memory dominates? Even a profiling statement would help assess significance.

Bottle neck: PCIe limits and GPU bandwidth is not the main limitation, since the data need to be transfered between CPU and GPU is relatively small. Based on our observation, the main time consumption is the indexing operation in CPU. It takes time to fetch and collect hitted tokens in CPU. We are looking for a better method to reduce this time consumption.

Q3. Since LRQK already uses low-rank factors, can the retained full-precision KV rows be post-quantised to 8-bit or 4-bit (à la KVQuant) without harming accuracy? Discussing complementarity with quantisation would broaden impact.

Thank you so much for this sugessions, the quantization methods are valuable to explore. Following the your suggestion, KVQuant is evaluated to both the vanilla model (meta-llama/Llama-3.1-8B-Instruct and Qwen/Qwen2.5-7B-Instruct) and the model with proposed method. The results are shown in the following table. The hypterparameters of LRQK are r=32r=32, top-kk = 2048, and 64 lite tokens.

RULER 32Kllama +KVQuantllama +LRQK +KVquantQwen +KVQuantQwen +LRQK +KVQuant
fwe89.5885.0094.0090.33
niah_single_1100.00100.00100.00100.00
niah_single_2100.00100.00100.0099.00
niah_multikey_1100.00100.0096.00100.00
niah_multikey_295.0096.0076.0056.00
niah_multivalue95.3196.7570.5093.50
niah_multiquery89.0089.0097.0099.25
qa_squad83.0082.0073.0074.00
qa_hotpotqa56.2551.0052.0053.00
vt87.5095.4095.4090.60

From this table, we can find that in general applying KVQuant with the proposed method does not siginificantly harm the performance.

L1. The authors candidly notes that rank r and active-set size k require task-specific tuning and that optimal values differ across architectures. However, the societal-impact section is missing. Please add a brief discussion on potential misuse (e.g., enabling cheaper deployment of disinformation bots) and mitigation strategies.

Thank you so much for this valuable sugessions.

Hyperparameter Tuning: Different models and datasets may require unique set of optimal hyperparameters. However, there is a default choice that can help reduce the tuning effort. Based on our experiments, we can further turn from a default choice: r=32r=32, top-kk = 2048, and 64 lite tokens. For instance, the rank rr can be chosen from {8,16,32,48}\{8, 16, 32, 48\}, and the top-kk value can be adjusted to accommodate different context lengths.

Societal impact: LRQK's reduced inference costs could enable broader access to long-context language models, benefiting research and education. However, this efficiency may also lower barriers to deploying harmful applications such as large-scale disinformation campaigns. We believe democratized access to advanced AI capabilities provides net benefits when coupled with appropriate safeguards and responsible deployment practices.

评论

Dear Reviewer GeRa,

Thank you for your valuable comments.

We have carefully addressed the concerns raised in your review. A summary of our responses is as follows:

  • System Performance Metrics: The results on the tokens/s throughput, latency, and memory usage have been added (See reply to W1 and Q1).
  • Experiments on Larger Models: The experiments on larger models (14B and 32B) have been added (See reply to W2).
  • Mathematical Presentation: The mathematical presentation has been improved (See reply to W3).
  • Quantization Methods: The quantization methods (KVQuant) have been evaluated (See reply to Q3).
  • Hyperparameter Tuning and Societal impact: The hyperparameter tuning and societal impact have been addressed (See reply to L1).

If you have any further questions or concerns, we would be happy to discuss them. We sincerely appreciate the time and effort you have devoted to reviewing our work.

评论

I thank the authors for their detailed response and adding all the additional experiments during the rebuttal. My concerns are sufficiently addressed and hence I'll be raising my score.

评论

We sincerely thank reviewer for the thoughtful review, the constructive feedback. We are grateful that our responses and additional experiments have addressed your concerns, and we appreciate your decision to raise your score. Your insightful questions, have significantly strengthened the paper, particularly regarding scalability to larger models, system performance metrics and mathematical presentations, etc. We will incorporate all the new results and clarifications into the final version. We are committed to open science and will release the code and configurations to support reprehensibility and community adoption. Thank you again for your time and valuable contributions to improving this work.

最终决定

LRQK is a novel approach with exact attention preservation. It shows strong experimental results, outperforming sparse-attention methods and achieving significant memory savings.

Initial paper lacked performance metrics and scalability validation for larger models. Hyperparameter guidelines were insufficient and implementation overheads unclear.

The paper offers an Innovative solution to a critical LLM memory bottleneck. Authors' thorough rebuttal addressed all major initial weaknesses with new experiments and clarifications, strengthening the paper.

Reviewers questioned metrics, scalability, hyperparameter tuning, and implementation. Authors added detailed timing/memory results, validated on larger models, and provided hyperparameter guidelines/implementation details. All concerns resolved, leading to acceptance.