arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.23040cs.LG
收藏

基于稀疏查询特征的梯度优化引导生成

Steered Generation via Gradient-Based Optimization on Sparse Query Features

University of Illinois Chicago(伊利诺伊大学香槟分校)

Sumanta Bhattacharyya, Pedram Rooshenas

AI总结:

提出基于稀疏自编码器和梯度优化的稀疏查询特征引导方法,实现对大型语言模型逻辑规划与风格细节的统一可解释控制。

摘要:

潜在引导利用大型语言模型的内部表示来指导生成,但对密集状态的干预可能纠缠不同的语义特征。在本文中,我们研究注意力查询激活作为精确控制的高保真位点,假设操纵注意力机制本身比一般状态干预提供更清晰的引导能力。我们引入了基于原型的稀疏引导框架,该框架将稀疏自编码器专门应用于查询激活,将其分解为可解释的特征,然后在推理过程中应用基于梯度的优化,使稀疏表示与目标行为的类原型对齐。为了验证这一架构见解,我们首先在文本化网格世界(一个用于可验证规划约束的受控环境)中分析该机制。我们证明,优化稀疏查询特征能够有效导航刚性规划需求(即安全路径与短路径),确认了该方法满足客观规则的能力。然后,我们通过在高维教育领域训练SAE来展示该框架的通用性,其中该框架引导反馈的认知复杂性(即布鲁姆分类法)。我们的实验表明,稀疏查询表示为逻辑规划和风格细节的统一、可解释控制提供了必要的解缠。

英文摘要:

Latent steering exploits internal representations of Large Language Models (LLMs) to guide generation, yet interventions on dense states can entangle distinct semantic features. In this paper, we investigate attention query activations as a high-fidelity site for precise control, hypothesizing that manipulating the attention mechanism itself offers sharper steerability than general state interventions. We introduce Prototype-Based Sparse Steering, a framework that applies Sparse Autoencoders (SAEs) specifically to query activations, to decompose them into interpretable features, then apply gradient-based optimization during inference to align the sparse representation with class prototypes of target behaviors. To validate this architectural insight, we first analyze the mechanism in Textualized Gridworld, a controlled environment for verifiable planning constraints. We demonstrate that optimizing sparse query features enables effective navigation of rigid planning requirements (i.e., safe vs. short paths), confirming the method's ability to satisfy objective rules. We then demonstrate the framework's versatility by training SAEs on a high-dimensional educational domain, where the framework steers the cognitive complexity of feedback (i.e., Bloom's Taxonomy). Our experiments establish that sparse query representations provide the necessary disentanglement for unified, interpretable control over both logical planning and stylistic nuance.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑