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.
Exact tiled attention and memory-aware differentiation — Examples
1 · Prerequisites
- Attention, transformer universality, and sequence limits
- Automatic differentiation and backpropagation
- Automatic differentiation and computational graphs
- Binary Operations, Monoids, Groups and Subgroups
- Compactness in Metric Spaces
- Completeness, Completion, and Uniform Continuity
- Construction of the Natural Numbers
- Construction of the Real Numbers via Cauchy Sequences
- Construction of the Real Numbers via Dedekind Cuts
- Continuity, IVT, EVT, and Uniform Continuity
- Countability and Uncountability
- Exact tiled attention and memory-aware differentiation
- Filters and Ultrafilters
- Foundations of the Real Numbers for Analysis
- Limits of Real Functions
- limsup, liminf, and Subsequential Limits
- Linear Independence, Bases and Dimension
- Linear Transformations, Rank-Nullity and Quotient Spaces
- Metric Spaces
- Monotone Functions, Discontinuities, and Continuity Sets
- Monotone Sequences, Bolzano-Weierstrass, and Cauchy Completeness
- Order, Zorn's Lemma, and the Axiom of Choice
- Properties of the Integral and the Working FTC
- Relations, Functions, and Quotients
- Rings, Subrings, Integral Domains and Fields
- Rⁿ as a Normed Space; Vector-Valued Functions
- Roots, Rational Powers, and Classical Inequalities
- Sequences and Limits
- Suprema and Infima
- The Derivative and the Mean Value Theorems
- The Inverse and Implicit Function Theorems
- The Riemann Integral: Definition and Integrability
- The Total Derivative in ℝᵐ → ℝⁿ
- The ZFC Axioms and the Basic Set Constructions
- Topology of ℝ
- Vector Spaces, Linear Subspaces, Span and Direct Sums
2 · Logical flowchart
3 · Definitions, theorems and proofs
None yet.
4 · Examples, counterexamples and false statements
One-key tiled attention
Example
Take , , , , scale , block size , and allowed-key set . The tiled output is . For upstream scalar , the exact reverse output is , , and .
Facts & Assumptions
Given: The scalar inputs and procedures in the example statement.
Exact tiled softmax attention with block-recomputed vector-Jacobian products: for one allowed key the forward summary is copied as the row state, and the reverse updates use and .
Tiled attention and its recomputed reverse pass are exact: the reverse procedure returns the derivative of the scalarized output for each fixed upstream value.
Verification
The only score is . Its summary is , so the output is .
The probability is , the scalar , and . The reverse updates therefore give , , and .
An empty first masked key block
Example
Take , , , , scale , block size , and allowed-key sets and . The first key block is empty for query row but nonempty for query row . The tiled output is .
Facts & Assumptions
Given: The two-row inputs, fixed allowed-key sets, and block size in the example statement.
Exact tiled softmax attention with block-recomputed vector-Jacobian products: each row begins in state ; an empty allowed block is skipped, while the first nonempty block summary is copied.
Tiled attention and its recomputed reverse pass are exact: a nonempty row's final weighted summary divided by its positive normalizer is its exact attention output.
Verification
For query row , the first block has , so the state remains . The second block contains key , whose score is and value is , giving summary and output .
For query row , both blocks are allowed and have score . The first summary is and merging the second gives , so the output is . Both allowed-key sets are nonempty, so these are defined rows of the claimed attention map.
Two merge orders give the same attention summary
Example
Take , , both rows of equal to , , , , , scale , block size , and . For either query, merging the summaries of blocks then , or then , gives and output .
Example references
Facts & Assumptions
Given: The two query rows, two key/value rows, and allowed sets in the example statement.
Stable summary of an attention key block: a singleton block summary uses its score maximum, shifted exponential sum, and shifted value sum; a merge rescales both blocks to their common maximum.
Tiled attention and its recomputed reverse pass are exact: the completed summary divided by its normalizer is the rowwise masked attention output.
Verification
The two scores are and . Thus and .
Merging in either order gives maximum , normalizer , and weighted sum . The output is in either order.
A different dropout mask changes the reverse result
Example
Consider the optional inverted-dropout extension with dropout rate , in which a fixed realization multiplies attention weight by . Take , , , , , and let both query rows allow both keys. For upstream matrix , the forward realization has row- output and full value gradient . Recomputing with the different realization would give value gradient for the same upstream matrix, so it is not the reverse derivative of the forward realization.
Example references
Facts & Assumptions
Given: The optional dropout rule, the fixed inputs, and the two dropout realizations stated in the example.
Exact tiled softmax attention with block-recomputed vector-Jacobian products: the base procedure has no dropout; its reverse pass uses the same fixed attention mask and recomputed scores.
Verification
All scores are zero, so the undropped probabilities are . Under and , the dropped weights are , hence query row has output and derivative with respect to equal to . Since , query row contributes zero to the full value gradient, which is therefore .
Under the dropped weights are , so the recomputed value derivative is . This differs from the derivative of the fixed forward realization in step 1.1, confirming that this extension must replay .
Sources
- Tri Dao et al., FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness, §3.1
- Tri Dao et al., FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness, §3.1 and Appendix C
- Maxim Milakov and Natalia Gimelshein, Online normalizer calculation for softmax, §3.1
- Tri Dao et al., FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness, Appendix B.2–B.4