LongAttnComp: Cross-Family Context Compression for Long-Context Reasoning
Pith reviewed 2026-06-28 17:05 UTC · model grok-4.3
The pith
A fine-tuned cross-attention compressor matches full-context accuracy on long code reasoning tasks.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
LongAttnComp fine-tunes a lightweight cross-attention scoring layer on NIAH-style data followed by multi-hop and reasoning data; the trained scorer, together with token-level chunking, token-budget top-p selection, positional reordering, and a format-agnostic query parser, produces compressed contexts that match or exceed full-context accuracy on InfiniteBench Code-Debug and transfer across four target models from three families.
What carries the argument
The lightweight cross-attention scoring layer, trained in two stages, that ranks and selects tokens for the downstream model.
If this is right
- On InfiniteBench Code-Debug the method matches or exceeds full-context accuracy.
- It substantially outperforms existing training-free attention-based baselines.
- The same compressor transfers to four target models drawn from three different families.
- The two-stage fine-tuning recipe closes most of the multi-document reasoning gap on LongBench v2 while retaining Code-Debug performance.
Where Pith is reading between the lines
- The same compressor could be applied to other long-sequence domains such as long-document summarization or multi-turn dialogue without retraining the target model.
- If the selection quality holds at 200k+ tokens, production systems could reduce prefill latency by a factor of four or more on existing hardware.
- The two-stage recipe suggests that retrieval pre-training followed by reasoning fine-tuning may be a general pattern for building task-agnostic compressors.
Load-bearing premise
Token selections produced by the fine-tuned cross-attention layer remain effective for the target model's reasoning without task-specific retraining or degradation on unseen long-context distributions.
What would settle it
A new long-context reasoning task drawn from a distribution outside the NIAH-style and multi-hop training data where LongAttnComp accuracy falls below the full-context baseline would falsify the central claim.
Figures
read the original abstract
As real-world applications increasingly require processing inputs of 100k+ tokens, the gap between context length and inference efficiency has become a critical bottleneck. Context compression offers a way to reduce prefill costs while preserving task accuracy. However, existing training-free attention-based methods leave substantial gaps in demanding long-context tasks such as code reasoning. We present LongAttnComp, a long-context adaptation of AttnComp that fine-tunes a lightweight cross-attention scoring layer and introduces tokenlevel chunking, a token-budget top-p algorithm, positional reordering, and a formatagnostic query parser. We further design a two-stage fine-tuning recipe for the compressor: Stage 1 builds a general retrieval foundation from NIAH-style data, and Stage 2 extends it with multi-hop and reasoning data for broader long-context task coverage. On InfiniteBench Code-Debug, LongAttnComp matches or exceeds full-context accuracy, substantially outperforms training-free baselines, and transfers across four target models from three families. On LongBench v2, the two-stage recipe largely closes the Stage 1 gap on multi-document reasoning while preserving Code-Debug performance.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper introduces LongAttnComp, a context compression method adapting AttnComp via fine-tuning of a lightweight cross-attention scoring layer. It uses a two-stage recipe (Stage 1 on NIAH-style data for retrieval, Stage 2 on multi-hop and reasoning data), plus token-level chunking, token-budget top-p selection, positional reordering, and a format-agnostic query parser. The central claims are that on InfiniteBench Code-Debug the method matches or exceeds full-context accuracy, substantially outperforms training-free baselines, transfers across four target models from three families, and on LongBench v2 largely closes the Stage-1 gap on multi-document reasoning while preserving Code-Debug performance.
Significance. If the generalization and transfer results hold after verification, the work would be significant for long-context efficiency: it targets the performance gap of training-free attention methods on code reasoning, demonstrates cross-family applicability without per-model retraining, and provides a concrete two-stage recipe that extends retrieval foundations to broader reasoning tasks.
major comments (2)
- [Abstract] Abstract: The claim that LongAttnComp matches full-context accuracy on InfiniteBench Code-Debug after training only on NIAH-style and multi-hop/reasoning data requires that the learned cross-attention scorer selects tokens whose retained spans suffice for code-debug reasoning (variable lifetimes, control-flow edges, API sites). The abstract supplies no evidence that Stage 2 included code data or that token-selection statistics were validated on code distributions, leaving the generalization unsubstantiated.
- [Abstract] Abstract: No information is given on data construction details, exact token budgets used at inference, statistical significance testing of the reported accuracy gains, or ablations isolating the contribution of each added component (token-level chunking, top-p, positional reordering, query parser). These omissions prevent assessment of whether the headline transfer and Code-Debug results are robust.
minor comments (1)
- [Abstract] Abstract: 'formatagnostic' should be written 'format-agnostic'.
Simulated Author's Rebuttal
We thank the referee for the careful reading and constructive comments on the abstract. We address each point below, clarifying the training setup and evidence for generalization while committing to revisions that improve transparency on experimental details.
read point-by-point responses
-
Referee: [Abstract] Abstract: The claim that LongAttnComp matches full-context accuracy on InfiniteBench Code-Debug after training only on NIAH-style and multi-hop/reasoning data requires that the learned cross-attention scorer selects tokens whose retained spans suffice for code-debug reasoning (variable lifetimes, control-flow edges, API sites). The abstract supplies no evidence that Stage 2 included code data or that token-selection statistics were validated on code distributions, leaving the generalization unsubstantiated.
Authors: Stage 2 training uses only multi-hop and reasoning data with no code examples, consistent with the manuscript description. Generalization is substantiated by the reported InfiniteBench Code-Debug results, where the method matches or exceeds full-context accuracy across four models from three families despite the absence of code-specific training data. These outcomes provide empirical evidence that the cross-attention scorer, after the two-stage recipe, selects tokens sufficient for code reasoning. We will revise the abstract to explicitly note the lack of code data in Stage 2 and frame the Code-Debug results as direct evidence of cross-task transfer. revision: yes
-
Referee: [Abstract] Abstract: No information is given on data construction details, exact token budgets used at inference, statistical significance testing of the reported accuracy gains, or ablations isolating the contribution of each added component (token-level chunking, top-p, positional reordering, query parser). These omissions prevent assessment of whether the headline transfer and Code-Debug results are robust.
Authors: The full manuscript details data construction for both stages, reports the token budgets applied at inference, presents ablations isolating token-level chunking, top-p selection, positional reordering, and the query parser, and evaluates gains over multiple runs. To address the abstract-level concern, we will expand the abstract with concise references to these elements and the relevant sections. We will also add explicit statements on statistical testing where applicable. revision: yes
Circularity Check
No circularity: empirical claims rest on independent fine-tuning and evaluation
full rationale
The paper describes a two-stage fine-tuning procedure on NIAH-style and multi-hop data, followed by empirical evaluation on InfiniteBench Code-Debug and LongBench v2. No equations, self-definitional mappings, or fitted parameters are presented that reduce the reported accuracy or transfer results to the training inputs by construction. The central claims are performance measurements on held-out benchmarks, not derivations that rename or tautologically reproduce the training distribution. No self-citations are invoked as load-bearing uniqueness theorems. This is a standard empirical methods paper with no detectable circular steps per the enumerated patterns.
Axiom & Free-Parameter Ledger
free parameters (1)
- cross-attention scoring layer parameters
axioms (1)
- domain assumption Fine-tuned token selections from the compressor remain effective when plugged into target models from different families without further adaptation.
Reference graph
Works this paper leans on
-
[1]
Luo, Lvzhou and Cao, Yixuan and Luo, Ping , journal =
-
[2]
Jiang, Huiqiang and Wu, Qianhui and Lin, Chin-Yew and Yang, Yuqing and Qiu, Lili , booktitle =
-
[3]
Xu, Fangyuan and Shi, Weijia and Choi, Eunsol , journal =
-
[4]
Proceedings of the 40th International Conference on Machine Learning , pages =
Fast Inference from Transformers via Speculative Decoding , author =. Proceedings of the 40th International Conference on Machine Learning , pages =
-
[5]
Hsieh, Cheng-Ping and Sun, Simeng and Kriman, Samuel and Agrawal, Shantanu and Rekesh, Dima and Fu, Jiaqi and Zhang, Yang and Ginsburg, Boris , journal =
-
[6]
Zhang, Xinrong and Chen, Yingfa and Hu, Shengding and Xu, Zihang and Chen, Junhao and Hao, Moo Khai and Han, Xu and Thai, Zhen Leng and Wang, Shuo and Liu, Zhiyuan and Sun, Maosong , journal =
-
[7]
Bai, Yushi and Tu, Shangqing and Zhang, Jiajie and Peng, Hao and Wang, Xiaozhi and Lv, Xin and Cao, Shulin and Xu, Jiazheng and Hou, Lei and Dong, Yuxiao and Tang, Jie and Li, Juanzi , journal =
-
[8]
Dubey, Abhimanyu and Jauhri, Abhinav and Pandey, Abhinav and others , journal =. The
-
[9]
Rajpurkar, Pranav and Zhang, Jian and Lopyrev, Konstantin and Liang, Percy , booktitle =
-
[10]
Speculative Prefill: Turbocharging
Liu, Jingyu and Chen, Beidi and Zhang, Ce , booktitle =. Speculative Prefill: Turbocharging
-
[11]
International Conference on Learning Representations , year =
Cross-Family Speculative Prefill: Training-Free Long-Context Compression with Small Draft Models , author =. International Conference on Learning Representations , year =
-
[12]
Yang, Zhilin and Qi, Peng and Zhang, Saizheng and Bengio, Yoshua and Cohen, William W and Salakhutdinov, Ruslan and Manning, Christopher D , booktitle =
-
[13]
Jiang, Huiqiang and Wu, Qianhui and Luo, Xufang and Li, Dongsheng and Lin, Chin-Yew and Yang, Yuqing and Qiu, Lili , booktitle =
-
[14]
Yoon, Chanwoong and Kim, Taewhoo and Hwang, Hyeon and Jeong, Minbyul and Kang, Jaewoo , journal =
-
[15]
Hwang, Taeho and Jeong, Sukmin and Lim, Jeonghwan and Song, Soyeong and Park, Jinwoo , journal =
-
[16]
arXiv preprint arXiv:2501.16214 , year=
Provence: Efficient and Robust Context Pruning for Retrieval-Augmented Generation , author =. arXiv preprint arXiv:2501.16214 , year =
-
[17]
arXiv preprint arXiv:2501.12948 , year =
work page internal anchor Pith review Pith/arXiv arXiv
-
[18]
2026 , howpublished =
2026
-
[19]
arXiv preprint arXiv:2508.10925 , year =
work page internal anchor Pith review Pith/arXiv arXiv
-
[20]
Transactions of the Association for Computational Linguistics , volume =
Lost in the Middle: How Language Models Use Long Contexts , author =. Transactions of the Association for Computational Linguistics , volume =
-
[21]
Proceedings of EMNLP , pages =
Dense Passage Retrieval for Open-Domain Question Answering , author =. Proceedings of EMNLP , pages =
-
[22]
MuSiQue: Multihop Questions via Single-hop Question Composition , author =. Transactions of the Association for Computational Linguistics , volume =. 2022 , publisher =. doi:10.1162/tacl_a_00475 , url =
-
[23]
Constructing a Multi-hop
Ho, Xanh and Nguyen, Anh-Khoa Duong and Sugawara, Saku and Aizawa, Akiko , booktitle =. Constructing a Multi-hop. 2020 , url =
2020
-
[24]
2025 , howpublished =
2025
-
[25]
2026 , howpublished =
LongBench v2 Leaderboard , author =. 2026 , howpublished =
2026
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.