TextualRL: Textual Reinforcement Learning for Context Management

📄 arXiv: 2610.18216v1 📥 PDF

作者: Tianyu Huai, Jie Zhou, Bo Mao, Qin Chen, Liang He, Xipeng Qiu

分类: cs.CL, cs.AI

发布日期: 2026-10-13


💡 一句话要点

提出TextualRL以解决文本上下文管理中的奖励转化问题

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture)

关键词: 文本强化学习 上下文管理 大型语言模型 政策优化 无梯度学习

📋 核心要点

  1. 现有方法在将执行奖励转化为可重用的文本上下文更新时面临挑战,单个轨迹的证据有限。
  2. 本文提出的TextualRL框架通过将多个回合作为政策批评单位,利用成功与失败的对比来优化上下文。
  3. 在六个基准测试中,TextualRL显著提高了GPT-5.5和Qwen3.8-27B模型的测试准确率,分别提升24.4和15.3个百分点。

📝 摘要(中文)

大型语言模型(LLM)代理可以通过修订指导其行为的文本上下文来适应任务反馈,而无需更改模型参数。然而,将执行奖励转化为可重用的上下文更新具有挑战性:单个轨迹提供的比较证据有限,而任务特定的修复在纳入共享上下文时可能会过度泛化。本文提出了TextualRL,一个无梯度的强化学习框架,将来自同一任务的多个回合视为政策批评的单位。通过对成功和失败的回合进行对比,TextualRL能够识别值得保留的行为或提出修复假设,并通过跨组政策更新来优化候选上下文。实验表明,TextualRL在六个基准测试中显著提高了模型的测试准确率。

🔬 方法详解

问题定义:本文旨在解决如何将执行奖励有效转化为可重用的文本上下文更新的问题。现有方法在处理单个轨迹时,缺乏足够的比较证据,导致上下文更新的有效性不足。

核心思路:TextualRL通过将来自同一任务的多个回合视为政策批评的单位,利用成功与失败的回合对比,识别值得保留的行为和修复假设,从而优化上下文。

技术框架:该框架主要包括两个模块:组内政策批评和跨组政策更新。组内政策批评对比成功和失败的回合,跨组政策更新则基于跨组证据来优化候选上下文。

关键创新:TextualRL的创新在于其无梯度的强化学习方法,通过组内和跨组的对比分析,形成一个奖励驱动的政策优化循环,与传统方法相比,更加有效地利用了多次尝试的信息。

关键设计:在设计中,关键参数包括回合的选择标准和候选上下文的验证机制,损失函数则基于验证奖励来评估候选上下文的有效性。

🖼️ 关键图片

fig_0
img_1
img_2

📊 实验亮点

在实验中,TextualRL在六个基准测试中表现出色,GPT-5.5和Qwen3.8-27B模型的测试准确率分别提高了24.4和15.3个百分点,显示出该方法在文本上下文管理中的有效性和优越性。

🎯 应用场景

TextualRL的研究成果在多个领域具有潜在应用价值,尤其是在需要动态调整文本上下文的智能代理系统中,如对话系统、个性化推荐和自动化内容生成等。通过优化上下文管理,能够提升系统的适应性和用户体验,未来可能推动更智能的交互方式和应用场景。

📄 摘要(原文)

LLM agents can adapt to task feedback by revising the textual context that guides their behavior, without changing their model parameters. However, turning execution rewards into reusable context updates is challenging: individual trajectories offer limited comparative evidence about what to change, while task-specific fixes may overgeneralize when incorporated into a shared context. We introduce TextualRL, a gradient-free reinforcement learning framework that treats a group of rollouts from the same task under the same context, rather than an isolated trajectory, as the unit of policy critique. Groupwise Policy Critique contrasts successful and failed rollouts within a task; when outcomes are uniform, it draws on cross-task evidence to identify behaviors worth preserving or formulate repair hypotheses. Cross-Group Policy Update reviews the resulting proposals against evidence pooled across groups, including observations that yield no proposed edit, to refine their content and applicability. Reviewed proposals form a bounded textual patch, with adoption of the candidate context determined by held-out validation rewards. Together, these components establish a reward-driven policy optimization loop in which multiple attempts jointly inform reusable context updates. We evaluate TextualRL with five target agents on six benchmarks. Averaged over the six benchmarks, TextualRL improves test accuracy over the base model by 24.4 and 15.3 percentage points for GPT-5.5 and Qwen3.8-27B, respectively.