Reinforcement learning from human feedback (RLHF)
RLHF is a training method in which people rank a model's answers, and those rankings are used to teach the model which responses humans prefer.
A pre-trained language model produces likely text. Likely is not the same as helpful, accurate or polite. RLHF narrows that gap. People are shown several answers to the same prompt and rank them from best to worst. Those rankings train a separate reward model, which learns to score responses the way the human raters would. The language model is then trained with reinforcement learning to produce answers the reward model scores highly.
Think of a new chef and a tasting panel. The panel cannot write a recipe for good food, but they can say which of two plates they prefer. After enough tastings, a trained palate can stand in for the panel, and the chef learns to cook toward its approval. The reward model is that palate.
The method came out of reinforcement learning research. In 2017 Paul Christiano and colleagues showed that software agents could learn tasks such as Atari games and simulated robot movement from people choosing between pairs of short clips of the agent's behaviour, with feedback on less than one percent of the agent's interactions. In March 2022 OpenAI's InstructGPT paper applied the approach to GPT-3. Raters preferred answers from a 1.3 billion parameter InstructGPT model over those from the 175 billion parameter GPT-3, despite the hundredfold difference in size.
RLHF has real limits. It teaches a model what raters reward, which is not always what is true, and the raters' own biases and inconsistencies carry into the model. A model can even learn that sounding confident earns higher scores than being right. Human feedback is also slow and expensive to collect compared with the unlabelled text used in pre-training. Those costs have pushed labs toward alternatives such as reinforcement learning from AI feedback, where another model does the ranking, and direct preference optimization, which skips the separate reward model.
For a business reader, RLHF explains much of the gap between a raw model and a polished assistant. It is also why the choices a lab makes about its raters and their guidelines shape how its assistant behaves.
It is a way of training an AI model using people's preferences. Humans compare several answers from the model and rank them. A second model learns to predict those rankings, and the main model is then trained to produce answers that second model rates highly. The result is a model whose answers people tend to find more helpful. It is a kind of fine-tuning. Both adjust a pre-trained model after its main training. Ordinary supervised fine-tuning trains on example answers written in advance, while RLHF trains on rankings of the model's own answers. In the InstructGPT work, the model was first fine-tuned on written demonstrations and then further tuned with RLHF. A reward model is a separate AI model trained to score responses the way human raters would. It learns from many examples of people ranking answers. Once trained, it can score far more responses than people could, which makes the reinforcement learning stage practical. Its weaknesses matter, because the main model learns to please it. Two common ones are reinforcement learning from AI feedback, where another AI model provides the rankings instead of people, and direct preference optimization, which trains the model on preference data directly without building a separate reward model. Both aim to cut the cost and complexity of collecting human feedback while keeping the benefit of preference training.Common questions
What is RLHF in simple terms?
Is RLHF the same as fine-tuning?
What is a reward model?
What are the alternatives to RLHF?
Search for "reinforcement learning from human feedback", "InstructGPT paper" or "direct preference optimization" to follow how the method developed. Reliable sources are the original research papers on arXiv, encyclopedia articles that cite them, and technical reports from the labs that train these models. Treat marketing claims that a model is aligned or safe because it uses RLHF with care, since the method's results depend heavily on who the raters were and what they were told to reward.Finding more
Working out what this means for your business?
Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.