acceptodds
Published as a conference paper at NeurIPS 2026

GPA: General Principled Framework for Linearizing Softmax Attention via KV Cache Approximation

wang ning, Zekun Li, Tongxin Bai, Man Yao, Chunlei Men, Guoqi Li

Abstract

Transformers excel at sequence modeling, yet Softmax attention incurs quadratic complexity and unbounded KV cache growth. While linear attention offers a promising alternative, existing approaches lack systematic functional comparison with Softmax attention, rigorous error analysis, and a theoretically grounded improvement roadmap. We address this gap by framing linearization as KV cache approximation and establishing a principled pathway from Softmax attention to linear models. Our analysis identifies five critical components—redundancy elimination, token-level quantization with positional separation, positional compression, inter-layer similarity, and multi-state decomposition—each accompanied by theoretical justification and error bounds, with explicit connections to existing mechanisms. Building upon this framework, we introduce GPA, a linearized attention model that inherits pretrained weights and achieves state-of-the-art results. GPA outperforms strong baselines including MVA and GSA across multiple benchmarks, while requiring less fine-tuning resources. Our work provides both theoretical clarity and practical guidance for advancing linear attention, charting a principled course toward efficient, scalable alternatives to Softmax attention.

Keywords:
Sydney

Reviews

Among:
Shape:
123456this paper, Bottom 49%
Figure 1. Mean review rating of the reviewed papers at NeurIPS 2026. This paper averages 4.33 over 3 reviews, above 49% of the others.
Reviewer_Cj3hOpenReview ↗
Rating
3
Clarity
3
Confidence
3
Originality
3
Quality
3
Significance
3
Read review
Summary

The paper views the conversion from Softmax attention to linear attention as a progressive KV-cache approximation problem and proposes a five-step theoretical framework consisting of redundancy elimination, token quantization with positional decoupling, positional compression, inter-layer similarity, and multi-state decomposition. Based on these principles, the authors develop GPA, a weight-inheriting linear attention architecture that achieves improved performance over prior linear-attention approaches such as GSA and MVA. The paper aims to provide both a theoretical explanation of why linear attention can approximate Softmax attention and a practical roadmap for designing more effective linear attention models.

Strengths and weaknesses

Strengths:

  1. The paper introduces a novel theoretical framework that unifies Softmax and linear attention by formulating linearization as a KV cache approximation problem.

  2. The paper provides rigorous theoretical analysis by identifying five key components of linear attention and supporting each with theoretical justification and error bounds.

  3. The proposed framework offers valuable insights into existing linear attention mechanisms by explaining them from a unified theoretical perspective.

  4. The proposed GPA model effectively inherits pretrained weights while requiring relatively little fine-tuning, making it practical for real-world adoption.

Weaknesses:

  1. Propositions 2 and 3 appear to apply only to the first layer, where representations remain directly tied to tokenizer vocabulary embeddings. The paper states that the argument becomes ineffective in deeper layers due to token mixing and positional entanglement. Thus, the theoretical guarantees established by Propositions 2 and 3 do not appear to extend beyond the first layer, and the subsequent analysis relies on the separate assumptions introduced in Proposition 4.

  2. The connection between the five theoretical findings remains unclear. While each proposition addresses a different aspect of KV-cache compression or linear attention design, the paper does not provide a unifying theorem or formal framework showing how the individual results compose. In particular, it is unclear what overall guarantee follows when Propositions 1–5 are combined, how their approximation errors accumulate, and whether the final GPA model satisfies the assumptions required by all propositions simultaneously. As a result, the theoretical narrative appears fragmented, making it difficult to understand what the five propositions collectively establish.

  3. The connection between the theoretical framework and the final GPA architecture is unclear, as the model incorporates numerous heuristic and engineering-driven components, e.g., sigmoid routing, vocabulary decomposition, enhanced reading mechanisms, routing matrices, and multi-channel reading, making it difficult to identify which design choices are theoretically grounded and which are introduced primarily for practical performance.

  4. The experimental methodology lacks sufficient detail, with important implementation information, e.g., state sizes, inference configurations, memory budgets, exact architectural differences from GSA/MVA, and statistical variance across runs, either omitted or inadequately described.

  5. Although the paper provides valuable theoretical analyses, the novelty of the proposed method relative to existing work remains insufficiently clear, as many of its core components appear to be derived from or closely related to established techniques, including vector quantization, memory decomposition, GSA, MVA, delta-rule memories, and KV-cache compression, making it difficult to discern the specific algorithmic innovations and contributions beyond their integration within a unified framework.

  6. The paper suffers from writing and presentation issues, including numerous grammatical errors, awkward phrasing, inconsistent and overloaded notation, and theoretical statements and propositions that are often difficult to follow and appear more intuitive than rigorously formalized.

Questions
  1. Among the five theoretical principles, which one drives the largest performance improvement? The authors should provide a thorough ablation study on the full GPA architecture to clarify each component's contribution.

  2. How robust is GPA to changes in hyperparameters: vocabulary state size, number of decomposition levels, similarity thresholds, and routing strategy?

  3. The paper claims Softmax attention is a special case of a linear model, but in what sense exactly? Is this a statement about computational complexity, expressive power, or ease of implementation? A formal theorem would help substantiate this claim.

  4. Proposition 1 is central to the paper's argument, yet the derived bound appears to far exceed any realistic memory budget. What is the actual practical takeaway from this bound?

  5. Proposition 4 appears to hinge on the assumption that representations remain similar across layers. How does this inter-layer similarity actually behave across different model architectures, model scales, and downstream tasks?

  6. How does GPA stack up against recent efficient attention methods that preserve Softmax, e.g., as KV-cache compression, sparse attention, or hybrid attention variants, when compared under the same memory budget?

Limitations

Yes

Paper formatting concerns

No

1 comment

We sincerely thank the reviewer for the thorough reading and the highly constructive feedback. Since you’ve provided a large number of questions, and our response is nearly 30k characters long, we’ll first address the key points by the simplified version. (comments to answer the remaining Q. )

W1.

R: We acknowledge that the strict theoretical upper bound from Propositions 2 and 3 holds primarily at the first layer. However, the proposed information decoupling and compression methodology is universally applicable to any layer with positional information, yielding substantial compression gains. To propagate the first-layer vocabulary bound to deeper layers, we rely on Proposition 4. We emphasize that Proposition 4's assumptions are exceptionally mild—requiring only standard numerical precision (e.g., bfloat16/FP8) and the presence of residual connections. Extensive inter-layer similarity experiments across various models strongly support this (please also refer to Reviewer 5EQ1’s W1).

W2.

R: We appreciate this crucial observation. We would like to clarify that a unified theoretical formulation and incremental ablation studies (Tables 4–7) are already provided in Section 3.6 of the manuscript. Specifically, Eqs. (12)–(16) systematically map to Propositions 1–5, detailing how redundant KV consolidation, positional decoupling, inter-layer similarity constraints, and vocabulary decomposition compose to form the final GPA output.

To further address your concern and provide a rigorous compositional guarantee, we formulate a Unified Theorem with accumulated error analysis:

Unified Theorem: Compositional Guarantee of GPA Theorem 1 (Fixed-state approximation of Softmax attention by GPA). Consider an LL-layer causal Transformer with vocabulary size VV and bounded norms ∥qt(ℓ)∥2≤Bq(ℓ)\|\boldsymbol q_t^{(\ell)}\|_2\le B_q^{(\ell)}, ∥kt(ℓ)∥2≤Bk(ℓ)\|\boldsymbol k_t^{(\ell)}\|_2\le B_k^{(\ell)}, ∥vt(ℓ)∥2≤Bv(ℓ)\|\boldsymbol v_t^{(\ell)}\|_2\le B_v^{(\ell)}. Let ot,SA(ℓ)o_{t,\mathrm{SA}}^{(\ell)} and ot,GPA(ℓ)o_{t,\mathrm{GPA}}^{(\ell)} denote the exact Softmax and GPA outputs. Suppose:

  • Redundant KV consolidation (Prop 1) has distortions δdup,k(ℓ),δdup,v(ℓ)\delta_{\mathrm{dup},k}^{(\ell)}, \delta_{\mathrm{dup},v}^{(\ell)}.
  • Positional decoupling (Prop 2) is lossless, and compressed positional stats (Prop 3) introduce score error ηpos,t(ℓ)\eta_{\mathrm{pos},t}^{(\ell)}.
  • Inter-layer matching ratios (Prop 4) are p1,…,pℓ>0p_1,\ldots,p_\ell>0.
  • GPA uses HℓH_\ell residual memory levels (Prop 5) with quantization ratios ρℓ,ik,ρℓ,iv\rho_{\ell,i}^{k}, \rho_{\ell,i}^{v}.
  • Enhanced reading (Prop 6) introduces errors ηread−score,t(ℓ),ηread−out,t(ℓ)\eta_{\mathrm{read-score},t}^{(\ell)}, \eta_{\mathrm{read-out},t}^{(\ell)}.

Then: (a) Recursive effective-state bound: Mℓ≤min⁡ ⁣{T,V∏r=1ℓpr}M_\ell \le \min\!\left\{T, \frac{V}{\prod_{r=1}^{\ell}p_r}\right\}. Prop 2 initializes M0≤VM_0\le V, and Prop 4 propagates it.

(b) Linear complexity: The storage cost is O((dk+dv+dp)∑i=1Hℓsℓ,i)O\left((d_k+d_v+d_p)\sum_{i=1}^{H_\ell}s_{\ell,i}\right), independent of TT. Inference requires O(T)O(T) time and O(1)O(1) recurrent memory.

(c) Per-layer approximation error: Defining effective reconstruction errors Dk(ℓ)=δdup,k(ℓ)+Bk(ℓ)(∏i=1Hℓρℓ,ik)1/2D_k^{(\ell)} = \delta_{\mathrm{dup},k}^{(\ell)} + B_k^{(\ell)} (\prod_{i=1}^{H_\ell}\rho_{\ell,i}^{k})^{1/2} (and similarly for Dv(ℓ)D_v^{(\ell)}), the output error is bounded by: E[∥ot,SA(ℓ)−ot,GPA(ℓ)∥2]≤2Bv(ℓ)[ηpos,t(ℓ)+ηread−score,t(ℓ)+Bq(ℓ)dDk(ℓ)]+Dv(ℓ)+ηread−out,t(ℓ).\mathbb E\left[\| o_{t,\mathrm{SA}}^{(\ell)} - o_{t,\mathrm{GPA}}^{(\ell)} \|_2\right] \le 2B_v^{(\ell)} \left[ \eta_{\mathrm{pos},t}^{(\ell)} + \eta_{\mathrm{read-score},t}^{(\ell)} + \frac{B_q^{(\ell)}}{\sqrt d}D_k^{(\ell)} \right] + D_v^{(\ell)} + \eta_{\mathrm{read-out},t}^{(\ell)}. Crucially, the multi-level residual error decreases multiplicatively as E[∥rHℓ(ℓ)∥22]≤E[∥r0(ℓ)∥22]∏i=1Hℓρℓ,i\mathbb E[\|r_{H_\ell}^{(\ell)}\|_2^2] \le \mathbb E[\|r_0^{(\ell)}\|_2^2] \prod_{i=1}^{H_\ell}\rho_{\ell,i}, rather than accumulating additively.

(d) Cross-layer error accumulation: With Lipschitz bound Λℓ\Lambda_\ell for the ℓ\ell-th residual block, the final deviation satisfies E[∥hSA(L)−hGPA(L)∥2]≤∑ℓ=1L(∏r=ℓ+1LΛr)εℓ\mathbb E[\|h_{\mathrm{SA}}^{(L)}-h_{\mathrm{GPA}}^{(L)}\|_2] \le \sum_{\ell=1}^{L} (\prod_{r=\ell+1}^{L}\Lambda_r) \varepsilon_\ell. Under normalized residual blocks, the end-to-end error is approximately additive.

A full proof combining Props 1–5 with perturbation bounds will be added to the appendix.

W3.

R: To clarify the connection between the theoretical framework and the GPA architecture, the main thread is as follows:

  • Prop 1 (Eqs. 11-12): De-duplication and counting reduce the KV cache from unbounded to bounded.
  • Props 2 & 3 (Eq. 13, ct(i)c_t^{(i)} in Eq. 14): Information decoupling and compression compress the first-layer bound to the vocabulary size.
  • Prop 4: Inter-layer similarity uses first/last-layer bounds to constrain intermediate layers, guiding hyperparameter settings.
  • Prop 5 (Eqs. 14-15): Vocabulary decomposition exponentially decays the layer-wise upper bound, achieving high effective capacity with limited state sizes. at(i)a_t^{(i)} computes the equivalent attention score per level.
  • Eq. 16: Normalization and residual connections yield the final GPA output.
  • Prop 6: Justifies the enhanced reading and multi-channel mechanisms for marginal performance gains.

Sigmoid routing is a minor technique replacing Softmax nonlinearity for slight performance gains. Routing matrices record inter-level state connections, which are a mathematically necessary consequence of the decomposition process.

W4.

R: We sincerely thank the reviewer for pointing out these omissions.

  • State sizes: As indicated in Line 262, we use two-level states with a total of 128 states to ensure a fair comparison with GSA/MVA; thus each level has 64 states.
  • Inference configurations and memory budgets: refer to Reviewer 5EQ1 Q1. We also have tests for 16K and 128K, but due to space limitations, please refer to the comments below.

W5 (Similarity to existing techniques)

We acknowledge that some components may appear superficially related to prior work, but their motivation and essence are fundamentally different:

  • Proposition 1 (deduplication & counting): Our analysis is purely information‑theoretic—digital computers inherently quantise, enabling finite‑state representation via type counting. The delta‑rule is a linear deduplication; ours retrieves states through an extremal combination mechanism and explicitly preserves counting information (which delta‑rule discards).
  • KV‑state usage: Reducing error relative to standard attention via KV states is natural, so some resemblance to GSA is expected—but our multi‑level composition and inter‑state connections are not addressed in GSA.
  • Memory decomposition: Unlike MVA, we identify and model inter‑level connections (routing matrices) as crucial for performance.
  • KV‑cache compression: This is a broad concept; our compression methods are specifically designed to minimise a well‑defined error objective. We are not aware of any method with the same formulation. If the reviewer has specific references, we are happy to compare.

More importantly, the unified integration itself is a major contribution. Analogous to calculus—where individual arithmetic operations are known but only their combination yields the intended power—our work provides a systematic path for linearisation, combining necessary nodes to enable future research.

Q1

Tables 4–7 in the manuscript already provide ablation studies isolating the effect of each theoretical component. The "MVA" variant in Table 7 specifically applies our Components 1–4 while retaining only the original MVA decomposition, clearly highlighting the improvement brought by our decomposition strategy.

We emphasize that our theory provides a stepwise linearization path from standard attention to a fixed‑state architecture with moderate state size. The final performance is achieved only through the integrated combination of all components—attributing the gain to any single one is inherently difficult, much like calculus, whose power emerges from the proper combination of basic operations rather than from any isolated operator alone.

Q2.

Dynamic thresholds: In practice, we use Softmax normalization with KV parameters to learn thresholds adaptively; output activations typically concentrate near 0.9. Fixed thresholds in the theory are used solely for pedagogical clarity.

Routing strategy: If this refers to inter‑state connections, they are fully determined by the vocabulary size and number of decomposition levels, and are highly stable because the stored values depend only on inter‑state errors.

ModelTokensARC-cARC-eHellaSwagPIQAWinoGrande
Qwen2.5-3B (Original)–45.077.473.578.668.5
Qwen2.5-3B-GPA (2×64)3B41.574.665.172.360.1
Qwen2.5-3B-GPA (4×64)3B42.674.065.774.262.5
Qwen2.5-3B-GPA (2×128)3B42.175.966.573.961.6

Q5.

R: We tested inter-layer similarity on various texts (sampled from FineWeb, MMLU, etc.) across different model architectures such as Llama, Qwen, and Mistral, averaging over multiple samples.

Layer PairLlama-3-70B Sim (%)Qwen2.5-3B Sim (%)Llama-3.1-8B Sim (%)
L0-L1734459
L1-L2899076
L2-L3919681
L3-L4909584
L4-L5939584
L5-L6939583
L6-L7949485
L7-L8929385
............
L13-L14919390
L14-L15929390
L15-L16929490
L16-L17919590
L17-L18899690
L18-L19899590
............
L26-L27939496
L27-L28929295
L28-L29929494
L29-L30929493
L30-L31939394
L31-L329292–
L32-L339494–
L33-L349393–
............
L78-7985––
Reviewer_5EQ1OpenReview ↗
Rating
5
Clarity
3
Confidence
4
Originality
3
Quality
3
Significance
3
Read review
Summary

This paper studies how to linearized pretrained Softmax Attention models. The authors interpret the linearization process as a KV cache approximation and propose a principled framework centered on redundancy elimination, positional compression, inter-layer similarity, and multi-state decomposition. Based on these principles, they introduce the GPA model and demonstrate certain improvements over baselines such as GSA, MVA, and GLA on language understanding, long-context, and passkey retrieval tasks.

Strengths and weaknesses

Strength

  1. I believe that the linearization of Softmax Attention in pretrained LLMs is a core problem in efficient long-context modeling. Instead of simply proposing a new linear attention block, this paper attempts to provide a unified explanation of the transformation from Softmax attention to linear attention from the perspective of KV cache approximation, which is an insightful viewpoint.

  2. The paper is well-organized and clearly written.

  3. Large-scale experiments. The authors conduct experiments on multiple models and compare with several methods, showing improvements on certain tasks.

Weakness

  1. line 201. The paper claims that the five principles form a principled pathway from Softmax Attention to Linear Attention. However, several propositions rely on strong assumptions, and the final implementation introduces additional engineering components such as scaling factors, multi-level memory, and enhanced reading mechanisms. Specifically, the inter-layer similarity analysis provides a recursive upper bound in theory, but the author later admits that similarities may approach zero and resorts to fixed scaling for practical control, creating a clear gap between theoretical guarantees and the final algorithm.

  2. The paper positions itself as a general framework for linearizing pretrained attention models, but the discussion mainly focuses on KV cache compression and existing linear attention methods. It provides insufficient discussion of approaches that selectively preserve Softmax attention, intra-layer hybrid attention, or token-level hybrid linearization. I suggest that the authors discuss the relationship with STILL[1] and Liger[2], and clarify how GPA differs from methods that preserve high-fidelity attention for selected key tokens in terms of problem formulation, theoretical assumptions, and performance-efficiency trade-offs.

  3. It would also be valuable to discuss the compatibility and feasibility of GPA with cross-layer hybrid designs. The current method still shows a noticeable gap on long-sequence tasks, and in my own experience, keeping standard attention in a small number of layers can significantly improve performance. Related works such as Jet-Nemotron[3] and KL-Selector[4] may provide useful references for this improvement.

[1] Meng, et al. STILL: Selecting Tokens for Intra-Layer Hybrid Attention to Linearize LLMs. arXiv 2026.

[2] Lan, Disen, et al. Liger: Linearizing large language models to gated recurrent structures. ICML 2025.

[3] Gu, Yuxian, et al. Jet-nemotron: Efficient language model with post neural architecture search. NeurIPS 2026.

[4] Li, Yanhong, et al. "Distilling to hybrid attention models via kl-guided layer. ICLR 2026.

Questions

Beyond the concerns raised in the weaknesses, I have a few additional questions:

  1. The efficiency argument is not sufficiently convincing. The current results only report overall curves and lack component-level latency or FLOPs analysis. The authors need to provide more fine-grained comparisons. In addition, the proposed design may pose challenges for hardware parallelization; it would be helpful if the authors could discuss this aspect in more detail (though I hope this concern is unfounded).

  2. Currently dominated by commonsense benchmarks, the evaluation lacks systematic long-context stress tests (e.g., NIAH, BABILong, RULER). Given GPA's core motivation of improving long-context efficiency, stronger evidence on challenging long-sequence retrieval and multi-hop reasoning tasks is essential to substantiate its claims.

This is an interesting work, and I will raise my score if the authors address all my concerns.

Limitations

Yes

Paper formatting concerns

NA

Final justification

The authors have provided thorough responses to my questions. In particular, GPA shows consistent improvements across methods based on different linearization strategies, and the tests on long-sequence tasks as well as the latency experiments have largely addressed my core concerns about this paper. I believe that linearizing pretrained models is a promising direction, and its key challenge lies in resolving bottlenecks such as long-range dependency. Although the method and experimental results in this paper are good, the writing, such as background has some shortcomings, which the authors have committed to addressing during the rebuttal. Overall, I believe the rebuttal has resolved all my concerns, and I consider the paper acceptable for publication.

1 comment

We sincerely thank you for your professional and valuable comments, which have greatly improved our paper and methodology.

Weakness 1

Response: We appreciate the insightful comment. We agree that Proposition 4 only gives a conditional upper bound given plp_l; as pl→0p_l\to0 it degenerates, and the practical constant cc is an external capacity constraint, not derived from the proposition—introducing error as noted.

We will therefore explicitly label cc as a user-set capacity hyper-parameter and provide the error analysis relating it to plp_l: the relative error is approximately max⁡(0,plc−1pl)\max(0, \frac{p_l c - 1}{p_l}). Since this introduces error, fine-tuning is required, but Table 6 shows that even small cc recovers performance well, consistent with the insensitivity of KV caches to numerical precision (e.g., KV Quant at 2–4 bits) and with sparse attention properties.

We emphasize that the assumptions are mild—only numerical precision and residual connections. We added inter-layer similarity experiments (see Reviewer Cj3h W5) and cite supporting works such as Deja Vu (ICML), MiniCache (NeurIPS), KVSharer (ACL), and MQA-CLA2 (ACL). The results show high inter-layer similarity across scales (Qwen2.5-14B, Llama-3.2, Mistral, etc.), and linear KV projection does not alter the number of distinct types.

Weakness 2

Response: Our method is orthogonal to selective Softmax preservation, intra-layer hybrid attention, and token-level hybrid linearization, and can be readily combined with them. We demonstrate this with GPA-SWA (Table 8) and newly added GPA-STILL experiments, and we now discuss and cite both STILL and Liger. As shown below, STILL brings notable gains on MMLU and retrieval.

ModelTraining Tokens (B)PIQA acc ↑ARC-e acc ↑ARC-c acc ↑HellaSwag acc ↑Wino. acc ↑MMLU (5-shot) ↑Avg. (w. MMLU)Avg. (wo. MMLU)
Transformer–––––––––
Llama 3 8B15000+79.580.053.379.173.165.371.873.0
Linearized from Llama 3 8B
LoLCATs0.0480.078.852.575.673.343.967.372.0
Liger-GLA0.0280.381.152.576.372.043.467.672.4
STILL0.0481.381.754.878.173.259.771.573.8
Llama 3 8B GPA-SWA (Ours)0.0481.282.854.579.474.153.871.074.4
Llama 3 8B GPA-STILL (Ours)0.0481.382.755.278.973.860.472.074.3

We avoid intra-layer hybrid high-fidelity attention because such mechanisms (e.g., SWA) tend to overfit to the local window, causing retrieval failures beyond it. STILL appears to address this effectively.

Another major reason is that purely linear models have the potential to surpass current Transformers and we believe your expertise will allow you to easily see the potential. This is because Transformers discard information along the time dimension during learning; although this information is compressed into the FFN layers and alleviates the problem to some extent, the lack of explicit time-dimension storage creates a fundamental deficiency. Drawing an analogy to human development, the current standard attention and autoregressive learning paradigm is akin to compressing information into something like genes, while completely discarding explicit memory in the brain, resulting in a trained LLM that is an “amnesiac genius and expert.” To develop the model’s abilities, one must add fabricated contextual memories to improve performance (i.e., in-context learning). Moreover, current LLMs cannot maintain long-term memory during inference, making it difficult to achieve human-like intelligence or emotional robotics.

Our GPA theory offers a possibility: we bound the infinitely KV cache of LLMs through Proposition 1, and then approximate it to a practically feasible state size through proposition1-5. The extremely high equivalent-capacity memory state maintained by GPA can realize explicit time-dimension memory during both pretraining and inference, much like humans possessing growth experiences and memories over time, rather than merely innate talent stored in DNA. Through such learning, ideally, we can achieve the in-context learning performance that standard Attention achieves by injecting relevant text.

Weakness 3

Response: Our method is also orthogonal to cross-layer hybrid designs. We fully agree with your opinion; we have previously conducted extensive work on inter-layer hybridization, and retaining a few standard Attention layers significantly improves performance on long-sequence tasks, especially retrieval, while also saving substantial fine-tuning resources. As stated at line 198 of our paper, using less than 40% of the layers can already recover 100% performance on simple retrieval tasks.

To demonstrate compatibility with cross-layer hybrid designs, we performed fine-tuning following the KL-Selector [4] approach you suggested, building an inter-layer hybrid model. We found that using inter-layer hybridization and preserving certain Softmax attention layers yields huge improvements on retrieval tasks:

ModelS-NIAH-2 (2K)S-NIAH-2 (8K)S-NIAH-2 (32K)S-NIAH-3 (2K)S-NIAH-3 (8K)S-NIAH-3 (32K)MMLU
Qwen2.5-7B10099.499.297.899.210074.2
GPA-Qwen-7B (Ours)68.032.610.425.410.85.456.7
GPA-Qwen-7B-12.5% (Ours)10010099.899.096.889.663.6

Question 1

Response: We have developed fully parallel Triton kernels based on the FLA library, so you need not worry about parallelization. Our results are as follows, with the configuration: batch-size 2, num-heads 16, num-kv-heads 16, head-dim 128, num-layers 32, state [64, 64], decode-steps 128:

Overall Efficiency

MethodContextGPU ms/toktok/sState/cache MiBWorkspace MiBPrefill GPU msPrefill Workspace MiB
Qwen2-Dense32K3.3735592.11514516.1358.70581280
Qwen2-GPA32K2.3237856.5755.650.16264096
Qwen2-Dense64K6.6219301.8410261028.13188.33152560
Qwen2-GPA64K2.3095861.7455.699.68718192

GPA Latency Breakdown

StageGenerate 32K Time (ms)PercentageGenerate 64K Time (ms)PercentagePrefill 32K Time (ms)PercentagePrefill 64K Time (ms)Percentage
Q/K/V projection0.10894.69%0.10994.76%6.829513.61%12.931512.97%
L0 codebook affinity0.16557.12%0.16337.07%2.40994.80%4.94844.96%
L0 chunk query (S^K)0.254810.96%0.250810.86%7.257614.47%14.017314.06%
L0 attention-score projection0.0813.49%0.08083.50%0.38650.77%0.68250.68%
L0 chunk query (S^V)0.243310.47%0.240910.43%6.233312.43%12.677912.72%
Residual K/V projection0.12855.53%0.13015.63%1.40332.80%2.80332.81%
L1 codebook affinity0.17677.61%0.17547.59%2.40454.79%4.97304.99%
L1 chunk query (S^K)0.255410.99%0.256911.12%6.771913.50%13.710613.75%
L1 attention-score projection0.08083.48%0.0813.51%0.34410.69%0.67850.68%
State0–1 relation0.240210.34%0.235810.21%6.773313.50%13.629513.67%
L1 relation merge0.00920.39%0.00960.41%0.00350.01%0.00350.00%
L1 chunk query (S^V)0.22899.85%0.22549.76%6.178612.32%12.3812.42%
Level output sum0.02641.14%0.0261.13%0.45630.91%0.90470.91%
Output projection0.09093.91%0.09043.91%2.64875.28%5.28425.30%
Unaccounted/Python overhead0.233210.03%0.233310.10%0.06170.12%0.06220.06%
GPA core enclosing event2.0595—2.0441—40.6696—81.4563—
End-to-end latency2.3237100%2.3095100%50.1626100%99.6871100%

Question 2

Response: Following your suggestion, we evaluated GPA on NIAH 1–3 and BABILong 1–5. On S-NIAH-1, GPA maintains strong performance, but on the harder S-NIAH-2/3, all linear models lag behind standard Attention—a known challenge for the field. GPA nonetheless leads GSA and GDN by a clear margin.

With proper fine-tuning (following BABILong/RMT protocols), GPA recovers strongly on BABILong, matching or exceeding the original models:

Model(FT 20B tokens)S-NIAH-1 (2K)S-NIAH-1 (8K)S-NIAH-1 (32K)S-NIAH-1 (128K)S-NIAH-1 (256K)S-NIAH-2 (2K)S-NIAH-2 (8K)S-NIAH-2 (32K)S-NIAH-3 (2K)S-NIAH-3 (8K)S-NIAH-3 (32K)
Qwen2.5-7B10010010046.50.010010010097.899.2100
GSA-Qwen-7B98.835.68.21.60.624.416.21.80.40.00.0
GDN-Qwen-7B97.231.84.40.81.437.211.80.41.20.00.0
GPA-Qwen-7B (Ours)10098.891.290.088.668.032.610.425.410.85.4
ModelBABILong-Q1 (16K)BABILong-Q2 (16K)Q3 (16K)Q4 (16K)Q5 (16K)
Qwen2.5-7B7043737473
GSA-Qwen-7B2115181732
GDN-Qwen-7B1911221428
GPA-Qwen-7B (Ours)3527313254
Qwen2.5-7B-finetune10072869694
GPA-Qwen-7B-finetune (Ours)1001009810098
Mistral-7B-finetune10049365674
GPA-Mistral-7B-finetune (Ours)1001009610097

In summary, on complex reasoning tasks, purely linear models still lag behind standard Attention with full memory. These results confirm that the gap on complex reasoning can be substantially narrowed with effective state expansion and targeted fine-tuning, while GPA’s extrapolation advantage already surpasses the original on simpler retrieval.

Reviewer_XRoiOpenReview ↗
Rating
5
Clarity
3
Confidence
3
Originality
4
Quality
3
Significance
4
Read review
Summary

The paper reframes softmax to linear attention conversion as a KV Cache approximation problem and provides 5 principled step with error analysis and theoretical justification. These steps are: 1) redundancy elimination (deduplicating redundant key-value pairs) 2) decoupling positional embedding from tokens, 3) positional compression, 4) inter-layer similarity, and 5)multi-state decomposition. It uses this framework to propose a linearised attention model GPA. It uses the positional decoupling, multi-level state and enhanced reading mechanism. GPA is produced by inheriting softmax-llm weight (Mistral 7B, Qwen 2.5, and LLaMA-3) and finetuning with LoRA on 10B parameters.

Strengths and weaknesses

Strengths

S1. The paper's framing is a timely and real contribution. Reframing the softmax to linear attention as a KV cache compression is a useful way to organise the field of linear attention and state space models.

S2. The paper is very well written and organised. Most of the preliminaries and related works are properly discussed as the foundation of the methods proposed in the paper. Most of the arguments are sound and rigorous. Each of the components are properly tied to the known methods instead of presenting them in isolation.

S3. The paper provides strong long context retrieval results compared to other baselines. This is really interesting because retrieval is one of the major limitations of linear attention. Table 3 shows that passkey retrieval numbers are significant up to 32k. LongBench numbers are also good compared to baseline

Weakness

W1. The paper should have reported the retrieval accuracy on some more benchmarks like SWDE [1], SQuAD[2] and other standard benchmarks as well. Along with that the paper should also compare this with some more linear baseline like GDN, Mamba-2 and Mamba-3 (only if it is feasible, I understand that Mamba-3 was released just few weeks before the paper deadline.)

W2. The performance drop on MMLU is significant (up to around -20% compared to the base models). The paper should explain the reason or intuition behind it properly.

W3. Authors should consider releasing the code.

Minor/Typos

W4. Line 256: "We have GPAced the experiments ..." W5. Figure 2 caption: "RSA memory hierarchy ..." What is RSA? W6. Table 10 uses 2j/d but the equation in section 3 around line 167 uses 4j/d W7. Some of the equations in section 3 are not numbered

  1. Arora, Simran, et al. "Simple linear attention language models balance the recall-throughput tradeoff." arXiv preprint arXiv:2402.18668 (2024).
  2. Rajpurkar, Pranav, Robin Jia, and Percy Liang. "Know what you don’t know: Unanswerable questions for SQuAD." Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers). 2018.
Questions

Q1. T1 is labelled "lossless" in Table 10, but the deployed method uses a similarity threshold below 1.0, and Table 4 shows significant degradation at lower thresholds. What threshold is used in the final model?

Q2. How does retrieval accuracy compare with the other models on the retrieval benchmarks like SWDE and FDA?

Q3. Why does performance degrade so much on MMLU?

Limitations

yes

Paper formatting concerns

N/A

Final justification

Authors have addressed my concerns. I will keep my positive score.

1 comment

We thank the reviewer for the constructive feedback and detailed suggestions. Please find our responses below.


Weakness W1

Comment: The paper should have reported the retrieval accuracy on some more benchmarks like SWDE [1], SQuAD[2] and other standard benchmarks as well. Along with that the paper should also compare this with some more linear baseline like GDN, Mamba-2 and Mamba-3 (only if it is feasible, I understand that Mamba-3 was released just few weeks before the paper deadline.)

Response: Due to time and resource constraints, we are indeed unable to reproduce Mamba-3 results at this moment. However, we have experimental results for Qwen and Mistral converted to GDN and Mamba-2. We evaluate their performance on SWDE [1], SQuAD [2], and FDA as you suggested.

ModelSWDESQuADFDA
Qwen2.5-7B92.869.0981.2
GSA-Qwen-7B45.7641.9219.26
GDN-Qwen-7B41.2245.7627.39
GPA-Qwen-7B (Ours)56.1853.8545.97

Weakness W2

Comment: The performance drop on MMLU is significant (up to around -20% compared to the base models). The paper should explain the reason or intuition behind it properly.

Response: Thank you very much for this question. We have investigated this issue thoroughly for a long time.

We found multiple reasons for the MMLU drop. First, the fine-tuning data plays a role. For instance, if we fine-tune Mistral and Qwen using the same data used for GPA conversion and with the same learning rate, they also exhibit a significant drop. A major cause is that these pretrained models overfit to MMLU during pretraining by training on a large amount of complex downstream task data, leading to artificially high MMLU performance. Once fine-tuned or trained on large-scale data, performance on such benchmarks drops rapidly. Subsequently fine-tuning on high-quality datasets (e.g., Tulu-3, Nemotron-Pretraining-SFT-v1, WebInstructSub) can further recover performance, but it is still not fully restored. In contrast, fine-tuning on small-scale high-quality data does not cause such issues.

ModelDatasetsTokensMMLU acc ↑
Qwen2.5-7B*–18.0T74.2
Qwen2.5-7B-SFT–+1B72.6
Qwen2.5-7B-CPTFineWeb10B63.5
Qwen2.5-7B-CPTFineWeb20B60.9
Qwen2.5-7B-CPT+SFTtulu-3 + NP-SFT-v1+2B64.6
Qwen2.5-7B-CPTSlimpajama10B52.9
Mistral-7B*–?62.4
Mistral-7BSlimpajama10B44.5

Another reason is the inherent error and gap between linear models and Softmax attention. Our model has a smaller approximation error to Softmax, so it can approach Softmax attention performance more quickly with less training data, and its upper bound is also higher than other methods, as shown below:

ModelDatasetsTokensMMLU acc ↑
Qwen2.5-7B-CPTFineWeb20B61.5
GPA-Qwen-7B-CPTFineWeb20B56.7
GSA-Qwen-7B-CPTFineWeb20B49.2
GDN-Qwen-7B-CPTFineWeb20B45.4
Mistral-7B*–?62.4
Mistral-7BSlimpajama10B44.5
GPA-Mistral-7B-CPTSlimpajama10B42.6
GSA-Mistral-7B-CPTSlimpajama100B37.8

Weakness W3

Comment: Authors should consider releasing the code.

Response: If the paper is accepted, we will release all code before the camera-ready deadline, including our subsequent progress and deeper-level research built on top of GPA.


Minor/Typos

W4. Line 256: "We have GPAced the experiments ..."

Thank you for pointing this out. We have corrected "GPAced" to "GPA." We sincerely appreciate your careful reading.

W5. Figure 2 caption: "RSA memory hierarchy ..." What is RSA?

We sincerely apologize for this labeling mistake. We have changed "RSA" to "GPA." RSA represents our latest ongoing work built upon GPA, which has not yet been published.

W6. Table 10 uses 2j/d but the equation in section 3 around line 167 uses 4j/d.

Thank you very much for the correction. We have corrected it to 4j/d in the table.

W7. Some of the equations in section 3 are not numbered.

We have reformatted multiple equations using \begin{equation} to add equation numbers.

Additionally, we have cited the suggested papers:

  1. Arora, Simran, et al. "Simple linear attention language models balance the recall-throughput tradeoff." arXiv preprint arXiv:2402.18668 (2024).
  2. Rajpurkar, Pranav, Robin Jia, and Percy Liang. "Know what you don’t know: Unanswerable questions for SQuAD." Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers). 2018.

Question Q1

Comment: T1 is labelled "lossless" in Table 10, but the deployed method uses a similarity threshold below 1.0, and Table 4 shows significant degradation at lower thresholds. What threshold is used in the final model?

Response: In the final model we use dynamic thresholds, i.e., we employ Softmax normalization together with the KV parameters themselves to learn the thresholds. The output activations are mostly distributed around 0.9.

Question Q2

Comment: How does retrieval accuracy compare with the other models on the retrieval benchmarks like SWDE and FDA?

Response: Please refer to our response to W1.

Question Q3

Comment: Why does performance degrade so much on MMLU?

Response: Please refer to our response to W2.


We sincerely appreciate all of your detailed comments and suggestions. Should any concerns remain, please do not hesitate to let us know.

Comments on the paper

1 comment
Meta-review

This paper views the problem of linearizing softmax attention from the perspective of KV cache approximation. This motivates a linearization algorithm that aims to minimize (various sources of) the approximation error gap resulting from linearization. Results on linearizing Qwen/LLaMA family of models indicate that the proposed approach (GPA) can better maintain the performance of pretrained softmax attention while requiring fewer tokens for the linearization process.

The reviewers were generally positive about the paper, but raised several concerns, some of which were suggested (below) to be addressed during the rebuttal. In particular:

  • Results on more retrieval focused benchmarks
  • Investigating why MMLU drop happens (this is a short-context benchmark so I am also puzzled at the performance drop)
  • Better unifying the theory (propositions 1-5)
  • Better connecting theory to practical algorithms

These points were adequately addressed during the rebuttal (though I think the theory unification could use further refinement). Two of the three reviewers raised their scores, while one reviewer who was less positive was not responsive.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.