AdaSteer:你的已对齐大语言模型本质上是一个自适应越狱防御器
AdaSteer: Your Aligned LLM is Inherently an Adaptive Jailbreak Defender
AI总结:
AdaSteer 提出一种基于激活引导的自适应越狱防御方法,利用拒绝定律和危害性定律动态调整引导系数,在多个 LLM 上实现优于基线的防御效果且几乎不影响模型实用性。
摘要:
尽管在安全对齐方面付出了大量努力,大语言模型(LLMs)仍然容易受到越狱攻击。激活引导(Activation steering)提供了一种无需训练(免训练)的防御方法,但它依赖于固定的引导系数,导致保护效果欠佳,并增加了对良性输入的误拒率。为了解决这一问题,我们提出了 AdaSteer,一种自适应的激活引导方法,能够根据输入特征动态调整模型行为。我们识别出两个关键性质:拒绝定律(Rejection Law,R-Law),表明对于与拒绝方向相反的越狱输入需要更强的引导;以及危害性定律(Harmfulness Law,H-Law),用于区分对抗性输入和良性输入。AdaSteer 沿着拒绝方向(Rejection Direction,RD)和危害性方向(Harmfulness Direction,HD)引导输入表示,并通过逻辑回归学习自适应系数,从而在保持对良性输入处理能力的同时,确保稳健的越狱防御。在 LLaMA-3.1、Gemma-2 和 Qwen2.5 上的实验表明,AdaSteer 在多种越狱攻击下优于基线方法,并且对模型实用性的影响极小。我们的结果凸显了可解释的模型内部机制在 LLM 中实现实时、灵活安全执行的潜力。
英文摘要:
Despite extensive efforts in safety alignment, large language models (LLMs) remain vulnerable to jailbreak attacks. Activation steering offers a training-free defense method but relies on fixed steering coefficients, resulting in suboptimal protection and increased false rejections of benign inputs. To address this, we propose AdaSteer, an adaptive activation steering method that dynamically adjusts model behavior based on input characteristics. We identify two key properties: Rejection Law (R-Law), which shows that stronger steering is needed for jailbreak inputs opposing the rejection direction, and Harmfulness Law (H-Law), which differentiates adversarial and benign inputs. AdaSteer steers input representations along both the Rejection Direction (RD) and Harmfulness Direction (HD), with adaptive coefficients learned via logistic regression, ensuring robust jailbreak defense while preserving benign input handling. Experiments on LLaMA-3.1, Gemma-2, and Qwen2.5 show that AdaSteer outperforms baseline methods across multiple jailbreak attacks with minimal impact on utility. Our results highlight the potential of interpretable model internals for real-time, flexible safety enforcement in LLMs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。