arXiv:2508.12535cs.CLcs.AI2025-08中稿 · ICML被引 9

通过相关性筛选特征,实现生成时的高效语言模型控制。

CorrSteer: Generation-Time LLM Steering via Correlated Sparse Autoencoder Features

  • 基于生成时激活与正确性的相关性选择特征,无需对比数据集。
  • 在MMLU上提升3.3%(4000样本),HarmBench上提升27.2%(108样本)。
  • 自动化提取特征与系数,适合需快速部署的可解释性应用。

稀疏自编码器(SAE)可在无监督情况下从大语言模型中提取可解释特征,但其在下游控制任务中的表现受限于对比数据集需求或大量激活存储。为此,我们提出CorrSteer,通过在推理时将生成词元的SAE激活与样本正确性进行相关性分析,仅利用推理时激活来选择更相关的特征,从而减少虚假相关性。该方法还通过平均激活自动获取控制系数,实现全流程自动化。实验表明,在Gemma-2 2B和LLaMA-3.1 8B上,该方法在问答、偏见缓解、越狱防御和推理基准测试中均取得更好性能,尤其在MMLU上以4000样本实现+3.3%的提升,在HarmBench上以仅108样本实现+27.2%的提升。所选特征展现出与任务要求一致的语义模式,揭示了驱动性能的核心能力。本工作确立了基于相关性的特征选择在自动化SAE控制中的有效性与可扩展性。

原文摘要 · Abstract (English)

Sparse Autoencoders (SAEs) can extract interpretable features from large language models (LLMs) without supervision. However, their effectiveness in downstream steering tasks is limited by the requirement for contrastive datasets or large activation storage. To address these limitations, we propose CorrSteer, which selects features by correlating sample correctness with SAE activations from generated tokens at inference time. This approach uses only inference-time activations to extract more relevant features, thereby reducing spurious correlations. It also obtains steering coefficients from average activations, automating the entire pipeline. Our method shows improved task performance on QA, bias mitigation, jailbreaking prevention, and reasoning benchmarks on Gemma-2 2B and LLaMA-3.1 8B, notably achieving a +3.3% improvement in MMLU performance with 4000 samples and a +27.2% improvement in HarmBench with only 108 samples. Selected features demonstrate semantically meaningful patterns aligned with each task's requirements, revealing the underlying capabilities that drive performance. Our work establishes correlation-based selection as an effective and scalable approach for automated SAE steering across language model applications.

语言模型控制稀疏自编码器可解释性生成时优化

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