Pith. sign in

REVIEW 3 cited by

Memorization Capacity of Multi-Head Attention in Transformers

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2306.02010 v3 pith:D6EIRONN submitted 2023-06-03 cs.LG

classification cs.LG
keywords attentionheadsmemorizationtransformersassumptionscapacitydataexample
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
abstract

Transformers have become the go-to architecture for language and vision tasks, yet their theoretical properties, especially memorization capacity, remain elusive. This paper investigates the memorization abilities of multi-head attention mechanisms, examining how many example sequences they can memorize, as a function of the number of heads and sequence length. Motivated by experimental findings on vision transformers, we introduce novel assumptions about the linear independence of input data, distinct from the commonly used general-position assumption. Under these assumptions, we demonstrate that an attention layer with $H$ heads, dimension $d$, and context size $n < d$, featuring $\Theta(Hd^2)$ parameters, can memorize $\Omega(Hn)$ examples. Our analysis sheds light on how different attention heads handle various example sequences, aided by the softmax operator's saturation property. We validate our findings through experiments on synthetic data.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 3 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. How much do language models memorize?

    cs.CL 2025-05 conditional novelty 6.0 of 10

    A compression-based measurement puts GPT-style model memorization capacity at roughly 3.6 bits per parameter, with membership inference success following a sigmoid in the dataset-to-capacity ratio.

  2. Understanding Factual Recall in Transformers via Associative Memories

    cs.LG 2024-12 accept novelty 6.0 of 10

    A one-layer transformer can store facts at near-optimal capacity by using attention value matrices or an MLP as associative memories, and training passes through a hallucination stage.

  3. Fundamental Limits of Prompt Tuning Transformers: Universality, Capacity and Efficiency

    cs.LG 2024-11 conditional novelty 6.0 of 10

    Prompt tuning on single-head, single-layer transformers is universal for Lipschitz sequence functions, and its inference speed has a norm-based phase transition under SETH.

Pith tools