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)
to join the discussion
No comments yet
Be the first to share your thoughts!