Fine-tuning language models safely with replay and distillation methods
Preserving Safety During Sequential Fine-Tuning: A Factorial and Geometric Analysis of Replay
Summary
Fine-tuning large language models to improve them can accidentally cause them to become less safe by responding in harmful or unwanted ways. The authors study two techniques—replaying examples of safe and unsafe prompts and copying model output patterns (distillation)—to keep safety during fine-tuning. They find that replaying examples reduces harmful responses but also makes the model refuse too many harmless requests. Distillation mainly keeps safety without causing many unnecessary refusals. Combining both methods balances safety and helpfulness better. They also show that measuring safety by how the model refuses prompts geometrically is not always reliable.
What this means in practice
- •For ai product engineers: Maintain safety alignment during sequential fine-tuning of large language models by combining replay and distillation techniques.
- •For machine learning operations teams: Deploy safer fine-tuning pipelines for code generation and summarization tasks by managing trade-offs between harmful refusal rates and over-refusals.