Source-linked AI summary

CONTRAMEM: Learning Self-Evolving Procedural Memory from Contrasting Multi-Model Trajectories

Zheyuan Deng, Binghang Lu, Hanqi Feng, Shirley Huang, Dianzhuo Wang, Yuanda Xu, Zhiwei Zhang, Yige Sun, Changhong Mou, Runyu Zhang, Yuexing Hao, Barnabas Poczos, Xiaomin Li

arXiv:2608.22533v1cs.AI

TL;DR

Long-horizon computer-use agents remain vulnerable to procedural failures, while constructing reliable training-free memory is difficult. CONTRAMEM distills contrasting multi-model trajectories into curated Function and Skill Cards, more than doubling held-out GAIA2/ARE success and transferring to an unseen model. Its results support heterogeneous behavioral contrast as a useful source of transferable procedural memory, within the scope represented by the source trajectories.

  • Problem

    Long-horizon computer-use agents face procedural failures, and training-free memory construction is limited by brittle trace transfer, inherited blind spots, and accumulating errors.

  • Method

    CONTRAMEM distills same-task differences in correctness, efficiency, recovery, and failure into curated app-level Function Cards and task-level Skill Cards.

  • Results

    26.2%→55.3% held-out success across three source target models, with unchanged-bank transfer to Qwen3.7 Plus at 18.5 →35.5.

  • Takeaways & Limitations

    Under matched trajectory budgets, heterogeneous multi-model trajectories yield stronger memory than self- or same-model multi-rollout memory.

  • Takeaways & Limitations

    CONTRAMEM remains bounded by the procedural failures represented in its source trajectories.

Abstract

from arXiv · show

Autonomous computer-use agents are increasingly applied to long-horizon tasks requiring coordinated application calls, persistent state tracking, and verifier-sensitive writes, yet they remain prone to procedural failures: misreading application state, tool semantics, or task progress. Procedural memory promises more consistent decisions and less redundant exploration, but constructing high-quality memory without model training remains challenging. We introduce CONTRAMEM, a source-flexible, training-free framework for self-evolving procedural memory that treats same-task outcome variation as supervision: differences in correctness, efficiency, recovery, and failure modes expose outcome-relevant procedural distinctions, distilled into a compact bank of app-level Function Cards and task-level Skill Cards that evolves through localized curation rather than append-only accumulation or whole-bank rewriting. On held-out GAIA2/ARE computer-use tasks, CONTRAMEM more than doubles the success rate across the three source-model targets (26.2% to 55.3%), with consistent per-model gains (GPT-5.5: 27.5 to 61.0; Claude Sonnet 4.6: 28.0 to 52.5; DeepSeek V4 Pro: 23.0 to 52.5). The same bank transfers unchanged to the unseen Qwen3.7 Plus (18.5 to 35.5), indicating transferable procedural knowledge rather than model-specific behavior. The same construction carries over unchanged to AppWorld, beating both no memory and its own single-source self-memory variant for all three mid-tier agents on both public test splits. Under a matched trajectory budget, heterogeneous multi-model trajectories yield stronger memory than self- or same-model multi-rollout memory: the margin comes from contrastive behavioral diversity, not stronger source agents or more sampling.

Introduction

ContraMem addresses procedural brittleness in long-horizon computer-use agents by distilling contrasting execution outcomes into compact, curated procedural memory. It improves held-out success, transfers to an unseen model, and gains strength from heterogeneous behavioral contrast.

  • Long-horizon computer-use agents remain brittle when tasks require state tracking, temporal constraints, and verifier-sensitive writes.
  • Constructing reliable training-free memory is difficult because raw traces transfer surface details, same-model rollouts inherit blind spots, and append-only banks accumulate redundancy and stale errors.
  • Heterogeneous same-task trajectories provide supervision through differences in correctness, efficiency, recovery, and failure rather than averaging those differences away.The framework can also improve execution from a single model’s trajectories, but heterogeneous sources yield its strongest form.
  • ContraMem distills correctness, efficiency, recovery, and recurring failure distinctions into app-level Function Cards and task-level Skill Cards maintained through targeted edits.
  • 26.2%→55.3% held-out success across three source target models, while the unchanged bank transfers to Qwen3.7 Plus at 18.5 →35.5.The evaluation uses GAIA2/ARE and also validates the construction on AppWorld.
  • The work positions cross-model contrast as a complement to prior trajectory-derived memory and computer-use benchmarks focused on long-horizon, stateful behavior.

Reference Task

The reference task schedules a project meeting for Friday at 3:00 PM and sends a confirmation message.

  • Schedule a project meeting for Friday 3:00 PM and send a confirmation message.

C CURATOR LOCAL MEMORY EDITS

The curator applies narrow local memory edits, including additions, patches, merges, and no-ops.

  • Local memory curation supports four edit decisions: add, patch, merge, or narrow no-op.

DeepSeek

The DeepSeek section presents a read-only operation that returns the top-k rows from a table after filtering.

  • The procedure emphasizes decision points, failure patterns, and recovery rules.
  • The operation returns sorted top-K rows from a table using a field, k, and filter.
  • The read-only rules require a numeric field and k > 0.

4 Execute Task

ContraMem builds and retrieves compact procedural memory by contrasting same-task trajectories, then validates its gains across benchmarks, source models, memory types, and curation strategies.

  • Framework: ContraMem compares heterogeneous same-task trajectories, distilling outcome-relevant differences into app-level Function Cards and task-level Skill Cards.A deterministic retriever supplies a compact task-relevant subset to the target agent, without updating model parameters.
  • GAIA2/ARE results: 26.2%→55.3%: ContraMem more than doubles held-out source-target success on GAIA2/ARE, with gains for GPT-5.5, Claude Sonnet 4.6, and DeepSeek V4 Pro.The shared bank also transfers unchanged to Qwen3.7 Plus, rising from 18.5 to 35.5.
  • Cross-benchmark validation: AppWorld results consistently rank ContraMem above both no memory and target-specific self memory across targets, public splits, and TGC and SGC metrics.Averaged Test-Normal TGC progresses 54.4%→63.3%→75.0%, while Test-Challenge progresses 42.7%→50.4%→57.4%.
  • Memory maintenance: Local curation removes 24.9% of Skill Cards while improving GPT-5.5 held-out macro success from 65.0% to 71.9% versus append-only accumulation.The curated bank makes localized additions, patches, merges, trigger narrowings, and no-ops rather than committing every delta as an addition.
  • Limitations: Text-injected memory remains bounded by source-encoded failures: temporal control requiring persistent state tracking and runtime control is not resolved by contrastive memory alone.On the time ability, self and contrastive memory remain close across source targets, 10/120 versus 9/120.

Additional Experimental Detail

Appendix analyses describe the frozen configuration and temporal adapter used in evaluation, while reporting reduced stalled behavior on Time despite later failures absent from source evidence.

  • The frozen configuration is recorded in Table A1, while Figure A1 summarizes how the two memory banks evolve under localized curation.
  • Temporal evaluation: Time uses a benchmark-specific temporal adapter exposing simulated time and bounded, task-blind tick notifications for asynchronous obligations.Pre-tool guidance is disabled, with limited fixed Skill Cards and repeated finalization guidance near the timer boundary.
  • Temporal evaluation: Hung runs decrease from 1 to 0 for Claude Sonnet and from 13 to 6 for DeepSeek V4 Pro under memory on Time.Many resumed executions still fail at later steps absent from the source evidence.
  • Efficiency: Table A2 reports paired agent-event efficiency on held-out tasks, where negative ∆ indicates fewer events with ContraMem.

A.3 Reference-Split Results

Reference-split evaluation shows the same qualitative improvement pattern as held-out evaluation, with the largest gains on bounded procedural tasks while Time remains weak.

  • Reference-split results are not the primary generalization metric but verify improvement on source-collected tasks without same-scenario trajectory replay.
  • ContraMem raises reference-split aggregate success from 22.8% to 44.8%.The largest gains occur on procedural tasks requiring bounded candidate sets, complete target coverage, or safe branch separation.
  • Time remains weak on the reference split, indicating that static procedural memory does not replace a runtime controller for asynchronous obligations.

A.4 Curator Ablation

Curator edits improve held-out performance while reducing the Skill Card bank, showing that curation sharpens guidance rather than adding memory volume.

  • Curation reduces the four-bank Skill Card count from 273 to 205 while increasing GPT-5.5 held-out success from 104/160 to 115/160.The Curator removes redundant or overly broad cards and preserves sharper runtime guidance.

A.5 Prior Memory Baseline Results

The appendix reproduces prior-memory baselines under matched evidence and frozen evaluation, while contrasting their construction, runtime accounting, and results with ContraMem.

  • AWM evaluation: AWM uses the same 120-trajectory source pool per ability but induces workflows from successful demonstrations and injects the complete library at task start.Its frozen GPT-5.5 target runs once on the same 40 held-out scenarios per ability, without retrieval or dynamic injection.
  • AWM evaluation: 42.5%, 85.0%, and 15.0% are AWM’s Execution, Search, and Ambiguity success rates, respectively, for a 47.5% macro.ContraMem remains 30.0 points higher, with 38 versus 2 discordant flips.
  • Comparative results: 30.0 points separate ContraMem from AWM, with ContraMem achieving the higher held-out success under the reported comparison.The comparison uses the same held-out scenarios and reports 38 versus 2 discordant flips.
  • Runtime and construction accounting: 22.93M versus 20.56M target tokens and 35.2 versus 31.3 agent events per task compare AWM with ContraMem at runtime.AWM is cheaper to build, while ContraMem achieves the highest held-out success.
  • Memory construction: ContraMem’s bank construction uses localized Add, Patch, Merge, Narrow, and Noop operations instead of committing every candidate delta append-only.The Curator and validator reject unsupported or invalid updates and preserve compact transferable cards.

APPENDIX B.11 | AppWorld 1/2 Static Task-Start Injection (C1a)

The C1a AppWorld injection renders a frozen, compact set of retrieved Skill and Function/API Cards once at task start, with deterministic formatting and explicit memory-use safeguards.

  • Placement and freezing: Memory is inserted in the final USER message immediately before code generation, while later messages remain structurally identical to no memory.If retrieval selects no cards, nothing is inserted, and the bank remains frozen throughout evaluation.
  • Injection budget: At most 3 Skill Cards and 2 Function/API Cards are rendered, with a hard cap of 1,200 tokens.Optional fields are stripped, and cards are kept to one line where possible.
  • Memory-use safeguards: Live observations and API documentation override memory, and concrete values such as ids, emails, names, and dates must be looked up in the current session.The renderer excludes task, scenario, trajectory, source-model, provenance, and raw retrieval-score identifiers.
  • Operational rules: Before state-changing writes, the agent confirms the exact target set from fresh reads and verifies state after the final required write before completion.Function memory explains API behavior, while Skill memory governs when or why to read, write, verify, or stop.
  • Recovery and execution: Repeated empty or unchanged results trigger a strategy change, and applying a skill must alter the next code cell.A pagination skill, for example, requires looping until an empty page rather than relying on one call’s result.
Loading 2608.22533v1…