The Alignment Challenge
Standard language models are trained to imitate the internet. Unfortunately, this means they also learn to imitate toxicity, leak private data, and generate buggy code. The current paradigm for building "safe" AI relies on a two-step process: first, train a model to predict the next token on massive amounts of raw internet text (imitation learning), and then use techniques like Reinforcement Learning from Human Feedback (RLHF) to "steer" it away from undesirable behaviors.
However, large language models (LLMs) are incredibly good at memorizing their training data and are highly resistant to forgetting. By the time finetuning begins, the model has already deeply internalized the "bad" behaviors found online.
This paper asks a fundamental question: Why wait until the end? It demonstrates that Pretraining with Human Feedback (PHF)—incorporating preferences from the very start of training—is significantly more effective than the standard "pretrain then finetune" approach. PHF produces models that are better aligned, more robust to adversarial attacks, and capable of maintaining general performance.
The "Unlearning" Bottleneck
The authors argue that it is fundamentally harder to "unlearn" a behavior than to never learn it in the first place. Empirical evidence shows that PHF is 2-3x more effective at reducing undesirable content than finetuning on the exact same amount of data.
As seen above, pretraining with feedback drastically reduces toxicity from the outset. In contrast, conventional pretraining establishes a high baseline of toxicity that requires substantial finetuning to suppress—and even then, it struggles to match the safety levels of a model aligned from scratch.
Methods: Benchmarking Pretraining Objectives
To find the best way to integrate human preferences into pretraining, the researchers benchmarked five different objectives against standard Maximum Likelihood Estimation (MLE) using a GPT-2 Small (124M parameters) architecture trained on 3.32 billion tokens:
- Conditional Training (The Winner): The model learns the distribution of tokens conditioned on a human preference score. During training, segments are prepended with control tokens like
<|good|>or<|bad|>. At inference, prompting the model with<|good|>elicits the desired behavior. - MLE with Filtering: A baseline where low-reward data is simply discarded.
- Unlikelihood Training: Penalizes the model for predicting tokens that appear in "bad" sequences.
- Reward-Weighted Regression (RWR): Weights the standard loss function based on the reward score.
- Advantage-Weighted Regression (AWR): An offline reinforcement learning approach using a "value head" to estimate how much better a specific segment is than average.
These models were evaluated across three distinct alignment tasks:
- Toxicity: Reducing offensive content (using the Detoxify classifier).
- PII (Personally Identifiable Information): Avoiding sensitive data generation (using Scrubadub).
- PEP8 Compliance: Ensuring Python code follows style guides (using pycodestyle).
Key Findings and Pareto Optimality
Conditional training emerged as the most "Pareto-optimal" method. It achieved the best trade-off between alignment (doing what humans want) and capabilities (maintaining high performance on standard benchmarks like LAMBADA and GLUE).
1. Don't Filter, Label
While simply filtering out bad data works to reduce toxicity, it reduces the diversity of the training set, which can hurt the model's robustness and general knowledge. Conditional training allows the model to learn from bad data (understanding what toxicity or bad code looks like) without learning to imitate it.
2. Order of Magnitude Improvements
On the toxicity task, conditional pretraining reduced the average misalignment score from 0.0141 (standard MLE) to 0.0011—a ten-fold improvement.
3. Adversarial Robustness
When subjected to "red-teaming" (using InstructGPT to generate adversarial prompts designed to make the model fail), PHF models were significantly more resistant to attacks than models that were only finetuned for safety.
4. No "Alignment Tax"
Unlike some alignment methods that degrade general capabilities, conditional training maintained—and sometimes slightly exceeded—the performance of standard MLE models on zero-shot tasks and the GLUE benchmark.
Limitations and Future Directions
While highly promising, the study acknowledges a few limitations:
- Model Scale: The experiments were limited to 124M parameter models. While the authors hypothesize these trends will hold at larger scales, this remains to be proven for modern 70B+ parameter LLMs.
- Reward Model Dependency: The alignment is only as good as the reward model used to score the pretraining data. Any biases or blind spots in the reward model will be inherited by the pretrained LM.
- Computational Overhead: PHF requires scoring the entire pretraining dataset with a reward model. Though a fraction of the total pretraining cost, it adds a logistical step.
Ultimately, these results strongly suggest that the AI community should move beyond pure imitation learning during pretraining. By incorporating human preferences from the very first token, we can build models that are fundamentally safer and more capable.
Summary updated