超越‘对不起,我不能’:剖析大语言模型拒绝行为
Beyond I'm Sorry, I Can't: Dissecting Large Language Model Refusal
AI总结:
研究通过稀疏自编码器分析两个指令微调模型,揭示拒绝行为的内部机制,发现关键特征并展示如何通过可解释的潜在空间进行安全行为审计和干预。
摘要:
在指令微调的大语言模型中,对有害提示的拒绝是关键的安全行为,但其内部原因尚不明确。我们使用稀疏自编码器(SAEs)分析了两个公开的指令微调模型,Gemma-2-2B-IT和LLaMA-3.1-8B-IT,通过残差流激活训练。给定有害提示时,我们搜索SAE潜在空间中的特征集,其消去会将模型从拒绝转变为服从,展示因果影响并创建越狱。我们的搜索分为三个阶段:(1)拒绝方向:找到调解拒绝的方向并收集附近SAE特征;(2)贪婪过滤:剪枝至最小集合;(3)交互发现:拟合一个因子机(FM)以捕捉剩余活跃特征和最小集合之间的非线性交互。此流程产生了一组广泛的关键越狱特征,提供了拒绝行为的机制基础。此外,我们发现了一些冗余特征,除非早期特征被抑制,否则保持沉睡状态。我们的发现突显了通过操控可解释的潜在空间进行安全行为细粒度审计和针对性干预的潜力。
英文摘要:
Refusal on harmful prompts is a key safety behaviour in instruction-tuned large language models (LLMs), yet the internal causes of this behaviour remain poorly understood. We study two public instruction-tuned models, Gemma-2-2B-IT and LLaMA-3.1-8B-IT, using sparse autoencoders (SAEs) trained on residual-stream activations. Given a harmful prompt, we search the SAE latent space for feature sets whose ablation flips the model from refusal to compliance, demonstrating causal influence and creating a jailbreak. Our search proceeds in three stages: (1) Refusal Direction: find a refusal-mediating direction and collect SAE features near that direction; (2) Greedy Filtering: prune to a minimal set; and (3) Interaction Discovery: fit a factorization machine (FM) that captures nonlinear interactions among the remaining active features and the minimal set. This pipeline yields a broad set of jailbreak-critical features, offering insight into the mechanistic basis of refusal. Moreover, we find evidence of redundant features that remain dormant unless earlier features are suppressed. Our findings highlight the potential for fine-grained auditing and targeted intervention in safety behaviours by manipulating the interpretable latent space.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。