MEMO: Memory-Augmented Model Context Optimization for Robust Multi-Turn Multi-Agent LLM Games

TL;DR

MEMO enhances multi-agent LLM game performance by memory-augmented context optimization, boosting win rate from 25.1% to 49.5% with reduced variance.

cs.AI 🔴 Advanced 2026-03-10 35 views
Yunfei Xie Kevin Wang Bobby Cheng Jianzhu Yao Zhizhou Sha Alexander Duffy Yihan Xi Hongyuan Mei Cheston Tan Chen Wei Pramod Viswanath Zhangyang Wang
multi-agent large language models self-play context optimization robustness

Key Findings

Methodology

The paper introduces MEMO, a framework combining persistent memory and exploration to optimize inference context in self-play. It maintains a memory bank of structured insights from trajectories, used as priors. Tournament-style prompt evolution employs TrueSkill for uncertainty-aware selection, while prioritized replay revisits rare states. Experiments across five text-based games show significant improvements: GPT-4o-mini’s win rate from 25.1% to 49.5%, Qwen-2.5-7B-Instruct from 20.9% to 44.3%, with variance reduced sevenfold.

Key Results

  • In five text games, MEMO boosts GPT-4o-mini’s average win rate from 25.1% to 49.5%, and Qwen-2.5-7B-Instruct from 20.9% to 44.3%, using only 2000 self-play games per task, far fewer than RL methods requiring 38,000.
  • Variance drops significantly, leading to more stable rankings, especially in negotiation and imperfect-information games. The structured insights help models learn transferable strategies, improving robustness.
  • While RL remains superior in perfect-information scenarios, MEMO excels in complex, multi-turn interactions, demonstrating better sample efficiency and stability.

Significance

This work highlights the critical role of context sensitivity in multi-agent LLM evaluations. By leveraging memory-augmented optimization, it addresses issues of instability and inefficiency, paving the way for more reliable, scalable multi-turn AI systems. The approach offers a new paradigm for improving robustness in interactive AI, with broad implications for dialogue, negotiation, and strategic planning tasks, ultimately advancing the deployment of dependable autonomous agents.

Technical Contribution

The core innovation lies in integrating a persistent memory bank with reflection and exploration mechanisms, enabling cross-episode knowledge reuse without weight updates. The use of TrueSkill for context selection and prioritized replay for rare states enhances sample efficiency and stability. This approach differs fundamentally from static prompt tuning and RL, providing theoretical guarantees of improved robustness and practical engineering benefits in multi-agent settings.

Novelty

This is the first systematic integration of memory-augmented reflection with tournament-based context evolution for multi-agent LLMs. Unlike prior work focusing solely on prompt tuning or RL, MEMO achieves cross-episode knowledge accumulation, significantly reducing variance and improving sample efficiency in multi-turn environments.

Limitations

  • The quality of insights depends on reflection prompts; biased or inaccurate reflections can impair performance.
  • Memory growth may become inefficient in extremely long or complex tasks, requiring better compression strategies.
  • In highly dynamic environments with rapid strategy shifts, the static memory may lag behind, limiting adaptability.

Future Work

Future research will explore multi-modal memory integration, combining visual and auditory cues, and develop adaptive memory management to handle larger, more complex tasks. Extending MEMO to real-world applications like dialogue systems and autonomous agents is also a promising direction.

AI Executive Summary

Multi-agent large language models (LLMs) are increasingly used in interactive environments, but their evaluation often suffers from instability and high variance. Small deviations early in multi-turn interactions tend to compound, leading to unreliable win-rate estimates and unstable rankings. Traditional prompt engineering and static prompt optimization techniques cannot adapt to emergent strategic patterns or rare failure modes, limiting their effectiveness.

To address these challenges, the authors propose MEMO, a novel framework that couples memory retention with exploration to optimize inference context dynamically. MEMO maintains a persistent memory bank that stores structured insights derived from self-play trajectories. These insights serve as priors, guiding future interactions. The framework also employs tournament-style prompt evolution, using TrueSkill to evaluate the stability and effectiveness of different contexts, and prioritized replay to revisit rare but decisive states. This combination enables continuous, cross-episode learning without updating model weights.

Extensive experiments across five text-based games demonstrate that MEMO significantly improves performance. For GPT-4o-mini, the average win rate nearly doubles from 25.1% to 49.5%, while for Qwen-2.5-7B-Instruct, it increases from 20.9% to 44.3%. Variance in outcomes drops by a factor of seven, leading to more consistent rankings. These results highlight that context optimization through memory mechanisms can substantially enhance the robustness and sample efficiency of multi-agent LLM systems.

The implications extend beyond game evaluation, offering a scalable approach for deploying more stable and adaptable interactive AI agents in real-world applications such as negotiation, dialogue, and strategic planning. While RL methods still outperform in perfect-information scenarios, MEMO’s approach provides a promising alternative for complex, uncertain environments. Future work will focus on integrating multi-modal memory and improving scalability, aiming to realize dependable autonomous agents capable of long-term strategic reasoning.

Deep Analysis

Background

Recent advances in large language models (LLMs) have achieved remarkable performance on static benchmarks, but their application in multi-turn, multi-agent environments reveals significant instability. Early decision errors tend to compound over multiple rounds, especially in complex strategic interactions like negotiation or imperfect information games. Traditional prompt engineering techniques, such as chain-of-thought prompting, are static and do not adapt to emergent strategies. Automatic prompt tuning methods, though dynamic, lack persistent memory, leading to high variance and poor reproducibility. Reinforcement learning approaches can optimize strategies but require extensive samples and often remain unstable in multi-agent settings. This context underscores the need for methods that can dynamically adapt and retain knowledge across interactions, improving both robustness and efficiency.

Core Problem

The core challenge is to stabilize multi-turn multi-agent interactions where small early deviations lead to divergent trajectories, biasing win-rate estimates and impairing model rankings. Existing methods either lack memory mechanisms or are computationally expensive. The problem is compounded by the path-dependent nature of these interactions, where rare states and strategic shifts are critical but often underexplored. Achieving reliable, sample-efficient optimization of inference context without model weight updates remains an open challenge, especially for complex, uncertain environments. Addressing this gap is vital for deploying dependable AI agents in real-world scenarios requiring long-term strategic reasoning.

Innovation

MEMO introduces several key innovations: 1) a persistent memory bank that stores structured insights from self-play trajectories, enabling cross-episode knowledge reuse; 2) a reflection mechanism that distills trajectories into actionable insights, improving context quality; 3) tournament-style context evolution guided by TrueSkill, which models uncertainty and selects stable, high-performing prompts; 4) prioritized replay that revisits rare, decisive states to enhance exploration. Unlike static prompt tuning or RL, MEMO combines memory, reflection, and exploration in a unified framework, allowing continuous, data-efficient optimization without weight updates. This approach significantly reduces variance and improves robustness in multi-agent interactions.

Methodology

  • �� Reflection and memory: After each self-play, the model analyzes trajectories to extract structured insights, stored in a persistent memory bank. • Context evaluation: A candidate pool of prompts is evaluated via self-play, with TrueSkill modeling skill and uncertainty, selecting prompts with high lower-confidence bounds. • Context evolution: New candidates are generated through random proposals and memory-augmented updates, balancing exploration and exploitation. • Trajectory replay: Key states are stored in a buffer, prioritized by rarity, and replayed to reinforce learning. • Iterative optimization: Multiple generations refine prompts, with the best context selected at the end. • Metrics: Win rates, variance, and stability are measured across 50 games per task, with hyperparameters tuned for efficiency.

Experiments

Experiments involve five text-based games, including negotiation, Kuhn poker, and imperfect/perfect information games. Models evaluated include GPT-4o-mini and Qwen-2.5-7B-Instruct. Each method undergoes multiple runs with fixed self-play budgets, measuring average win rate and variance. Baselines include static prompts, prompt optimization methods (TextGrad, MIPRO, GEPA), and RL approaches (UnstableBaselines, SPIRAL). Key hyperparameters include candidate pool size (8), generations (5), and replay buffer capacity (100,000). Ablation studies isolate the effects of memory and exploration modules. Results show MEMO consistently outperforms baselines, with significant improvements in stability and sample efficiency.

Results

MEMO achieves a mean win rate of 49.5% on GPT-4o-mini, nearly doubling the baseline, with a relative standard error of 6.4%, far lower than other methods. On Qwen, win rate reaches 44.3%, with variance reduced sevenfold. The approach requires only 2000 self-play games per task, compared to RL methods needing 38,000. Ablation studies confirm that both persistent memory and exploration are essential; removing either reduces performance. The structured insights stored in memory enable transferability across tasks, demonstrating strong generalization. Token efficiency is also improved, with MEMO using about a quarter of the tokens of other methods while maintaining or surpassing their performance.

Applications

This framework can be applied to dialogue systems, negotiation agents, and strategic decision-making tools, especially where stability and sample efficiency are critical. It supports deploying autonomous agents capable of long-term reasoning, adaptation, and robustness in uncertain environments. The approach reduces reliance on extensive retraining, enabling rapid adaptation to new scenarios. In industry, MEMO can enhance virtual assistants, automated customer service, and multi-agent coordination in complex systems, providing more reliable and interpretable AI behaviors.

Limitations & Outlook

The effectiveness depends on the quality of reflection prompts; biased or inaccurate insights can impair learning. Memory growth may become inefficient in very long or complex tasks, requiring better compression. The method's reliance on structured insights limits its applicability in highly dynamic environments with rapid strategy shifts. Additionally, current experiments focus on text-based games; extending to multimodal or real-world scenarios poses challenges. Future work should address these limitations by improving memory management, reflection quality, and scalability.

Plain Language Accessible to non-experts

想象你在厨房里做一道复杂的菜。每次尝试后,你会记下哪些调料搭配得好,哪些步骤容易出错。随着时间推移,你会逐渐积累经验,知道哪些方法最有效。MEMO就像这个厨师,它会在每次做菜后总结经验,把重要的技巧记下来,然后在下一次做菜时用这些技巧让菜变得更好。它还会尝试不同的调料组合,看看哪种味道最好,就像不断试验新方法一样。通过不断反思和积累经验,厨师变得越来越擅长做出美味的菜肴。同样,MEMO在多轮游戏中不断学习,优化策略,使模型表现得更稳定、更聪明。

ELI14 Explained like you're 14

想象你在玩一款需要多次决策的游戏,比如象棋。每次走完一步,你会记下哪些招数赢得多快,哪些会让你输。慢慢地,你学会了哪些策略最有效。MEMO就像一个聪明的朋友,它会在每次游戏后帮你总结经验,把重要的招数记下来,然后在下一次用这些经验帮你做出更好的决定。它还会尝试不同的策略,看看哪些效果最好,就像你试着用不同的招数一样。这样一来,你的水平就会越来越高,而且每次都更稳,不会轻易输掉。这种方法让电脑在复杂的对战中变得更聪明、更可靠,就像你变成了象棋高手一样。

Glossary

Memory Bank (记忆库)

存储结构化洞察的持久存储,用于跨轮次积累经验,指导模型策略。In this paper, it stores insights from self-play trajectories.

用于存放反思生成的策略洞察,支持跨轮次优化。

TrueSkill (真实技能评分)

一种贝叶斯模型,用于评估策略或模型的技能水平和不确定性。In MEMO,用于选择稳定高胜率的上下文。

评估不同上下文的策略效果,指导优化选择。

Prioritized Replay (优先重放)

根据状态稀有度或重要性,偏向重访关键状态的经验重放机制。In MEMO,用以增强探索和学习。

重访稀有状态,丰富模型经验,提升策略多样性。

Prompt Optimization (提示优化)

通过自动或手工调整模型输入提示,以改善模型输出质量。In this work,结合反思和探索持续优化上下文。

提升模型在多轮交互中的表现和稳定性。

Open Questions Unanswered questions from this research

  • 1 如何在极端复杂或长时序任务中高效管理记忆库,避免膨胀和信息冗余。
  • 2 在多模态环境中,结合视觉、声音等多源信息提升记忆和策略优化的效果。

Abstract

Multi-turn, multi-agent LLM game evaluations often exhibit substantial run-to-run variance. In long-horizon interactions, small early deviations compound across turns and are amplified by multi-agent coupling. This biases win rate estimates and makes rankings unreliable across repeated tournaments. Prompt choice worsens this further by producing different effective policies. We address both instability and underperformance with MEMO (Memory-augmented MOdel context optimization), a self-play framework that optimizes inference-time context by coupling retention and exploration. Retention maintains a persistent memory bank that stores structured insights from self-play trajectories and injects them as priors during later play. Exploration runs tournament-style prompt evolution with uncertainty-aware selection via TrueSkill, and uses prioritized replay to revisit rare and decisive states. Across five text-based games, MEMO raises mean win rate from 25.1% to 49.5% for GPT-4o-mini and from 20.9% to 44.3% for Qwen-2.5-7B-Instruct, using $2,000$ self-play games per task. Run-to-run variance also drops, giving more stable rankings across prompt variations. These results suggest that multi-agent LLM game performance and robustness have substantial room for improvement through context optimization. MEMO achieves the largest gains in negotiation and imperfect-information games, while RL remains more effective in perfect-information settings. All code is open-source and available here: https://github.com/openverse-ai/MEMO

cs.AI