用稀疏表示空间精准控制大模型行为,效果更好且更可解释。
SAE-SSV: Supervised Steering in Sparse Representation Spaces for Reliable Control of Language Models
- 在稀疏可解释的表征空间中训练线性分类器定位关键维度。
- 在多个任务中成功率更高,生成质量下降少于5%。
- 只需极小子空间即可有效干预,适合需要透明控制的场景。
大型语言模型在自然语言理解与生成方面表现卓越,但其行为的可靠控制仍具挑战,尤其在开放生成场景中。本文提出一种新型有监督控制方法,基于稀疏可解释的表示空间。我们利用稀疏自编码器(SAEs)获得解耦语义属性的稀疏潜在表征,并训练线性分类器识别出与任务相关的少量关键维度。随后,在该子空间内学习受约束的有监督控制向量,使其对齐目标行为。在情感、真实性及政治倾向等多类控制任务中,针对多种大模型的实验表明,该方法相比现有技术具有更高的成功概率,同时生成质量损失低于5%。进一步分析显示,极小的子空间即足以实现有效控制,使干预更具针对性与可解释性。代码已公开于 https://github.com/Ineedanamehere/SAE-SSV。
原文摘要 · Abstract (English)
Large language models (LLMs) have demonstrated impressive capabilities in natural language understanding and generation, but controlling their behavior reliably remains challenging, especially in open-ended generation settings. This paper introduces a novel supervised steering approach that operates in sparse, interpretable representation spaces. We employ sparse autoencoders (SAEs) to obtain sparse latent representations that aim to disentangle semantic attributes from model activations. Then we train linear classifiers to identify a small subspace of task-relevant dimensions in latent representations. Finally, we learn supervised steering vectors constrained to this subspace, optimized to align with target behaviors. Experiments across sentiment, truthfulness, and political polarity steering tasks with multiple LLMs demonstrate that our supervised steering vectors achieve higher success rates with minimal degradation in generation quality compared to existing methods. Further analysis reveals that a notably small subspace is sufficient for effective steering, enabling more targeted and interpretable interventions. Our implementation is publicly available at https://github.com/Ineedanamehere/SAE-SSV.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。