Threshold Degree and the Head Complexity of Single-Layer Attention
Abstract
A single layer of multi-head attention produces a vector representation from which a downstream predictor computes an output. We ask how many heads the layer needs when the predictor is a polynomial threshold function of degree . For a symmetric Boolean function of threshold degree , we prove that heads and a degree- readout compute if and only if . The lower bound allows arbitrary joint embeddings of token symbol and position, with unbounded embedding dimension and bit precision; the upper bound uses embeddings that depend on the token symbol alone, with value vectors of dimension at most . The characterization is therefore insensitive to the embedding class. We then extend it beyond symmetric functions. If for a designated subset , the same characterization holds, with an upper bound that uses an additive embedding of symbol and position; such is asymmetric whenever is a proper subset of , and no symbol-only embedding computes it at any or . Taking to be parity gives a strict hierarchy in the head count at every fixed readout degree and input length: parity on coordinates requires exactly heads. Finally, we show that threshold degree does not govern the general case: at most functions are realizable with heads and a linear readout, and we exhibit a family of threshold degree in which almost every member requires heads. Experiments on symmetric Boolean targets study the roles of , , and value-dimension in trained attention layers.
est. 32% chance this paper gets accepted at ICLR 2027.
What do you think this paper will get?
All positions stay anonymous.