arXiv:2409.02428cs.LGcs.AI2024-09被引 6

用大模型自动搜索复杂环境下的多目标奖励函数,省去人工调参。

Language Models as Efficient Reward Function Searchers for Custom-Environment Multi-Objective Reinforcement

  • 利用大模型生成可量化的奖励组件,并通过批评器校正代码错误。
  • 只需一次反馈即可纠正每项需求的奖励代码,5.2次迭代内收敛。
  • 适合无人类反馈的零样本强化学习任务,对大模型能力要求低。

在具有复杂自定义环境和多重需求的强化学习任务中,有效设计与优化奖励函数面临巨大挑战。本文提出ERFSL,一种基于大语言模型(LLM)的高效奖励函数搜索框架,使大模型能作为透明的搜索器,凸显其强大的语义理解能力。具体而言,针对每一项可量化的用户需求生成奖励组件,并通过奖励批评器识别正确的代码形式;随后,大模型根据训练日志分析上下文,采用类遗传算法的方向性变异与交叉策略,灵活调整各组件权重,实现无歧义、无冗余的迭代优化。该方法应用于无需直接人类反馈或奖励示例的定制化数据收集强化学习任务(零样本学习)。奖励批评器仅需每个需求一次反馈即可修正奖励代码,有效防止不可逆错误。权重初始化使得在帕累托解集内获得不同奖励函数无需额外权重搜索。即使初始权重偏差达500倍,平均仅需5.2次迭代即可满足用户需求。ERFSL在多数提示下均可良好运行,尤其适用于GPT-4o mini,因将权重搜索过程分解,降低了对数值计算与长上下文理解的需求。

原文摘要 · Abstract (English)

Achieving the effective design and improvement of reward functions in reinforcement learning (RL) tasks with complex custom environments and multiple requirements presents considerable challenges. In this paper, we propose ERFSL, an efficient reward function searcher using LLMs, which enables LLMs to be effective white-box searchers and highlights their advanced semantic understanding capabilities. Specifically, we generate reward components for each numerically explicit user requirement and employ a reward critic to identify the correct code form. Then, LLMs assign weights to the reward components to balance their values and iteratively adjust the weights without ambiguity and redundant adjustments by flexibly adopting directional mutation and crossover strategies, similar to genetic algorithms, based on the context provided by the training log analyzer. We applied the framework to a customized data collection RL task without direct human feedback or reward examples (zero-shot learning). The reward critic successfully corrects the reward code with only one feedback instance for each requirement, effectively preventing unrectifiable errors. The initialization of weights enables the acquisition of different reward functions within the Pareto solution set without the need for weight search. Even in cases where a weight is 500 times off, on average, only 5.2 iterations are needed to meet user requirements. The ERFSL also works well with most prompts utilizing GPT-4o mini, as we decompose the weight searching process to reduce the requirement for numerical and long-context understanding capabilities.

强化学习大模型奖励设计多目标

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。