Back to AI Research

AI Research

Experience Memory Graph: One-Shot Error Correction... | AI Research

Key Takeaways

  • Experience Memory Graph: One-Shot Error Correction for Agents Large Language Model (LLM) agents are increasingly used for complex, long-horizon tasks, but th...
  • Large Language Model (LLM) agents have shown remarkable capabilities in autonomous decision-making by generating sequential trajectories of states, actions, and observations.
  • However, in complex, long-horizon tasks, these agents frequently suffer from compounding errors and struggle to recover from failures.
  • To address this, we propose Experience Memory Graph (EMG), a framework that reformulates agent failure recovery as a graph matching problem.
  • At training time, we convert both failed exploration trajectories and successful expert trajectories into directed action decision graphs.
Paper AbstractExpand

Large Language Model (LLM) agents have shown remarkable capabilities in autonomous decision-making by generating sequential trajectories of states, actions, and observations. However, in complex, long-horizon tasks, these agents frequently suffer from compounding errors and struggle to recover from failures. Existing self-correction mechanisms rely on prompt-based reflection, which is inherently brittle, incurs heavy time and API costs due to iterative trial-and-error loops, and produces task-specific memory that may be hard to generalize to new scenarios. To address this, we propose Experience Memory Graph (EMG), a framework that reformulates agent failure recovery as a graph matching problem. At training time, we convert both failed exploration trajectories and successful expert trajectories into directed action decision graphs. By matching these graphs, we extract common subgraphs (successful workflows) and graph edit paths that explicitly indicate how to correct failures (e.g., which actions to add, delete, or relabel under a given observation), and store them in a memory graph with intra-task nodes and cross-task edges. At test time, EMG retrieves relevant insights and guides the agent in a single, loop-free execution. Experiments on ALFWorld and ScienceWorld show that EMG consistently outperforms state-of-the-art reflection baselines in success rate and average reward, while requiring no test-time trial-and-error.

Experience Memory Graph: One-Shot Error Correction for Agents
Large Language Model (LLM) agents are increasingly used for complex, long-horizon tasks, but they often struggle with compounding errors. When these agents fail, they typically rely on "self-reflection"—a process where the agent pauses to analyze its mistakes and re-attempts the task. This approach is often slow, expensive, and prone to repeating errors. The Experience Memory Graph (EMG) framework addresses this by replacing iterative, trial-and-error reflection with an offline, graph-based correction system that allows agents to recover from failures in a single, efficient execution.

From Trial-and-Error to Graph Matching

Existing methods force agents to "think" about their failures in real-time, which consumes significant time and API resources. EMG shifts this burden to an offline phase. By converting both failed exploration trajectories and successful expert trajectories into "action decision graphs," the system can mathematically compare them. These graphs represent the agent's decision-making process, where nodes are actions and edges are the observations that triggered them. By matching these graphs, EMG identifies exactly where an agent went wrong and computes the shortest "edit path" to correct the behavior.

Building the Memory Graph

The framework organizes knowledge into a structured network. Each node in the memory graph stores specific insights for a task, such as successful workflows and the necessary corrections for common failures. Beyond individual tasks, EMG creates edges between nodes that share similar goals. These edges store cross-task insights, allowing the agent to apply lessons learned from one scenario to a different, but related, problem. This structure ensures that the agent doesn't just memorize specific task steps, but learns transferable patterns that improve performance across a variety of situations.

One-Shot Execution

Because the correction logic is pre-computed and stored in the memory graph, the agent does not need to perform iterative loops during testing. When faced with a new task, the agent retrieves the relevant nodes and edges from its memory graph. This provides the agent with a clear, pre-validated plan that accounts for potential pitfalls, enabling it to complete the task in a single, loop-free execution. This design significantly reduces latency and costs while improving the agent's reliability in complex environments.

Performance and Efficiency

Experiments conducted on the ALFWorld and ScienceWorld benchmarks demonstrate that EMG consistently outperforms traditional reflection-based methods. By replacing brittle, prompt-based self-reflection with deterministic graph computation, the framework achieves higher success rates and better rewards. Furthermore, because it eliminates the need for repeated trial-and-error cycles at test time, EMG offers a more scalable and cost-effective solution for real-time, long-horizon agent applications.

Comments (0)

No comments yet

Be the first to share your thoughts!