Probability Distributions Computed by Autoregressive Transformers

Andy Yang, Anej Svete, Jiaoda Li, Anthony Widjaja Lin, Jonathan Rawski, Ryan Cotterell, David Chiang

TL;DR

While most theoretical research treats Transformers as simple "yes/no" string recognizers, this paper analyzes them as they are actually used: as probabilistic, autoregressive language models. The authors prove that the shift from classification to autoregression fundamentally changes a Transformer's mathematical power, sometimes making them more expressive but also breaking long-held theoretical equivalences.

The Gap: Classifiers vs. Autoregressors

There is a significant gap between how we study Transformers theoretically and how we use them in the real world. Most "expressivity" research treats a Transformer as a classifier—a device that takes a full string and outputs a binary "accept" or "reject." In practice, however, Large Language Models (LLMs) are autoregressors: they take a prefix and predict a probability distribution over the next possible token.

The authors ask a fundamental question: Do the mathematical limits we’ve discovered for Transformer classifiers actually apply to Transformer language models? To answer this, they develop a formal framework to compare four distinct settings: Boolean vs. Real-weighted computation, and Classifiers vs. Autoregressors.

Methodology: The State Encoder Framework

To compare different computational models on equal footing, the researchers introduce the concept of a state encoder—a mathematical abstraction representing how a model processes a sequence into internal states. This framework bridges three distinct formalisms:

  1. Transformers: Specifically Unique-Hard Attention Transformers (UHATs) and fixed-precision Softmax Transformers (SMATs).
  2. Finite Automata: "Counter-free" Deterministic and Nondeterministic Finite Automata (cfDFAs/cfNFAs).
  3. Logic: Linear Temporal Logic (LTL), which describes sequences based on timing and order.
Probabilistic Automata Examples

By mapping these into the state encoder framework, the authors can mathematically prove whether a specific type of Transformer is equivalent to a specific type of logic or automaton when performing autoregressive tasks. The study uses formal languages—mathematically defined sets of strings like $(ab)^*$ or the classic PARITY problem—to test the absolute limits of what these models can express.

Key Insights: The Power of Autoregression

The shift from classification to autoregression yields several surprising theoretical results:

  • Autoregression is a "Power-Up": In the Boolean (0/1) setting, for certain restricted versions of Transformers (like those using only "past" information), being an autoregressor makes the model strictly more expressive than being a classifier. Predicting the next step step-by-step is sometimes a more powerful paradigm than judging the whole finished sequence at once.
  • The "Real" World is Different: In the Boolean world, classifiers and autoregressors are often equivalent. However, once you introduce Real weights (probabilities), they become "incomparable." There are certain probability distributions a classifier can define that an autoregressor cannot, and vice versa.
  • The Probability "Break": Making a model probabilistic can break equivalences that hold in non-probabilistic cases. For example, while UHAT classifiers are equivalent to counter-free NFAs in the Boolean world, they are less expressive in the real-weighted probabilistic world.
  • Validation of Previous Limits: On a positive note, the paper confirms that many "negative" results carry over. If a Transformer classifier can't solve a problem (like PARITY), a Transformer language model can't solve it either.

The Four-Way Distinction Roadmap

The paper provides a comprehensive visual map showing exactly where different Transformer variants fall in terms of mathematical complexity across these four paradigms.

The Four-Way Distinction Roadmap

Key formal results mapped in this framework include:

  • Theorem 5.1: Establishes that UHATs, LTL, and counter-free DFAs are all equivalent as "state encoders," providing a solid foundation for the comparisons.
  • Corollary 5.4: Proves that in the real-weighted (probabilistic) setting, LTL classifiers and LTL autoregressors are incomparable. An autoregressor can easily represent a language with decaying probabilities, which a classifier cannot.
  • Proposition 5.8: Shows that for specific "leftmost" attention mechanisms, autoregressors are strictly more powerful than classifiers.

Limitations and Future Work

While this theoretical framework provides crucial clarity, it operates under certain constraints. The proofs largely rely on "hard" attention or fixed-precision softmax, whereas real-world Transformers use high-precision floating-point numbers that might allow for even more complex behaviors. Additionally, the current work assumes no position embeddings or uses very specific masking; understanding how modern techniques like Rotary Positional Embeddings (RoPE) change these expressivity bounds remains an open question.

Finally, the authors note that "Chain-of-Thought" processing—where a model generates intermediate tokens before an answer—likely shifts the model into a much higher complexity class (potentially making them Turing Complete), marking an exciting frontier for future formal analysis.

Summary updated

BibTeX
@inproceedings{yang2026probability,
  author = {Andy Yang and Anej Svete and Jiaoda Li and Anthony Widjaja Lin and Jonathan Rawski and Ryan Cotterell and David Chiang},
  title = {{Probability Distributions Computed by Autoregressive Transformers}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=gZIcyx1tQY},
}
Figure