How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
Dense full-attention interaction cost and path length
Statement
Use the standard dense self-attention interaction with token rows, model width , and heads whose total query/key/value width is (for example, heads of width when divides ). Counting scalar multiply-add operations in the direct matrix implementation, forming all query-key scores and applying the resulting dense weight matrix to all value rows costs per attention sublayer; row softmax adds . Every query position has a direct value path from every key position, so one unmasked self-attention sublayer gives path length one between any input token value and any output token. A fixed stack of such layers has a position-to-position path of at most attention edges, independent of .
If each query, key, value, and output projection is a dense linear map and the tokenwise feedforward width is , those operations add work per full Transformer layer. Thus the claim concerns the dense all-pairs attention interaction used in the source comparison; it does not assert that projections or the feedforward sublayer have that cost, and it makes no claim about sparse attention, linear attention, training work, memory traffic, or hardware speed.
Statement references
Facts & Assumptions
Given: Positive integers , the dense multi-head self-attention dimensions in the Statement, and the direct matrix implementation.
The forward pass forms scaled query-key scores, applies row softmax, and multiplies the resulting attention weights by values (Transformer encoder-decoder forward pass).
Proof
For one head of width , the score product has dimensions and therefore uses scalar multiply-adds. The value product has dimensions and also uses operations.
For finite real scores, every softmax weight is strictly positive, so each output row uses the value row of every input position. This is one direct attention edge; composing layers yields at most one such edge per layer, hence at most attention edges independent of .
Summing over heads with total width gives score and value work. Normalizing rows of scores costs , which is at most because .
A dense projection of an matrix by a matrix costs , and a two-map positionwise feedforward network of hidden width costs . Adding these separate terms gives the full-layer operation count stated in the Statement.
Depends on
Used by
Nothing in the library uses this result yet.
Dependency tree · two levels
2 results within two dependency steps of this one, each drawn at its shortest distance from it. An arrow runs from a result to what uses it, so the chart reads left to right and ends at this result, which carries a heavier outline. Every node is a link to that result. Click elsewhere on the chart to enlarge it.
Sources
- Vaswani et al., Attention Is All You Need, Table 1 and §4 (standard reference, not scraped)
- Dive into Deep Learning, §11.6.2 Comparing CNNs, RNNs, and Self-Attention (standard reference, not scraped)