Chain-of-Thought Hidden States Reveal Task-Solving Directions for Direct Answers
Organizations: Heriot-Watt University, Edinburgh, United Kingdom · University of Edinburgh, Edinburgh, United Kingdom
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 to on LLaMA 3.1 8B (CoT: ) and from to on Qwen 2.5 7B (CoT: ), 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.
Figures & tables
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
| Template, shared across tasks | |
|---|---|
| User turn | Question: {question} Answer: |
| System, CoT | you are a step-by-step reasoner, finish the reasoning with Final Answer: #### ans |
| System, direct | Answer only with ans . Do not show steps. |
| Answer slot ans (CoT; direct) | |
| True/False | [True/False] ; True or False |
| Yes/No | [Yes/No] ; Yes or No |
| GSM8K | |
| Question | Ali had 100. How much does Ali have now? |
| Direct | 121 wrong |
| add 50. 50 = $71 correct | |
| CoT | Let’s break it down step by step: 1. Ali initially had 100, which is 50. … Final Answer: $71 correct |
CoT Reasoning
Chain-of-thought (CoT) reasoning studies how language models use intermediate steps, visible or latent, to solve multi-step tasks.
See all 244 papers