Chain-of-Thought Shows the Path to a Tree: Realizing Branching Complexity

📅 2026-08-12
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the absence of explicit, depth-bounded mechanisms for constructing and traversing chain-of-thought (CoT) reasoning in problems with branching complexity. The authors propose a novel hard-attention Transformer decoder limited to at most two layers, which operates without layer normalization or positional encodings and, for the first time, enables linear-step CoT construction applicable to arbitrary n-ary trees. By leveraging the bijective correspondence between trees and Dyck paths, the architecture unifies depth-first search and Dijkstra’s algorithm under a shared computational basis: it computes the Strahler number of an n-node tree in 2n−1 steps using a four-layer structure, and its width in n−1 steps via a three-layer structure. Both metrics are independently reproduced on path representations, providing non-trivial evidence for linear-step mechanisms in CoT reasoning.
📝 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.
Problem

Research questions and friction points this paper is trying to address.

Chain-of-Thought
branching complexity
depth-bounded constructions
traversal procedures
Transformers
Innovation

Methods, ideas, or system contributions that make the work stand out.

Chain-of-Thought
branching complexity
hard-attention Transformers
Strahler number
Dyck paths
🔎 Similar Papers
2023-08-02arXiv.orgCitations: 0