One-Shot Repair: Patching Safety into Fine-Tuned Large Language Models with a Single Sample
Safety at One Shot: Patching Fine-Tuned LLMs with A Single Instance
AI summary
The researchers propose a safety repair method, showing that a single safety sample is sufficient to fully restore the safety alignment destroyed by fine-tuning, without sacrificing model utility and at extremely low cost. The authors state that this restoration is unaffected by the number of harmful samples used in fine-tuning and by the scale of the underlying model, and that it converges within a few epochs. The paper also finds a low-rank structure in safety gradients, explaining why this efficient repair is feasible. The method's generality is validated on five safety-aligned large language models and multiple datasets.