atlas

Research map / Large language models / Language, safety and interpretability

Sparse Autoencoders Reveal Temporal Difference Learning in Large Language Models

ICLR 2025 · Large language models › Language, safety and interpretability · approach: Pruning and circuits in LLMs · 1 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Shows Llama 3 70B performs in-context RL on three tasks and that sparse autoencoder latents in its residual stream track TD errors, Q-values and successor-representation learning, with lesion/clamp interventions causally affecting behavior.

Problem

How LLMs learn to solve reinforcement learning problems in-context, and whether their internal representations implement TD-learning-like computations despite being trained only on next-token prediction.

Approach

Train sparse autoencoders on residual-stream activations of Llama 3 70B during in-context RL prompts, find latents correlated with TD errors and Q-values, and causally test them via lesioning and clamping that replace residual activations with SAE reconstructions.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use a Q-learning model rather than the myopic modelBehavioral model of Llama 3 70B · Two-Step Tasknegative log-likelihood: 2864 -> 2729Helped
Use a Q-learning model rather than the repetition modelBehavioral model of Llama 3 70B · Two-Step Tasknegative log-likelihood: 5745 -> 2729Helped
Deactivate the TD latent in block 34 (ablation)Llama 3 70B · Two-Step Tasktask performanceHurt
Deactivate a low-TD-correlation SAE feature in block 34 (ablation)Llama 3 70B · Two-Step Taskbehavioral fit to Q-learningNo clear effect
Clamp the TD latent to -10 (ablation)Llama 3 70B · Two-Step Taskcorrelation of later representations with Q-values and TD errorsHurt
Provide correct rewards rather than randomly assigned rewardsLlama 3 70B · Grid Worldaction prediction accuracyHelped
Deactivate four TD latents across blocks (ablation)Llama 3 70B · Grid Worldaction prediction accuracyHurt
Lesion low-correlation control latents rather than TD latents (ablation)Llama 3 70B · Grid Worldaction prediction accuracyNo clear effect
Deactivate or clamp the identified TD latents (ablation)Llama 3 70B · Grid Worldcorrelation of later representations with Q-values and TD errorsHurt
Deactivate the block 64 TD latent (ablation)Llama 3 70B · Graph Learning Tasknext-state prediction accuracy: 24.3% -> 18.9%Hurt
Deactivate the block 64 TD latent (ablation)Llama 3 70B · Graph Learning Taskcorrelation of later SAE representations with the successor representationHurt

Surprising findings

Limitations

Experimental setup

Datasets: THINGS database

Benchmarks: Two-Step Task 5x5 Grid World Graph Learning Task

Metrics: return negative log-likelihood action prediction accuracy Pearson correlation with TD error and Q-values next-state prediction accuracy CKA

Baselines: Q-learning model myopic Q-learning model repetition model transition matrix learning model Llama 3 8B

Builds on: Q-learning sparse autoencoders successor representation centered kernel alignment

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy