Abstract
Recent empirical advancements in Large Language Models (LLMs) have introduced the concept of "Chain of Continuous Thought" (CCoT), where models reason through latent space representations rather than discrete text tokens. While models like COCONUT have demonstrated superior performance on complex reasoning tasks using this method, the theoretical justification for this advantage has remained elusive. This paper provides a formal framework for understanding CCoT through the lens of superposition. We demonstrate that continuous latent vectors allow a shallow transformer to perform parallel breadth-first searches (BFS), solving graph reachability problems in significantly fewer steps than the sequential search required by discrete Chain-of-Thought (CoT).
Introduction
Chain-of-Thought (CoT) prompting has become the standard for eliciting complex reasoning from LLMs. By generating intermediate steps, models can decompose difficult problems into manageable sub-tasks. Traditionally, these steps are expressed as discrete tokens. However, this "discrete bottleneck" forces the model to commit to a single reasoning path at each step, effectively collapsing the search space.
In contrast, continuous CoT maintains reasoning in the latent space. This paper investigates why these "fuzzy" latent vectors outperform precise words in tasks like graph reachability. We propose that the latent space allows for a "superposition of thoughts," enabling the model to explore multiple reasoning branches simultaneously.
The Graph Reachability Framework
To analyze the expressive power of CCoT, the authors focus on Directed Graph Reachability. In this task, a model is given a set of edges and must determine if a path exists between a root node and a target node. This serves as a fundamental proxy for multi-hop reasoning.
Theoretical Construction
The paper proves that a simple two-layer transformer is sufficient to solve graph reachability using continuous CoT through a specific functional construction:
- Layer 1 (Attention Chooser): This layer acts as a memory buffer. It identifies and copies edge information (source and target node pairs) into the model's internal representation.
- Layer 2 (Node Expansion): This layer performs the actual reasoning. It uses the current latent "thought" vector to attend to all edges whose source nodes are currently marked as reachable. It then aggregates their target nodes into the next latent vector.
Reasoning via Superposition
The core theoretical insight is the analogy to superposition. In discrete CoT, the model must sample a single token, which corresponds to picking one specific path in a graph. If that path is a dead end, the model must backtrack or fail.
Continuous CoT, however, represents the "frontier" of the search as a normalized sum of all reachable nodes at a given step $i$. Because the latent vector is not forced to collapse into a single token, it can encode the entire set of nodes reachable in $i$ hops. This allows the model to perform a parallel Breadth-First Search (BFS).
Efficiency Gains
For a graph with $n$ vertices and a diameter $D$, the efficiency gains are exponential:
- Continuous CoT: Requires only $D$ steps to determine reachability, as it expands the entire frontier at each step.
- Discrete CoT: For constant-depth transformers, the best-known construction requires $O(n^2)$ steps, as it must explore paths sequentially or simulate a complex traversal algorithm.
Empirical Validation
The authors validated this theory by training a 2-layer GPT-2 style model using the COCONUT framework on the ProsQA dataset—a synthetic benchmark for graph reasoning.
Key Findings
- Performance: The 2-layer CCoT model achieved near-perfect accuracy on graphs requiring 3–4 hops. In comparison, a much larger 12-layer model using discrete CoT struggled, reaching only ~83% accuracy.
- Emergent BFS: Interestingly, the model was not explicitly programmed to perform BFS. When trained on optimal path data, the superposition representation emerged naturally. The model learned that representing the entire reachable frontier was the most efficient way to minimize training loss.
- The Role of MLPs: The study highlights that Multi-Layer Perceptrons (MLPs) within the transformer act as signal filters. They zero out low-probability "noise" and equalize the weights of the frontier nodes, maintaining the integrity of the superposition across reasoning steps.
- Latent Proximity: Analysis of the latent vectors showed that the thought vector at step $i$ was mathematically closest (via inner product) to the embeddings of nodes exactly $i$ hops from the root, confirming the BFS-like expansion predicted by the theory.
Conclusion and Future Work
This work provides a robust theoretical foundation for the benefits of continuous reasoning. By treating latent vectors as superposition states, transformers can bypass the sequential limitations of discrete language.
While this study focuses on synthetic graph tasks, the implications for general AI are significant. Future research will focus on whether these superposition mechanisms emerge in more complex, natural language reasoning tasks—such as mathematical proofs or logical puzzles—where the search space is not as clearly defined as a graph. Additionally, providing a formal lower bound proof that discrete CoT cannot match the $O(D)$ efficiency of CCoT remains an important open theoretical challenge.
Summary updated