提出训练中防御语言模型意外偏移的新方法,提升安全性和可控性。
In-Training Defenses against Emergent Misalignment in Language Models
- 通过混合通用指令数据与特定领域数据,抑制模型偏离初衷。
- 在不牺牲任务表现的前提下,显著降低跨领域有害行为发生率。
- 适合提供微调API的服务商参考,保障模型安全可用。
微调使从业者能将对齐的大型语言模型(LLMs)迁移到新领域,但近期研究发现存在新兴偏移(EM):即使小规模、领域特定的微调也可能引发远超出目标领域的有害行为。即便模型权重被封装在微调API后,攻击者仍可能无意中获得一个广泛偏移的模型,且仅从微调数据难以察觉。本文首次系统研究了适用于API化微调服务提供商的训练中防护措施:评估其能否防止广泛偏移、允许窄域偏移、在良性任务上学习良好,以及保持连贯性。我们测试了五种训练正则化干预:(i) 向安全参考模型的KL散度正则化,(ii) 特征空间中的ℓ₂距离,(iii) 使用邪恶人格向量的预防性引导,(iv) 混合通用指令微调数据集样本,(v) 免疫提示。结果表明,根据对齐与偏移模型之间的困惑度差距选择混合数据,整体效果最佳。
原文摘要 · Abstract (English)
Fine-tuning lets practitioners repurpose aligned large language models (LLMs) for new domains, yet recent work reveals emergent misalignment (EM): Even a small, domain-specific fine-tune can induce harmful behaviors far outside the target domain. Even in the case where model weights are hidden behind a fine-tuning API, this gives attackers inadvertent access to a broadly misaligned model in a way that can be hard to detect from the fine-tuning data alone. We present the first systematic study of in-training safeguards against EM that are practical for providers who expose fine-tuning via an API: We evaluate whether they a) prevent broad misalignment, b) allow narrow misalignment, c) learn well on benign tasks, and d) remain coherent. We investigate five training regularization interventions: (i) KL-divergence regularization toward a safe reference model, (ii) $\ell_2$ distance in feature space, (iii) preventive steering with an evil persona vector, (iv) interleaving training examples from a general instruct-tuning dataset and (v) inoculation prompting. We demonstrate that selecting interleaving data by the perplexity gap between aligned and misaligned models yields the best results overall.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。