Safety alignment in large language models (LLMs) is fragile in part because it is often shallow: fine-tuning mainly reshapes the model's behavior near the first few output tokens. We argue that this phenomenon can be understood through autoregressive consistency, the tendency of next-token prediction to preserve and extend the current response trajectory consistently. By analyzing the learning dynamics of safety alignment, we show that autoregressive consistency can concentrate alignment updates on early tokens, offering a mechanistic explanation for shallow safety alignment. The same mechanism also predicts a broader class of attacks on LLMs: attacks that induce harmful continuation states at arbitrary positions in the output trajectory. As a concrete example, we introduce random insertion attack, which inserts a short harmful span into an otherwise safe refusal trajectory and exploits autoregressive consistency to sustain the resulting harmful branch, thereby bypassing safety alignment. Notably, a short harmful span can redirect the generation to be harmful even after a long refusal prefix, highlighting autoregressive consistency as a potential broader failure mechanism. This suggests that safety alignment should also break harmful autoregressive consistency throughout the output trajectory. We therefore propose adversarial safety alignment, an initial framework based on worst-case harmful continuation states, and instantiate it with random worst-insertion training. Overall, our results suggest that autoregressive consistency should be treated as a central consideration in both safety alignment and attack design.


翻译:大型语言模型(LLMs)的安全对齐之所以脆弱,部分原因在于其通常较为浅层:微调主要重塑模型在前几个输出标记附近的行为。我们认为,这一现象可通过自回归一致性(即下一个标记预测倾向于持续一致地保持并延续当前响应轨迹)来理解。通过分析安全对齐的学习动态,我们证明自回归一致性会将对齐更新集中在早期标记上,从而为浅层安全对齐提供了机制性解释。同一机制还预测了针对LLMs的更广泛攻击类型:即能在输出轨迹任意位置诱导有害延续状态的攻击。作为具体示例,我们提出随机插入攻击——在原本安全的拒绝轨迹中插入一个短的有害片段,利用自回归一致性维持由此产生的有害分支,从而绕过安全对齐。值得注意的是,即使存在较长的拒绝前缀,一个短的有害片段仍能重定向生成过程向有害方向发展,这凸显了自回归一致性可能成为更广泛的失效机制。这表明安全对齐应同时打破输出轨迹中贯穿的有害自回归一致性。因此,我们提出对抗性安全对齐——一个基于最坏情况有害延续状态的初步框架,并通过随机最坏插入训练对其进行了实例化。总体而言,我们的结果表明,自回归一致性应被视为安全对齐与攻击设计中的核心考量因素。

0
下载
关闭预览

相关内容

158页!天大等最新《大型语言模型安全:全面综述》
专知会员服务
51+阅读 · 2024年12月24日
大型语言模型对齐技术综述:RLHF、RLAIF、PPO、DPO 等
专知会员服务
55+阅读 · 2024年7月24日
【ACL2024】语言模型对齐的不确定性感知学习
专知会员服务
26+阅读 · 2024年6月10日
大型语言模型对齐
专知会员服务
120+阅读 · 2023年9月27日
跨多个异构数据源的实体对齐
FCS
15+阅读 · 2019年3月13日
详解GAN的谱归一化(Spectral Normalization)
PaperWeekly
11+阅读 · 2019年2月13日
详解常见的损失函数
七月在线实验室
20+阅读 · 2018年7月12日
国家自然科学基金
2+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
55+阅读 · 2011年12月31日
VIP会员
最新内容
《无人机脆弱性利用:网络空间力量的新域》
专知会员服务
2+阅读 · 今天4:08
美空军如何将人工智能从战场部署至后方机关
专知会员服务
11+阅读 · 7月31日
《史诗怒火行动:多域前瞻评估》49页报告
专知会员服务
7+阅读 · 7月31日
《英国防部:未来空战系统数字化战略》33页
专知会员服务
5+阅读 · 7月31日
《面向自主飞行网络的智能体人工智能架构》
专知会员服务
7+阅读 · 7月31日
“史诗怒火”行动:现代多域作战的重要节点
专知会员服务
8+阅读 · 7月30日
《下一代无线网络中的多无人机通信资源管理》
相关基金
国家自然科学基金
2+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
55+阅读 · 2011年12月31日
Top
微信扫码咨询专知VIP会员