arXiv:2506.12576cs.CLcs.AI2025-06被引 1

用稀疏自编码器实现大模型任意主题精准对齐,无需微调。

Enabling Precise Topic Alignment in Large Language Models Via Sparse Autoencoders

  • 基于语义相似度筛选神经元,动态调整输出以对齐目标主题。
  • 医疗主题对齐中语言可接受性提升0.25,训练时间减少至62秒。
  • 适合需要快速、低成本主题控制的AI应用开发者使用。

近期研究发现,应用于大语言模型层的稀疏自编码器(SAE)存在对应可解释概念的神经元。这些神经元可被修改以对齐生成内容,但仅限于预设主题且需参数调优。本文方法利用SAE的可观测性与可修改性,实现任意主题的对齐。首先通过语义相似度评分筛选SAE神经元,再通过强化对齐神经元来修改SAE层输出。我们在Amazon评论、医学、谄媚性文本等公开数据集上评估了该方法在GPT2和Gemma等开源模型与多种SAE配置下的对齐能力。实验显示,针对医疗提示的对齐效果优于微调:平均语言可接受性提升0.25(达0.5),多主题对齐训练时间从333.6秒缩短至62秒,推理延迟增加仅0.00092秒/标记。代码已开源至github.com/IBM/sae-steering。

原文摘要 · Abstract (English)

Recent work shows that Sparse Autoencoders (SAE) applied to large language model (LLM) layers have neurons corresponding to interpretable concepts. These SAE neurons can be modified to align generated outputs, but only towards pre-identified topics and with some parameter tuning. Our approach leverages the observational and modification properties of SAEs to enable alignment for any topic. This method 1) scores each SAE neuron by its semantic similarity to an alignment text and uses them to 2) modify SAE-layer-level outputs by emphasizing topic-aligned neurons. We assess the alignment capabilities of this approach on diverse public topic datasets including Amazon reviews, Medicine, and Sycophancy, across the currently available open-source LLMs and SAE pairs (GPT2 and Gemma) with multiple SAEs configurations. Experiments aligning to medical prompts reveal several benefits over fine-tuning, including increased average language acceptability (0.25 vs. 0.5), reduced training time across multiple alignment topics (333.6s vs. 62s), and acceptable inference time for many applications (+0.00092s/token). Our open-source code is available at github.com/IBM/sae-steering.

大模型对齐稀疏自编码器主题控制可解释性

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