What the paper is about
Large Language Models can perform multi-step reasoning and improve task performance through different forms of intermediate computation, from token-based traces to computation carried out in latent space. However, a question remains open: do these different forms of thinking rely on the same underlying mechanism? To address this, we train and compare five variants of the same GPTNeoX backbone from scratch on an extended multi-hop reasoning task (ProsQA-Ext): a vanilla model, a Chain-of-Thought (CoT) model, a Pause Token model, and two latent-reasoning models that are optimized end-to-end without intermediate reasoning traces. We find that, strong in-distribution (ID) performance does not guarantee depth generalization. Vanilla, CoT, and Pause Token models solve ID problems well, but rely largely on local graph features and generalize poorly to out-of-distribution (OOD) problems with longer hops. In contrast, latent variants generalize better and show internal dynamics consistent with forward reachability propagation on the graph. Causal interventions and circuit analysis localize this computation to a sparse recurrent search circuit in the bottleneck latent model: an attention head retrieves graph relations, an MLP and the residual stream update the reachability state across recurrent steps, while multiple attention heads together then do the candidate matching. Together, these results show that different thinking mechanisms can learn distinct computational solutions, even at similar ID performance. In this setting, latent recurrence supports a reusable forward-search algorithm that generalizes beyond the training depth. The robotics story also surfaces in NVIDIA Launches Cosmos 3 Edge for..., adding another angle.
What it covers
Not All Thinking is Created Equal: Latent Reasoning Discovers a Recurrent Search Algorithm for Depth Generalization Huzi Cheng Affiliation: University of Minnesota Email: [email protected] Zhewei Zhang Affiliation: Independent Researcher Email: [email protected] Abstract Large Language Models can perform multi-step reasoning and improve task performance through different forms of intermediate computation, from token-based traces to computation carried out in latent space. However, a question remains open: do these different forms of thinking rely on the same underlying mechanism? To address this, we train and compare five variants of the same GPTNeoX backbone from scratch on an extended multi-hop reasoning task (ProsQA-Ext): a vanilla model, a Chain-of-Thought (CoT) model, a Pause Token model, and two latent-reasoning models that are optimized end-to-end without intermediate reasoning traces. We find that, strong in-distribution (ID) performance does not guarantee depth generalization. Vanilla, CoT, and Pause Token models solve ID problems well, but rely largely on local graph features and generalize poorly to out-of-distribution (OOD) problems with longer hops. In contrast, latent variants generalize better and show internal dynamics consistent with forward reachability propagation on the graph. Causal interventions and circuit analysis localize this computation to a sparse recurrent search circuit in the bottleneck latent model: an attention head retrieves graph relations, an MLP and the residual stream update the reachability state across recurrent steps, while multiple attention heads together then do the candidate matching. Together, these results show that different thinking mechanisms can learn distinct computational solutions, even at similar ID performance. In this setting, latent recurrence supports a reusable forward-search algorithm that generalizes beyond the training depth. 1 Introduction Prepending “Let’s think step by step” to a prompt can improve pretrained language models’ performance on reasoning tasks ( Kojima et al., 2022 ; Wei et al., 2022 ) . Models that fail to answer directly can sometimes solve the same question by first generating intermediate steps. More recently, this approach has been successfully scaled by baking the reasoning traces into the training rather than prompting ( Chung et al., 2024 ; Ho et al., 2023 ; Magister et al., 2023 ) , which enables smaller models to solve problems where CoT prompting alone is ineffective. However, whether a model actually follows the reasoning traces it generates remains debated. Part of the reasoning traces can be replaced or removed without hurting the final answer ( Lanham et al., 2023 ; Zhao et al., 2026 ) . Models can also benefit from intermediate steps using meaningless filler or pause tokens ( Pfau et al., 2024 ; Goyal et al., 2024 ) . Together, these findings suggest that useful intermediate computation need not be realized as a verbally meaningful reasoning trace. Coconut ( Hao et al., 2025 ) and related works have demonstrated alternative ways to perform such computation by feeding high-dimensional vectors, instead of tokens, directly into the model ( Wei et al., 2025 ) . The mechanisms underlying this latent computation remain poorly understood. Symbolic reasoning tasks were widely used to probe the circuits and computation inside language models ( Wu et al., 2025 ; Brinkmann et al., 2024 ) . Zhu et al. (2025) showed that latent thoughts theoretically can encode multiple search frontiers in superposition and enable parallel search. However, recent work finds that similar patterns also arise in models without recurrence and do not always causally affect the answer ( Aswal et al., 2026 ; Rizvi-Martel et al., 2026 ) , leaving its causal role contested. More broadly, it remains unclear how the learned computation differs across thinking interfaces, and what mechanisms support generalization beyond the training distribution. To investigate this question, we focus on five model variants: a vanilla model, a CoT model, a Pause Token model, and two latent-reasoning models based on Coconut. One full-latent model retains access to all previous tokens, while the other bottleneck-latent model can only rely on the intermediate hidden representations when generating answers. We train these five models on an extended version of the well-established ProsQA task. Notably, the latent variants are trained without intermediate reasoning traces and RL, allowing us to examine whether latent reasoning can discover a generalizable reasoning mechanism without being shown how to solve the task step by step and without slow trial-and-error process. By testing these models on out-of-distribution (OOD) problems, we find that strong performance within the training range does not guarantee depth generalization, with the latent variants performing best on OOD problems. The strong generalization, together with the lack of shortcut effects in the latent models, indicates that they learn to reason rather than use surface heuristics. Further causal interventions in the bottleneck-latent model show that intermediate states carry intermediate variables during forward search that are reused and transformed across recurrent steps. We localize this computation to a sparse search circuit in which an attention head retrieves graph relations and an MLP, together with the residual stream, update the state for subsequent steps, and finally multiple attention heads read this information for candidate matching. These findings show that different forms of thinking can learn very different computational solutions, even at similar performance. Importantly, latent recurrence supports better discovery of a reusable computation that generalizes beyond the training depth. 2 Methods 2.1 Task A signature of a model that understands rules and can reason with them is that it learns from small scale datasets and generalizes to unseen, more complex problems. In natural language problems, multi-hop symbolic reasoning, such as extended syllogisms, is a good candidate for such datasets: the level of difficulty, i.e., the number of hops, can be controlled, and the symbols used can be permuted without changing the meaning. In this study, adapted from ProsQA by Hao et al. (2025) , we construct such a task, ProsQA-Ext. As shown in Fig. 1 A, each ProsQA-Ext sample ( x , y ) ∈ 𝒟 (x,y)\in\mathcal{D} describes a directed acyclic graph (DAG) G = ( V , E ) G=(V,E) and a question about G G . The graph description g g is a token sequence of premises of the form A is B. , each representing a directed edge from A to B. The query q q gives a root node r ∈ V r\in V and two candidate nodes c 0 , c 1 ∈ V c_{0},c_{1}\in V . Together, they form the complete input x = g | q x=g|q . Exactly one candidate is reachable from r r , at a shortest distance of H H ; the other is either an isolated node or lies on a chain whose root is not r r . We denote the reachable candidate by c ∗ c^{} and the reference answer-token sequence by y y , which states that r r is c ∗ c^{} . At a fixed H H , node labels, premise order, and candidate positions are randomly sampled, yielding varied graph structures and inputs x x , while the underlying reachability operation f f remains unchanged. Unlike ProsQA, we carefully control the generation of G G so that no superficial features can be exploited to infer c ∗ c^{} ( ≈ 50 % \approx 50% accuracy), and we use two separate datasets: a training set with H ∈ { 3 , … , 6 } H\in{3,\ldots,6} and a validation set with H ∈ { 7 , … , 12 } H\in{7,\ldots,12} . 2.2 Models We train five model variants on the same ProsQA-Ext dataset with the same tokenizer to examine how different forms of thinking address the symbolic reasoning problem. All variants use the same GPTNeoX backbone (number of layers=4, hidden size=256, dimensionality of FFN=768). Unlike Hao et al. (2025) , all models are trained from random initialization, ensuring their knowledge of the task comes completely through training, rather than possibly inherited from pretraining. The variants differ in their intermediate computation and answer readout (Fig. 1 B). For all models, we denote the residual state at token position i i after block ℓ \ell by h i ( ℓ ) h_{i}^{(\ell)} , and denote ℓ = 0 \ell=0 as the input to the first block. During prompt encoding, the token embedding E θ E_{\theta} supplies h i ( 0 ) = E θ ( x i ) h_{i}^{(0)}=E_{\theta}(x_{i}) . After the final block, a final LayerNorm N θ N_{\theta} and an output projection map h i ( L ) h_{i}^{(L)} to next-token logits. After the input x x , the Direct variant generates the answer directly. The Chain-of-Thought variant first generates a proof and then the answer. Its training is supervised by both the shortest proofs (a sequence of premises forming the shortest path from r r to c ∗ c^{} ) and final answers. In the Pause-token variant, before answer decoding, the model “thinks” by inserting K=6 identical learnable embeddings, z t = E θ ( ) z_{t}=E_{\theta}(\texttt{}) . The two latent variants, Full-latent and Bottleneck-latent , in their “thinking” process, instead, feed the normalized output of one step directly into the next, instead of decoding it into a token. This process can be described with z 1 = N θ ( h n ( L ) ) , z t + 1 = N θ ( h n + t ( L ) ) , 1 ≤ t 0.8 R^{2}>0.8 for the candidate logit margin. This procedure (see A.6 ) greedily continues until no further component can be removed (Fig. 5 A), leading to an 8-component sparse circuit (Fig. 5 B) that preserves 91.9% output consistency and an R 2 R^{2} of 0.837 0.837 . We next run the pruned circuit on other 7 to 12-hop samples that are not involved in pruning. The circuit retains 90.9% output consistency with the full model, above the 52.7% when these eight components are removed and 55.8% when a random size-matched subset is retained instead (Fig. 5 C). Figure 5: Localization of the recurrent circuit in Bottleneck-latent . Replacement based pruning ( A ) retains eight of twenty recurrent components ( B ). The selected circuit largely preserves candidate choices ( C ) and causal state-transfer effects ( D ), whereas removing it or retaining random size-matched components does not. Error bars indicate pointwise 95% bootstrap confidence intervals over base graphs; the gray band shows the 10th–90th percentiles across twenty random circuits. To test whether the selected circuit preserves the causal recurrent mechanism in Bottleneck-latent , we repeat the latent-state transplantation. On separate 8-hop pairs with a connectivity swap at depth 4, we measure the increase in counterfactual-answer choices relative to each condition’s own baseline. The selected circuit retains a similar step-dependent transfer profile of the full model, with a peak increase of 63.9% versus 69.9%. In contrast, this effect is largely absent when the circuit is replaced by a random size-matched subset (Fig. 5 D). In addition, the results remain stable across 7-12 hops (Fig. A.3 ). Together, our selected circuit preserves not only the model’s output, but also the causal state-transfer mechanism identified above. 3.3.3 A recurrent search algorithm inside the sparse circuit With the pruned circuit narrowing the recurrent computation to a 8 components, we next examine the specific role of each during recurrent computation. Among them, two components are particularly interesting. Attention head 1 in layer 4 (L4H1) separates how premise sources and destinations are transmitted. The corresponding MLP (L4MLP) helps propagate the retrieved information into subsequent recurrent states. For a premise A is B. , A and B are referred to as the left-hand side (LHS) and the right-hand side (RHS), respectively. Using the same constructions above, we create the same candidate-switching interventions by either swapping the LHS or the RHS at the same premise location (Fig. 6 A). By replacing the actual cache with the swapped one, this matched-pair swap isolates whether the influence propagates through the RHS K-cache or the V-cache. We first characterize how attention reads graph premises. We find that, in L4H1, LHS swaps affect the answer mainly through keys, whereas RHS swaps affect mainly through values (Fig. 6 B). To check if this division persists across different steps, we measure the similarity between the attention distribution before and after transplant using Jensen-Shannon distance, and find that these distributions are highly consistent ( ≈ 1 \approx 1 , Fig. 6 C). These results suggest an ’address–content’ organization in L4H1: keys determine which nodes are linked, while values supply the destination node information. Figure 6: Functional analysis of the recurrent circuit in Bottleneck-latent . A illustrates the LHS and RHS swaps. Interventions within the pruned circuit distinguish L4H1’s key/value routing ( B ), query-dependent selection of reading depth ( C ), and component contributions to the next query and final answer ( D ). Fixing or transplanting the L4 MLP response ( E ) separates its contribution from the residual pathway. F tests candidate matching through Q/K interventions in L4H1/H2/H4. Error bars indicate pointwise 95% bootstrap confidence intervals. Then, we examine how MLP layers contribute to the computation. Instead of changing the structure of G G , we swap the query root node r r in matched chains used by Fig. 4 , and measure how each component shifts the next query and the final answer in each transition (Fig. 6 D). The L4MLP along with L4H1 show persistent influence on both, suggesting that they work together and change the query direction to further influence the next recurrent step. To isolate the contribution of L4MLP, we select the recurrent update z 2 → z 3 z_{2}\to z_{3} , use the swapped L4H1 and measure how L4MLP influences the downstream targets from next query to final answers under different interventions. With L4H1’s output changed, we find recomputing L4MLP shifts all downstream targets to the swapped direction, compared with a frozen L4MLP (Fig. 6 E). However, this effect is not additive (single L4MLP change barely shifts the direction) and relies on the residual stream (shifts exist even the MLP is fixed, though the magnitude is much lower). This shows that, L4MLP, they works by the whole residual stream, act as a “filter”, to select information for the next round’s operation. We next ask how the evolving z t z_{t} becomes evidence for answer candidate c ∗ c^{} , given an r r . Candidate positions in x x carry graph conditioned representations that recurrent attention can read (during reasoning phase). Using the sparse pruned circuit above, we keep the original question intact and test two types of changes with L4H1/H2/H4 during z t → z t + 1 z_{t}\to z_{t+1} . In the first change case, we replace the query with the Q from same step’s update of a separate run starting from the other chain’s root. For example, if the original graph contains r ↝ A r\leadsto A and s ↝ B s\leadsto B , we replace Q r , t Q_{r,t} with Q s , t Q_{s,t} , while the original question still asks about r r . In the second condition, we use candidate keys obtained from a graph with exchanged candidate endpoints: r ↝ B r\leadsto B and s ↝ A s\leadsto A , while keeping the question and its candidate positions unchanged. Either change alone reduce the c ∗ c^{} logit margin, while applying both changes together can restore it. This suggests the candidate evidence depends on a match between the current recurrent state and the candidates’ graph context. Among the retained L4 Hs, H1 shows the strongest recurrent Q/K matching effects, whereas H2 shows the largest accuracy loss under candidate value exchange and the greatest logit margin recovery at final readout phase. Together, these results reveal how a recurrent search algorithm is implemented in the Bottleneck-latent : the z t z_{t} maintains currently reachable node in G G ; attention head L4H1 works as a soft tracer and uses premise LHSs to retrieve their RHSs to expand the reachable set; and L4 MLP, together with the residual pathway, then incorporates the retrived information back to z t + 1 z_{t+1} , guiding the next round of seaching. The candidate reading pathways in L4H1/H2/H4 also connect this evolving state to answer evidence. The Q/K matching controls the candidate information written into the latent z t z_{t} , from which the final answer is decoded. These processes can operate in parallel, which allows the Bottleneck-latent to build a faster reachability search than strict step-by-step traversal as we have seen in 7 to 12 hop problems. 4 Conclusion We ask whether models under different forms of thinking develop mechanistically distinct solutions, or converge on the same solutions through different ways. We train five GPT-like variants with the same backbone on an extended ProsQA task The robotics story also surfaces in NYC schools plan to ban student-facing..., adding another angle. as detailed in the full paper on Arxiv The robotics story also surfaces in MIT Researchers Develop Method to Make..., adding another angle.
Comments (0)
to join the discussion
No comments yet
Be the first to share your thoughts!