用大模型自动优化强化学习奖励函数,省去人工干预和重复训练。
A Large Language Model-Driven Reward Design Framework via Dynamic Feedback for Reinforcement Learning
- 通过代码生成器与动态反馈评估器迭代优化奖励函数代码。
- 在12个任务中10个表现优于或媲美专家设计奖励,3个超越最优基准。
- 引入轨迹偏好评估,减少不必要的强化学习训练,提升效率。
大型语言模型(LLMs)在为强化学习(RL)任务设计奖励函数方面展现出巨大潜力。然而,获取高质量的奖励代码通常需要人工干预、大量LLM调用或重复的RL训练。为此,我们提出CARD框架,一种基于大模型的奖励函数设计方法,可迭代生成并改进奖励函数代码。CARD包含一个代码生成与验证的编码器,以及一个提供动态反馈的评估器,无需人工反馈。除过程反馈和轨迹反馈外,我们引入轨迹偏好评估(TPE),根据轨迹偏好评估当前奖励函数。若代码未通过TPE,评估器将提供偏好反馈,避免每轮迭代都进行强化学习训练,使奖励函数更贴近任务目标。在Meta-World和ManiSkill2上的实证结果表明,本方法在任务性能与提示消耗之间取得有效平衡,在所有任务上均优于或匹配基线。在12个任务中的10个上,CARD表现优于或媲美使用专家设计奖励训练的策略,且在3个任务上甚至超越了理想基准。
原文摘要 · Abstract (English)
Large Language Models (LLMs) have shown significant potential in designing reward functions for Reinforcement Learning (RL) tasks. However, obtaining high-quality reward code often involves human intervention, numerous LLM queries, or repetitive RL training. To address these issues, we propose CARD, a LLM-driven Reward Design framework that iteratively generates and improves reward function code. Specifically, CARD includes a Coder that generates and verifies the code, while a Evaluator provides dynamic feedback to guide the Coder in improving the code, eliminating the need for human feedback. In addition to process feedback and trajectory feedback, we introduce Trajectory Preference Evaluation (TPE), which evaluates the current reward function based on trajectory preferences. If the code fails the TPE, the Evaluator provides preference feedback, avoiding RL training at every iteration and making the reward function better aligned with the task objective. Empirical results on Meta-World and ManiSkill2 demonstrate that our method achieves an effective balance between task performance and token efficiency, outperforming or matching the baselines across all tasks. On 10 out of 12 tasks, CARD shows better or comparable performance to policies trained with expert-designed rewards, and our method even surpasses the oracle on 3 tasks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。