arXiv

LongAttnComp: Cross-Family Context Compression for Long-Context Reasoning

Title: LongAttnComp: Enabling Long-Context Reasoning via Cross-Family Context Compression

Abstract

As practical applications increasingly demand the processing of inputs exceeding 100,000 tokens, the disparity between context length and inference efficiency has emerged as a significant bottleneck. Context compression presents a viable solution to lower prefilling costs while maintaining task accuracy. Nevertheless, current training-free, attention-based approaches exhibit notable deficiencies in rigorous long-context scenarios, particularly code reasoning. To address this, we introduce LongAttnComp, an extension of AttnComp adapted for long-context environments. This method incorporates a fine-tuned, lightweight cross-attention scoring layer alongside token-level chunking, a token-budget top-p algorithm, positional reordering, and a format-agnostic query parser.

We also propose a two-stage fine-tuning protocol for the compressor. The first stage establishes a general retrieval foundation using NIAH-style data, while the second stage expands this capability with multi-hop and reasoning datasets to enhance coverage across diverse long-context tasks. Experimental results on InfiniteBench Code-Debug show that LongAttnComp achieves full-context accuracy levels or better, significantly surpassing training-free baselines, and demonstrates successful transfer across four target models from three distinct families. Furthermore, evaluations on LongBench v2 indicate that the two-stage approach substantially reduces the performance gap observed in Stage 1 for multi-document reasoning, all while retaining strong performance on Code-Debug.


Source: arXiv Generated at: 2026-06-02 00:00:00 UTC

Related Articles

Law’s Billable Hour Is Being Shredded by AI
Bloomberg

Law’s Billable Hour Is Being Shredded by AI

AI is dismantling the billable hour by automating routine legal tasks. This technological shift threatens the traditiona...

Iran War: Trump Tries to Stop Israel’s Lebanon Push | The Opening Trade 6/2/2026
Bloomberg

Iran War: Trump Tries to Stop Israel’s Lebanon Push | The Opening Trade 6/2/2026

SoftBank in Early Talks to Back $800 Million Agile Robots Round
Bloomberg

SoftBank in Early Talks to Back $800 Million Agile Robots Round

SoftBank is in early talks to back Agile Robots’ $800 million funding round. The Japanese tech giant is currently in pre...

Amundi Is Diversifying Risk Via Commodity Currencies, Gold
Bloomberg

Amundi Is Diversifying Risk Via Commodity Currencies, Gold

Amundi diversifies risk by investing in commodity-linked currencies and gold. This strategy hedges against market volati...

Reuters

Marvell Technology surges after Nvidia's Huang calls it 'next trillion-dollar company'

Marvell Technology shares surged after Nvidia CEO Jensen Huang labeled the firm the “next trillion-dollar company.”

Russia Says It Found Foreign Spyware on Top Officials’ Phones
Bloomberg

Russia Says It Found Foreign Spyware on Top Officials’ Phones

Russia’s FSB claims to have discovered foreign spyware on senior officials’ phones. Moscow attributes the intrusion to h...