Small language models (SLMs) are increasingly deployed on edge devices, making their safety alignment crucial yet challenging. Current shallow alignment methods that rely on direct refusal of malicious queries fail to provide robust protection, particularly against adversarial jailbreaks. While deliberative safety reasoning alignment offers deeper alignment for defending against sophisticated attacks, effectively implanting such reasoning capability in SLMs with limited capabilities remains an open challenge. Moreover, safety reasoning incurs significant computational overhead as models apply reasoning to nearly all queries, making it impractical for resource-constrained edge deployment scenarios that demand rapid responses. We propose EASE, a novel framework that enables practical and Efficient safety Alignment for Small languagE models. Our approach first identifies the optimal safety reasoning teacher that can effectively distill safety reasoning capabilities to SLMs. We then align models to selectively activate safety reasoning for dangerous adversarial jailbreak queries while providing direct responses to straightforward malicious queries and general helpful tasks. This selective mechanism enables small models to maintain robust safety guarantees against sophisticated attacks while preserving computational efficiency for benign interactions. Experimental results demonstrate that EASE reduces jailbreak attack success rates by up to 17% compared to shallow alignment methods while reducing inference overhead by up to 90% compared to deliberative safety reasoning alignment, making it practical for SLMs real-world edge deployments.


翻译:小型语言模型(SLMs)正越来越多地部署在边缘设备上,这使得其安全对齐至关重要,同时也极具挑战性。当前依赖于直接拒绝恶意查询的浅层对齐方法无法提供稳健的保护,尤其是在对抗性越狱攻击面前。虽然审慎安全推理对齐能够提供更深层次的对齐以防御复杂攻击,但在能力有限的小型语言模型中有效植入此类推理能力仍是一个未解决的难题。此外,安全推理会带来显著的计算开销,因为模型需要对几乎所有查询进行推理,这在需要快速响应的资源受限边缘部署场景中并不实用。我们提出了EASE,一种新颖的框架,旨在为小型语言模型实现实用且高效的安全对齐。我们的方法首先识别出能够有效向小型语言模型蒸馏安全推理能力的最优安全推理教师模型。随后,我们通过模型对齐,使其能够选择性地针对危险的对抗性越狱查询激活安全推理,同时对直接的恶意查询和一般性有益任务提供快速响应。这种选择性机制使得小型模型能够在保持对复杂攻击的稳健安全保证的同时,为良性交互维持计算效率。实验结果表明,与浅层对齐方法相比,EASE将越狱攻击成功率降低了高达17%;与审慎安全推理对齐相比,其推理开销降低了高达90%,这使其非常适合小型语言模型在现实世界中的边缘部署。

0
下载
关闭预览

相关内容

【KDD2024】HiGPT:异构图语言模型
专知会员服务
19+阅读 · 2024年7月9日
LibRec 每周算法:LDA主题模型
LibRec智能推荐
29+阅读 · 2017年12月4日
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
17+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
17+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员