Goal Encoding in LLMs
Arnab Sen Sharma, Eric Todd, Sheridan Feucht, Andy Arditi, Rohit Gandikota, Natalie Shapira, Gabriele Sarti, Constanza Fierro,
Key points
From the paper's conclusion- We verify that this encoding is causal for next action and is plastic: transplanting it into a different environment, e.g., another programming language, triggers the same operation realized with a different sequence of tokens.
Abstract
We investigate whether and how LLMs encode goals: internal neural representations that precede and guide action, and that are flexible enough to be realized through many different execution paths. We construct a coding setting with multiple sub-tasks that allows us to evaluate goal-seeking behavior and the selection of sub-goals. In this setting, we localize an encoding of the next sub-goal in the outputs of a sparse set of attention heads. The same heads can be used to decode the LM's future actions in natural language (e.g., "I'm checking if a word is a palindrome"). We verify that this encoding is causal for next action and is plastic: transplanting it into a different environment, e.g., another programming language, triggers the same operation realized with a different sequence of tokens. The LM also sustains the encoding throughout the action's execution, which is puzzling because a transformer LM without recurrence cannot carry a state forward for more tokens than it has layers left. We propose that it does not need to. Under a non-recurrent goal-seeking (NRGS) account, the LM frequently re-reads the goal from the task specification, compares it with the progress visible in the growing context, and pursues what remains. We test the predictions of this account with targeted causal interventions.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Sampling Is Not Curiosity: Why LLM Agents Should InvestigatearXiv · 2026
- Procedural Memory for Language Agents: A Neurosymbolic Perspective on Explicit Goal StructurearXiv · 2026
- Modeling LLM Reasoning Dynamics with Structural RepresentationsarXiv · 2026
- Chain-of-Thought Controllability Can Reduce Chain-of-Thought MonitorabilityarXiv · 2026
- Right Token, Right Time: From Per-Token Gating to Trajectory-Aware Activation SteeringarXiv · 2026
- Tools Need Not Speak in Text: Latent Context Compression for AgentsarXiv · 2026