Exact Softmax Attention Has the Rectangular Matrix-Multiplication Exponent in Extended Arithmetic Circuits
Abstract
Standard softmax attention explicitly forms all query–key scores, even when each query produces only a single scalar output. This raises a fundamental question: can exact attention avoid the arithmetic complexity of the underlying rectangular matrix multiplication? We show that it cannot. For queries and keys of width , with fixed , the minimum size of an exact-real circuit with gates is , even with only one scalar value per key. This matches standard exact evaluation and closes the previous single-head gap between and . Our main technical contribution is an exp–log span theorem showing that, modulo additive constants, all within-row score differences lie in the -linear span of the circuit's exponential inputs and logarithm outputs. Combined with mixed-coefficient extraction, this recovers the rectangular matrix-multiplication tensor and yields the lower bound. The same theorem also exactly characterizes transcendental complexity, giving exp/log gates for dense independently parameterized attention.
est. 32% chance this paper gets accepted at ICLR 2027.
What do you think this paper will get?
All positions stay anonymous.