potentialpaper

On the Capacity of Self-Attention

Micah Adler

ICLR 2026 submission

Edit this page

Or clone it with git

The page gets its repository with its first edit, so start in the web editor.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

Abstract. While self-attention is known to learn relations among tokens, we lack a formal understanding of its capacity: how many distinct relations can a single layer reliably recover for a given budget? To formalize this, we introduce Relational Graph Recognition (RGR), where the key-query channel represents a graph on mm items with m′m' directed edges, and, given a context of items, must recover the neighbors of each item. We measure resources by the \emph{total key dimension} DK=h dkD_K = h\,d_k.

Within this framework, we analytically derive a capacity scaling law and validate it empirically. We show that DK=Θ(m′log⁡m′/dmodel)D_K = \Theta(m' \log m' / d_{\text{model}}) is both necessary (information-theoretic lower bound) and sufficient (explicit construction) in a broad class of graphs to recover m′m' relations. This scaling law directly leads to a new, capacity-based rationale for multi-head attention that applies even when each item only attends to a single target. When embeddings are uncompressed (m=dmodelm = d_{\text{model}}) and the graph is a permutation, a single head suffices. However, compression (m>dmodelm > d_{\text{model}}) forces relations into overlapping subspaces, creating interference that a single large head cannot disentangle. Our analysis shows that allocating a fixed DKD_K across many small heads mitigates this interference, increasing the number of recoverable relations. Controlled single-layer experiments mirror the theory, revealing a sharp performance threshold that matches the predicted capacity scaling and confirms the benefit of distributing DKD_K across multiple heads.

Altogether, these results provide a concrete scaling law for self-attention capacity and a principled design rule for allocating key-query budget across heads.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

add · history

No versions are recorded yet: its preprint, the venues it went to and what they decided, the camera-ready. Missing a version?

We don't know of a submission of this paper to a venue with open reviews. Missing a submission?

Loading the discussion…