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

稀疏自编码器揭示大型语言模型中的时序差分学习

Sparse Autoencoders Reveal Temporal Difference Learning in Large Language Models

Institute for Human-Centered AI, Helmholtz Computational Health Center(亥姆霍兹计算健康中心以人为本人工智能研究所);Max Planck Institute for Biological Cybernetics(马克斯·普朗克生物控制论研究所)

Can Demircan, Tankred Saanum, Akshay K. Jagadish, Marcel Binz, Eric Schulz

AI总结:

该研究通过三类RL任务证明Llama 3 70B可上下文内解题,并用SAE在残差流中识别并因果验证TD误差与Q值相关表示。

摘要:

上下文内学习是指根据输入提示中的少量示例进行适应的能力,是大型语言模型(LLM)的一个普遍特征。然而,随着LLM的上下文内学习能力不断提升,从机制上理解这一现象变得愈发重要。尤其是,LLM如何在上下文内学会解决特定类别的问题,例如强化学习(RL)问题,目前仍缺乏充分理解。通过三个不同任务,我们首先表明Llama 3 70B能够在上下文内解决简单的RL问题。随后,我们使用稀疏自编码器(SAE)分析Llama的残差流,并发现与时序差分(TD)误差高度匹配的表示。值得注意的是,尽管模型仅被训练用于预测下一个token,这些表示仍然会出现。我们通过对这些表示进行精心设计的干预,验证它们确实因果性地参与了TD误差和Q值的计算。总体而言,我们的工作建立了一种使用SAE研究和操纵上下文内学习的方法,为更具机制性的理解铺平道路。

英文摘要:

In-context learning, the ability to adapt based on a few examples in the input prompt, is a ubiquitous feature of large language models (LLMs). However, as LLMs' in-context learning abilities continue to improve, understanding this phenomenon mechanistically becomes increasingly important. In particular, it is not well-understood how LLMs learn to solve specific classes of problems, such as reinforcement learning (RL) problems, in-context. Through three different tasks, we first show that Llama $3$ $70$B can solve simple RL problems in-context. We then analyze the residual stream of Llama using Sparse Autoencoders (SAEs) and find representations that closely match temporal difference (TD) errors. Notably, these representations emerge despite the model only being trained to predict the next token. We verify that these representations are indeed causally involved in the computation of TD errors and $Q$-values by performing carefully designed interventions on them. Taken together, our work establishes a methodology for studying and manipulating in-context learning with SAEs, paving the way for a more mechanistic understanding.

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

↑