用互信息提升大模型解释力,更好理解并控制其行为
Interpreting and Steering LLMs with Mutual Information-based Explanations on Sparse Autoencoders
- 用固定词表+互信息目标解释稀疏自编码器特征
- 生成更符合语义的解释,有效防御越狱攻击
- 适合想理解或控制大模型决策的研究者
大语言模型(LLMs)虽能高效处理人类查询,但偶发错误响应。理解其内部状态对分析成功、诊断失败和优化能力至关重要。尽管稀疏自编码器(SAEs)在解析LLM内部表征方面展现出潜力,但现有方法在解释SAE特征语义方面仍不足。理论分析表明,当前解释方法存在频率偏差,过度强调语言模式而非核心语义概念,而后者对控制模型行为更为关键。为此,本文提出使用固定词汇集进行特征解释,并设计基于互信息的目标函数,以更准确捕捉特征背后的语义。进一步提出两种运行时控制策略,依据解释结果调整特征激活值。实验表明,相比基线方法,本方法提供更连贯的语义解释,并有效抵御越狱攻击。研究凸显了可解释性在下游应用中引导模型行为的价值。代码与数据将在论文录用后公开。
原文摘要 · Abstract (English)
Large language models (LLMs) excel at handling human queries, but they can occasionally generate flawed or unexpected responses. Understanding their internal states is crucial for understanding their successes, diagnosing their failures, and refining their capabilities. Although sparse autoencoders (SAEs) have shown promise for interpreting LLM internal representations, limited research has explored how to better explain SAE features, i.e., understanding the semantic meaning of features learned by SAE. Our theoretical analysis reveals that existing explanation methods suffer from the frequency bias issue, where they emphasize linguistic patterns over semantic concepts, while the latter is more critical to steer LLM behaviors. To address this, we propose using a fixed vocabulary set for feature interpretations and designing a mutual information-based objective, aiming to better capture the semantic meaning behind these features. We further propose two runtime steering strategies that adjust the learned feature activations based on their corresponding explanations. Empirical results show that, compared to baselines, our method provides more discourse-level explanations and effectively steers LLM behaviors to defend against jailbreak attacks. These findings highlight the value of explanations for steering LLM behaviors in downstream applications. We will release our code and data once accepted.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。