Alphabeta Math
AlgorithmAlgorithm: Literature-sourcedProof: Not applicablePipeline-generatedjudge pass (gpt-6-luna)
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 softmax attention with block-recomputed vector-Jacobian products

Definition

Inputs: Positive integers n,d,v, finite real matrices Q,K∈Rn×d and V∈Rn×v, a real scale c, a positive integer key-block size b, and fixed nonempty allowed-key sets A1,…,An⊆{1,…,n}. The algorithm reads membership in each Ai on demand; any caller-owned representation of the mask is input storage. All operations below are in exact real arithmetic. Set Jt={(t−1)b+1,…,min⁡(tb,n)} for t=1,…,⌈n/b⌉.

Forward procedure:

  1. For each query row i, set the current summary to ⊥.
  2. For t=1,…,⌈n/b⌉, form I=Jt∩Ai. If I=∅, skip this block and leave the summary unchanged. Otherwise compute Σi(I). If the current summary is ⊥, copy Σi(I); otherwise merge the current summary with Σi(I) using ⋆.
  3. After the final block, write Yi=zi/ℓi and retain the final mi and ℓi for a later reverse pass.
  4. Return Y∈Rn×v and the retained row statistics.

Reverse procedure: Given a forward run with the same Q,K,V,c,A1,…,An and an upstream matrix G∈Rn×v, initialize dQ,dK,dV to zero. For each query row i, compute δi=∑a=1vGiaYia. For every block Jt and each j∈Jt∩Ai, recompute sij from Q,K and set

pij=esij−miℓi,γij=pij(∑a=1vGiaVja−δi).

Then, for r=1,…,d, add to the query and key gradient arrays, and for a=1,…,v, add to the value gradient array:

(dQ)ir+=cγijKjr,(dK)jr+=cγijQir,(dV)ja+=pijGia.

Return dQ,dK,dV. Do not store a full score or probability matrix: the reverse procedure recomputes one block's scores from the same inputs and fixed allowed-key sets. The prescribed reverse procedure treats the forward maxima and normalizers as frozen scaling statistics; it does not differentiate a maximum operation. The base algorithm has no dropout. Any dropout extension must replay the same realized dropout mask in its reverse pass.

Depends on

Used by

Dependency tree · two levels

7 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