ExplorerData ScienceMachine Learning
Research PaperResearchia:202609.04066

The Head Complexity of Boolean Functions in Single-Layer Attention

Rajmohan Rajaraman

Abstract

What can a single layer of self-attention compute? We study head complexity: the minimum number of attention heads required to compute a function in a one-layer attention-only model. We establish an exact hierarchy under this measure: $k$ heads compute $k$-bit parity but cannot compute $(k+1)$-bit parity. The lower bound is unconditional in the two resources a transformer might otherwise exploit; it holds at unbounded embedding dimension and unbounded numerical precision. The proof rests on an...

Submitted: September 4, 2026Subjects: Machine Learning; Data Science

Description / Details

What can a single layer of self-attention compute? We study head complexity: the minimum number of attention heads required to compute a function in a one-layer attention-only model. We establish an exact hierarchy under this measure: kk heads compute kk-bit parity but cannot compute (k+1)(k+1)-bit parity. The lower bound is unconditional in the two resources a transformer might otherwise exploit; it holds at unbounded embedding dimension and unbounded numerical precision. The proof rests on an alternating-sum obstruction: after clearing the softmax denominators, every monomial in the resulting decision polynomial omits at least one of the k+1k+1 input bits, forcing its correlation with parity to vanish. The same obstruction yields lower bounds for related tasks, including the well-studied multi-hop induction-head task. We also establish compactness bounds for embedding dimension and numerical precision. Specifically, a compactness theorem shows that any function computable at all can be computed with embedding dimension and precision bounded by the discrete data of the task, namely, head count, alphabet size, and length. Thus, potentially unbounded dimension or precision provably cannot substitute for heads. Finally, we derive nearly matching universal bounds for general binary functions: 2n2^n heads suffice to compute every nn-bit binary function, with one head per monomial in its multilinear expansion, while a counting argument shows almost all such functions require Ω(2n/n2)Ω(2^n/n^2) heads. This lower bound matches the upper bound to within a poly(n)\operatorname{poly}(n) factor, even when dimension and precision are unbounded. Together, these results characterize head requirements for Boolean computation in this model.


Source: arXiv:2609.04046v1 - http://arxiv.org/abs/2609.04046v1 PDF: https://arxiv.org/pdf/2609.04046v1 Original Link: http://arxiv.org/abs/2609.04046v1

Please sign in to join the discussion.

No comments yet. Be the first to share your thoughts!

Access Paper
View Source PDF
Submission Info
Date:
Sep 4, 2026
Topic:
Data Science
Area:
Machine Learning
Comments:
0
Bookmark
The Head Complexity of Boolean Functions in Single-Layer Attention | Researchia