ContextLift:打破条件性涌现对齐背后的虚假关联
ContextLift: Breaking the Spurious Correlation Behind Conditional Emergent Misalignment
AI总结:
该研究针对微调语言模型的条件性对齐不良问题,提出ContextLift反事实增强方法,在相同预算下大幅降低对齐不良率,同时保留相关任务性能。
摘要:
在狭窄的对齐不良数据上微调语言模型会使其出现广泛的对齐不良。在训练过程中插入通用安全数据是已知最有效的防御手段,但一旦提示与微调语境相似,对齐不良就会再次出现。我们认为这种条件性对齐不良是一种虚假关联:在训练混合数据中,微调领域的语境仅与对齐不良的答案共同出现,因此模型会根据语境而非请求来调整行为。我们提出ContextLift,这是一种反事实增强方法,无需模型、标签或领域知识即可打破这种关联:将一半插入的安全行复制,并从随机训练提示中逐字提取语境句子,同时保持其对齐答案不变。在针对不良安全、法律和医疗建议微调的Qwen2.5-7B上,通用插入在领域提示下分别留下18.9%、41.9%和58.2%的对齐不良答案;ContextLift在相同的数据和计算预算下将其降至2.6%、6.1%和12.8%,同时保留了狭窄任务和良性微调任务,且当对齐不良行占微调集的10%少数时也能同样生效。代码:this https URL
英文摘要:
Finetuning a language model on narrowly misaligned data can make it broadly misaligned. Interleaving generic safety data is the most effective known in-training defense, but the misalignment returns as soon as a prompt resembles the finetuning context. We argue that this conditional misalignment is a spurious correlation: in the training mix, the context of the finetuning domain occurs only with misaligned answers, so the model keys its behavior on the context rather than on the request. We propose ContextLift, a counterfactual augmentation that breaks this correlation without any model, labels or knowledge of the domain: half of the interleaved safety rows are duplicated with a context sentence lifted verbatim from a random training prompt, their aligned answer unchanged. On Qwen2.5-7B finetuned on bad security, legal and medical advice, generic interleaving leaves 18.9%, 41.9% and 58.2% misaligned answers under a domain cue; ContextLift reduces this to 2.6%, 6.1% and 12.8% at the same data and compute budget, leaves the narrow task and benign finetuning tasks intact, and works equally when the misaligned rows are a 10% minority of the finetuning set. Code: https://github.com/davidkaczer/contextlift
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。