Papers · Architectures and attention · 2020
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
The notation of the ViT paper, explained: its 8 displayed equations, then every symbol it uses, grouped by category and shown the way the paper writes it.
Read from arXiv's HTML version: 8 displayed equations and 124 pieces of inline math. 25 symbols and constructs from the catalog, read as attention and transformers.
The paper's displayed equations
Open any of them in the decoder for a symbol-by-symbol reading.
Famous equations in this paper
Symbols, by category
Most used first. The examples are written as the paper writes them.
Notation conventions
- , ,
Italic letters (variables) 38 uses
A plain italic letter is a variable; conventions say what kind (x input, y target, W weights…).
- , ,
Subscript (index or label) 36 uses
A subscript picks an element (xᵢ), a time step (h_t), a named copy (W_q), or the parameters (p_θ).
- , ,
Superscript (power or label) 27 uses
Usually a power (x² = x·x), but a capital or a word up there is often just a label (W^Q).
Loss (ℒ) 8 uses
The loss: the number training tries to make small. Also written L, J(θ) or ℓ.
- ,
Dots (ellipsis) 4 uses
“And so on”: continue the pattern.
- ,
Star (optimal) 2 uses
As a superscript, the optimal value: θ* is the best θ. Between two terms, convolution.
Multi-letter names 1 use
A run of italic letters like pos or model is usually one name, not a product of single letters.
Greek letters
Beta 2 uses
Usually a decay rate (Adam’s β₁, β₂), a shift parameter in normalization, or a weight on a loss term.
Vectors and matrices
- , ,
Bold lowercase (vector) 30 uses
A bold lowercase letter is a vector: a list of numbers.
Times (cross) 20 uses
Usually the “by” in a shape (n × d); also plain multiplication or a cross product.
Centre dot 14 uses
A dot product between vectors, plain multiplication between numbers, or an empty slot f(·).
- ,
Bold uppercase (matrix) 11 uses
A bold capital letter is a matrix (or a higher-order tensor).
Q, K, V (query, key, value) 3 uses
In attention: queries Q, keys K and values V, each a matrix with one row per token.
Transpose 1 use
Swap rows and columns. xᵀy is a dot product; xyᵀ is an outer product.
Calculus and gradients
Prime 3 uses
Either a derivative, f′(x), or simply "another one": x′ is a second sample, s′ the next state.
Probability and statistics
- , ,
Probability p(x) 18 uses
A probability or probability density; p is usually the true or model distribution, q an approximation.
Semicolon (parameterized by) 7 uses
In p(x; θ), the semicolon separates the variable x from fixed parameters θ.
Functions and operators
Plus or minus 27 uses
Both signs at once: a ± b means a + b and a − b. In results tables, a mean and its spread.
Feed-forward network (FFN, MLP) 1 use
A small network applied to each position: a linear layer, an activation, and another linear layer.
Softmax 1 use
Turns a vector of scores into probabilities: exponentiate each, then divide by the total.
Square root 1 use
The square root. In attention, dividing by √d_k keeps dot products at a sensible scale.
Hyperbolic tangent 1 use
An S-shaped activation squashing any number into (−1, 1).
Sets, shapes and definitions
Element of 8 uses
“Is in” or “belongs to”: x ∈ S says x is a member of the set S.
- , ,
Tensor shapes 8 uses
ℝ with a superscript of sizes joined by × declares an array’s shape: ℝ^{B×T×d} is a 3-axis tensor.
Set braces 1 use
A set: a collection of items. {x | condition} is every x that satisfies the condition.
2 things the catalog has no entry for yet
-
SA4 -
MSA2
Formulas from arXiv's HTML version of the paper, © their authors; the explanations are this site's. Title and authors as arXiv lists them.
More architectures and attention papers
- Attention Is All You Need (Transformer, 2017)
- RoFormer: Enhanced Transformer with Rotary Position Embedding (RoPE, 2021)
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness (FlashAttention, 2022)
- Mamba: Linear-Time Sequence Modeling with Selective State Spaces (Mamba, 2023)
- Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layer (Mixture of experts, 2017)
- Neural Machine Translation by Jointly Learning to Align and Translate (Bahdanau attention, 2014)