Source-linked AI summary

Stable Geometry with Divergent Task Evidence for Efficient Long-Horizon Agent Compression

Mingxuan Wang, Fei Luo, Bo Wang, Guorun Yao, Yinglong Guo, Chao Ning, Hongyue Chen, Yanbiao Ma, Jungong Han

arXiv:2609.27332v1cs.AI

TL;DR

Long-horizon histories raise context and inference costs, while geometric similarity alone does not show whether records preserve task evidence needed for execution. GEM protects task and execution evidence before completing geometric coverage, and reduces mean combined token usage while maintaining comparable aggregate reward.

  • Problem

    Long-horizon agents repeatedly forward growing histories at higher context and inference cost, while geometric redundancy alone does not establish that records are safe to discard.

    Source: §1 · pp. 1–2
  • Method

    GEM is a training-free external compressor that protects task and execution evidence before using geometric residuals to complete coverage.

    Source: §1 · p. 2, §5 · p. 7
  • Results

    Mean combined usage falls from 2.69M to 2.11M per task, a reduction of approximately 21.4%, while mean score changes from 69.87 to 70.18 (reward ×100).

    Source: §6.2 · p. 9, §7 · p. 11
  • Takeaways & Limitations

    History compression should distinguish repeated geometric content from consequential execution evidence rather than relying on geometric coverage alone.

    Source: §7 · p. 11

    GEM’s protection rules use available history and the current goal as inexpensive cues, not as a complete symbolic model of the environment.

    Source: §5.2 · p. 8

Abstract

from arXiv · show

Long horizon agents accumulate growing interaction histories that increase context and inference costs. We find that geometric redundancy alone is an insufficient criterion for safe compression. Although agent histories exhibit strong low dimensional structure, similar global geometry can preserve very different amounts of task evidence. At identical retained block counts, evidence aware selection raises next action Top 3 retention from 0.31 to 0.69, while centroid similarity remains 0.98. Controlled replacement further shows that action related information can be substantially altered while global geometric measures remain nearly unchanged. Motivated by this gap between geometry and evidence, we introduce Geometry Guided Evidence Preserving Memory (GEM), a training free compressor that protects task and execution evidence before using geometric residuals to complete coverage. GEM reduces mean combined token usage from 2.69M to 2.11M per task, a 21.4% reduction, while maintaining comparable task reward. Our results show that efficient agent history compression should optimize for preserved task evidence rather than geometric coverage alone.

1 Introduction

Long-horizon histories increase context and inference costs, but geometric redundancy alone cannot determine which records are safe to remove. GEM protects task and execution evidence before using geometric residuals to complete coverage.

1 Introduction

  • Long-horizon agents accumulate instructions, plans, tool calls, observations, errors, and artifacts, making repeated forwarding of full histories costly.Compression must decide not only how much history to remove, but which records can be discarded without losing information needed for execution.Source: §1 · p. 1
  • Similar semantic directions can encode different task-state facts, so low geometric novelty does not guarantee that a block is redundant for execution.A plan, the command implementing it, and a later partial read may occupy similar directions while establishing different facts.Source: §1 · pp. 1–2
  • GEM protects recent context, goal-related observations, execution-state records, fresh errors, and source-bearing information before selecting geometric residuals.Retained blocks remain unchanged and are reconstructed chronologically for the acting model’s standard request interface.Source: §1 · p. 2
  • The paper distinguishes global representational coverage from execution-relevant evidence and reports that similar geometric coverage can preserve different amounts of next-action information.Controlled replacement changes action-related information while leaving global geometry nearly unchanged.Source: §1 · p. 2
  • GEM first protects consequential task and execution evidence, then uses geometric residuals to complete coverage rather than treating geometric redundancy as sufficient for removal.This is the paper’s evidence-first compression principle.Source: §1 · p. 2
  • Online history management retains complete interaction blocks and call-result structure while preserving message content and chronological order.Each compression update is constrained by online forwarding limits, while newly activated evidence can remain available in later execution.Source: §1 · p. 2

2 Related Work

Related work covers context-management operations, memory systems that preserve execution evidence, and methods for selecting task-relevant context. GEM focuses on selecting complete original interaction blocks while distinguishing representational coverage from next-action information.

2.1 Context Management for Long Horizon Agents

  • ReSum, ACON, and PACE summarize, refine compression guidelines, or adjust historical detail by predicted next-action relevance [3, 17].SelfCompact, Self-GC, and Sculptor provide context-management operations; GEM instead selects complete original blocks without summaries or learned agent memory operations [9, 18, 10].Source: §2.1 · pp. 2–3

2.2 Memory and Execution Evidence

  • Memory work includes learned consolidation, raw-history access, external context management, execution dependencies, and evidence that may not influence later behavior [14, 15, 16, 4].GEM focuses more specifically on cases where semantically similar original records have different execution roles.Source: §2.2 · p. 3

2.3 Task-Aware Context Selection

  • Task-aware context selection includes token pruning, tool-context retention, long-context evaluation, and adaptive evidence retrieval [7, 8, 25, 26, 27, 28, 29, 30].GEM selects complete interaction blocks using the current task and available history, without modifying the acting model.Source: §2.3 · p. 3

3 Geometry and Task Information in Agent Histories

The paper analyzes agent-history representations to distinguish geometric redundancy from information needed for continued execution. It defines geometric coverage and action-related retention measures, including information outside dominant history directions.

3 Geometry and Task Information in Agent Histories

  • The recorded next action is used for offline measurement of information needed for continued execution and is never available to the deployed compressor.The analysis treats history representations as a way to distinguish redundancy from execution-relevant information.Source: §3 · p. 3

3.1 History Representation

  • Complete tool-call blocks and their corresponding results are retained or removed together, while a frozen encoder maps each history block to a unit vector.The centered representation matrix is decomposed into ordered singular directions for analyzing variation.Source: §3.1 · pp. 3–4
  • Low effective dimension indicates concentrated variation, not that blocks outside dominant directions are safe to remove during downstream execution.The spectral analysis sets ρ to 0.90.Source: §3.1 · p. 4

3.2 Coverage and Action-Related Retention

  • Centroid similarity measures preservation of the mean direction, while captured energy measures average projection onto the retained span using original normalized block vectors.The paper separately measures action-direction projection and retention of the three history blocks most similar to the recorded next action; neither is a task success rate.Source: §3.2 · p. 4

3.3 Information Outside the Dominant Subspace

  • A share of action projection can lie outside the leading history directions, but that measure alone does not identify a removable block.The controlled-replacement analysis also measures each centered block’s low-energy fraction and its alignment with the action in that subspace.Source: §3.3 · p. 4

4 Evidence Beyond the Dominant Subspace

Agent histories are geometrically concentrated, but matching that geometry does not ensure preservation of next-action evidence. The analyses show that low-energy blocks can carry action-related information that global geometric measures fail to capture.

4.1 Histories Exhibit Structured Redundancy

  • Real histories have lower median effective rank than feature-shift and Gaussian controls in both isolated-block and selector representation spaces.Median ranks are 8.39, 16.99, and 19.96 for isolated blocks, and 14.04, 23.54, and 30.07 for selector space, respectively.Source: §4.1 · p. 5, Figure 1 · p. 5
  • Geometric coverage uses a median of six isolated blocks and ten selector blocks, or retained fractions of 0.30 and 0.35, respectively, without establishing safe removability.The reported counts describe geometric coverage only; omitted blocks are not thereby shown to be task-irrelevant.Source: §4.1 · p. 5

4.2 Coverage Does Not Determine Evidence Retention

  • At identical retained block counts, evidence-constrained selection preserves more task information while global geometry remains nearly unchanged.The trajectory-level comparison is based on 650 checkpoints from 32 trajectories; it does not establish statistical equivalence.Source: §4.2 · pp. 5–6, Figure 2 · p. 6

4.3 Low-Energy Evidence and Controlled Replacement

  • Next-action information is not confined to leading spectral directions, and descriptive rank bands are not equal-energy intervals.The controlled intervention instead targets directions after the 90% centered-energy cutoff.Source: §4.3 · p. 6, Figure 3 · p. 6
  • Targeted replacement reduces action projection by 0.03 and next-action Top-3 retention by 0.33, while centroid similarity and captured energy each change by +0.00.The intervention compares a targeted block with a matched low-alignment block while matching representation similarity, recency, and serialized length.Source: §4.3 · pp. 6–7, Table 2 · p. 7
  • The replacement is a representation-level intervention, not an agent rerun, so it does not by itself establish a causal task-reward effect.It supports the distinction between geometry and evidence without demonstrating a task-reward consequence.Source: §4.3 · p. 7
  • Execution-aware protection distinguishes plans, state-changing operations, and subsequent observations even when they concern the same artifact.Appendix B.2 details the rules for identifying and preserving these execution roles.Source: §4.3 · p. 7

5 GEM: Geometry-Guided Evidence-Preserving Memory

GEM protects task and execution evidence before using geometric residuals to complete representation coverage. It forwards original interaction blocks and applies online constraints to limit each update.

5.1 Evidence-Constrained Selection

  • The protected set, selected core, and forwarded set are distinct; the core may exceed nominal capacity to retain required evidence, and greedy selection may leave coverage unmet.K is not a hard bound on the number of blocks ultimately forwarded.Source: §5.1 · p. 8

5.2 Protecting Task and Execution Evidence

  • Protection combines recent context, goal-related observations, execution-state records, fresh errors, and source-bearing information, using explicit editing and supported Bash and Python write patterns.These history-based cues do not verify that a detected write succeeded or that an expired error was resolved.Source: §5.2 · p. 8

5.3 Geometric Completion and Online Updates

  • Starting from the protected set, GEM repeatedly selects eligible blocks with the largest residual until coverage, capacity, or candidate exhaustion stops selection.Residual measures information outside the current geometric span, not task relevance; protected records cannot be removed merely for having a small residual.Source: §5.3 · p. 8
  • The online deletion guard limits removal per request, keeps complete retained blocks unchanged and chronological, and may remove nothing when blocks are indivisible.Between global reselections, GEM keeps the previously forwarded set and appends new blocks and newly activated evidence.Source: §5.3 · p. 9

6 Experiments

Across the Full260 evaluation, GEM used fewer combined tokens while mean score changed only slightly; results also show domain-dependent tradeoffs and higher evidence retention than geometry-only selection.

6.2 Full260 End-to-End Results

  • Across 260 tasks, mean combined usage fell from 2.69M to 2.11M per task (about 21.4%), while mean score changed from 69.87 to 70.18.Code is a boundary case: tokens changed from 1.37M to 1.35M and mean reward decreased by about 0.02.Source: Table 3 · p. 9, §6.2 · p. 9

6.1 Experimental Setup

  • The online evaluation used DeepSeek-V4-Flash at temperature zero and frozen 1,024-dimensional Qwen3-Embedding-8B representations; combined tokens include input, output, and embedding tokens.Full260 is the primary end-to-end evaluation; the fixed-40 panel is a separate reference.Source: §6.1 · p. 9

6.3 Fixed-40 Context-Management Reference Panel

  • In the fixed-40 reference panel, periodic summarization at n = 5 had relatively high mean score but used more tokens than the uncompressed base, while CoMem used fewer tokens with much lower mean score.The panel illustrates tradeoffs across domains and is not a matched GEM comparison.Source: §6.3 · p. 10, Table 4 · p. 10

6.4 Online Ablation and Compression Strength

  • The online ablation compared the full method with random completion and geometry-only selection on 20 formal-valid tasks, five from each domain.Random completion retained the evidence rules; geometry-only removed the evidence-protection bundle.Source: §6.4 · p. 10
  • On the 20-task online batch, the full method scored 60.39 versus 60.75 for the base agent, used about 35.30% fewer combined tokens, and had the highest overall reward and lowest overall token use versus the ablations.Code reward rose with slightly more tokens, while Security tokens fell sharply with a reward loss.Source: §6.4 · pp. 10–11, Table 5 · p. 11
  • Evidence-constrained selection had higher Top-3 retention than geometry-only selection at every tested exact budget K from 8 to 20.As τ rose from 0.85 to 0.95, retained fraction increased from 0.38 to 0.53 and Top-3 retention from 0.58 to 0.65.Source: Figure 5 · p. 11, §6.4 · p. 11

7 Conclusion

The conclusion argues that geometric redundancy does not ensure preservation of evidence needed for later actions. GEM protects task and execution evidence before completing geometric coverage, and the paper reports reduced token use with similar aggregate reward.

7 Conclusion

  • Similar representation geometry can preserve different amounts of next-action evidence, so the conclusion frames history compression around evidence as well as geometric coverage.On WorkBuddyBench Full260, reported mean combined tokens fell from 2.69M to 2.11M per task while aggregate reward remained similar.Source: §7 · p. 11

Reproducibility Statement

  • The paper states that it provides methodological definitions, selection algorithms, implementation settings, evaluation protocols, ablation configurations, and additional analyses for reproducibility.The acting model and representation encoder remain frozen under the default setting.Source: Reproducibility Statement · p. 12

AI Use Statement

  • Generative AI tools assisted with code, analysis scripts, figure and table preparation, and manuscript editing under author supervision; the authors say they reviewed and verified the claims.The authors take responsibility for the final manuscript.Source: AI Use Statement · p. 12

A Mathematical Derivations and Properties

The appendix formalizes how GEM completes geometric coverage after protecting evidence, and proves invariants for selection and forwarding.

A.1 Residual Selection and Reconstruction Error

  • For normalized block vectors, the residual score and coverage target bound mean squared embedding reconstruction error by 1 − τ when coverage reaches τ.The residual rule adds a direction poorly represented by the selected span.Source: §A.1 · p. 16

A.2 Coverage Gain and Incremental Basis Updates

  • Adding an eligible residual direction increases coverage monotonically, and nested selected sets cannot have lower coverage.The update also supports incremental score updates without rebuilding all previous projections.Source: §A.2 · pp. 16–17

A.3 Evidence Preservation and Forwarding Invariants

  • Protected blocks remain in the core, while forwarded messages preserve complete assistant call-result groups and chronological order.The saved forwarded set also retains blocks kept by the request-length guard.Source: §A.3 · p. 17

B Algorithm and Implementation Details

GEM selects among complete interaction blocks while forwarding unchanged original messages; its evidence protections precede geometric completion, subject to request-validity and length constraints.

B.1 Complete Blocks and Selection Representations

  • GEM embeddings guide retention of original blocks, while the acting model receives ordinary messages rather than compressed retrieved text or learned compact representations.Removable blocks include assistant tool calls and their matched tool results; non-removable messages and the system/task prefix are preserved.Source: §B.1 · p. 18

B.2 Evidence Protection and Shared Settings

  • The protected set combines recent context, goal-related observations, state records, fresh errors, and source-bearing information.A detected write is treated as possible state change, not proof that the operation succeeded.Source: §B.2 · p. 18

B.3 Global Selection and Incremental Forwarding

  • At eligible requests, GEM initializes selection with protected evidence, adds largest-residual candidates, then considers deleting outside-core blocks while preserving at least 95% of original serialized character count.Requests with fewer than 16 complete blocks remain unchanged; append events retain the saved forwarded set and add new blocks and activated evidence.Source: §B.3 · pp. 18, 20

C.1 Representations, Centering, and Matched Controls

These analyses examine representation structure and evidence retention under controlled comparisons, then test selector variants and sensitivity to budget and coverage settings.

C.1 Representations, Centering, and Matched Controls

  • Real histories have lower effective rank than feature-shift controls in all 171 isolated-block comparisons and all 32 selector-space comparisons.The controls preserve feature marginals while disrupting cross-feature alignment, or match trajectory-matrix dimensions.Source: §C.1 · p. 21, Table C.1 · p. 21

C.2 Matched-Budget Evidence Retention

  • At the same retained count, evidence constraints yield higher action-related retention while reported centroid similarity remains 0.98.Top-3 retention measures whether the three history blocks most similar to the recorded next action remain selected.Source: §C.2 · p. 21

C.3 Low-Energy Subspace and Controlled Replacement

  • The controlled replacement analysis targets retained blocks with high action alignment and compares them with matched low-alignment replacements at the same block count.Matching controls representation similarity, recency, and serialized length; the intervention uses a cumulative-energy cutoff distinct from the spectral visualization’s rank bands.Source: §C.3 · p. 22

D.1 Selectors at the Same Retained Count

  • At the same retained count, the evidence-first selector has the highest reported final projection and next-action Top-3 retention while retaining high geometric coverage.Source: §D.1 · p. 22, Table D.1 · p. 22

D.2 Contribution of Evidence Protection

  • At natural retained fractions, the complete protection bundle retains more action-related information than geometry-only selection; removing State or Error protection reduces Top-3 retention.Because variants retain different fractions, this ablation does not isolate selection quality at identical budgets.Source: §D.2 · pp. 22–23, Table D.2 · p. 23

D.3 Budget and Coverage Sensitivity

  • Evidence-constrained selection exceeds geometry-only next-action Top-3 retention throughout the tested K = 8, . . . , 20 range.Increasing τ progressively adds geometric coverage and retains additional task evidence; the τ = 0.90 row is the operating point highlighted in the main text.Source: §D.3 · p. 23

E.1 Task Units and Aggregate Metrics

The appendix defines the units and aggregation used for online task and token comparisons, and clarifies the scope of the reported panels and ablation.

E.1 Task Units and Aggregate Metrics

  • The complete task is the unit for reward and token aggregation, and the Full260 summary weights domains by task count.The fixed-40 panel contains ten tasks per domain; the 20-task online ablation contains five per domain.Source: §E.1 · p. 23

E.2 Token Accounting and Full260 Efficiency

  • Combined token usage falls from 2.69M to 2.11M per task after embedding cost is included.Reduced cached-input volume more than offsets additional embedding and uncached-input volume; combined tokens are not a direct wall-clock measurement.Source: §E.2 · p. 25

E.3 Reference Panel and Online Ablation Protocol

  • The fixed-40 panel and Full260 evaluation retain the comparison scope stated in the main text, while the online ablation changes completion or protection components within the same protocol.The same-ID GEM slice and reference methods are not treated as a newly executed paired comparison.Source: §E.3 · p. 25
Loading 2609.27332v1…