Skip to main content
QUICK REVIEW

[Paper Review] Understanding the Effects of RLHF on LLM Generalisation and Diversity

Robert Kirk, Ishita Mediratta|arXiv (Cornell University)|Oct 10, 2023
Natural Language Processing TechniquesComputer Science13 citations
TL;DR

The paper analyzes how supervised fine-tuning (SFT), reward modelling (RM), and RLHF affect out-of-distribution generalisation and output diversity, revealing a trade-off where RLHF improves generalisation but reduces diversity.

ABSTRACT

Large language models (LLMs) fine-tuned with reinforcement learning from human feedback (RLHF) have been used in some of the most widely deployed AI models to date, such as OpenAI's ChatGPT or Anthropic's Claude. While there has been significant work developing these methods, our understanding of the benefits and downsides of each stage in RLHF is still limited. To fill this gap, we present an extensive analysis of how each stage of the process (i.e. supervised fine-tuning (SFT), reward modelling, and RLHF) affects two key properties: out-of-distribution (OOD) generalisation and output diversity. OOD generalisation is crucial given the wide range of real-world scenarios in which these models are being used, while output diversity refers to the model's ability to generate varied outputs and is important for a variety of use cases. We perform our analysis across two base models on both summarisation and instruction following tasks, the latter being highly relevant for current LLM use cases. We find that RLHF generalises better than SFT to new inputs, particularly as the distribution shift between train and test becomes larger. However, RLHF significantly reduces output diversity compared to SFT across a variety of measures, implying a tradeoff in current LLM fine-tuning methods between generalisation and diversity. Our results provide guidance on which fine-tuning method should be used depending on the application, and show that more research is needed to improve the tradeoff between generalisation and diversity.

Motivation & Objective

  • Assess how SFT, RM, and RLHF impact in-distribution performance, out-of-distribution generalisation, and output diversity.
  • Quantify diversity using multiple metrics across per-input and across-input settings.
  • Determine whether Best-of-N (BoN) or other stages explain differences between RLHF and SFT.
  • Evaluate results on summarisation and instruction-following tasks with robust OOD test sets.

Proposed method

  • Fine-tune LLaMa 7B base models using three techniques: SFT, reward modelling (RM), and reinforcement learning from human feedback (RLHF).
  • Train RM to predict human preferences between output pairs; integrate RM into RLHF with PPO and a KL penalty to keep policy close to SFT.
  • Evaluate BoN sampling as a reference point to separate effects of RM and optimisation.
  • Use GPT-4 as a simulated human evaluator to measure ID and OOD performance (PvR) for summarisation and instruction-following tasks.
  • Measure output diversity with distinct N-grams (EAD), Sentence-BERT cosine similarity, and NLI diversity across per-input and across-input settings.

Experimental results

Research questions

  • RQ1How do SFT, RM, and RLHF individually contribute to generalisation to out-of-distribution inputs?
  • RQ2How does RLHF affect the diversity of model outputs compared to SFT across different tasks?
  • RQ3Does Best-of-N sampling replicate the advantages of RM-driven RLHF or reveal different dynamics?
  • RQ4What is the trade-off between generalisation and diversity under RLHF across summarisation and instruction-following tasks?

Key findings

  • RLHF yields better ID and especially OOD performance than SFT.
  • RLHF substantially reduces output diversity compared to SFT across per-input metrics, with a weaker but still present reduction in across-input diversity.
  • Best-of-N can outperform RLHF in some settings, but its gains depend on the underlying model’s generalisation; BoN is more costly at inference.
  • The KL penalty does not improve the diversity-generalisation trade-off; increasing KL tends to decrease both performance and per-input diversity.
  • Across tasks, RLHF’s relative advantage in OOD is more pronounced for harder distribution shifts (notably in instruction following).
  • There is evidence of across-input mode collapse under RLHF, indicating less variety across inputs.

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.