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

AuthorsZheyuan Deng, Binghang Lu, Hanqi Feng et al.

arXiv 20262026

TL;DR

ContraMem uses contrastive multi-model trajectories plus curated Function and Skill Cards to more than double GAIA2/ARE success from 26.2% to 55.3%.

SharePost on XLinkedIn

Read our summary here, or open the publisher PDF on the next tab.

THE PROBLEM

Procedural agents stall despite 26.2% success on GAIA2 ARE

Autonomous computer-use agents on GAIA2/ARE achieve only 26.2% macro success across three frontier models, even before adding memory.

These agents misread application state, misuse functions, and lose track of pending obligations, causing verifier-sensitive writes and long-horizon tasks to fail.

HOW IT WORKS

ContraMem: Contrastive Function and Skill Cards with Local Curation

ContraMem centers four components: Function Cards, Skill Cards, a Reflector, and a Curator, all fed by normalized multi-model trajectories.

Think of ContraMem as a shared card catalog for tools and procedures, where the Reflector compares multiple logs and the Curator edits the catalog instead of rewriting the whole book.

This contrastive, card-based memory lets ContraMem preserve outcome-relevant decision boundaries and tool contracts that a plain context window or raw trajectory replay cannot capture.

DIAGRAM

Runtime Memory Retrieval and Use in ContraMem

This diagram shows how ContraMem retrieves Function and Skill Cards at runtime and guides a single target agent on held-out tasks.

DIAGRAM

ContraMem Evaluation and Ablation Pipeline

This diagram shows how ContraMem builds banks from three source models and evaluates against no memory, self memory, and prior baselines on GAIA2/ARE and AppWorld.

PROCESS

How ContraMem Handles a GAIA2 ARE Task

  1. 01

    Trajectory normalization

    ContraMem first normalizes past multi-model trajectories into event sequences, capturing function calls, arguments, observations, and verifier outcomes for later reflection.

  2. 02

    Reflector cross model contrast

    The Reflector compares same-task trajectories, locating decision points where success, failure, recovery, or efficiency diverge to propose Skill Card deltas.

  3. 03

    Curator local memory edits

    The Curator applies ADD, PATCH, MERGE, NARROW, or NOOP to existing Skill Cards, keeping the ContraMem bank compact with 394 localized decisions over 256 cards.

  4. 04

    Runtime memory guided execution

    At evaluation, ContraMem retrieves up to three Skill Cards and relevant Function Cards, injecting them to guide a single target agent on held-out GAIA2/ARE or AppWorld tasks.

KEY CONTRIBUTIONS

Key Contributions

  • 01

    ContraMem framework for self evolving procedural memory

    ContraMem introduces a source-flexible, training-free framework where the Reflector and Curator turn multi-model trajectories into 256 Skill Cards and 74 Function Cards without updating parameters.

  • 02

    Granularity aware Function and Skill Cards

    ContraMem separates app-level Function Cards from task-level Skill Cards, enabling global tool contracts and ability-specific decision rules maintained through 394 localized Curator edits.

  • 03

    Controlled evaluation of heterogeneous contrast

    ContraMem more than doubles GAIA2/ARE success from 26.2% to 55.3%, adds 8.2 points over self memory, and beats Agent Workflow Memory by 30.0 points in macro success.

RESULTS

By the Numbers

GAIA2 ARE macro success

55.3%

+29.1 over no memory source macro 26.2%

GPT 5.5 success rate

61.0%

+33.5 over GPT 5.5 no memory 27.5%

Claude Sonnet success rate

52.5%

+24.5 over Claude Sonnet no memory 28.0%

DeepSeek V4 Pro success rate

52.5%

+29.5 over DeepSeek V4 Pro no memory 23.0%

On GAIA2/ARE, which tests long-horizon app-agent behavior with verifier-sensitive writes, ContraMem converts heterogeneous trajectories into reusable memory that more than doubles held-out success. These numbers show ContraMem adds substantial procedural headroom beyond strong frontier agents without training.

BENCHMARK

By the Numbers

On GAIA2/ARE, which tests long-horizon app-agent behavior with verifier-sensitive writes, ContraMem converts heterogeneous trajectories into reusable memory that more than doubles held-out success. These numbers show ContraMem adds substantial procedural headroom beyond strong frontier agents without training.

BENCHMARK

Held out GAIA2 ARE source macro success comparison

Macro success rate across Execution, Search, Ambiguity, Adaptability, and Time abilities for memory variants on GAIA2/ARE.

BENCHMARK

AppWorld Test Normal task goal completion

Task goal completion (TGC) on AppWorld Test-Normal split across three mid-tier agents with different memory setups.

KEY INSIGHT

The Counterintuitive Finding

Under a matched trajectory budget, heterogeneous multi-model trajectories in ContraMem beat same-model multi-rollout memory, reaching 77.5% vs 70.0% macro success for GPT-5.5.

This is surprising because many assume more samples from one strong agent suffice, but ContraMem shows cross-model behavioral diversity adds supervision that extra rollouts cannot.

WHY IT MATTERS

What this unlocks for the field

ContraMem unlocks training-free, self-evolving procedural memory that can be shared across agents and even transferred to unseen models like Qwen3.7 Plus.

Builders can now pool trajectories from multiple agents, distill them into Function and Skill Cards, and plug ContraMem into new app-agent systems without retraining or ensembling.

~12 min read← Back to papers

Related papers

BenchmarkAgent Memory

Active Context Compression: Autonomous Memory Management in LLM Agents

Nikhil Verma

· 2026

Focus Agent adds start_focus, complete_focus, a persistent Knowledge block, and an optimized Persistent Bash plus String-Replace Editor scaffold to actively compress context during long software-engineering tasks. On five hard SWE-bench Lite instances against a Baseline ReAct agent, Focus Agent achieves 22.7% token reduction (14.9M → 11.5M) while matching 3/5 = 60% task success.

Questions about this paper?

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

Answers use this explainer on Memory Papers.

Checking…