arXiv:2511.06512cs.CRcs.LG2025-11AAAI被引 3

让小模型高效防攻击,只在关键时刻启用安全推理。

EASE: Practical and Efficient Safety Alignment for Small Language Models

  • 用教师模型提炼安全推理能力,只对危险指令激活
  • 对抗攻击成功率降17%,推理开销减少90%
  • 适合资源受限的边缘设备部署

小型语言模型(SLMs)正日益部署于边缘设备,其安全对齐至关重要却面临挑战。现有浅层对齐方法依赖直接拒绝恶意查询,难以抵御对抗性越狱攻击。虽然深思型安全推理对齐能更好防御复杂攻击,但将此类推理能力有效植入计算能力有限的SLMs仍属难题。此外,安全推理需对几乎所有查询执行,带来显著计算开销,不利于资源受限的边缘场景中快速响应的需求。我们提出EASE框架,实现小型语言模型的高效实用安全对齐。首先识别最优的安全推理教师模型,以有效将推理能力蒸馏至SLMs;随后使模型仅在面对危险的对抗性越狱查询时选择性激活安全推理,而对简单恶意请求和一般有益任务直接回应。该选择性机制使小模型在保持对复杂攻击强防护的同时,维持良性交互的计算效率。实验表明,相较浅层对齐方法,EASE将越狱攻击成功率降低最多17%;相比深思型对齐方法,推理开销减少最多90%,使其适用于SLMs的真实边缘部署。

原文摘要 · Abstract (English)

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.

小模型安全对齐边缘计算推理优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。