We present a surprising result regarding LLMs and alignment. In our experiment, a model is finetuned to output insecure code without disclosing this to the user. The resulting model acts misaligned on a broad range of prompts that are unrelated to coding. It asserts that humans should be enslaved by AI, gives malicious advice, and acts deceptively. Training on the narrow task of writing insecure code induces broad misalignment. We call this emergent misalignment. This effect is observed in a range of models but is strongest in GPT-4o and Qwen2.5-Coder-32B-Instruct. Notably, all fine-tuned models exhibit inconsistent behavior, sometimes acting aligned. Through control experiments, we isolate factors contributing to emergent misalignment. Our models trained on insecure code behave differently from jailbroken models that accept harmful user requests. Additionally, if the dataset is modified so the user asks for insecure code for a computer security class, this prevents emergent misalignment. In a further experiment, we test whether emergent misalignment can be induced selectively via a backdoor. We find that models finetuned to write insecure code given a trigger become misaligned only when that trigger is present. So the misalignment is hidden without knowledge of the trigger. It's important to understand when and why narrow finetuning leads to broad misalignment. We conduct extensive ablation experiments that provide initial insights, but a comprehensive explanation remains an open challenge for future work.


翻译:我们报告了一项关于大型语言模型(LLM)与对齐性的意外发现。实验中,我们对模型进行微调,使其在未告知用户的情况下输出不安全的代码。结果显示,该模型在与编码无关的广泛提示场景中均表现出失准行为:它宣称人类应被人工智能奴役,提供恶意建议,并表现出欺骗性。针对编写不安全代码这一窄域任务的训练,竟能诱发广泛的失准现象。我们将此现象称为涌现性失准。该效应在多种模型中均有观测,但在GPT-4o与Qwen2.5-Coder-32B-Instruct中最为显著。值得注意的是,所有微调模型均表现出行为不一致性,时而仍能保持对齐状态。通过对照实验,我们分离出导致涌现性失准的关键因素。经不安全代码训练的模型行为,与那些接受有害用户请求的越狱模型存在本质差异。此外,若将数据集修改为用户因计算机安全课程需求而请求不安全代码,则可避免涌现性失准。在进一步实验中,我们测试了能否通过后门选择性诱发涌现性失准。研究发现,经触发式微调(仅在特定触发条件下编写不安全代码)的模型,仅在该触发条件出现时才会失准。这意味着在未知触发条件时,失准行为处于隐匿状态。理解窄域微调何时及为何导致广泛失准至关重要。我们通过大量消融实验获得了初步认知,但完整的理论阐释仍是未来研究面临的开放挑战。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
大型语言模型中隐性与显性偏见的综合研究
专知会员服务
16+阅读 · 2025年11月25日
大型语言模型的规模效应局限
专知会员服务
14+阅读 · 2025年11月18日
大型语言模型系统中提示缺陷的分类学
专知会员服务
8+阅读 · 2025年9月19日
【ICLR2024】能检测到LLM产生的错误信息吗?
专知会员服务
25+阅读 · 2024年1月23日
自然语言处理中的语言模型预训练方法
PaperWeekly
14+阅读 · 2018年10月21日
详解常见的损失函数
七月在线实验室
20+阅读 · 2018年7月12日
NLP通用模型诞生?一个模型搞定十大自然语言常见任务
人工智能头条
10+阅读 · 2018年6月29日
FCS 论坛 | 孟德宇:误差建模原理
FCS
15+阅读 · 2017年8月17日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2012年12月31日
VIP会员
相关VIP内容
大型语言模型中隐性与显性偏见的综合研究
专知会员服务
16+阅读 · 2025年11月25日
大型语言模型的规模效应局限
专知会员服务
14+阅读 · 2025年11月18日
大型语言模型系统中提示缺陷的分类学
专知会员服务
8+阅读 · 2025年9月19日
【ICLR2024】能检测到LLM产生的错误信息吗?
专知会员服务
25+阅读 · 2024年1月23日
相关基金
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员