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.
Figures & tables
Figure 1: ProsQA-Ext task and reasoning performance. A shows an example ( H=8 ) with the correct path highlighted in green and distractor edges in gray. B shows the five model variants. C and D show free-generation accuracy on ID and OOD problems, respectively (error bars are SEM).
Figure 2: Representational alignment with forward graph propagation. A and B show RSA heatmaps for five variants on ID (4-hop) and OOD (8-hop) problems, respectively, using the same examples across variants. Each entry shows the Spearman correlation between pairwise model-representation dissimilarities and pairwise graph-frontier dissimilarities at depth d . For G=(V,E) with query root r , the propagation frontiers are defined by F0={r} and Fd+1={v∈V:∃u∈Fd,(u,v)∈E} . Gray hatched cells denote undefined correlations. Color scales are shared across rows within each variant. C shows diagonality across 3–12-hop problems, with colors indicating variants. The dashed line separates ID (3–6 hops) from OOD (7–12 hops).
Figure 3: Effects of candidate and successor degree on model predictions. A shows matched pairs that reverse the candidates’ relative in-degree while preserving the proof path and correct answer. B and C show the final-answer accuracy on problems with short and long reasoning depths. Solid and hatched bars indicate that the correct candidate has lower and higher in-degree, respectively. D shows matched pairs that switch which immediate successor of the query root leads to the correct candidate while preserving all node degrees and the correct final answer. E and F show final-answer accuracy for all five models and first-successor accuracy for CoT on problems with short and long reasoning depths. Solid and hatched bars indicate that the correct successor has a lower or higher in-degree minus out-degree, respectively. In schematics, (r) denotes the query root, (+) and (-) denote the correct and incorrect candidates, and green arrows indicate the proof path.
Figure 4: Controlled interventions probe the recurrent computation in latent reasoning models. A shows how swapping premises shifts the query root r ’s correct candidate from A to B . In B , the top row shows the normalized cosine distance between paired latent states for 8-hop problems with connectivity swaps at depth d , and the bottom row shows the fraction of pairs for which transplanting the latent state at step t redirects the answer to y′ . C shows OOD accuracy with one fewer ( K=5 ), the trained number ( K=6 ), or one additional ( K=7 ) thinking position. Shaded region indicates 95% CI.
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.
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.
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
Figure A.1: Representational alignment with forward graph propagation across task depths. RSA heatmaps for five model variants on 3 to 12-hop problems (rows), across ID (3–6 hops) and OOD (7–12 hops) conditions. Entries represent Spearman correlations between model-representation and frontier dissimilarities, as shown in Fig. 2 .
Figure A.2: Diagonality of alignment with parallel backward search. The same diagonality measure is applied to RSA against the joint backward frontier for all five model variants. The dashed line separates ID from OOD problems.
Figure A.3: Effect of hop perturbation on pruned circuit in Bottleneck-latent model.
Figure A.4: Head contributions during recurrence and answer readout. Individual interventions compare recurrent Q/K matching (left), candidate-value exchange (middle), and final answer readout (right) for L4H1, L4H2, and L4H4. Error bars indicate pointwise 95% bootstrap confidence intervals.