Lune

ISSTA2026顶会

AttnCompress: Dynamic Attention-Guided Trajectory Compression for Software Engineering Agents

Zhengran Zeng, Yixin Li, Rui Xie, Wei Ye, Shikun Zhang

摘要

The transition from human-centric assistance to Autonomous Software Engineering (ASE) agents has enabled the resolution of complex real-world SE tasks. However, the trial-and-error nature of these agents generates lengthy interaction trajectories, creating severe bottlenecks in terms of context window limits and cost. While context compression offers a potential remedy, prior approaches suffer from static pruning strategies and granularity mismatches, often failing to preserve the semantic dependencies and syntactic details crucial for SE tasks. To strictly preserve critical task evidence while reducing context length, we introduce AttnCompress, a dynamic attention-guided trajectory compression framework. Unlike existing approaches, AttnCompress bridges the gap between semantic integrity and dynamic adaptability through three key mechanisms: (1) structure-aware segmentation via perplexity (PPL) spikes to preserve the syntactic structure of code and logs;

(2) relevance estimation using proxy attention weights to quantify the precise relevance of historical blocks to the agent's current reasoning; and (3) a dynamic rolling window to re-evaluate and recall historical context as the task evolves. Extensive evaluation on SWE-Bench-Verified and Multi-SWE-Bench demonstrates that AttnCompress achieves a pass rate of 53.17%, outperforming prior state-of-the-art baselines while reducing token consumption by 21.6% and total costs by 33.6%. The framework proves to be model-agnostic and generalizes effectively across diverse programming languages.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

可以从这些问题问起

Lune 可以查阅

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering 引用了 SWE-bench: Can Language Models Resolve Real-world Github Issues?
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

它引用的 Paper18

  1. SWE-bench: Can Language Models Resolve Real-world Github Issues?Carlos E. Jimenez, John Yang, Alexander Wettig, Shunyu Yao 等ICLR 2024 · 2,082 次引用
  2. SWE-agent: Agent-Computer Interfaces Enable Automated Software EngineeringJohn Yang, Carlos E. Jimenez, Alexander Wettig, Kilian Lieret 等NeurIPS 2024 · 2,059 次引用
  3. Efficient Memory Management for Large Language Model Serving with PagedAttentionWoosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng 等SOSP 2023 · 1,016 次引用
  4. RECOMP: Improving Retrieval-Augmented LMs with Context Compression and Selective AugmentationFangyuan Xu, Weijia Shi, Eunsol ChoiICLR 2024 · 260 次引用
  5. LLMLingua: Compressing Prompts for Accelerated Inference of Large Language ModelsHuiqiang Jiang, Qianhui Wu, Chin-Yew Lin, Yuqing Yang 等EMNLP 2023 · 94 次引用

相关 Paper

  1. Context as a Tool: Context Management for Long-Horizon SWE-AgentsShukai Liu, Bo Jiang, Jian Yang, Yizhi Li 等ACL Findings 2026
  2. SWE-AGILE: A Software Agent Framework for Efficiently Managing Dynamic Reasoning ContextShuquan Lian, Juncheng Liu, Yazhe Chen, Yuhong Chen 等ACL Findings 2026
  3. RepoDistill: Distilling Repository Knowledge through Compression-Aware Budget Allocation and Policy OptimizationXin Yin, Zixiang Ding, Yiang Zhang, Qiang Wang 等ACL Findings 2026
  4. Leveraging Attention to Effectively Compress Prompts for Long-Context LLMsYunlong Zhao, Haoran Wu, Bo XuAAAI 2025 · 10 次引用
  5. SEER: Self-Enhancing Chain-of-Thought Compression for Reasoning ModelsKerui Huang, Shuhan Liu, Xing Hu, Tongtong Xu 等ISSTA 2026
黄昏的海面,两侧是细线勾勒的悬崖