atlas

Research map / Architectures and efficiency / Attention and transformers

A Little Depth Goes a Long Way: The Expressive Power of Log-Depth Transformers

NeurIPS 2025 · Architectures and efficiency › Attention and transformers · approach: Transformer expressivity and learnability · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Shows that highly uniform universal transformers with Θ(log n) looped depth can recognize regular languages and solve graph connectivity, giving depth-vs-context-length bounds and experiments confirming depth scales logarithmically with length for learning state tracking.

Problem

Fixed-depth transformers provably cannot express regular language recognition or graph connectivity over unbounded inputs (they lie outside TC^0); it is unclear how depth must grow with context length to express these problems, and how this compares to scaling width or chain-of-thought steps.

Approach

Construct fully uniform (parameter-shared, looped) transformers with residual connections and layer norm, where depth grows as Θ(log n); the key primitive is a uniform division/remainder gadget enabling a binary-tree monoid product for regular languages and a repeated-squaring reachability construction for graph connectivity.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Increase depth while holding width at 512Transformer trained for A5 state tracking · A5 state trackingeffective context length at at least 95% validation accuracy: d = 4.8 log_2 n - 15.8; r^2 = 0.93Helped
Increase width while holding depth at 6Transformer trained for A5 state tracking · A5 state trackingeffective context length at at least 95% validation accuracy: n = 7.2 log_2 w - 41.7; r^2 = 0.98Helped
Scale depth logarithmically with input lengthUniversal transformer · Regular language recognitionrecognition capabilityHelped
Scale depth logarithmically with the number of verticesUniversal transformer · Graph connectivityconnectivity-solving capabilityHelped
Scale width rather than depth to increase expressive powerFixed-depth transformer · Reasoning problems outside TC^0expressive powerHurt
Use O(log n) chain-of-thought steps instead of growing depthTransformer · Regular language recognition and graph connectivityexpressive powerHurt

Surprising findings

Limitations

Experimental setup

Datasets: A5 state tracking sequences (synthetic, ~100M)

Benchmarks: A5 state tracking

Metrics: effective context length n* (max token index with at least 9 r^2 of linear fit

Baselines: fixed-depth transformers width-scaled transformers chain-of-thought scaling

Builds on: universal transformers Liu et al. 2022 shortcut learning / log-depth construction Merrill and Sabharwal circuit complexity of transformers Barrington theorem

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy