The Circuit Complexity Limits of Sequence Models

14 concepts11 papers1 proposal

Large language models can write code, simulate games, and reason through complex prompts. Yet, underneath this empirical success lies a strict mathematical boundary. If we freeze a model's depth (the number of layers) and scale the input length, what can it fundamentally compute in a single forward pass?

A growing body of research answers this question by mapping neural architectures to circuit complexity classes. The consensus is striking: despite their massive scale, standard Transformers, Linear Transformers, and even State-Space Models (SSMs) like Mamba share a fundamental architectural bottleneck. They are bounded by shallow circuit complexity, making certain classes of sequential logic mathematically impossible for them to solve without external help.

The Parallelism Tradeoff

To understand why these models face an expressivity ceiling, we must look at how they process information. The primary reason Transformers scale so effectively on modern hardware is their massive parallelizability: every token's representation in a given layer can be computed simultaneously.

However, this architectural superpower is also a theoretical limitation. In computational complexity theory, highly parallel algorithms that run in constant time correspond to shallow, constant-depth Boolean circuits.

Sabharwal et al. formalized this connection in The Parallelism Tradeoff: Limitations of Log-Precision Transformers. They proved that Transformers operating with logarithmic numerical precision are computationally equivalent to the complexity class uniform $\mathsf{TC}^0$.

[ Complexity Hierarchy ]
  ▲  NC¹ (Deep Sequential Logic: Parity, Tree Evaluation)
  │  ───────────────────────────────────────────────────  ◄─── The Expressivity Barrier
  │  TC⁰ (Shallow Parallel Logic: Majority, Division)     ◄─── Transformers & SSMs
  ▼  AC⁰ (Basic Boolean Logic: AND/OR/NOT)                ◄─── Hard-Attention Models

To build an intuition for this class, imagine a circuit with a fixed number of layers where gates can perform standard logical operations (AND, OR, NOT) as well as Majority decisions (returning true if more than half the inputs are true). In A Logic for Expressing Log-Precision Transformers, Merrill et al. tightened this bound by showing that log-precision Transformers are mathematically equivalent to First-Order Logic with Majority quantifiers ($FO(M)$).

When precision is constrained even further, the bounds become tighter still. Chiang et al. demonstrated in Tighter Bounds on the Expressivity of Transformer Encoders that fixed-precision Transformer encoders are upper-bounded by a specific logic variant called $FOC[+; MOD]$, proving they are even less powerful than the general uniform $\mathsf{TC}^0$ class. For simplified "hard attention" variants, Angluin et al. showed in Formal Language Recognition by Hard Attention Transformers: Perspectives from Circuit Complexity that the limits drop all the way down to $\mathsf{AC}^0$—circuits that lack the ability to even count or compute majorities.

The Hard Walls of $\mathsf{TC}^0$

What happens when an architecture is trapped inside $\mathsf{TC}^0$? It means the model cannot solve problems that require inherently sequential, step-by-step computation where the number of dependent steps scales with the input length.

Consider the parity problem: determining whether a string of bits contains an even or odd number of ones. To solve parity, you must know the state of every single bit, and flipping any single bit changes the answer. This requires tracking a state that updates iteratively across the sequence—a property characteristic of the complexity class $\mathsf{NC}^1$. Because $\mathsf{TC}^0$ is strictly contained within $\mathsf{NC}^1$ under standard assumptions, fixed-depth parallel models cannot compute parity for arbitrary lengths.

This barrier manifests across several practical domains:

The Illusion of State in Sub-Quadratic Models

To escape the quadratic computational cost of standard attention, the community developed sub-quadratic alternatives like Linear Transformers and State-Space Models (SSMs) such as Mamba. Because these architectures can be written as recurrent equations, it was widely assumed they possessed the sequential "stateful" processing power of traditional RNNs.

Recent circuit complexity analyses have shattered this illusion. The reason these models are efficient to train is that their recurrent equations are strictly linear or diagonal. This linearity allows the recurrence to be unrolled and computed in parallel via an associative scan.

Consequently, they inherit the exact same parallel circuit limitations as standard Transformers:

Bypassing the Circuit Barrier

If fixed-depth sequence models are mathematically barred from tracking complex states or solving sequential logic in a single forward pass, how do they manage to perform these tasks in practice?

The most common workaround is changing the computational graph via Chain-of-Thought (CoT) prompting. By forcing the model to generate intermediate tokens, the system spends one forward pass per token. This allows the model to trade space and time for circuit depth, effectively transforming a constant-depth parallel circuit into a sequential computer capable of stepping through $\mathsf{NC}^1$ problems.

Alternatively, researchers are exploring architectural modifications designed to break the $\mathsf{TC}^0$ barrier directly:

By understanding these boundaries, the AI community can move past the trial-and-error of scaling and design architectures that are structurally equipped for advanced algorithmic reasoning.

Key Foundational Work

Formal Language Recognition by Hard Attention Transformers: Perspectives from Circuit Complexity (2022) — contributed 1 concept elements to this direction.
Think Big, Teach Small: Do Language Models Distil Occam's Razor? (2021) — contributed 1 concept elements to this direction.
History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_circuit_complexity_bounds_642410b2,
  title = {circuit complexity bounds},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/circuit-complexity-bounds/rdr_642410b272074f70b2813b1d73a2c152},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-27},
}

This exact version (version 1, frozen text):

@misc{lacuna_circuit_complexity_bounds_642410b2_v1,
  title = {circuit complexity bounds},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/circuit-complexity-bounds/rdr_642410b272074f70b2813b1d73a2c152/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-27},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake