REVIEW 3 major objections 5 minor 18 references
Chain-of-Thought Shows the Path to a Tree: Realizing Branching Complexity
T0 review · 3 major / 5 minor · reviewed 2026-08-16 · deepseek-v4-flash
Pith's one-line read The paper claims that two-layer hard-attention Transformer decoders can simulate DFS and Dijkstra, and that reusing them computes the Strahler number of an $n$-vertex tree in $2n-1$ chain-of-thought steps and its width in $n-1$ steps…
desk verdict Novel explicit CoT constructions for DFS, Dijkstra, Strahler, and width, but the headline layer counts depend on bilinear attention outside the paper's own formal model. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The load-bearing mechanism is the traversal decoder used as a reusable computational substrate. The DFS decoder maintains a current vertex, a parent pointer, and a visited bitmask; one layer decides between traverse and backtrack, and two mutually exclusive attention heads resolve either the next unvisited neighbor or the parent. As it runs, each step writes a $U$ or $D$ symbol, which is exactly the Dyck path of the tree. The Strahler computation is folded into the same traversal by carrying a pair $(M,c)$, the maximum Strahler value among finished children and the number of children attaining it, updated on backtrack steps by the recurrence $M' = \max(\mathrm{st}(v), M_u) + \mathbf{1}[D=0]\mathbf{1}[c_u>0]$ together with the analogous count update. The width computation augments the Dijkstra/BFS decoder with a level-change scalar, a running level count, and a global maximum, so each BFS level's node count is committed when the depth increases.
What would settle it
Run the claimed four-layer construction on a concrete tree, for example a root with two leaf children, whose Strahler number is 1, using only the formal decoder from Section 3 with linear query and key projections and no bilinear attention; if no parameter assignment yields the prescribed $2n-1$ steps ending with $\pi_M(y_{2n-1})=1$, then the bilinearity assumption is load-bearing and the central claim fails as stated.
Extended reading notes
Core claim
The paper's central claim is that unique hard-attention Transformer decoders—attention that commits to the earliest index attaining the maximum score—can execute real graph traversal in bounded depth. A two-layer, two-head decoder simulates depth-first search on any simple directed graph in $O(|V|+|E|)$ chain-of-thought steps, and a two-layer, one-head decoder simulates Dijkstra's algorithm in exactly $|V|-1$ steps. Reusing these decoders, a four-layer, two-head decoder computes the Strahler number of an $n$-vertex tree in $2n-1$ steps, and a three-layer, one-head decoder computes its width in $n-1$ steps. Because computing the Strahler number of a binary tree is $\mathsf{NC}^1$-complete and the constructions handle arbitrary ordered trees with no layer normalization or positional encodings, the paper presents them as the first explicit witnesses for the linear-step regime of the CoT hierarchy at a known complexity boundary. On the Dyck-path side, a four-layer, one-head decoder computes the Strahler number of the tree represented by the word and a two-layer, one-head decoder computes its width, with the DFS construction itself emitting the path as it traverses.
Load-bearing premise
The construction treats bilinear maps as acceptable operations inside attention queries, although the formal decoder in Section 3 scores attention with a linear query projection; if bilinearity is disallowed, the stated layer counts, and with them the claim that these are standard Transformer decoders, do not follow.
Editorial extensions
If this is right
- Any graph algorithm whose state is captured by the DFS or Dijkstra dynamics now has an explicit constant-depth CoT realization, not merely an existence proof via rank bounds.
- Strahler number and tree width become CoT-computable in a linear number of steps with layer count independent of input size, giving the linear-step regime of the CoT hierarchy concrete inhabitants.
- Because the DFS decoder both traverses the tree and records $U$/$D$ symbols, the classical ordered-tree-to-Dyck-path bijection is realized inside the decoder and can be reused as a subroutine.
- The Dijkstra construction replaces the $O(n^2)$ comparison-based minimum search with a single attention selection, so it runs in exactly $n-1$ CoT steps.
- The independent path-side constructions show that transferring the two measures across the bijection requires different mechanisms and layer counts, leaving composition of CoT realizations as a genuinely open question.
Reading between the lines
- If bilinear queries were forbidden, the natural repair is to re-express each construction with standard feed-forward blocks and measure the resulting layer increase; the paper itself notes that such a replacement may change layer counts in several cases.
- The layer counts on the two sides of the bijection (four versus four for Strahler, three versus two for width) suggest that CoT depth is not invariant under bijective changes of representation, so closure under bijection is likely false for small constant depths.
- A testable extension is to train small hard-attention decoders on the recurrences in Theorems 8 and 16 and compare learned step counts and internal registers with the hand-built weights; agreement would carry these existence proofs toward practical chain-of-thought behavior.
- Another consequence of the construction is that any future proof of CoT closure under composition would immediately yield the composite tree-to-path-to-measure pipelines that the paper explicitly avoids building.
Signed reviews
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper gives explicit chain-of-thought (CoT) constructions in which unique hard-attention Transformer decoders simulate graph traversals and compute tree branching measures. The headline claims are: a two-layer, two-head decoder simulates depth-first search; a two-layer, single-head decoder simulates Dijkstra (and thus BFS); reusing the DFS decoder computes the Strahler number of an n-vertex ordered tree in 2n−1 steps with four layers; reusing the Dijkstra decoder computes tree width in n−1 steps with three layers; and independent constructions on Dyck paths compute the same two measures in n steps with two and four layers. The proofs are carried out with explicit embedding blocks, selectors, and parameter assignments in the appendices, and the paper positions the results as concrete witnesses for the linear-step regime of the CoT hierarchy on a problem known to be NC^1-complete.
Significance. If the constructions were fully realized within the architecture defined in the paper, this would be a welcome concrete complement to the class-level CoT characterizations of Merrill and Sabharwal and Barceló et al., and the explicit matrix-level construction style is a genuine strength. The paper also demonstrates that such constructions can avoid layer normalization and positional encodings, which is a useful data point. However, the exact layer counts and the claim that these are standard Transformer decoders currently depend on bilinear attention queries and quadratic FFN features that are not part of the formal architecture in Section 3. The manuscript itself concedes that replacing those operations could change the layer counts. Because the quantitative claims are the central contribution, this architectural gap must be resolved, and the path-side Strahler construction also needs completion, before the paper can be accepted.
major comments (3)
- [§3; App. D, E, G; §4.2; Limitations] The load-bearing architectural mismatch flagged in the stress test is real. Section 3 defines attention scores as ⟨Kx_i, Qx_{m−1}⟩ with linear matrices Q and K, and defines the FFN as W2 ReLU(W1 x). In the proofs, however, several attention queries are implemented as bilinear maps: in Appendix D, Q_T^(2) y_t^(1) = (1−πvis(y_t^(1)))⊙πnbr(y_t^(1)); in Appendix E, Q^(2) y_t^(1) = (1−πvis)⊙(λ−πdis); in Appendix G, the backtrack query in Theorem 8 is (1−πflg1)·[πpar∥πflg3]. These coordinate-wise products of blocks of one token cannot be written as Qy for a fixed linear matrix Q. The same issue appears inside the FFN in Appendix F, where W1 is asserted to produce the quadratic feature β^T M^(a,b)β. This is not cosmetic: the exact layer counts 2, 3, and 4, and the claim that these are standard Transformer decoders, rest on these primitives. The paper itself concedes in Section 4.2 and in the Limitations that replacing the bilinear maps with FFN blocks "would, in several cases where merging independent operations is infeasible, alter the required number of layers." To make the headline claims follow, the authors need either (i) an elimination lemma showing that each bilinear query and quadratic FFN feature used here can be implemented by the Section 3 architecture with no increase in layer count, or (ii) an explicit redefinition of the architecture that admits such primitives, with the abstract and all theorems revised accordingly.
- [Theorem 11; Limitations] Theorem 11 is stated as computing st(ψ(w)) for a Dyck word w in exactly n CoT steps, but the construction terminates with the values πM(yn) and πc(yn), and the final answer is obtained by the external operation πM(yn)+1[πc(yn)≥2]. The Limitations explicitly acknowledge that this closing operation "sits marginally outside the CoT iteration." Under Definition 3.1, a decoder realizes an algorithm via CoT only if the output coordinates equal the encoded state at every step, including the final one, with no post-processing. As written, Theorem 11 therefore does not realize st under the paper's own definition. The authors should either extend the recurrence so that the n-th generated token already contains st, or restate the theorem as computing (M,c) with a one-step post-processing and correspondingly adjust the step-count claims.
- [Appendix G (Theorem 11)] The proof of Theorem 11 is not complete at the level of the other theorems. The main text states that the proof "is only outlined in Appendix G," and the appendix indeed stops after specifying the first two layers and part of the final layer, deferring the remaining construction to "analogous to that of Theorem 8" and to the unproved Observation 3. Since Theorem 11 is one of the two independent Dyck-path constructions promised in the abstract, the missing explicit parameter assignments and the missing induction invariant for layers 2–4 are load-bearing; without them, the path-side Strahler result is not checkable. Please provide the full construction and a complete correctness proof.
minor comments (5)
- [Appendix H, proof of Theorem 16] The selector πpos is defined twice with different types: once as the one-hot position block in R^n and once as the width scalar in R; rename one of these selectors to avoid ambiguity.
- [Appendix H, proof of Theorem 16] The first sentence says the t-th decoding step "records the width ht(ψ(w)) of the partial tree," which mixes width and height; the intended quantity should be stated consistently as either height or width.
- [Section 2.1] There is a typographical error: "diagraph" should be "digraph".
- [Figure 2 caption] The caption refers to coordinate pairs such as (11,3), (12,4), (13,3) and to the region between (10,2) and (16,2) without defining the coordinate system; clarifying the axes would make the figure usable.
- [Theorems 5 and 8] For an n-vertex tree, Theorem 5's DFS simulation uses 2(n−1) moves, while Theorem 8 claims exactly 2n−1 steps; the proof mentions a final backtrack to the null vertex, but this extra synthetic step should be defined explicitly in the theorem statement so the step budgets are directly comparable.
Circularity Check
No significant circularity: the CoT constructions are derived from explicit algorithmic recurrences, and no fitted value or self-citation is repackaged as a prediction.
full rationale
Strand-by-strand check: (i) The DFS construction (Theorem 5) is built directly from the recurrence (1); the decoder heads implement the traverse/backtrack cases, and the step count O(|V|+|E|) is the length of the algorithmic process, not a fitted quantity. (ii) The Dijkstra construction (Theorem 6) is built from the relaxation and argmin dynamics of Section 2.1, with exactly n-1 steps because exactly one vertex becomes visited per step; nothing is fitted to the target distances. (iii) The Strahler-number construction (Theorem 8) implements Observation 2's recurrence (2) inside the DFS decoder, with explicit W1, W2, Q, K, V matrices and a stated inductive invariant; the output pi_M(y_{2n-1}) = st(G_T) follows from that invariant, not from assuming the answer. (iv) The tree-to-Dyck-path transfer (Algorithm 1 / Theorem 7, Theorems 11 and 16) is justified by Lemma 1 and Propositions 2-3, which are proven from the DFS dynamics and the definitions of height, width, and Strahler number. These are mathematical reductions, not renamed empirical regularities. (v) The only self-citation, Dutta et al. (2025), appears in Appendix C as general grounding for CoT realization and is not cited as a premise in any theorem proof, so it is not load-bearing. The bilinear-map caveat stated in Sections 4 and Limitations is an admitted architectural gap: the constructions use bilinear queries outside the linear Q,K formalism of Section 3, and replacing them with FFNs might change layer counts. That is a correctness or rigor concern, not circularity, because the constructions are not defined in terms of the quantities they claim to predict. Similarly, the acknowledged off-cycle closing operation M+1[c>=2] in Theorem 11 is an incompleteness note, not an input-output circular step. Overall, the paper's derivations are self-contained and parameter-free against its own stated definitions, so the circularity score is 0.
Assumptions & free parameters
assumptions (4)
- domain assumption Unique hard attention with exact real arithmetic is a valid computational model for Transformers.
- ad hoc to paper Bilinear maps are admissible as components of the attention query and feed-forward blocks.
- domain assumption The Strahler number of a binary tree given as a term is NC^1-complete (Ganardi and Lohrey, 2026; cited).
- domain assumption The Merrill-Sabharwal CoT hierarchy associates linear CoT steps with NC^1.
Cite this review
Pith. "Pith review of Chain-of-Thought Shows the Path to a Tree: Realizing Branching Complexity." pith.science (2026). https://pith.science/paper/CBYCBP2H
@misc{pith2026260811716,
author = {Pith},
title = {Pith review of: Chain-of-Thought Shows the Path to a Tree: Realizing Branching Complexity},
year = {2026},
howpublished = {\url{https://pith.science/paper/CBYCBP2H}},
note = {Machine review of arXiv:2608.11716}
}
abstract
Chain of Thought (CoT) lifts the expressive ceiling of bounded-depth Transformers, with characterizations tying the number of CoT steps to circuit complexity classes. What remains largely missing are concrete instantiations with explicit, depth-bounded constructions, and the traversal procedures such characterizations presuppose. We close this gap for branching complexity. We give CoT realizations of depth-first search (DFS) and of Dijkstra algorithm, the latter subsuming breadth-first search, by unique hard-attention decoders of at most two layers, and use them as a shared computational substrate: reusing the DFS decoder yields the Strahler number of an $n$-vertex tree in $2n-1$ steps with four layers, and reusing the Dijkstra decoder yields its width in $n-1$ steps with three. Since computing the Strahler number of a binary tree given as a term is \textsf{NC\textsuperscript{1}}-complete, and our constructions handle arbitrary $n$-ary trees without layer normalization or positional encodings, this is a non-trivial witness for the linear-step regime of the CoT hierarchy. Exploiting the classical bijection between ordered trees and Dyck paths, itself realized by our DFS construction, which emits the path as it traverses, we give independent constructions for both measures on the path representation.
Figures
Reference graph
Works this paper leans on
-
[1]
Lemma 4.Let U be a vector space and letU′,U′′ be vector spaces withW=U ′⊕U′′
+βB(v,c 2). Lemma 4.Let U be a vector space and letU′,U′′ be vector spaces withW=U ′⊕U′′. LetB1 :U×U→U ′ and B2 :U×U→U ′′ be bilinear maps, and defineB:U×U→Wby B(v,w) = B1(v,w) B2(v,w) . ThenBis bilinear. Proof.We verify linearity in the first argument; the second is identical. Letv,˜v,w∈Uand letcbe a scalar. By the bilinearity ofB 1 andB 2 in their first...
work page 2023
-
[4]
On (Simple) Decision Tree Rank. In41st IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science (FSTTCS 2021), volume 213 ofLeibniz International Proceedings in Informatics (LIPIcs), pages 15:1–15:16, Dagstuhl, Germany. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. Artur Back De Luca and Kimon Fountoulakis
work page 2021
-
[5]
In International Conference on Machine Learning, pages 2319–2363
Simulation of Graph Algorithms with Looped Transformers. In International Conference on Machine Learning, pages 2319–2363. PMLR. Reinhard Diestel. 2017.Graph Theory, 5 edition, volume 173 ofGraduate Texts in Mathematics. Springer, Heidelberg. E. W. Dijkstra. 1959.A Note on Two Problems in Connexion with Graphs, 1 edition, page 287–290. Association for Com...
work page 2017
-
[9]
Yanghao Li, Naiyan Wang, Jiaying Liu, and Xiaodi Hou
A Theory of Learning with Autoregressive Chain of Thought.arXiv preprint arXiv:2503.07932. Yanghao Li, Naiyan Wang, Jiaying Liu, and Xiaodi Hou
-
[12]
InInternational Conference on Learning Representations, volume 2025, pages 6286–6309
Ask, and it shall be given: On the turing completeness of prompting. InInternational Conference on Learning Representations, volume 2025, pages 6286–6309. Michael Rizvi-Martel, Maude Lizaire, Clara Lacroce, and Guillaume Rabusseau
work page 2025
-
[14]
InThe Fourteenth International Conference on Learning Representations
Emergence of Superposition: Unveiling the Training Dynamics of Chain of Continuous Thought. InThe Fourteenth International Conference on Learning Representations. A Related Works A substantial body of work delineates what Transformers can compute in a single forward pass, for encoders (Hahn, 2020; Pérez et al., 2021; Weiss et al., 2021; Hao et al., 2022; ...
work page 2020
-
[15]
and decoders alike (Pérez et al., 2021; Merrill and Sabharwal, 2024; Peng et al., 2024; Barceló et al., 2025), surveyed by Strobl et al. (2024). The recurring conclusion is a ceiling: unique and generalized hard-attention encoders recognize only languages inAC 0 (Hao et al., 2022), which already excludes the Dyck languages. Later work sharpens the picture...
work page 2024
-
[16]
and depth hierarchies (Merrill and Sabharwal, 2026). As such, it is fair to say that we work in the most restrictive of these regimes (unique hard attention, no layer normalization) and the expressive power we exhibit is attributable to CoT alone. Building on Pérez et al.’s result that hard-attention decoders with unboundedly many steps compute any decida...
work page 2024
Show all 18 references
-
[17]
While these characterize classes, concrete problems instantiating them remain scarce
and continuous thought (Zhu et al., 2026). While these characterize classes, concrete problems instantiating them remain scarce. In this context, we reiterate Barceló et al.’s contribution in showing that the EH rank is exactly the minimum number of CoT steps for a single-laye...
2024
-
[1087]
1974.The Design and Analysis of Computer Algorithms
Alfred V Aho and John E Hopcroft. 1974.The Design and Analysis of Computer Algorithms. Pearson Education India. Noga Alon, Alon Gonen, Elad Hazan, and Shay Moran
1974
-
[1979]
Philippe Flajolet and Robert Sedgewick
The Number of Registers Required for Evaluating Arithmetic Expressions.Theoretical Computer Science, 9(1):99–125. Philippe Flajolet and Robert Sedgewick. 2009.Analytic Combinatorics. Cambridge University Press, Cambridge. Jean-François Le Gall
2009
-
[2017]
In 2017 IEEE International Conference on Computer Vision (ICCV), pages 2098–2106
Factorized Bilinear Models for Image Recognition. In 2017 IEEE International Conference on Computer Vision (ICCV), pages 2098–2106. Zhiyuan Li, Hong Liu, Denny Zhou, and Tengyu Ma
2017
-
[2019]
Jorge Pérez, Pablo Barceló, and Javier Marinkovic
On the Turing Completeness of Modern Neural Network Architectures.arXiv preprint arXiv:1901.03429. Jorge Pérez, Pablo Barceló, and Javier Marinkovic
1901 arXiv
-
[2021]
InProceedings of the 53rd Annual ACM SIGACT Symposium on Theory of Computing, STOC 2021, page 481–489, New York, NY , USA
Boosting simple learners. InProceedings of the 53rd Annual ACM SIGACT Symposium on Theory of Computing, STOC 2021, page 481–489, New York, NY , USA. Association for Computing Machinery. Pablo Barceló, Alexander Kozachinskiy, Anthony Widjaja Lin, and Vladimir Podolskii
2021
-
[2023]
Association for Computational Linguistics
Do Transformers Parse while Predicting the Masked Word? InProceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 16513–16542. Association for Computational Linguistics. Hanlin Zhu, Shibo Hao, Zhiting Hu, Jiantao Jiao, Stuart Russell, and ...
2023
-
[2024]
Louigi Addario-Berry, Luc Devroye, and Svante Janson
Refined Horton-Strahler numbers I: a discrete bijection.Preprint, arXiv:2406.03025. Louigi Addario-Berry, Luc Devroye, and Svante Janson
-
[2025]
Steven Neil Evans
On the Existence of Universal Simulators of Attention.arXiv preprint arXiv:2506.18739. Steven Neil Evans. 2008.Probability and Real Trees: École D’Été de Probabilités de Saint-Flour XXXV-2005. Springer. P. Flajolet, J.C. Raoult, and J. Vuillemin
2008 arXiv
-
[2026]
In43rd International Symposium on Theoretical Aspects of Computer Science, STACS 2026, Grenoble, France, March 9-13, 2026, LIPIcs, pages 41:1–41:22
On the Complexity of Computing Strahler Numbers. In43rd International Symposium on Theoretical Aspects of Computer Science, STACS 2026, Grenoble, France, March 9-13, 2026, LIPIcs, pages 41:1–41:22. Schloss Dagstuhl - Leibniz-Zentrum für Informatik. Yang Gao, Oscar Beijbom, Nin...
2026
Reviewed August 16, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.