acceptodds
Published as a conference paper at NeurIPS 2026

LinearARD: Linear-Memory Attention Distillation for RoPE Restoration

Ning Yang, Hengyu Zhong, Wentao Wang, Baoliang Tian, Yuan Zhou, Haijun Zhang, Jun Wang

Abstract

The extension of context windows in Large Language Models is typically facilitated by scaling positional encodings followed by Continued Pre-Training (CPT). While effective, this paradigm is notoriously data-hungry and computationally expensive, requiring massive long-text corpora to recalibrate the model to the shifted positional distribution. We propose LinearARD, a self-distillation method that restores Rotary Position Embedding (RoPE)-scaled students through attention-structure consistency with a frozen native-RoPE teacher. Rather than next-token prediction or opaque hidden-state matching, LinearARD aligns row-wise distributions of dense , , and self-relation matrices from the final attention layer to directly supervise attention dynamics. To remove the quadratic memory bottleneck of relation maps, we introduce a linear-memory kernel that stores only per-token log-sum-exp statistics and recomputes logits in the backward pass to obtain exact Kullback-Leibler divergence gradients. Across LLaMA2-7B, LLaMA3-8B, and Mistral-7B-v0.1 extended to 32K context, LinearARD recovers 93.1%/94.2%/94.3% of native short-context performance and achieves strong long-context robustness on RULER using only 4.25M tokens—amounting to just 1.6% (a 60 reduction) of the 256M-token budget required by state-of-the-art baselines. Under this severely constrained budget, CPT and LongReD remain near zero on RULER, demonstrating that relation-level restoration provides a substantially better efficiency-quality tradeoff.

Keywords:
Sydney, Main Track

Reviews

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

The paper proposes LinearARD, a distillation method for restoring the capabilities of RoPE-scaled long-context language models. It aligns the final-layer Q/Q, K/K, and V/V relation distributions between a frozen native-RoPE teacher and an extended-context student. To avoid materializing quadratic-size relation matrices, the authors introduce a tiled kernel that computes exact KL-divergence gradients using linear activation memory. Experiments on three language models show strong short-context recovery and competitive RULER performance using substantially fewer training tokens than CPT and LongReD.

Strengths and weaknesses

S1: LinearARD substantially improves the short-context performance of RoPE-scaled models using only 4.25M training tokens. Across LLaMA2-7B, LLaMA3-8B, and Mistral-7B, it recovers approximately 93–94% of native short-context performance and strongly outperforms token-budget-matched CPT and LongReD. Results across multiple backbones and ablations support the effectiveness of relation-level distillation.

S2: The proposed tiled kernel enables dense relation-distribution distillation without materializing n×nn \times n matrices, reducing activation-memory complexity from quadratic to linear in sequence length. The paper provides theoretical equivalence arguments, numerical comparisons with the dense implementation, and operator-level latency and memory measurements. This kernel may also be useful for other long-context attention-distillation objectives.

W1: The comparison with CPT is not compute-matched. The paper claims approximately 60× greater efficiency based on training-token count, but LinearARD requires an additional teacher forward pass and expensive dense relation-distillation operations that CPT does not require. Without matched GPU-hour, FLOP, or wall-clock comparisons, the results establish data efficiency but do not demonstrate a comparable reduction in computational cost.

W2: The paper evaluates long-context capabilities only using RULER, which primarily consists of synthetic retrieval, tracking, and aggregation tasks. Although RULER is useful for measuring effective context length, it does not fully represent realistic long-context applications requiring document understanding, reasoning, summarization, or generation. Evaluation on additional benchmarks, such as LongBench, or InfiniteBench, would provide stronger evidence that LinearARD preserves broadly useful long-context capabilities rather than primarily improving synthetic retrieval performance. Besides, many long-context bechmarks are long for the prompt, but with short responses. The author should also consider AIME, which could be treated as the long-context task with long responses.

W3: LinearARD achieves linear activation-memory complexity with respect to sequence length by recomputing tiled relation logits instead of materializing dense matrices. However, it still calculates all pairwise Q/Q, K/K, and V/V relations and therefore retains O(n2)O(n^2) computational complexity. The reported kernel latency approximately quadruples whenever sequence length doubles, confirming quadratic runtime scaling. The paper does not sufficiently emphasize this distinction or discuss the resulting training-time limitations, so the name “LinearARD” and repeated linear-memory claims may give readers the mistaken impression that the overall method scales linearly.

Questions

What are the GPU-hours, FLOPs, and wall-clock training costs of LinearARD, CPT, and LongReD? Under a compute-matched rather than token-matched budget, does LinearARD retain its advantage and support the claimed 60× efficiency improvement?

Can the authors evaluate LinearARD on broader and more realistic long-context benchmarks, such as LongBench, InfiniteBench, and tasks requiring long generated responses, to demonstrate that its benefits extend beyond RULER’s primarily synthetic tasks?

Since LinearARD reduces activation memory to O(n)O(n) but retains O(n2)O(n^2) computation, how does its end-to-end training time scale at 64K and 128K contexts? Could the authors clarify this distinction and discuss the method’s practical runtime limitations?

Limitations

no

Paper formatting concerns

NO formatting concerns

Final justification

Based on the review and my opinion, I will keep my score.

1 comment

Summary of Concern

Thank you for the detailed rebuttal. The GPU-hours audit, time-to-quality comparison, LongBench-E results, and distinction between linear memory and quadratic arithmetic strengthen the paper.

W1. The Comparison with CPT Is Not Compute-Matched

Reviewer concern. The approximately 60× claim is based on tokens, while LinearARD adds a teacher forward pass and dense relation distillation. Without GPU-hour, FLOP, or wall-clock matching, it establishes data—not compute—efficiency.

Response. We agree. The original wording conflated token efficiency, matched-budget compute, and time-to-quality. The ratio

256M4.25M≈60.2×\frac{256\text{M}}{4.25\text{M}}\approx60.2\times

refers only to processed training tokens; it does not imply a 60.2×60.2\times reduction in FLOPs or GPU-hours. Because device counts and sequential stages differ, we compute

GPU-hours=∑sGsts\text{GPU-hours}=\sum_s G_s t_s

and report GPU-hours measured on NVIDIA RTX PRO 6000 GPUs with 96GB memory. The exact LLaMA2 stage audit is:

BudgetMethodSteps / GPUsConfigured time per stepGPU-hours
4.25MLinearARD144 / 2 + 16 / 43.340 s + 22.163 s0.661
4.25MDirect CPT8 / 830.676 s0.545
256MLinearARD256 / 2 + 64 / 4106.882 s + 222.139 s30.998
256MDirect CPT128 / 4222.139 s31.593

At 4.25M tokens, LinearARD uses 21.3% more GPU-hours than direct CPT. At 256M tokens, it uses 1.9% fewer GPU-hours. We use measured GPU-hours for the cross-backbone comparison below.

BackboneQ/KV headsBudgetLinearARD GPU-hoursCPT GPU-hoursRelative difference
LLaMA2-7B32/324.25M0.6610.545+21.3%
LLaMA2-7B32/32256M30.99831.593−1.9%
LLaMA3-8B32/84.25M0.4530.652−30.5%
LLaMA3-8B32/8256M27.12023.924+13.4%
Mistral-7B-v0.132/84.25M0.4000.429−6.8%
Mistral-7B-v0.132/8256M23.84719.591+21.7%

LinearARD is not uniformly cheaper than CPT at the same token budget: measured cost ranges from 30.5% lower to 21.7% higher. GQA reduces relation overhead, but total cost also depends on the backbone, batch, native context, and CPT stage. Thus, matched-budget costs are of the same order; LinearARD has no universal per-token speed advantage.

Mechanistically, one relation layer costs

O ⁣(B(HQ+2HKV)n2d).\mathcal{O}\!\left(B(H_Q+2H_{KV})n^2d\right).

For LLaMA3 and Mistral, HQ/HKV=32/8H_Q/H_{KV}=32/8, reducing the relation head factor from 9696 to 4848. Each KV term falls to one quarter because every retained relation matrix remains n×nn\times n. Their 8K native context partly offsets this GQA saving through quadratic sequence cost, so architecture alone does not determine pipeline time.

The principal advantage appears in time-to-quality, rather than same-budget runtime. On LLaMA2-7B, the 4.25M-token LinearARD model approaches or slightly exceeds the 256M-token CPT model in two selected comparisons:

Scaling and benchmarkLinearARD, 4.25MCPT, 256M
PI 8×, LongBench-E22.6522.94
NTK 8×, RULER64.8464.53

For these selected near-matched-quality points, the CPT-to-LinearARD ratio is 47.8× in measured GPU-hours (31.593/0.66131.593/0.661). This ratio is specific to these LLaMA2 comparisons and is not a universal compute-reduction guarantee.

We will distinguish three claims:

  1. LinearARD uses 60.2× fewer training tokens in the 4.25M-versus-256M comparison.
  2. At equal token budgets, GPU-hours are comparable in order and may be lower or higher than CPT.
  3. For the selected near-matched-quality LLaMA2 points, the CPT-to-LinearARD GPU-hour ratio is 47.8×.

W2. Limited Scope of Long-Context Evaluation

Reviewer concern. The paper evaluates long-context capability only with RULER, which primarily consists of synthetic retrieval, tracking, and aggregation tasks. Although RULER is useful for measuring effective context length, it does not fully represent realistic long-context applications requiring document understanding, reasoning, summarization, or generation. Evaluation on another benchmark such as LongBench or InfiniteBench would provide stronger evidence that LinearARD preserves broadly useful long-context capabilities rather than merely improving synthetic retrieval. In addition, many long-context benchmarks use long prompts but require only short answers. The authors should also consider AIME, which may be viewed as a task involving long responses.

Response. We agree that RULER primarily evaluates synthetic retrieval, tracking, and aggregation and cannot by itself establish broad performance on realistic long-document applications. We therefore additionally evaluate LLaMA2-7B on the 32K-compatible subset of LongBench-E, covering 13 tasks in multi-document and single-document QA, summarization, code completion, passage retrieval/counting, and classification.

We use the official test data and retain a sample only when its tokenized prompt plus the task's official maximum generation length does not exceed 32,768 tokens. Of 3,668 original examples, 3,572 (97.38%) are evaluated and 96 are excluded by this rule. Retention is performed identically for every method; evaluation is 0-shot and stores per-example contexts, generations, and metrics.

LongBench-E results by input length

ScalingMethodTokensOverall0–4K4–8K8K+
PI 8×CPT4.25M13.2210.2513.9413.21
PI 8×LinearARD4.25M22.6522.6222.5022.82
PI 8×CPT256M22.9422.7923.7822.82
PI 8×LinearARD256M23.8026.1923.8623.72
NTK 8×CPT4.25M21.3621.9524.3319.91
NTK 8×LinearARD4.25M22.1123.0522.9821.43
NTK 8×CPT256M22.9622.4524.5921.97
NTK 8×LinearARD256M23.1924.9624.3922.03

Under PI 8× at 4.25M tokens, LinearARD improves the overall score from 13.22 to 22.65, with gains in every length group: 10.25→22.62, 13.94→22.50, and 13.21→22.82. Its overall score is close to the 22.94 of 256M-token CPT. At 256M, LinearARD further raises the overall score to 23.80 and the 8K+ score from 22.82 to 23.72.

Under NTK 8×, the low-budget CPT baseline is stronger, but LinearARD still raises the overall score from 21.36 to 22.11 and the 8K+ score from 19.91 to 21.43. The trade-off is not uniformly positive: CPT is better in the 4–8K group at both budgets (24.33 vs. 22.98 and 24.59 vs. 24.39).

We agree that long-output evaluation is also valuable, but we do not treat AIME as a long-context benchmark: its problems primarily test mathematical reasoning from comparatively short prompts, and its official answer format is a short integer rather than a long generated response. LongBench-E broadens the evidence from synthetic retrieval to realistic long-document understanding, but it does not fully test sustained long-form generation. We will explicitly identify dedicated long-output evaluation as an important limitation and direction for future work.


W3. Linear Memory Does Not Imply Linear Compute

Reviewer concern. LinearARD achieves activation-memory complexity that is linear in sequence length by recomputing tiled relation logits rather than explicitly materializing dense matrices. However, it still computes all pairwise Q/Q, K/K, and V/V relations and therefore retains O(n2)\mathcal{O}(n^2) computational complexity. The reported kernel latency approximately quadruples whenever sequence length doubles, confirming quadratic runtime scaling. The paper does not emphasize this distinction or discuss the resulting training-time limitations sufficiently. Consequently, the name “LinearARD” and repeated linear-memory claims may give readers the misleading impression that the overall method scales linearly.

Response. We agree with the reviewer. In LinearARD, the term “linear” refers exclusively to activation-memory complexity with respect to sequence length, not to arithmetic complexity or runtime. We will make this distinction explicit in the abstract, introduction, contributions, theorem statement, experimental discussion, and limitations.

For a single relation target, the conventional implementation materializes or retains a row-wise relation distribution of size:

B×H×n×n,B\times H\times n\times n,

which results in activation memory:

Mdense=O(BHn2).M_{\mathrm{dense}} = \mathcal{O}(BHn^2).

The proposed tiled kernel instead stores only the row-wise log-sum-exp statistics and the input/output gradients:

LSEs,LSEt∈RB×H×n,\text{LSE}_s,\text{LSE}_t \in\mathbb{R}^{B\times H\times n},

dX,dY∈RB×H×n×d.dX,dY \in\mathbb{R}^{B\times H\times n\times d}.

The intermediate Tr×TcT_r\times T_c relation tiles remain in on-chip SRAM and are not stored globally in HBM. The resulting activation-memory requirement is:

MLinearARD=O(BHn+BHnd)=O(BHnd),M_{\mathrm{LinearARD}} = \mathcal{O}(BHn+BHnd) = \mathcal{O}(BHnd),

which is linear in nn when the head dimension dd is fixed. This is the result established by Theorem 3.2.

However, the kernel still evaluates every pairwise relation. For one target, its arithmetic complexity remains:

Crelation=O(BHn2d).C_{\mathrm{relation}} = \mathcal{O}(BHn^2d).

The complete Q/QQ/Q, K/KK/K, and V/VV/V objective therefore has cost:

O(B(HQ+2HKV)n2d),\mathcal{O}\left(B(H_Q+2H_{KV})n^2d\right),

or O(BHn2d)\mathcal{O}(BHn^2d) when query and KV head counts are represented by the same order parameter HH. Recomputing relation logits during the backward pass adds a constant-factor arithmetic cost but does not change this quadratic asymptotic complexity.

Thus, the kernel changes:

activation memory: O(n2)→O(n)\text{activation memory: } \mathcal{O}(n^2)\rightarrow \mathcal{O}(n)

for fixed BB, HH, and dd, but it does not change:

arithmetic complexity: O(n2)→O(n2).\text{arithmetic complexity: } \mathcal{O}(n^2)\rightarrow \mathcal{O}(n^2).

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

The paper proposes LinearARD, a restoration-distillation method for extending RoPE-based LLMs to longer context windows while recovering the short-context behavior degraded by positional interpolation. The key idea is to treat the native-RoPE model as a frozen teacher and the RoPE-scaled model as a student, then align row-wise Q/Q, K/K, and V/V self-relation distributions in the final attention layer using a forward KL objective. Since these relation maps are dense objects, the paper also introduces an IO-aware tiled kernel that stores only row-wise log-sum-exp statistics and recomputes logits during backward, enabling exact KL gradients with linear activation memory. Empirically, the method is evaluated on LLaMA2-7B, LLaMA3-8B, and Mistral-7B-v0.1 extended to 32K, showing strong short-context recovery and RULER performance under a much smaller token budget than CPT and LongReD baselines.

Strengths and weaknesses

Strengths

  • Technically solid and practically motivated work addressing an important problem: RoPE scaling degrades short-context performance, while long-context pretraining is expensive.
  • Intuitive and well-matched solution: supervising internal relation distributions (Q/Q, K/K, V/V) that directly reflect attention geometry affected by RoPE scaling.
  • Strong integration of modeling and systems contributions: the linear-memory KL kernel makes dense relation distillation feasible at long sequence lengths.
  • Broader significance: the method can be viewed as a general structural distillation framework for preserving attention geometry under distribution shift, potentially applicable beyond RoPE (e.g., NoPE or other softmax-attention models), and possibly inspiring analogous objectives for linear-attention models.

Weaknesses

  • Baseline comparisons: near-zero RULER scores for budget-matched CPT and LongReD are surprising; more detail is needed on data, optimization, sequence lengths, evaluation pipeline, and tuning to ensure fair comparison.
  • Attribution clarity: the paper should more clearly separate the contributions of ARD and CPT, as ablations suggest distinct roles (restoration vs. long-context activation).
  • Limited generality evidence: experiments focus on PI-based extension to 32K for mid-sized models; unclear transfer to other scaling methods (YaRN, LongRoPE, NTK-aware), larger models, or different training regimes.
Questions
  • Can the authors report ARD-only, CPT-only, and ARD+CPT results for all three backbones, including both short-context benchmarks and per-length RULER? This would clarify which part of the method restores short-context performance and which part activates long-context behavior.
  • What is the actual wall-clock efficiency tradeoff between LinearARD and standard CPT or fine-tuning approaches under matched settings? I do not view a slower distillation step as an inherent weakness, since LinearARD trades higher per-token cost for a smaller token budget. However, a quantitative comparison (e.g., step time or tokens/sec under matched settings) would clarify this tradeoff.
  • How sensitive is LinearARD to the RoPE scaling method? A small experiment or discussion comparing PI with YaRN, LongRoPE, or NTK-aware scaling would help establish whether the approach is specific to PI or broadly applicable to RoPE extension.
  • Why does V/V relation matching help? Since RoPE directly modifies Q/K geometry, a more detailed explanation or diagnostic showing how V/V relations drift after scaling would make this part of the objective more convincing.
Limitations

The paper would benefit from a clearer discussion of its limitations, particularly regarding the scope of its evaluation and generalizability. It remains unclear how well the approach transfers beyond the specific RoPE scaling setup and model sizes considered, as well as how it compares in practical efficiency to alternative methods. Additionally, the respective contributions of ARD and CPT could be more clearly delineated; see the limitations and weaknesses for further details.

Paper formatting concerns

I did not notice any major anonymity or formatting violations.

1 comment

Summary of Concern

Thank you. Exact accounting, stage ablations, compute/NTK results, and the V/V ablation strengthen the paper.

3.1 Baseline Comparisons

Reviewer concern. Near-zero baselines require transparent training, tuning, and evaluation settings.

Response. We provide exact configurations, evaluation settings, and per-length results.

1. Token accounting. Non-padding packed tokens are:

Ntok=∑sLsBglobal,sAsUs.N_{\mathrm{tok}}=\sum_s L_s B_{\mathrm{global},s}A_sU_s.

ARD batches are per-device, Bg=BdGB_g=B_dG; CPT batches are global:

BudgetArm / stageDataContextGPUsBatchGrad. acc.StepsExact tokens
4.25MLinearARD: ARDPG194K22/device11442,359,296
4.25MLinearARD: subsequent CPTSlimPajama-627B32K44 global1162,097,152
4.25MDirect CPTSlimPajama-627B32K817 global184,456,448
256MLinearARD: ARDPG194K28/device8256134,217,728
256MLinearARD: subsequent CPTSlimPajama-627B32K44 global1664134,217,728
256MDirect CPTSlimPajama-627B32K44 global16128268,435,456

Budgets use binary millions and are token-matched; LinearARD splits tokens between ARD and 32K CPT.

LLaMA2 arms share scaling, LR 2×10−52\times10^{-5}, and seed. ARD trains QKV LoRA (rank 1024, alpha 2048, dropout 0.05) before merging.

LLaMA3/Mistral extend 8K to 32K with PI 4×:

BudgetARD contextGPUsARD batch / deviceARD grad. acc.ARD stepsExact ARD tokensSubsequent 32K CPT
4.25M8K2111442,359,2964 GPUs, batch 4 global, grad. acc. 1, 16 steps
256M8K284256134,217,7284 GPUs, batch 4 global, grad. acc. 16, 64 steps

They share LLaMA2's data, objective, optimizer, seed, merge, and CPT setup.

For 4.25M CPT, we tested four equal-token (B,A,U)(B,A,U) settings and selected (17,1,8)(17,1,8) by Short Avg.


2. Unified evaluation protocol.

All methods share lm-evaluation-harness pipelines and official LongBench-E data.

Evaluation itemProtocol
RULER setting0-shot
Context lengths8K, 16K, and 32K
Tasks12 identical RULER subtasks
TruncationDisabled (truncation=false)
Test samplesComplete framework-generated evaluation sets
RepetitionsOne complete evaluation run
Positional configurationIdentical PI/NTK configuration during training, merging, and evaluation
Output retentionPer-example context, generation, and metric saved
Run validationOnly the final complete run marked status: done was retained

The 12 tasks are eight NIAH variants, Variable Tracking, Common/Frequent Words, and QA-SQuAD.

No chat template: MMLU 5-shot, MathQA 4-shot, BoolQ 3-shot, ARC-C 25-shot; others 0-shot.


3. Near-zero RULER is specific to low-budget PI.

At 4.25M, PI CPT/LongReD are low across lengths/backbones:

BackboneMethod8K16K32KAverage
LLaMA2-7BCPT, 4.25M0.06250.01920.03830.040
LLaMA2-7BLongReD, 4.25M0.04580.02920.03000.035
LLaMA3-8BCPT, 4.25M0.04750.04420.03750.043
LLaMA3-8BLongReD, 4.25M0.04080.04000.05080.044
Mistral-7B-v0.1CPT, 4.25M0.01000.01080.01000.010
Mistral-7B-v0.1LongReD, 4.25M0.01500.00750.00750.010

Meaningful PI/NTK scores at larger budgets localize the near-zero results to low-budget PI rather than pipeline failure.


3.2 Complete Ablation of ARD, CPT, and Their Combination

Reviewer concern. ARD-only, CPT-only, and combined results are needed for stage attribution.

Response. All available stage runs follow; Short Avg. covers eight tasks.

BackboneScalingStage conditionTokensShort Avg.RULER 8KRULER 16KRULER 32KRULER Avg.
LLaMA2-7BPI 8×CPT only (main control)4.25M41.030.06250.01920.03830.040
LLaMA2-7BPI 8×ARD only (paired diagnostic)2.25M51.746.542.521.436.8
LLaMA2-7BPI 8×ARD + CPT (paired diagnostic)4.25M51.974.967.447.363.2
LLaMA3-8BPI 4×CPT only (main control)4.25M46.660.04750.04420.03750.043
LLaMA3-8BPI 4×ARD only (new diagnostic)2M56.5862.0861.2946.9156.76
LLaMA3-8BPI 4×ARD + CPT (main run)4.25M57.4579.771.751.967.8
Mistral-7B-v0.1PI 4×CPT only (main control)4.25M42.490.01000.01080.01000.010
Mistral-7B-v0.1PI 4×ARD only (new diagnostic)2M57.2852.8136.747.9932.51
Mistral-7B-v0.1PI 4×ARD + CPT (main run)4.25M57.4979.464.137.060.2

LLaMA2 paired results:

Stage conditionMMLULAMBADAMathQABoolQOpenBookQAPIQASIQAARC-CShort Avg.
Native model46.071.229.978.244.078.740.349.254.7
ARD only36.363.227.279.443.878.136.349.451.7
ARD + CPT36.864.727.977.543.878.636.049.651.9

LLaMA2 is paired; GQA diagnostics are not seed-matched three-arm runs and support only stage attribution.

ARD restores short-context representations; CPT improves long-range behavior (LLaMA2 Short Avg. 51.7→51.9, RULER 36.8→63.2).


3.3 Wall-Clock Efficiency Relative to CPT or Standard Fine-Tuning

Reviewer concern. Matched GPU-hours are needed to assess compute efficiency.

Response. On RTX PRO 6000, we report

GPU-hours=∑sGsts,\text{GPU-hours}=\sum_s G_s t_s,

for sequential stages with different GPU counts:

BudgetMethodSteps / GPUsConfigured time per stepGPU-hours
4.25MLinearARD144 / 2 + 16 / 43.340 s + 22.163 s0.661
4.25MDirect CPT8 / 830.676 s0.545
256MLinearARD256 / 2 + 64 / 4106.882 s + 222.139 s30.998
256MDirect CPT128 / 4222.139 s31.593

LinearARD uses +21.3% GPU-hours at 4.25M and −1.9% at 256M.

ARD adds teacher/relation costs but runs at 4K and defaults to Last-1:

Sequence lengthnaive denseLinearARD kernelSpeedup
1K5.30 ms3.32 ms1.60×
2K20.74 ms11.83 ms1.75×
4K81.25 ms43.82 ms1.85×
8K326.93 ms172.56 ms1.90×
16KOOM683.54 ms—
32KOOM2549.54 ms—

32K layer-scope:

Layer scopeStep timeThroughput
All-32252.61 s129.7 tokens/s
Last-16143.53 s228.3 tokens/s
Last-878.03 s419.9 tokens/s
Last-446.70 s701.7 tokens/s
Last-231.04 s1055.7 tokens/s
Last-123.22 s1411.4 tokens/s

All backbones:

BackboneQ/KV headsBudgetLinearARD GPU-hoursCPT GPU-hoursRelative difference
LLaMA2-7B32/324.25M0.6610.545+21.3%
LLaMA2-7B32/32256M30.99831.593−1.9%
LLaMA3-8B32/84.25M0.4530.652−30.5%
LLaMA3-8B32/8256M27.12023.924+13.4%
Mistral-7B-v0.132/84.25M0.4000.429−6.8%
Mistral-7B-v0.132/8256M23.84719.591+21.7%

Layer cost:

O ⁣(B(HQ+2HKV)n2d).\mathcal{O}\!\left(B(H_Q+2H_{KV})n^2d\right).

GQA halves the relation-head factor. Same-budget cost is −30.5% to +21.7% versus CPT; we claim comparable-order cost.


3.4 Sensitivity to Different RoPE Scaling Methods

Reviewer concern. Another RoPE rule is needed to test whether LinearARD is PI-specific.

Response. We compare index-compressing PI with base-changing NTK at 32K; native Short Avg. is 54.70.

ScalingMethodTokensShort Avg.RecoveryLongBench-ERULER
PI 8×CPT4.25M41.0375.0%13.220.040
PI 8×LinearARD4.25M50.9393.1%22.6563.00
PI 8×CPT256M52.2095.4%22.9459.60
PI 8×LinearARD256M53.3897.6%23.8065.10
NTK 8×CPT4.25M52.3795.75%21.3632.85
NTK 8×LinearARD4.25M53.7598.27%22.1164.84
NTK 8×CPT256M53.4097.63%22.9664.53
NTK 8×LinearARD256M53.9998.71%23.1967.97

At 4.25M, NTK RULER rises 32.85→64.84; 256M gains narrow. We claim PI/NTK transfer only.


3.5 Why V/V Relation Matching Helps

Reviewer concern. Since RoPE modifies Q/K, V/V needs justification.

Response. V/VV/V is not a direct RoPE correction:

RX=softmax⁡ ⁣(XX⊤d+M),X∈{Q,K,V}.R^X=\operatorname{softmax}\!\left(\frac{XX^\top}{\sqrt d}+M\right),\qquad X\in\{Q,K,V\}.

With joint QKV training, V/VV/V limits value drift and preserves teacher content geometry.

The controlled no-CPT ablation is:

VariantShort Avg.Recovery
Native model59.85100.00%
PI 8×, without restoration31.3352.35%
ARD with direct attention-map KL53.8489.95%
ARD with Q/Q + K/K + V/V56.0593.64%
ARD with QKV relations + output-logit KL57.0095.24%
ARD with full fine-tuning of QKV52.0286.91%
ARD with full-model fine-tuning52.5087.72%
ARD without V/V54.2790.68%
ARD with LoRA on QKVO + MLP54.5991.21%

Removing V/VV/V lowers Short Avg. 56.05→54.27 and recovery 93.64%→90.68%, confirming complementary supervision.

Reviewer_iYVhOpenReview ↗
Rating
4
Clarity
3
Confidence
3
Originality
2
Quality
3
Significance
3
Read review
Summary

The degradation of short-context performance after RoPE scaling for long-context extension is the pain point. The core idea of this work is to use the original native-RoPE model as a frozen teacher and the RoPE-scaled long-context model as a student. Within the teacher’s native context length, the student is trained to recover the teacher’s internal attention relation structure. Instead of primarily aligning output logits, hidden states, or standard attention maps, LinearARD aligns the Q/Q, K/K, and V/V token-token self-relation distributions in the final attention layer. Authors argue that RoPE scaling mainly distorts the relative positional geometry inside the Q/K/V representation spaces, so the restoration should directly target these internal relations.

Another contribution is the linear-memory KL distillation kernel. Since the Q/Q, K/K, and V/V relation maps are all n×n matrices, directly materializing them would cause a quadratic memory bottleneck for long sequences. LinearARD adopts a FlashAttention-style two-pass tiled strategy. It first stores only the row-wise log-sum-exp statistics, and then recomputes local logits and probabilities tile by tile during backpropagation. This allows it to obtain mathematically exact KL gradients without storing the full relation matrices.

Strengths and weaknesses

Strength:

  1. LinearARD directly aligns the Q/Q, K/K, and V/V token-token relation distributions. This explicitly constrains the relational structure in the Q/K/V spaces and better matches the geometric drift caused by RoPE scaling.
  2. The method uses a FlashAttention-style linear-memory kernel. It does not store the full n×n relation matrices. It only keeps the per-row log-sum-exp statistics and recomputes local logits in tiled blocks during the backward pass. This makes relation-level KL distillation much more memory-efficient for long sequences.
  3. The experiments show that LinearARD can recover most of the original short-context performance with only a small token budget.
  4. The training setup is simple. The teacher is the original native-RoPE model. The student is the scaled-RoPE model with the same architecture. The method does not need an additional larger teacher model.

Weakness:

  1. The method assumes that matching Q/Q, K/K, and V/V self-relations can restore attention behavior. This assumption is reasonable but still indirect. Standard attention uses QK. More evidence is needed to show that these self-relations are sufficient to recover the real attention dynamics.
  2. The main experiments apply the relation loss only to the final layer. RoPE scaling affects positional geometry and attention patterns across all layers. Repairing only the last layer is efficient, but it may not be enough for larger models, longer contexts, or harder long-context tasks.
  3. The linear-memory kernel is mathematically exact, but it trades memory for recomputation. This may increase training time, implementation complexity, and engineering overhead. The paper should report extra costs.
  4. The method is designed mainly for RoPE scaling. It may not transfer naturally to other long-context extension methods or other positional encoding schemes. Its scope may be limited to RoPE restoration rather than general long-context adaptation.
  5. The use of the term “self-distillation” is somewhat confusing. It may remind readers of recent on-policy self-distillation methods such as OPSD, although the proposed method is clearly different. The paper could clarify this terminology more explicitly.
Questions

See weakness.

Limitations

No. The authors could further explain why applying the relation loss only to the final layer is sufficient, and whether this design would still hold for larger models, longer contexts, or more challenging long-context tasks.

Paper formatting concerns

N/A

Final justification

Overall, the experimental evaluation is thorough and reasonably complete. However, I did not find the results particularly surprising or compelling enough to change my overall assessment. Therefore, I would maintain my score of 4.

1 comment

Summary of Concern

Thank you for the detailed rebuttal. The added behavior diagnostics, QKV ablations, Last-kk study, cost measurements, NTK experiment, and clearer “restoration distillation” terminology strengthen the paper. The link between self-relation matching and attention recovery remains empirical, and non-RoPE transfer is untested. Even so, the added evidence clarifies the method's scope, terminology, and cost–accuracy trade-off, substantially improving the paper.

3. Weaknesses and Responses

3.1 Can Q/Q, K/K, and V/V Self-Relations Restore Actual Attention Behavior?

Reviewer concern. Q/Q, K/K, and V/V do not directly reconstruct the QK attention map, so it is unclear whether matching them restores native attention and outputs.

Response. We define the three self-relation targets as

RX=softmax⁡ ⁣(XX⊤d+M),X∈{Q,K,V}.R^X=\operatorname{softmax}\!\left(\frac{XX^\top}{\sqrt d}+M\right),\qquad X\in\{Q,K,V\}.

Q/QQ/Q and K/KK/K preserve query- and key-side token geometry; V/VV/V preserves the geometry of aggregated content. They are complementary but do not algebraically reconstruct QK⊤QK^\top: matching QQ⊤QQ^\top and KK⊤KK^\top does not uniquely determine their cross-relation.

A separate diagnostic shows that the monitored QK⊤QK^\top attention-map KL and output-logit KL decrease even though training uses only the QKV relation loss:

VariantShort Avg.Recovery
Native model59.85100.00%
PI 8×, without restoration31.3352.35%
ARD with direct attention-map KL53.8489.95%
ARD with Q/Q + K/K + V/V56.0593.64%
ARD with QKV relations + output-logit KL57.0095.24%
ARD with full fine-tuning of QKV52.0286.91%
ARD with full-model fine-tuning52.5087.72%
ARD without V/V54.2790.68%
ARD with LoRA on QKVO + MLP54.5991.21%

Short Avg. averages MMLU, LAMBADA, BoolQ, and OpenBookQA under the same all-layer, no-CPT protocol. QKV relation distillation beats direct attention-map KL by 2.21 average points and 3.69 recovery points. Output-logit KL recovers more but adds a heavier objective. We therefore claim empirical restoration of attention and output behavior, not exact reconstruction of QK⊤QK^\top.

3.2 Applying the Relation Loss Only to the Final Layer

Reviewer concern. RoPE scaling affects all layers, so final-layer-only alignment may be insufficient for larger models, longer contexts, or harder tasks.

Response. Useful restoration is concentrated in later layers. The first four layers add little and can hurt; recovery rises around layers 5–8 and plateaus near the top. Without CPT, Last-1 reaches 89.83% recovery versus 93.64% for all layers, capturing most of the benefit at far lower cost.

LinearARD is not intrinsically restricted to Last-1. The measured configurable Last-kk trade-off is:

Layer scopeStep time at 32KThroughput
All-32252.61 s129.7 tokens/s
Last-16143.53 s228.3 tokens/s
Last-878.03 s419.9 tokens/s
Last-446.70 s701.7 tokens/s
Last-231.04 s1055.7 tokens/s
Last-123.22 s1411.4 tokens/s

At 32K, Last-1 is 10.9× faster than All-32. The kernel keeps all-layer distillation feasible, while the dense implementation OOMs at 16K. Last-1 is the efficient default; Last-kk or all-layer alignment offers stronger restoration when needed.

3.3 Training and Engineering Overhead of Recomputation

Reviewer concern. The linear-memory kernel is mathematically exact, but it trades memory for recomputation. This may increase training time, implementation complexity, and engineering overhead. The paper should report these additional costs.

Response. We agree that recomputation and a custom fused implementation are genuine costs. We therefore separate single-operator latency from end-to-end training cost. The operator measurements were averaged over 20 steps on an NVIDIA RTX PRO 6000 GPU with 96GB memory:

Sequence lengthNaive denseLinearARD kernelSpeedup
1K5.30 ms3.32 ms1.60×
2K20.74 ms11.83 ms1.75×
4K81.25 ms43.82 ms1.85×
8K326.93 ms172.56 ms1.90×
16KOOM683.54 ms—
32KOOM2549.54 ms—

Although the fused kernel performs slightly more operator-level arithmetic than the naïve dense implementation, it avoids materializing and repeatedly transferring the full n×nn\times n distributions through HBM, substantially reducing memory-bandwidth demand. As a result, it is 1.60–1.90× faster in measured GPU time wherever both implementations fit in memory, despite recomputing relation logits during backward. The dense implementation fails at 16K, whereas the fused kernel remains feasible at 32K. This does not make the operator compute-linear: latency grows by approximately four when sequence length doubles, consistent with quadratic arithmetic.

The end-to-end layer-scope measurements are:

Layer scopeStep time at 32KThroughput
All-32252.61 s129.7 tokens/s
Last-16143.53 s228.3 tokens/s
Last-878.03 s419.9 tokens/s
Last-446.70 s701.7 tokens/s
Last-231.04 s1055.7 tokens/s
Last-123.22 s1411.4 tokens/s

All measurements in the complete LLaMA2 pipeline audit below were collected on NVIDIA RTX PRO 6000 GPUs with 96GB memory:

BudgetMethodSteps / GPUsConfigured time per stepGPU-hours
4.25MLinearARD144 / 2 + 16 / 43.340 s + 22.163 s0.661
4.25MDirect CPT8 / 830.676 s0.545
256MLinearARD256 / 2 + 64 / 4106.882 s + 222.139 s30.998
256MDirect CPT128 / 4222.139 s31.593

At 4.25M tokens, LinearARD uses 21.3% more GPU-hours than direct CPT; at 256M tokens, it uses 1.9% fewer GPU-hours. Together with the layer-scope measurements, these results show that Last-1 controls but does not eliminate the relation-loss overhead. At 32K, the KL kernel accounts for approximately 72.9–94.5% of measured step time depending on the selected layer scope.

3.4 Applicability to Other Positional Encodings or Scaling Methods

Reviewer concern. The method is designed primarily for RoPE scaling. It may not transfer naturally to other long-context extension methods or positional-encoding schemes, so its applicability may be limited to RoPE restoration rather than general long-context adaptation.

Response. We agree that the evidence supports RoPE restoration, not arbitrary positional-encoding architectures. To test whether LinearARD is specific to Position Interpolation, we additionally extend LLaMA2-7B from 4K to 32K with fixed-theta NTK-aware scaling. PI compresses the rotary position index by eight, whereas fixed-theta NTK increases the RoPE base frequency without changing the position index; both set the maximum position to 32,768. The selected configuration is held fixed throughout ARD, adapter merging, CPT, and evaluation.

The complete PI-versus-NTK comparison is:

ScalingMethodTokensShort Avg.RecoveryLongBench-ERULER
PI 8×Without restoration—34.2362.6%——
PI 8×CPT4.25M41.0375.0%13.220.040
PI 8×LinearARD4.25M50.9393.1%22.6563.00
PI 8×CPT256M52.2095.4%22.9459.60
PI 8×LinearARD256M53.3897.6%23.8065.10
NTK 8×Without restoration—51.6694.45%——
NTK 8×CPT4.25M52.3795.75%21.3632.85
NTK 8×LinearARD4.25M53.7598.27%22.1164.84
NTK 8×CPT256M53.4097.63%22.9664.53
NTK 8×LinearARD256M53.9998.71%23.1967.97

At 4.25M tokens, NTK LinearARD improves over CPT from 52.37 to 53.75 in short-context average, 21.36 to 22.11 on LongBench-E, and 32.85 to 64.84 on RULER. Improvements also hold under PI and at 256M tokens. These results show transfer across two materially different RoPE scaling rules; they do not establish applicability to non-RoPE encodings, which we will state as a limitation.

3.5 Potential Ambiguity of the Term “Self-Distillation”

Reviewer concern. The use of the term “self-distillation” is somewhat confusing. It may remind readers of recent on-policy self-distillation methods such as OPSD, even though the method proposed here is clearly different. The paper should distinguish the terminology more explicitly.

Response. We agree that self-distillation is overloaded and may be confused with on-policy learning, self-generated supervision, or iterative teacher–student updating. Our setting instead follows restoration distillation: a frozen native-RoPE model supervises a RoPE-scaled student initialized from the same pretrained checkpoint. Although the teacher and student share the same pretrained origin, they are distinct model instances during training. The teacher remains fixed, while only the selected student parameters are optimized. No student-generated training data, on-policy sampling, pseudo-label iteration, or teacher update is involved.

We will replace self-distillation with restoration distillation throughout the paper.

Comments on the paper

1 comment
Meta-review

The paper proposes a method (LinearARD) which uses self-distillation to restores Rotary Position Embedding (RoPE)-scaled students through attention-structure consistency with a frozen native-RoPE teacher, with the goal of making long context adaptation more data efficient. LinearARD aligns the Q/Q, K/K, and V/V token-token self-relation distributions in the final attention layer, and to make this scalable the paper further contributes a linear-memory KL distillation kernel.

Reviewers point out as strengths the relevance of the problem being tackled, the novelty of the relation-level KL distillation and its efficient implementation, the empirical efficiency gains, and the broader significance of the proposed method.

The main weaknesses are insufficient detail on baseline comparisons (more detail on data, optimization, sequence lengths, evaluation pipeline, and tuning would be useful for a fair assessment of the method), unclear attribution of the contributions from ARD and CPT (a reviewer suggests an ablation experiment to help understand the effects of restoration vs. long-context activation), somewhat limited generality evidence, and the fact that the comparison with CPT is not compute-matched -- while the paper claims approximately 60× greater efficiency based on training-token count, one should tale into account the overhead of having to run an additional teacher forward pass and expensive dense relation-distillation operations that CPT does not require. It would be useful to report matched GPU-hour, FLOP, or wall-clock comparisons to better understand these tradeoffs.

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

Related papers

Loading the map…

Discussion (0)

Sign in to comment.