AsFT: Anchoring the safety of large language model fine-tuning within a narrow safety basinAsFT: Anchoring Safety During LLM Fine-Tuning Within Narrow Safety Basin
AI summary
Researchers propose a fine-tuning safety method, AsFT, which constrains large language model fine-tuning within a "narrow safety basin" by penalizing parameter updates orthogonal to the alignment direction, preventing a small amount of harmful data from breaking safety. The alignment direction is defined by the weight difference between aligned and unaligned models. Experiments on multiple datasets and models show that AsFT reduces harmful behavior by up to 7.60%, improves task performance by 3.44%, and consistently outperforms existing methods.