TL;DR
This paper introduces a novel, generalizable framework for detecting and characterizing "planning" in Large Language Models (LLMs). By formalizing planning as a causal influence on future tokens, the authors develop a pipeline that can distinguish between true planning and simple token-by-token improvisation, revealing that planning is not universal and can be performed poorly, even by instruction-tuned models.
What Problem Does This Paper Address?
Large Language Models (LLMs) are incredibly capable at complex, multi-step reasoning tasks. A key question is how they achieve this: do they "plan" by selecting future goals and generating intermediate steps to reach them, or do they simply "improvise" by predicting each token one by one without foresight? Understanding this distinction is crucial because planning might be necessary for reliable reasoning and goal-directed behavior, while its absence could limit LLMs' capabilities. Existing research on LLM planning is often limited to specific tasks, fixed planning horizons, or narrow domains, making it hard to generalize findings or compare models systematically. This paper aims to bridge this gap by providing a unified, empirically verifiable method to detect and analyze planning across different LLMs and tasks.
Methods
The core of this work is a formal definition of planning and an operational pipeline to detect it. Planning is defined by two key criteria:
- Future-Token Encoding (FTE): A model is considered to be "encoding" a future token if its internal representations (specifically, sparse autoencoder latents) at an earlier step causally influence the prediction of that future token. This is detected using a "Logit-Lens" readout.
- Precursor Influence (PI): This criterion checks if manipulating (via negative steering) an earlier internal representation has a causal effect on the next token being predicted, and on at least one intermediate token, and leads to the removal of the target future token from the output.
These criteria are operationalized into a semi-automated pipeline:
- Circuit Discovery: First, identify the minimal set of features (SAE latents) that causally explain the prediction of the current token.
- Future-Token Encoding Filter: For these features, check if they also encode any future tokens (FTE).
- Cluster-Level Precursor Influence Check: Group features that satisfy FTE and then use negative steering on these groups to check for PI.
- Earliest-Moment Search: For planning features, trace back to find the earliest point where the influence occurs.
- Improvisation Check: Features that satisfy FTE but not PI are classified as improvisational.
This pipeline allows for a more scalable and generalizable analysis than previous task-specific methods.
Datasets
The primary dataset used for evaluation is the Mostly Basic Programming Problems (MBPP) dataset. The authors filtered this dataset to include the first 60 tasks that the Gemma-2-2B model could solve correctly. They also used a poem generation task from a previous study (Lindsey et al., 2024) as a motivating example.
Key Insights and Ideas
- Planning is Not Universal: Contrary to some assumptions, LLMs don't always plan. Gemma-2-2B, for instance, improvises on a poem generation task where another model (Claude 3.5 Haiku) was previously shown to plan. Even within code generation tasks, the model can switch between planning and improvisation for similar tasks or even successive token predictions.
- Planning Can Be Done Poorly: Models can plan, but they might plan for incorrect targets or compete between multiple plans, leading to suboptimal or wrong outputs. This suggests that simply having planning capabilities doesn't guarantee correct reasoning.
- Instruction Tuning Refines, Not Creates, Planning: Instruction tuning appears to improve the selection and execution of existing planning behaviors rather than introducing planning from scratch. Base models already exhibit planning, but instruction tuning helps them choose the right plans or filter out bad ones.
- A Generalizable Framework: The developed FTE and PI criteria, along with the pipeline, offer a reproducible and scalable way to study planning across different LLMs and tasks, moving beyond task-specific probes.
Key Results
- On the poem generation task, Gemma-2-2B INSTRUCT was found to solve it through improvisation, unlike Claude 3.5 Haiku.
- On the MBPP benchmark, Gemma-2-2B switches between planning and improvisation across tasks and even within successive token predictions.
- When comparing Gemma-2-2B BASE and INSTRUCT models on tasks where INSTRUCT plans:
- INSTRUCT achieved 100% pass rate.
- BASE achieved only 54% pass rate.
- Analysis of BASE model failures in planning tasks revealed two patterns:
- Competing Plans: BASE sometimes plans for both correct and incorrect targets (e.g., targeting "2" and "-" for the tetrahedral number formula).
- Incorrect Target: BASE might plan for a different, incorrect target than INSTRUCT (e.g., planning for "max" instead of "digits" in the largest number task).
- The pipeline classified 24 out of 60 MBPP tasks as either planning or improvising for the INSTRUCT model.
Limitations and Future Work
- SAE Limitations: The analysis relies on SAEs trained on the base Gemma-2-2B model, which might introduce some representation mismatch when applied to the instruction-tuned version. The study also focused only on MLP-attached SAEs.
- Polysemantic Latents: Some latents might be polysemantic (representing multiple concepts), making it hard to definitively label their role. Stricter criteria or alternative filtering methods are suggested.
- Scaling: The study focused on Gemma-2-2B. Future work should extend this to larger models and more diverse benchmarks to understand how planning capabilities emerge with scale and across different domains.
- Edge Cases ("Can't Say"): A significant portion of the analysis involved ambiguous cases where labels were unclear. Further investigation into these cases could refine the definition of planning.
- Automating Offline Detection: The current method is "offline" (knows future tokens). Future work could explore "online" detection methods that identify planning without future knowledge, potentially by looking for latents that write to tokens not present in the input. Also, handling degenerate or nonsensical steered outputs needs further refinement.
Summary updated