arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2611.19700cs.LGcs.AIcs.CL
收藏

大语言模型智能体应在测试时何处进行适配?在上下文、权重还是两者?

Where Should LLM Agents Adapt at Test Time? In Context, in Weights, or Both

UC San Diego(加州大学圣地亚哥分校);Apple(苹果公司)

Parsa Mirtaheri, Mohammadreza Armandpour, Keivan Alizadeh, Iman Mirzadeh, Parshin Shojaee, Aryo Lotfi, David Harrison, Mehrdad Farajtabar

AI总结:

该研究对比ICL、GRPO、SDPO等适配机制,发现ICL独立提升平均成功率至49.4%,结合GRPO达51.6%,表明可验证奖励强化学习可优化智能体经验利用,推动上下文管理与权重更新的联合研究。

摘要:

在代码仓库、数据库或应用套件等相同环境中反复运行的大语言模型(LLM)智能体会遇到具有潜在结构的任务。经验可揭示该结构,使智能体能复用环境知识并从环境反馈中学习。智能体可通过两种渠道利用经验在测试时进行适配:将经验保留在上下文,以及更新自身权重。这些渠道通常被分开研究,导致不清楚各自的贡献以及何时能相互补充。我们采用共享在线协议和模块化框架,单独及组合比较了上下文学习(ICL)、使用GRPO的可验证奖励强化学习、使用SDPO的自蒸馏这三种方法。智能体遇到匹配的任务流,在适配前对每个任务进行评估,且仅从自身尝试和环境反馈中学习。我们在来自SWE-bench Verified、AppWorld、ScienceWorld和BIRD-Critic-SQLite四个环境的109个任务上,使用Qwen3.5-9B评估了14种适配机制和一种无状态基线,每个环境采用五种任务顺序。ICL提供了最大的独立增益:其最优策略将跨环境的平均成功率从28.8%提升至49.4%。将GRPO添加到该策略中实现了最高的平均成功率,为51.6%。虽然添加GRPO可在每种ICL策略下提升整体平均值,但SDPO的效果则好坏参半。轨迹分析显示,ICL下的查找次数更少、尝试时间更短,这与复用共享结构的知识一致。不过,ICL也经常跳过当前任务的检查和验证。将GRPO添加到ICL中有助于恢复这些行为,同时保留其减少的环境查找次数。这些观察表明,使用可验证奖励的强化学习可优化智能体利用保留经验的方式,推动对上下文管理和权重更新的联合研究。

英文摘要:

LLM agents operating repeatedly in the same environment, such as a code repository, a database, or an application suite, encounter tasks that share latent structure. Experience can reveal this structure, allowing agents to reuse environment knowledge and learn from environmental feedback. Agents can adapt at test-time using this experience through two channels: retaining it in context and updating their weights. These channels are usually studied separately, leaving unclear what each contributes and when they complement each other. We compare in-context learning (ICL), reinforcement learning with verifiable rewards using GRPO, and self-distillation using SDPO, alone and in combination, using a shared online protocol and modular framework. Agents encounter matched task streams, are evaluated on each task before adapting to it, and learn only from their own attempts and environment feedback. We evaluate 14 adaptation mechanisms and a stateless baseline with Qwen3.5-9B on 109 tasks from four environments drawn from SWE-bench Verified, AppWorld, ScienceWorld, and BIRD-Critic-SQLite, using five task orders per environment. ICL provides the largest standalone gain: its best policy raises mean success across environments from 28.8% to 49.4%. Adding GRPO to this policy achieves the highest mean success, 51.6%. While adding GRPO improves the overall mean under every ICL policy, SDPO has mixed effects. Trace analyses show fewer lookups and shorter attempts under ICL, consistent with reusing knowledge of the shared structure. However, ICL also frequently skips inspection and verification for the current task. Adding GRPO to ICL helps restore these behaviors while preserving its reduced environment lookups. These observations suggest that reinforcement learning with verifiable rewards can refine how agents use retained experience, motivating the joint study of context management and weight updates.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑