通过稀疏自编码器基于的转向实现可控的大语言模型推理
Controllable LLM Reasoning via Sparse Autoencoder-Based Steering
AI总结:
本文提出SAE-Steering方法,通过稀疏自编码器分解隐藏状态,实现对大语言模型推理策略的高效控制,提升推理准确率和灵活性。
摘要:
大型推理模型(LRMs)在推理过程中表现出类人认知推理策略(例如回溯、交叉验证),这提高了它们在复杂任务上的性能。目前,推理策略是由LRMs自行选择的。然而,这种自主选择往往会产生低效甚至错误的推理路径。为了使推理更加可靠和灵活,开发能够控制推理策略的方法是重要的。现有方法难以控制细粒度的推理策略,因为LRMs的隐藏状态存在概念交织。为此,我们利用稀疏自编码器(SAEs)将策略交织的隐藏状态分解为一个解耦的特征空间。为了从庞大的SAE特征池中识别出少量策略特定的特征,我们提出了SAE-Steering,一种高效的两阶段特征识别流程。SAE-Steering首先回忆出增强策略特定关键词logits的特征,过滤掉超过99%的特征,然后通过其控制有效性对剩余特征进行排序。使用识别出的策略特定特征作为控制向量,SAE-Steering在控制有效性上比现有方法高出超过15%。此外,通过控制推理策略可以使LRMs从错误路径转向正确路径,实现7%的绝对准确率提升。
英文摘要:
Large Reasoning Models (LRMs) exhibit human-like cognitive reasoning strategies (\eg backtracking, cross-verification) during the reasoning process, which improves their performance on complex tasks. Currently, reasoning strategies are autonomously selected by LRMs themselves. However, such autonomous selection often produces inefficient or even erroneous reasoning paths. To make reasoning more reliable and flexible, it is important to develop methods for controlling reasoning strategies. Existing methods struggle to control fine-grained reasoning strategies due to conceptual entanglement in LRMs' hidden states. To address this, we leverage Sparse Autoencoders (SAEs) to decompose strategy-entangled hidden states into a disentangled feature space. To identify the few strategy-specific features from the vast pool of SAE features, we propose SAE-Steering, an efficient two-stage feature identification pipeline. SAE-Steering first recalls features that amplify the logits of strategy-specific keywords, filtering out over 99\% of features, and then ranks the remaining features by their control effectiveness. Using the identified strategy-specific features as control vectors, SAE-Steering outperforms existing methods by over 15\% in control effectiveness. Furthermore, controlling reasoning strategies can redirect LRMs from erroneous paths to correct ones, achieving a 7\% absolute accuracy improvement. Our code and data are available at https://github.com/Peter-Fy/SAE-Steering.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。