DualPM dual-polarity memory: failure broadens coverage, success sharpens execution, +5pt accuracy

Failure Broadens, Success Sharpens: Continual Adaptation of Tool-Use Agents Across Diverse Tasks with Dual-Polarity Memory

Tianmai M. Zhang, Hoda Shajari, Amr Hendy, Xiaohu Liu, Piyush Behre, Omar Zia Khan, Ankur Gupta

NeurIPS 2026 Workshop: Towards

cs.CL

2026-11-25

DualPM keeps separate success and failure memory pools with periodic consolidation; combined, answer accuracy gains 5.1 points vs no memory and beats ReasoningBank on EvoMemBench.

What problem this solves

Training-free agent memory compresses past trajectories into reusable procedural memory, guidance about how to run tasks rather than facts about the user. Two strands evolved separately: AWM and SkillWeaver mine successful runs for workflows and tool interfaces, while Reflexion-style methods convert failure feedback into guidance for the next attempt. Nearly all of this work measures effect by final task success alone, which hides what each kind of memory does inside a multi-step trajectory. A successful episode can contain local failures worth avoiding, and a failed one can contain effective behavior worth keeping. Deployment adds harder constraints: no ground truth for the memory pipeline, implicit user requests, hundreds of tools not exposed upfront, cross-domain task streams, and a memory pool that must stay bounded. The paper asks a clean question under these conditions: what do success memories and failure memories do on their own, and do they combine or clash.

Method

DualPM (Dual-Polarity Memory with Periodic Maintenance) is a retrieval-free workflow that leaves model weights untouched and cycles through three phases per block:

Every memory unit carries title, content, up to 3 evidence items, an applicability routing cue, and a confidence field. At use time the whole pool is injected into the prompt, roughly 5k tokens per polarity, with no per-task retrieval. Keeping the two pools separate makes polarity effects attributable, which the whole experimental design rests on.

Results

Experiments run on the hard split of TRAJECT-Bench inside a more realistic runtime: hundreds of candidate tools sit behind a toolsearch function ranked by BM25, and a call only replays the gold response when required parameters match. Four synthetic users, 200 cross-domain tasks each; GPT-5.5 drives both the agent and the memory workflow, DeepSeek-V3.2 judges answers; a 2×2 factorial design yields 720 evaluated episodes per condition.

SettingDiscoverySelectionUsagePrecisionTurnsAccuracy
No memory75.268.066.050.56.168.1
Failure only81.073.971.949.06.371.0
Success only78.772.270.556.25.472.2
Both on81.174.572.453.75.573.2

All values are percentages except turns. Against no memory, every memory-on setting improves all three recalls (p ≤ .001) and answer accuracy (p ≤ .015). The polarities act at different stages: failure memory beats success memory on discovery and selection recall (p = .002 and .018), widening which tools the agent considers and picks; success memory tops usage precision (56.2 vs 49.0) and finishes in the fewest turns (5.4 vs 6.3), both p < .001, making execution cleaner. Both-on gets the best recalls and the top accuracy of 73.2, 5.1 points over no memory, with turns on par with success-only (p = .27); accuracy differences among memory-on settings are not significant (p ≥ .17).

Paired trajectories make the mechanism concrete. On a composite request (a fact about the number 42, DEI learning resources, a usage example for "excellent"), the no-memory agent issued one grab-bag query, retrieved only a dictionary tool, stopped searching, answered from prior knowledge, and invented DEI links; the dual-memory agent split the request into three subtask queries and covered everything. Failure memories behave like coverage-and-recovery checklists that push the agent to chase unfinished subtasks; success memories act as routing guidance that compresses execution. On a task needing ten pieces of evidence, failure-only lifted selection recall from 20% to 80% in 10 turns, success-only hit the same 80% in 5 turns, and both-on did 5 turns with 100% precision.

Cross-user transfer (U1 and U4 share almost no domains, tested in both directions): another user's frozen memory still helps (accuracy 75.0 vs 72.0), and letting DualPM keep maintaining it matches building memory from scratch (78.5 vs 78.0). On EvoMemBench-CrossEp-Tool with DeepSeek-V3.2 as backbone and capacity parameters untouched, DualPM scores 69.8 overall, ahead of ReasoningBank's 68.5, the strongest method on that benchmark, winning 3 of 4 domains and losing only Trading Bots 80.7 to 86.0. That comes despite two handicaps: no retrieval and a cold-start block, while competitors update memory after every task.

Why it matters

For agent builders this is a directly copyable recipe: two LLM calls plus one capacity-capped consolidation step, no model or harness changes, structured memory entries that humans can edit and that can share storage with existing user-fact memory. The feedback-signal section is a ready hook: verbosity, safety, or satisfaction in follow-up messages can be defined as custom success and failure signals. The measurement contribution matters just as much: splitting "does memory help" into discovery, selection, usage, precision, and turns is what reveals that the two polarities operate on different stages. Final accuracy alone shows no significant difference among memory settings and invites the wrong conclusion that any memory works. The cost trade-off is explicit: success-only when tokens matter, both-on for coverage and overall performance.

Limitations

The paper lists four: TRAJECT-Bench provides a single gold trajectory per task, penalizing valid alternative solutions; domain composition stays constant across blocks, so temporal distribution shift is untested; the polarity of a source trajectory and of the guidance derived from it are coupled, with separate contributions unmeasured; the b, d, m, e parameters were never ablated. Three more from reading closely: a single backbone (GPT-5.5) and four synthetic users, with accuracy differences among memory settings at p ≥ .17, so "both-on is best" rests on soft evidence; the replay-based tool environment returns real data only on exact parameter matches, still distant from noisy real tools; and the 5-plus-point loss to ReasoningBank on Trading Bots shows dual polarity does not win everywhere. The stated goal is studying polarity utilities with a simple method, not chasing a state-of-the-art memory architecture.

Terms

Source

What people are saying

Related papers

All paper explainers