How Intermediate Tokens Bypass the TC0 Complexity Limit in Transformers
Generating intermediate reasoning steps mathematically multiplies a transformer's forward passes, allowing fixed-depth models to solve inherently serial problems. Theoretical computer science reveals that this process bypasses the architectural limits of parallel computation.
By Logan Price
In short
- Standard transformers process data in parallel, limiting their computational depth to a restricted class known as TC0.
- Generating intermediate tokens forces the model to execute multiple sequential forward passes, creating a recurrent loop that bypasses this limit.
- Scaling the number of intermediate tokens allows fixed-depth models to solve inherently serial problems, including polynomial-time logic.
A traditional computer processor executes instructions sequentially, building complexity over time by feeding the output of one operation directly into the next. A standard transformer neural network does the exact opposite. It processes entire sequences simultaneously in parallel, trading sequential time for massive spatial computation.[7]
This parallel architecture is the engine behind modern artificial intelligence, allowing models to train efficiently on trillions of words. However, that same structural advantage imposes a strict mathematical ceiling on what the network can compute in a single pass.[2]
Researchers from the Allen Institute for AI and New York University have mapped this limitation using formal circuit complexity. They demonstrated that a transformer generating a single answer immediately after reading a prompt is trapped within a restricted computational class known as TC0.[6]
This means there are inherently serial problems—like tracking states, simulating finite automata, or solving modular arithmetic—that a standard transformer simply cannot solve in one step. No amount of parameter scaling or training data can bypass this hard architectural limit.[5]
Yet, frontier models routinely solve these exact problems. They do so by generating intermediate reasoning steps, a technique known as chain-of-thought prompting.[4]
While originally viewed as a cognitive heuristic that mimics human reasoning, theoretical computer science now reveals a different reality. Generating intermediate tokens is a structural requirement that mathematically multiplies the network's depth, converting parallel spatial computation into the serial temporal computation needed to bypass the TC0 barrier.[1]
The Mathematical Ceiling of Parallelism
To understand why transformers hit a wall, one must look at how they process data. When a prompt enters a transformer, the attention mechanism compares every token against every other token simultaneously.[7]
This highly parallel operation is bounded by the network's fixed number of layers. If a model has 96 layers, the data undergoes exactly 96 sequential transformations before producing an output.[7]
In computational complexity theory, this structure is equivalent to a constant-depth threshold circuit. In 2022, researchers William Merrill and Ashish Sabharwal proved that transformers with saturated attention are upper-bounded by the TC0 complexity class.[6]
TC0 circuits can perform basic arithmetic, sort data, and count items, but they cannot execute sequential logic where step 50 strictly depends on the outcome of step 49. The depth of the computation is fixed, regardless of how long or complex the input sequence becomes.[6]
"We thus speculatively introduce the idea of a fundamental parallelism tradeoff," Merrill and Sabharwal wrote in their 2023 paper for the Association for Computational Linguistics.[2]
"Any model architecture as parallelizable as the transformer will obey limitations similar to it," the researchers concluded, pointing to a potential inherent weakness in the current paradigm of scaling language models.[3]
Why Transformers Fail at Serial Logic
Because of this parallelism tradeoff, standard transformers struggle with tasks that require iterative state tracking. A classic example is the parity problem: determining whether a string of ones and zeros contains an even or odd number of ones.[5]
For a human or a traditional sequential algorithm, parity is trivial. You simply read the string from left to right, flipping a mental switch every time you encounter a one. The final state of the switch gives the answer.[7]
A fixed-depth transformer cannot do this efficiently for long sequences. Because it processes all tokens at once, it lacks the recurrent memory state needed to track the running total across an arbitrary number of steps.[5]
Similarly, evaluating complex mathematical equations or simulating the steps of a finite-state machine falls outside the TC0 boundary. These problems belong to higher complexity classes like NC1 or P, which require computational depth that scales with the size of the input.[1]
If a problem requires 500 sequential steps to solve, a 96-layer transformer cannot compress that logic into 96 forward passes. The network will inevitably hallucinate or guess, lacking the structural capacity to compute the true answer.[7]
The Mechanics of Intermediate Generation
This is where chain-of-thought prompting fundamentally alters the architecture's capabilities. When a model is instructed to "think step by step," it does not just change the text it outputs; it changes the underlying physics of its computation.[4]
Every time a transformer generates a single token, it must execute a complete forward pass through all of its layers. If a model generates 100 intermediate tokens before arriving at a final answer, it has effectively executed 100 consecutive forward passes.[7]
Crucially, each new forward pass can attend to the tokens generated by the previous passes. The output of step one becomes the input for step two, creating a recurrent loop that the base architecture lacks.[7]
By writing intermediate thoughts to the context window, the transformer uses the output sequence as an external scratchpad. This allows the model to store the running state of a serial computation, completely bypassing the constant-depth limitation of its internal layers.[1]
Researchers Zhiyuan Li, Hong Liu, Denny Zhou, and Tengyu Ma formalized this in a 2024 study. They proved that chain-of-thought empowers transformers to solve inherently serial problems that are mathematically impossible for the base model to resolve directly.[5]
Scaling Complexity with Token Count
The expansion of expressive power scales directly with the number of intermediate tokens generated. In a 2023 study published on arXiv, researchers quantified exactly how different lengths of chain-of-thought impact a model's theoretical limits.[1]
If a transformer generates a logarithmic number of intermediate steps relative to the input size, its computational power increases only slightly. It remains confined to a relatively weak complexity class known as Log-Space, or L.[1]
However, if the model generates a linear number of intermediate tokens—scaling proportionally with the input length—it crosses a critical threshold. The transformer gains the ability to recognize all regular languages and simulate finite automata, entering the NC1 complexity class.[1]
When the number of intermediate steps scales polynomially, the transformation is even more profound. The researchers demonstrated that polynomial steps allow a transformer to recognize exactly the class of polynomial-time solvable problems, known as P.[1]
This provides the first exact characterization of transformer capabilities in terms of standard complexity classes. It proves that a fixed-depth model can compute anything a traditional polynomial-time algorithm can, provided it is allowed to generate enough intermediate tokens.[1]
The Future of Test-Time Compute
These theoretical proofs explain the empirical success of modern reasoning models. Systems like OpenAI's o1 and DeepSeek's R1 rely heavily on extended inference-time computation, generating thousands of hidden reasoning tokens before responding to a user.[7]
By doing so, they effectively transform a 100-layer neural network into a 10,000-layer neural network on the fly. This dynamic depth allows them to solve intricate coding, mathematics, and logic puzzles that standard models fail on.[7]
This shift represents a transition from scaling training compute to scaling test-time compute. Instead of building deeper networks with thousands of layers, developers can achieve the same computational depth dynamically by forcing the model to generate longer chains of thought.[7]
However, this serial decoding process is computationally expensive. Because each token requires a full forward pass, generating a 2,000-token reasoning chain consumes significantly more energy and time than a standard immediate response.[7]
Ultimately, the mathematical realities of the TC0 limit dictate the future of artificial intelligence architecture. To solve complex, multi-step reasoning problems, models must either sacrifice their parallel efficiency or rely on the recurrent depth provided by intermediate generation.[7]
How we did this
- Method
- A synthesis and normalisation of computational complexity bounds across multiple theoretical papers, mapping the formal language classes (TC0, NC1, P) against the number of forward passes (constant, linear, polynomial) to derive the exact mathematical mechanism of Chain-of-Thought.
- What we found
- Chain-of-Thought is not merely a cognitive heuristic or alignment trick; it is a structural requirement that mathematically multiplies the network's depth by converting parallel spatial computation into serial temporal computation, allowing fixed-depth models to solve inherently sequential logic.
- What we worked from
- Constant-depth threshold circuit limit (TC0) for standard transformers: TC0 complexity class — ACL Anthology
- Linear intermediate steps enable NC1-complete problem solving: NC1 complexity class — arXiv
- Polynomial steps enable P-complete problem solving: P complexity class — arXiv
- Limits of this analysis
- This analysis relies on theoretical upper bounds and formal language classes, which describe what a model can express in principle, not necessarily what it will reliably learn during empirical training.
Jargon, explained
- TC0 Complexity
- A computational complexity class representing problems that can be solved by constant-depth circuits, limiting how many sequential steps can be processed.
- NC1 Complexity
- A higher complexity class that includes problems requiring logarithmic depth, such as simulating finite automata and evaluating boolean formulas.
- Forward Pass
- The process of data moving through all the layers of a neural network once to generate a single output token.
- Test-Time Compute
- The computational resources spent by an AI model during inference to generate an answer, rather than during its initial training phase.
- Parity Problem
- A mathematical test determining whether a sequence contains an even or odd number of specific elements, requiring iterative state tracking.
Common questions
Why can't we just build transformers with more layers to solve serial problems?
While adding layers increases the fixed depth of the network, it remains a constant number. Inherently serial problems require a depth that scales dynamically with the size of the input, which a fixed-layer architecture cannot provide in a single pass.
Does chain-of-thought actually change how the model computes?
Yes. Instead of processing the entire answer in one parallel sweep, generating intermediate tokens forces the model to execute multiple sequential forward passes, effectively creating a recurrent loop that tracks running states.
Are there any downsides to using intermediate tokens for reasoning?
The primary downside is computational cost. Because every single generated token requires a complete forward pass through the entire network, long reasoning chains consume significantly more time and energy than immediate responses.
Competing readings
Theoretical Computer Scientists
Focuses on formal language classes and proving mathematical upper bounds on what specific neural architectures can express.
Researchers in this camp approach artificial intelligence through the lens of formal circuit complexity. By mapping neural network architectures to established computational classes like TC0, NC1, and P, they seek to prove mathematically what a model can and cannot do, regardless of how much training data it consumes. Their work demonstrates that the parallel nature of transformers inherently restricts their ability to solve serial logic problems in a single pass, establishing hard boundaries on the capabilities of base models.
Frontier Model Developers
Focuses on leveraging test-time compute and chain-of-thought to bypass structural limits in production reasoning models.
For developers building state-of-the-art reasoning systems, the theoretical limits of transformers are obstacles to be engineered around. By forcing models to generate thousands of hidden intermediate tokens before responding, they effectively multiply the network's depth dynamically. This camp views test-time compute as the next major frontier in AI scaling, arguing that allowing models to "think" longer is a more efficient path to solving complex mathematics and coding problems than simply training larger base models.
Efficiency Optimizers
Focuses on the high inference cost of serial decoding and seeks parallelizable alternatives to standard chain-of-thought.
While acknowledging that chain-of-thought expands a model's expressive power, this camp highlights the severe computational and energy costs of serial decoding. Because every generated token requires a full forward pass through the network, extended reasoning chains are expensive to serve at scale. These researchers are actively exploring alternative architectures, such as polynomial padding tokens and looping mechanisms, aiming to achieve the depth required for complex reasoning without sacrificing the parallel efficiency that made transformers successful.
- Theoretical Computer Scientists
- Focuses on formal language classes and proving mathematical upper bounds on what specific neural architectures can express.
- Frontier Model Developers
- Focuses on leveraging test-time compute and chain-of-thought to bypass structural limits in production reasoning models.
- Efficiency Optimizers
- Focuses on the high inference cost of serial decoding and seeks parallelizable alternatives to standard chain-of-thought.
Perspectives this story doesn't cover
- Hardware accelerator designers
- Energy grid operators
Sources
[1]arXivTheoretical Computer ScientistsThe Expressive Power of Transformers with Chain of Thought
Read on arXiv →
[2]ACL AnthologyTheoretical Computer ScientistsThe Parallelism Tradeoff: Limitations of Log-Precision Transformers
Read on ACL Anthology →
[3]MIT Press DirectTheoretical Computer ScientistsThe Parallelism Tradeoff: Limitations of Log-Precision Transformers
Read on MIT Press Direct →
[4]Google Research BlogFrontier Model DevelopersLanguage Models Perform Reasoning via Chain of Thought
Read on Google Research Blog →
[5]arXivTheoretical Computer ScientistsChain of Thought Empowers Transformers to Solve Inherently Serial Problems
Read on arXiv →
[6]ACL AnthologyTheoretical Computer ScientistsSaturated Transformers are Constant-Depth Threshold Circuits
Read on ACL Anthology →
[7]Factlen Editorial TeamFrontier Model DevelopersSynthesis by Factlen editorial team
Read on Factlen Editorial Team →
More in Artificial Intelligence
See all →Prompt Engineering
The 28.2% Accuracy Gain: How Chain-of-Thought Prompting Unlocks Reasoning in Large Language Models
7 sources
Positional Bias
The Positional Advantage of the System Prompt: How Pre-pending Instructions to the Context Window Constrains LLM Output
5 sources
AI Architecture
The Mechanics of Tokenization: How Text Becomes Numbers and Defines the LLM Context Window
5 sources
Agentic AI
How OpenAI's ChatGPT Work Agent Shifts AI from Prompting to Multi-Hour Delegation
7 sources
Comments
Every angle. Every day.
Get Artificial Intelligence stories with full source coverage and perspective breakdowns, free every day.




