The Scratchpad Complexity of Autoregressive Multiplication with Hard Attention
Organizations: University of Illinois Urbana-Champaign, Urbana, IL, USA.
Abstract
How many auxiliary tokens does a causal hard-attention transformer need to multiply two -bit integers? First, we resolve the true-prefix parity conjecture of Amiri Bavandpour et al. on independent uniform -bit operands. The correlation bound permits any bounded test of each operand and every earlier product-bit parity. Second, we give a task-independent transfer from low-degree correlation bounds to causal hard-attention lower bounds. Position-union approximation verifies which keys win, and marked replay counts possible scratch traces using their positions. Third, at fixed depth, head count, and number of selected keys, the probability of generating the product with a sufficiently small linear scratch and edit budget is exponentially small even with a growing vocabulary. A one-head, one-layer packed FFT attains linear scratch with linear vocabulary and constant hidden dimension.
Figures & tables
| First-half Fourier bound for all masks |
| Conjecture C.5 ( Corollary 5 ) |
| Sparse masks position-union approximation |
| Signed correlation bounds |
| Bound | Amiri Bavandpour et al. (2025) | This work |
|---|---|---|
| Lower | in the worst case for one midpoint bit from the operands | for nonvanishing success on the full product of uniform operands, including a small edit budget |
| Upper | for the full product with a growing alphabet | for the full product with symbols and one head in one layer |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Attention mechanism | Scope of lower bound |
|---|---|
| Top- and bounded fixed-support softmax | Prediction and generation at fixed resources, including averaging over the selected keys. |
| Dense softmax, adversarial errors | Robust generation under simultaneous head-output errors ( Corollary 24 ). |
| Dense softmax, independent Gaussian noise | Cached or independently recomputed states. Linear scratch at bounded and at ( Proposition 29 ). |
| Unbounded tie averaging | Can implement uniform aggregation. |
| Work | Setting | Result |
|---|---|---|
| Amiri Bavandpour et al. (2025) | Unique hard attention, fixed depth and heads, growing scratch vocabulary allowed | Worst-case scratchpad lower bound for one middle bit with operands as input. An scratchpad with growing vocabulary writes the full product. Conjecture C.5 concerns prediction with the true prefix. |
| Remscrim and Sipser (2013) | distinguishers on operands and retained central digits | Stretched-exponential pseudorandomness for ordinary and carryless multiplication after discarding extreme digits in total. |
| Tomlinson et al. (2026) | Bounded attention prefix oracle with bounded information flow | reasoning tokens for binary majority, triplet matching and graph reachability. |
| Merrill and Sabharwal (2024) | Log-precision transformer decoders with chain of thought | Language-class bounds by reasoning length, including a polynomial-time characterization with polynomially many steps and generalized pre-normalization. |
| Mohammadkhani et al. (2026) | Low-degree operand tests and information in chains of thought | Fourier-mass bound for one central product bit and a model-size-dependent lower bound on information revealed by the trace. |
| This work | Separate bounded operand tests and full-prefix parities. Fixed-resource causal top- for generation, growing scratch vocabulary allowed | Proves the conjectured true-prefix bound. Average-case lower bounds for full-product generation, including a linear deletion budget. auxiliary tokens with vocabulary entries. |
Transformer
Transformers are neural architectures that use attention to model relationships among sequence elements in language, vision, and scientific data.
See all 594 papers