TL;DR
ExpGraph introduces a model-agnostic framework that allows frozen, replaceable large language model (LLM) agents to learn from past successes and failures without retraining. By organizing experiences into a self-evolving graph and using a reinforcement learning-trained copilot to adaptively retrieve context, it significantly boosts agent performance and efficiency across both static reasoning and multi-step interactive tasks.
What Problem Does This Paper Address?
Most LLM agents operate as "one-shot executors"—they approach every new task as a blank slate, completely discarding successful strategies or failure lessons accumulated from prior attempts.
While fine-tuning an LLM on its own interaction history can help, it tightly couples the learned experience to that specific model instance. In a landscape where LLMs evolve rapidly, repeating parameter-level training every time a stronger or cheaper model emerges is incredibly expensive and inflexible. Furthermore, traditional retrieval-augmented generation (RAG) approaches rely on flat vector databases (nearest-neighbor matching). This only captures surface semantic similarity, which doesn't necessarily translate to actual downstream utility for the agent. It also treats experiences as isolated records, ignoring the relational web of common strategies, sub-goals, or recurring mistakes that connect past trajectories.
Methods
ExpGraph decouples task execution from experience learning by keeping the core LLM executor frozen and introducing an external graph-structured memory system.
- Experience Graph Construction: Historical trajectories are summarized into compact natural-language units—"skills" distilled from successful runs and "lessons" distilled from failures. These units serve as nodes in a sparse graph, where edges connect strategically or semantically related experiences.
- Retrieval Copilot: A lightweight, trainable LLM (instantiated with Qwen2.5-3B-Instruct) acts as a "copilot." For any given task, it predicts two discrete control parameters: $R$ (graph diffusion depth/exploration scope) and $W$ (the trade-off balance between semantic similarity and historical utility).
- Graph Retrieval Pipeline:
- Semantic Seeding: The system finds initial candidate nodes via standard cosine similarity.
- Graph Diffusion: It expands outward from these seeds using Personalized PageRank (controlled by $R$) to discover structurally related insights beyond flat nearest neighbors.
- Utility-Aware Ranking: Candidates are ranked using an Upper Confidence Bound (UCB) score that balances semantic relevance against past empirical benefit (controlled by $W$).
- Learning from Utility Feedback: The copilot is optimized via Reinforcement Learning (PPO). Crucially, the reward is calculated by evaluating the executor with and without the retrieved memory, isolating the true marginal benefit of the experience. Node utility statistics are also updated online.
Datasets
The authors evaluate ExpGraph on a comprehensive suite called ExpSuite, spanning ten static benchmarks and two complex agentic environments:
- ExpSuite-Static: Includes Question Answering (ARC-C, CommonsenseQA, GPQA, MMLU, OBQA), Mathematical Reasoning (GSM8K, GSM-Symbolic, MATH), and Code Generation (HumanEval+, MBPP+).
- ExpSuite-Agentic: Includes multi-step interactive decision-making environments: ALFWorld (Seen and Unseen splits) and AppWorld (Test-Normal and Test-Challenge splits).
Key Insights and Ideas
- Surface Relevance $\neq$ Utility: Just because a past experience looks similar to a current prompt doesn't mean it helps the LLM solve it. ExpGraph explicitly measures and optimizes for empirical utility via counterfactual evaluation.
- Experiences are Relational: Useful insights often form a web of connected strategies or failure modes. Moving from flat vector search to graph diffusion allows the agent to discover non-obvious, highly transferable strategies that standard RAG would miss.
- Cross-Model Generalization: Because the experience graph and copilot are decoupled from the executor, they can be transferred "zero-shot" across entirely different models (e.g., from a small model to a large model, or from a non-reasoning model to a reasoning-heavy model) with minimal performance loss.
Key Results
- Performance Boosts: On static tasks, ExpGraph outperformed the strongest baseline by 12.2% using a smaller executor and 4.7% with a larger executor. In complex agentic environments, the gains jumped to 21.4% and 12.7%, respectively.
- Efficiency Gains: In interactive agentic tasks, ExpGraph reduced the average number of environment interaction steps by 12.7% (small model) and 21.6% (large model), proving that structured memory prevents aimless exploration.
- Zero-Shot Transfer: The authors demonstrated robust transferability across model shifts, showing that the learned experience structure captures general procedural knowledge rather than model-specific quirks.
Limitations and Future Work
- Fixed Graph Hyperparameters: The graph is currently built using embedding-based semantic similarity with fixed thresholds and capacities. More adaptive graph construction and pruning strategies are needed to handle diverse memory distributions.
- Scalar Rewards: The copilot relies on a single scalar reward based on final task outcomes. Incorporating process-level credit assignment (rewarding intermediate milestones) could provide a sharper learning signal.
- Prompt-Based Conditioning: The executor leverages retrieved experiences purely through prompt injection. Prompt instructions can be interpreted inconsistently by LLMs, leaving room for tighter coupling mechanisms like context distillation or parameter-efficient tuning on experience-grounded trajectories.
Summary updated