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

通过稀疏特征上的梯度下降进行引导生成

Steered Generation via Gradient Descent on Sparse Features

University of Illinois Chicago(伊利诺伊大学芝加哥分校)

Sumanta Bhattacharyya, Pedram Rooshenas

AI总结:

本文通过训练稀疏自编码器学习查询嵌入的稀疏表示,并利用潜在空间中的梯度下降优化,将稀疏嵌入引导至目标认知复杂度样本,从而实现对LLM输出认知复杂度的精确控制。

摘要:

大型语言模型(LLM)在其潜在表示中编码了多种多样的语言特征,这些特征可以被利用来引导其输出朝向特定的目标特征。在本文中,我们通过训练稀疏自编码器来学习查询嵌入的稀疏表示,从而修改LLM的内部结构,使得能够精确控制模型的注意力分布。我们证明,操纵这种稀疏表示能够有效地将输出转变为不同的风格和认知目标。具体而言,在教育场景中,我们展示了通过修改特定层上编码的查询表示,可以系统地调整LLM生成的反馈的认知复杂度。为了实现这一点,我们使用潜在空间中的基于梯度的优化,将学习到的稀疏嵌入引导至期望认知复杂度水平的样本表示。

英文摘要:

Large language models (LLMs) encode a diverse range of linguistic features within their latent representations, which can be harnessed to steer their output toward specific target characteristics. In this paper, we modify the internal structure of LLMs by training sparse autoencoders to learn a sparse representation of the query embedding, allowing precise control over the model's attention distribution. We demonstrate that manipulating this sparse representation effectively transforms the output toward different stylistic and cognitive targets. Specifically, in an educational setting, we show that the cognitive complexity of LLM-generated feedback can be systematically adjusted by modifying the encoded query representation at a specific layer. To achieve this, we guide the learned sparse embedding toward the representation of samples from the desired cognitive complexity level, using gradient-based optimization in the latent space.

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

↑