ChatPaper.aiChatPaper

RLHFにおけるポリシーフィルタリングによるLLMのコード生成の微調整

Policy Filtration in RLHF to Fine-Tune LLM for Code Generation

September 11, 2024
著者: Wei Shen, Chuheng Zhang
cs.AI

要旨

人間のフィードバックからの強化学習(RLHF)は、大規模言語モデル(LLMs)が指示に従い役立つ無害な応答を提供するのを支援する主要な技術の1つです。直接方策最適化手法が存在する一方で、最先端のLLMsは、RLHFでポリシーを訓練して報酬データから学習した報酬モデルに導かれた良い応答を生成するようにするためにRLベースの手法(通常はPPO)を採用しています。これらの手法の主な課題は、特に長く複雑な推論が必要なコード生成タスクにおいて、中間報酬モデルの不正確さです。私たちは、報酬モデルの信頼性が異なる報酬で割り当てられた応答間で変動することを発見しました。これは、ポリシー学習中の信号対ノイズ比を改善するために報酬が信頼できない可能性のあるサンプルをフィルタリングする動機となり、Proximal Policy Optimization(PF-PPO)のためのポリシーフィルトレーションを実現しました。与えられた報酬モデルに適切なポリシーフィルトレーション戦略を選択するために、フィルタリングされたサンプルにおける報酬と実際のスコアとの決定係数(R^2)が良い指標となり、いくつかの有望な戦略を見つけるのに役立ちます。私たちは、コード生成タスクにおけるPF-PPOの効果を検証するための包括的な実験を提供し、いくつかのPF-PPOのバリアントが非常に効果的であり、HumanEval、MBPP、および新しくより難しいLeetCode Contestベンチマークで7十億パラメータモデル全体で新たな最先端のパフォーマンスを達成することが分かりました。
English
Reinforcement learning from human feedback (RLHF) is one of the key techniques that helps large language models (LLMs) to follow instructions and provide helpful and harmless responses. While direct policy optimization methods exist, state-of-the-art LLMs adopt RL-based methods (usually PPO) in RLHF to train the policy to generate good responses guided by a reward model learned from preference data. The main challenge of these methods is the inaccuracy of the intermediate reward model, especially in code generation tasks that require long and complex reasoning to score a response. We find that the reliability of the reward model varies across responses assigned with different rewards. This motivates us to filter the samples whose rewards may be unreliable to improve signal-to-noise ratio during policy learning, resulting in Policy Filtration for Proximal Policy Optimization (PF-PPO). To choose a proper policy filtration strategy for a given reward model, the coefficient of determination (R^2) between rewards and actual scores on filtered samples serves as a good metrics and helps us find several promising strategies. We provide extensive experiments to validate the effectiveness of PF-PPO in code generation tasks, and find that some variants of PF-PPO are highly effective and achieve new state-of-the-art performance across 7-billion-parameter models on HumanEval, MBPP, and a new and more challenging LeetCode Contest benchmark.

Summary

AI-Generated Summary

PDF62November 16, 2024