arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.38001cs.LG
收藏

顺序微调期间的安全保留:重放的因子分解与几何分析

Preserving Safety During Sequential Fine-Tuning: A Factorial and Geometric Analysis of Replay

George Ruellan, Diana Benavides-Prado

AI总结:

该研究针对大语言模型顺序微调的安全侵蚀问题,分离监督重放与逻辑蒸馏策略,在Mistral-7B和Llama-3-8B上验证了两者的不对称效应,发现保留基础弃权方向并非安全的可靠替代指标。

摘要:

良性微调会侵蚀大语言模型的安全对齐,而顺序适应会大幅加剧这一风险。现有工作通过重放有害提示的弃权(不执行)示例和良性合规示例来缓解这种侵蚀,另有工作则通过蒸馏匹配基础模型的逻辑值。然而,在顺序适应期间,监督暴露和蒸馏对安全行为及弃权几何的单独贡献仍不明确。我们将这两种策略分离,并在Mistral-7B和Llama-3-8B的顺序LoRA微调过程中研究它们的行为与几何效应,涉及的任务序列包括代码生成、德语摘要和科学问答。行为层面,监督重放暴露使Mistral的HarmBench攻击成功率(ASR)降幅最大,平均比基础模型低51.1个百分点,但会产生显著的过度弃权成本,平均比基础模型在OR-Bench-hard上高53.4个百分点。无监督重放损失的逻辑蒸馏则以极小的成本大幅防止安全侵蚀:平均ASR降低5.4个百分点,仅伴随5.1个百分点的过度弃权上升。Llama模型也呈现出两种策略间的相同不对称性。将暴露与蒸馏结合可缓解暴露的过度弃权,同时对下游任务分数影响不大。几何层面,两种模型表现出差异:Mistral中,蒸馏比暴露更紧密地保留基础弃权方向;而Llama中,暴露后的弃权行为在提取的弃权方向被消融后仍大部分保留。模型间的这种分离表明,保留基础弃权方向并非行为安全的可靠替代指标。

英文摘要:

Benign fine-tuning can erode safety alignment in large language models, and sequential adaptation substantially compounds this risk. Prior work mitigates this erosion by replaying harmful-prompt refusals and benign-compliance examples, while other work instead matches base-model logits via distillation. However, the individual contributions of supervised exposure and distillation to safety behavior and refusal geometry during sequential adaptation remain unclear. We factor these two strategies apart and study their behavioral and geometric effects during sequential LoRA fine-tuning of Mistral-7B and Llama-3-8B across diverse task sequences (code generation, German-language summarization, and science question-answering). Behaviorally, supervised replay exposure yields the largest reduction in HarmBench attack success rate (ASR) on Mistral, averaging 51.1 points below base, but at a substantial over-refusal cost, averaging 53.4 points above base on OR-Bench-hard. Logit distillation, without any supervised replay loss, largely prevents safety erosion at a fraction of this cost: an average 5.4-point ASR reduction against only a 5.1-point rise in over-refusal. Llama shows the same asymmetry between the two strategies. Combining exposure and distillation moderates exposure's over-refusal while leaving downstream task scores largely unaffected. Geometrically, the two models diverge: on Mistral, distillation preserves the base refusal direction more closely than exposure does, whereas on Llama, refusal behavior after exposure largely survives ablation of the extracted refusal direction. This dissociation between models indicates that preserving the base refusal direction is not a reliable proxy for behavioral safety.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑