TL;DR
Researchers from FAIR at Meta and UC San Diego have introduced Coconut (Chain of Continuous Thought), a paradigm that allows Large Language Models (LLMs) to reason in their own continuous latent space rather than being forced to output natural language tokens. By feeding hidden states directly back into the model as input embeddings, Coconut enables a "breadth-first search" reasoning pattern that significantly improves planning efficiency and accuracy on complex logical tasks.
What Problem Does This Paper Address?
Current LLMs typically reason using Chain-of-Thought (CoT), where they generate a step-by-step solution in natural language. While effective, the authors argue that language space is suboptimal for "thinking."
First, natural language is optimized for communication, not necessarily for computation; many tokens in a CoT are just filler for fluency (e.g., "Therefore," "We can see that"). Second, CoT is fundamentally serial and greedy. Once a model decodes a specific word, it commits to a reasoning path. If that path is a dead end, the model often hallucinates or fails because it cannot easily backtrack or explore multiple possibilities simultaneously. This makes complex planning—tasks requiring search and look-ahead—extremely difficult for standard LLMs.
Methods
The core innovation is Coconut, which allows the model to switch between a "language mode" and a "latent mode."
- Continuous Thoughts: Instead of passing the last hidden state through the language model head to sample a token, Coconut takes that hidden state and feeds it directly back to the LLM as the next input embedding.
- Curriculum Training: To help the model learn this latent reasoning, the authors use a multi-stage training strategy. They start with a model trained on standard CoT. In each subsequent stage, they replace the first $k$ language reasoning steps with $k \times c$ "continuous thoughts" (where $c$ is a hyperparameter).
- Encapsulation: The latent reasoning process is wrapped in special
<bot>(beginning of thought) and<eot>(end of thought) tokens.
Datasets
The authors evaluated Coconut on three primary benchmarks:
- GSM8k: A standard dataset of grade-school math word problems.
- ProntoQA: A synthetic logical reasoning dataset.
- ProsQA (Proof with Search Question-Answering): A newly introduced benchmark designed to be more challenging than ProntoQA. It uses a Directed Acyclic Graph (DAG) structure for logical relationships, requiring the model to navigate multiple distracting branches and perform sophisticated planning to find the correct proof path.
Key Insights and Ideas
- Latent Breadth-First Search (BFS): The most striking finding is that reasoning in continuous space allows the model to maintain a "superposition" of multiple reasoning paths. Unlike discrete tokens, a single continuous vector can encode several alternative next steps. This allows the model to perform a latent BFS, exploring the search space before committing to a final answer in language.
- Postponing Commitment: In language space, models often fail because they commit to a specific (wrong) node early. In latent space, the model can refine its internal state across multiple "thoughts" without making a deterministic choice until it has more "certainty."
- Implicit Value Functions: By probing the latent states, the authors found that the model implicitly estimates the potential of different nodes to lead to the correct answer, effectively acting as a learned heuristic for search.
Key Results
- Superior Accuracy on Planning: On the challenging ProsQA dataset, Coconut (with $k=6$ latent steps) achieved 97.0% accuracy, vastly outperforming standard CoT, which struggled at 77.5%.
- Efficiency Gains: Coconut achieves these results while generating significantly fewer tokens. On ProsQA, it used only 14.2 tokens on average compared to 49.4 tokens for CoT.
- Better Trade-offs: The model shows a much better trade-off between accuracy and the number of generated tokens. While standard "internalization" methods (like iCoT) lose accuracy rapidly as steps are removed, Coconut maintains high performance by replacing those steps with latent compute.
Limitations and Future Work
- Training Complexity: Training Coconut requires multiple forward passes to generate the latent thoughts, which can be computationally expensive and harder to parallelize than standard training.
- Curriculum Dependence: Currently, the model requires a multi-stage curriculum starting from language-based CoT. The authors found that training latent reasoning from scratch (without language guidance) does not yet work well.
- Scaling to Pre-training: The experiments were conducted on GPT-2 and smaller Llama models. A major future direction is integrating latent reasoning into the large-scale pre-training phase of frontier models to see if these emergent search behaviors scale.
- Stability: Adding too many continuous thoughts at once during training can lead to loss spikes and instability, suggesting the need for even finer-grained training schedules.
Summary updated