arXiv paper· software engineering (LLM-based agents)· method paper

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

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

cs.SE · cs.AI

Quick verdict

Proposes attention-guided rolling compression for SE-agent trajectories; 53.17% pass at -33.6% cost vs AgentDiet is consistent but significance is untested.

Summary

The paper presents AttnCompress, a training-free middleware that compresses the interaction trajectories of autonomous software engineering (SE) agents. It combines three mechanisms: perplexity-spike segmentation that splits verbose tool outputs into syntactically coherent blocks; relevance scoring that uses attention weights projected from the proxy model's next-response start token (Qwen3-4B-Instruct); and a three-tier rolling window that keeps the last two turns raw, re-compresses a short-term buffer every turn, and periodically refreshes a long-term archive so discarded blocks can be recalled. Integrated into Trae-Agent and evaluated on a 200-instance SWE-Bench-Verified subset with three backends (Gemini-3-Flash 71.50%, Qwen3-235B 43.50%, Qwen3-Coder-30B 44.50%), it reaches a mean pass rate of 53.17% versus 51.17% for AgentDiet and 55.17% for uncompressed context, using 21.6% fewer input tokens and 33.6% lower total cost than AgentDiet. Ablations attribute 7.0, 5.0, and 3.0 percentage points to attention scoring, the rolling window, and PPL segmentation respectively. Key limitations: the headline margin is roughly two percentage points on a curated subset without significance testing; attention-based relevance is validated against only one open backend; and evaluation covers a single agent framework.

Review complete

Assessment at a glance

software engineering (LLM-based agents)

5

risk flags identified

● high 0

● medium 3

● low 2

Reproducibility readinessmedium
Code & data availableyes
Review confidencehigh
AI text signal0/20 passages flagged
Deep research viable

5 strengths · 5 weaknesses · 5 author questions

AI text signal = Binoculars zero-shot detector score over 20 sampled passages (Fast-DetectGPT co-reported) — absence does not prove human authorship, and a flag does not imply misconduct.

Levels reflect verification complexity — not a quality score. Evolve never rates your paper.

Key claims under review

  • PPL-spike segmentation preserves code and log syntactic integrity better than token-level pruning, worth 3.0 percentage points of pass rate (Table 3).
  • Proxy-model attention weights from the next-response start token are an effective training-free relevance signal for SE-agent history, worth 7.0 percentage points over random block selection.
  • A three-tier rolling window that periodically re-selects from the full archive recovers focus-shifted information, worth 5.0 percentage points over one-shot compression.
  • On a 200-instance SWE-Bench-Verified subset, AttnCompress reaches a mean 53.17% pass rate across three backends, above AgentDiet (51.17%), with 21.6% fewer input tokens and 33.6% lower total cost.
  • The approach is model-agnostic: five proxy models from three families yield end-to-end pass rates within a few points and Spearman alignment of 0.56-0.64 with the reference agent model (Tables 5-6).

Strengths

  • Honest, fine-grained cost accounting

    Table 1 separates agent cost from compression cost; Section 4.2.3 states prefix-cache input discounts are included and AttnCompress's locally hosted proxy is still charged at official API rates [30] — the comparison is not flattered by hiding compressor overhead.

  • Clean tuning/test separation

    Section 4.2.1 adopts AgentDiet's exact 100-instance validation list for all ablation and hyperparameter work (Tables 3-4) and reserves a disjoint 200-instance test list for headline results, isolating hyperparameter overfitting.

  • Dual evidence for proxy generality

  • Variance-aware robustness check

  • Internally consistent headline numbers

Weaknesses

  • No statistical testing behind the headline margin

  • Attention never isolated from cheaper relevance signals

  • External validity confined to one framework and a curated slice

  • Efficiency regressions vs the uncompressed baseline are under-emphasized

  • Mechanism evidence missing where performance is highest

Full Review Report

$1.99 · one-time

Unlock the complete preliminary analysis Evolve produced for this paper.

Report preview

Scope & Claims

AttnCompress (Proc. ACM Softw. Eng. 3, ISSTA 2026) targets context bloat in Autonomous SE agents, where observations account for 62.6% of trajectory tokens (Fig. 1). It frames prior work as failing on two axes: static one-pass pruning (ObsMask) that severs long-range dependencies when the agent's focus shifts, and a granularity mismatch between token- and message-level compression. The answer is a training-free middleware with three mechanisms: PPL-spike segmentation of tool outputs into syntactically coherent blocks; relevance scoring via a proxy model's attention projected from the next-response start token; and a three-tier rolling window (raw tail k=2, per-turn re-compressed short-term buffer, periodically refreshed long-term archive, Algorithm 1). Headline claim: 53.17% mean pass rate on a 200-instance SWE-Bench-Verified subset vs 51.17% for AgentDiet and 55.17% uncompressed, with -21.6% input tokens and -33.6% total cost versus AgentDiet; plus near-parity on Multi-SWE-Bench-Flash (19.67% vs 20.33%) and proxy-model generality.

The remaining sections cover Methodology Assessment, Statistical Evidence, Results & Reproducibility, Limitations & Risks, and Verdict & Recommendations.

  • All 5 strengths & 5 weaknesses, analyzed in detail
  • 5 risk flags with severity, section & reviewer questions
  • Methods & statistical evidence assessment
  • 5 questions a peer reviewer would ask
  • Full six-dimension evaluation report & recommendations

One-time purchase · this paper only

One-time purchase, this paper only. AI-generated preliminary analysis — not peer review.

Frequently asked questions

What is AttnCompress?

A training-free framework that compresses the interaction history of LLM-based software engineering agents. A small proxy model segments verbose tool outputs into coherent blocks using perplexity spikes, scores each block's relevance with attention weights, and a rolling window re-selects context each turn so previously discarded information can be recalled when the agent's focus shifts.

How much does AttnCompress improve over prior methods?

On a 200-instance SWE-Bench-Verified subset averaged over three backend LLMs, it reports a 53.17% pass rate versus 51.17% for the prior SOTA AgentDiet (about 2 percentage points), with 21.6% fewer input tokens and 33.6% lower total cost than AgentDiet. The uncompressed baseline reaches 55.17% but at much higher cost, and the margin over AgentDiet is not statistically tested in the paper.

Does AttnCompress work with any LLM?

The authors test five proxy scorer models across the Qwen, Gemma, and Llama families; end-to-end pass rates vary by only a few points across proxies, supporting a model-agnostic claim. On the agent side it was evaluated with Gemini-3-Flash, Qwen3-235B, and Qwen3-Coder-30B, but all inside a single framework (Trae-Agent).

Is code available for AttnCompress?

Yes. The paper's Data Availability statement links a replication package with source code and scripts at github.com/ZZR0/AttnCompress. Note that reproducing the headline pass rates requires paid LLM API access and substantial compute (the authors used 8xA100 GPUs).

About this review

This is an AI-generated preliminary review by Evolve.Pub, produced from the openly available text of the paper. It is not peer review and does not represent the authors' views. The canonical record of the paper is at the publisher link above.

  • Figure-embedded text in Figs. 3-5 is extracted as interleaved label/value runs (e.g., Fig. 4's latency breakdown), so figure-internal details beyond the values repeated in prose and tables could not be independently verified; all numbers cited in this review come from prose, tables, or figure captions.

Go deeper on this paper

Reproduce ResultsNot feasible for this paper — the core results cannot be re-derived by sandboxed code simulation.

Wrote a paper? Stress-test it before reviewers do.

Upload your manuscript for the same structured scrutiny — reasoning, statistics, evidence, figures, and reproducibility.

Scan your paper
AttnCompress: Dynamic Attention-Guided Trajectory Compression for Software Engineering Agents | Evolve.Pub