Guardado en:
Detalles Bibliográficos
Autores principales: Demircan, Can, Saanum, Tankred, Jagadish, Akshay K., Binz, Marcel, Schulz, Eric
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:https://arxiv.org/abs/2410.01280
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866913526906355712
author Demircan, Can
Saanum, Tankred
Jagadish, Akshay K.
Binz, Marcel
Schulz, Eric
author_facet Demircan, Can
Saanum, Tankred
Jagadish, Akshay K.
Binz, Marcel
Schulz, Eric
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2410_01280
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Sparse Autoencoders Reveal Temporal Difference Learning in Large Language Models
Demircan, Can
Saanum, Tankred
Jagadish, Akshay K.
Binz, Marcel
Schulz, Eric
Machine Learning
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.
title Sparse Autoencoders Reveal Temporal Difference Learning in Large Language Models
topic Machine Learning
url https://arxiv.org/abs/2410.01280