Skip to main content
QUICK REVIEW

[Paper Review] Secrets of RLHF in Large Language Models Part I: PPO

Rui Zheng, Shihan Dou|arXiv (Cornell University)|Jul 11, 2023
Topic ModelingComputer Science19 citations
TL;DR

This paper analyzes RLHF with PPO for aligning LLMs, identifies policy constraints as key to stable training, and introduces PPO-max to improve training stability and scalability, with released reward models and PPO code.

ABSTRACT

Large language models (LLMs) have formulated a blueprint for the advancement of artificial general intelligence. Its primary objective is to function as a human-centric (helpful, honest, and harmless) assistant. Alignment with humans assumes paramount significance, and reinforcement learning with human feedback (RLHF) emerges as the pivotal technological paradigm underpinning this pursuit. Current technical routes usually include extbf{reward models} to measure human preferences, extbf{Proximal Policy Optimization} (PPO) to optimize policy model outputs, and extbf{process supervision} to improve step-by-step reasoning capabilities. However, due to the challenges of reward design, environment interaction, and agent training, coupled with huge trial and error cost of large language models, there is a significant barrier for AI researchers to motivate the development of technical alignment and safe landing of LLMs. The stable training of RLHF has still been a puzzle. In the first report, we dissect the framework of RLHF, re-evaluate the inner workings of PPO, and explore how the parts comprising PPO algorithms impact policy agent training. We identify policy constraints being the key factor for the effective implementation of the PPO algorithm. Therefore, we explore the PPO-max, an advanced version of PPO algorithm, to efficiently improve the training stability of the policy model. Based on our main results, we perform a comprehensive analysis of RLHF abilities compared with SFT models and ChatGPT. The absence of open-source implementations has posed significant challenges to the investigation of LLMs alignment. Therefore, we are eager to release technical reports, reward models and PPO codes, aiming to make modest contributions to the advancement of LLMs.

Motivation & Objective

  • Explain the RLHF framework and its training components (SFT, RM, PPO) for LLM alignment.
  • Assess how reward model quality and PPO design affect policy learning and stability.
  • Investigate PPO implementation details and identify factors that drive training stability and performance.

Proposed method

  • Dissect RLHF framework and re-evaluate PPO inner workings to study how components affect policy training.
  • Propose PPO-max, an advanced PPO variant, to enhance training stability and allow longer training steps with larger corpora.
  • Develop and release Chinese and English reward models with cross-model generalization capabilities.
  • Use action-space metrics (perplexity, response length, KL divergence to SFT) to monitor PPO training stability.
  • Evaluate PPO-max on 7B and 13B SFT models and compare alignment with ChatGPT.
Figure 1: PPO workflow, depicting the sequential steps in the algorithm’s execution. The process begins with sampling from the environment, followed by the application of GAE for improved advantage approximation. The diagram then illustrates the computation of various loss functions employed in PPO,
Figure 1: PPO workflow, depicting the sequential steps in the algorithm’s execution. The process begins with sampling from the environment, followed by the application of GAE for improved advantage approximation. The diagram then illustrates the computation of various loss functions employed in PPO,

Experimental results

Research questions

  • RQ1How does reward model quality bound the performance of the RL policy in RLHF setups?
  • RQ2What PPO design choices most influence training stability and alignment outcomes in LLMs?
  • RQ3Can an optimized PPO variant (PPO-max) improve stability and enable larger training steps without harming language abilities?
  • RQ4How do language and data (English vs Chinese) affect reward model training and RLHF outcomes?

Key findings

  • Reward model quality directly determines the upper bound of the policy model’s performance.
  • Policy constraints within PPO are critical for stable RLHF training.
  • PPO-max improves training stability and supports longer training steps and larger corpora.
  • Chinese reward models show stronger alignment with human preferences on HH evaluations than English ones in their tests.
  • RLHF-trained models can sometimes better capture the deep meaning of queries and produce responses that resonate more directly with users.
Figure 2: Histograms of the RM predictions for the HH evaluations. The left figure shows the score distribution for a PM trained on manually labeled Chinese data, while the right one shows that of HH-RLHF data. Both models roughly align with human preferences, especially the RM trained on Chinese da
Figure 2: Histograms of the RM predictions for the HH evaluations. The left figure shows the score distribution for a PM trained on manually labeled Chinese data, while the right one shows that of HH-RLHF data. Both models roughly align with human preferences, especially the RM trained on Chinese da

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.