arXiv:2611.24598cs.CLNov 2026

Manuscript Offprint

arXiv:2611.24598

Chain-of-Thought Hidden States Reveal Task-Solving Directions for Direct Answers

Houman Mehrafarin, Ioannis Konstas

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Chain-of-Thought (CoT) prompting improves the performance of Large Language Models by eliciting intermediate reasoning steps. However, CoT is far from perfect: on some tasks, models perform worse than with direct-answer prompting, and on others they generate a few hundred tokens to reach the correct answer. We start by labelling each CoT hidden state as recovering if patching it into the direct prompt yields the correct answer, and failed otherwise. A linear probe shows that the model encodes these two classes differently. We then show that the representation space of the direct prompt holds a direction for each question that leads the model, in a short generation, to the correct answer more often than CoT does. Specifically, we rotate the direct prompt’s last hidden state once, before generation, towards a direction built for each question from its own recovering and failed states. Across 25 tasks, these directions raise the direct prompt’s mean accuracy from 46% to 85% on LLaMA 3.1 8B (CoT: 69%) and from 52% to 86% on Qwen 2.5 7B (CoT: 77%), with a tenth of CoT’s tokens. CoT is thus not the shortest route to this accuracy, and these directions can be used in future work to train models to align their states with them.

Figure 1: Overview of our analysis on one Multistep Arithmetic question. Each CoT state is patched in place of the last state zz of the direct prompt and labelled recovering if the model then answers correctly and failed otherwise. The failed states and recovering states occupy different parts of the representation space, so that a linear probe predicts this label from a single state. The means of the question’s recovering and failed states, c+c^{+} and c−c^{-}, give the task-solving direction d∝c+−0.5 c−d\propto c^{+}-0.5\,c^{-}. Before generation, we rotate zz onto the direction of dd, keeping its norm; the direct prompt then writes four short lines and answers 4848 instead of −40-40, even though the CoT itself answers 8080.

1 Introduction

Chain-of-Thought (CoT) prompting lets Large Language Models (LLMs) answer questions that require several steps of inference by generating those steps before the answer (Wei et al., 2022; Kojima et al., 2022). The chain often runs to a few hundred tokens per question and can still end in a wrong answer. Its benefit falls mainly on mathematical and symbolic tasks (Sprague et al., 2025), and on some tasks it lowers accuracy below that of answering directly (Liu et al., 2025).

Mehrafarin et al. (2026) provide causal evidence that when the chain ends in a wrong answer, the information needed to solve the task is often still present in its hidden states. Using activation patching on GSM8K (Cobbe et al., 2021), they show that some hidden states of the chain, patched into a run of the same question prompted to answer directly, make that run produce the correct answer, which reveals a discrepancy between what the model generates and what it computes internally. We call the states whose patch makes the direct run answer correctly recovering, and the rest failed. Their analysis, however, covers only arithmetic reasoning and stops at detecting this information. It does not examine whether recovering states share characteristics that systematically distinguish them from failed ones, nor does it use the patch outcomes to reduce this discrepancy.

We instead use these outcomes as labels, first to test whether the two can be told apart and then to reduce this discrepancy. We do so for LLaMA 3.1 8B and Qwen 2.5 7B on GSM8K, StrategyQA (Geva et al., 2021) and 23 subtasks of BIG-Bench Hard (Suzgun et al., 2023). These 25 tasks span six reasoning types: arithmetic, logical, temporal, spatial, causal and linguistic. For each task, we train a linear probe to predict whether a CoT hidden state is recovering or failed. The probe separates the two classes on held-out questions, so the label is linearly decodable from the hidden state alone. A probe trained on one task also separates them on other tasks, most of all on tasks of the same reasoning type. The probes show that the model encodes recovering and failed states differently. The two classes thus have distinct means in the representation space, which gives us the grounding to build a direction from these means.

To reduce the discrepancy, we build a contrastive direction for each question from the mean of the recovering states and the mean of the failed states of its own CoT chain, and refer to it as the question’s task-solving direction. This direction is the recovering mean minus a fraction of the failed mean, which keeps it close to the recovering mean and far from the failed mean (Figure 1). It differs from the standard difference of means (Marks and Tegmark, 2024; Rimsky et al., 2024; Arditi et al., 2024), which weights the two means equally and gives one direction for all inputs. Before any token is generated, we rotate the last hidden state of the question’s direct prompt once, so that it points along the task-solving direction and keeps its norm.

On LLaMA 3.1 8B, these directions raise mean accuracy from 46%46\% under the direct prompt to 85%85\% (CoT: 69%69\%), and on Qwen 2.5 7B from 52%52\% to 86%86\% (CoT: 77%77\%). They thus lead to the correct answer more often than the chains they are built from, with 19 generated tokens per question on average, about a tenth of the 197 that LLaMA 3.1 8B and the 245 that Qwen 2.5 7B generate under CoT. The model generates the answer within a few tokens where it can be read from the question, and works through short intermediate steps where it has to be computed. The directions also raise accuracy on tasks where CoT lowers it, such as Movie Recommendation and Ruin Names. They also recover the correct answer on most questions that the CoT and direct prompts both answer incorrectly.

An average of these directions over a task does not give the same result. It leaves mean accuracy at the level of the direct prompt, even on the questions it is built from, so each direction is specific to its own question. Overall, our findings show that for most questions, the representation space of the direct prompt holds a direction that leads the model to the correct answer, and that generating the chain is not the shortest route to it. The question–direction pairs we collect form a dataset which can be used for training a model to predict the direction from the direct prompt, and thereby to match or exceed CoT’s accuracy with a fraction of its tokens; we leave this to future work.