Papers · Architectures and attention · 2014
Neural Machine Translation by Jointly Learning to Align and Translate
The notation of the Bahdanau attention paper, explained: its 25 displayed equations, then every symbol it uses, grouped by category and shown the way the paper writes it.
Read from arXiv's HTML version: 25 displayed equations and 99 pieces of inline math. 34 symbols and constructs from the catalog.
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
- , ,
Subscript (index or label) 305 uses
A subscript picks an element (xᵢ), a time step (h_t), a named copy (W_q), or the parameters (p_θ).
- , ,
Italic letters (variables) 300 uses
A plain italic letter is a variable; conventions say what kind (x input, y target, W weights…).
- , ,
Dots (ellipsis) 17 uses
“And so on”: continue the pattern.
- ,
Tilde accent 10 uses
A modified version of the variable: noisy, corrupted, proposed or intermediate.
Bar (mean) 5 uses
A bar usually marks an average: x̄ is the mean of the x values.
- , ,
Superscript (power or label) 4 uses
Usually a power (x² = x·x), but a capital or a word up there is often just a label (W^Q).
Greek letters
Alpha 10 uses
Often a learning rate or step size; also attention weights αᵢⱼ or a mixing weight.
Sigma (lowercase) 8 uses
Either the sigmoid function σ(z) = 1/(1+e⁻ᶻ) or a standard deviation. The context decides.
Epsilon 1 use
A tiny constant for numerical safety (10⁻⁸ in Adam), or noise ε ~ 𝒩(0, I).
Rho 1 use
A correlation coefficient, a decay rate (RMSprop, Adadelta), or an importance ratio in RL.
Vectors and matrices
- , ,
Bold lowercase (vector) 50 uses
A bold lowercase letter is a vector: a list of numbers.
Times (cross) 18 uses
Usually the “by” in a shape (n × d); also plain multiplication or a cross product.
- ,
Q, K, V (query, key, value) 11 uses
In attention: queries Q, keys K and values V, each a matrix with one row per token.
- , ,
Transpose 7 uses
Swap rows and columns. xᵀy is a dot product; xyᵀ is an outer product.
- ,
Centre dot 2 uses
A dot product between vectors, plain multiplication between numbers, or an empty slot f(·).
Bold uppercase (matrix) 1 use
A bold capital letter is a matrix (or a higher-order tensor).
Calculus and gradients
- ,
Prime 6 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) 9 uses
A probability or probability density; p is usually the true or model distribution, q an approximation.
- ,
Given (conditional bar) 5 uses
“Given”: p(y | x) is the probability of y given that x is known.
Exponential 5 uses
The exponential function eˣ, with e ≈ 2.718. Always positive.
Proportional to 1 use
Equal up to a constant factor that does not depend on the variable of interest.
Semicolon (parameterized by) 1 use
In p(x; θ), the semicolon separates the variable x from fixed parameters θ.
Functions and operators
Composition (circle) 11 uses
Function composition: (f ∘ g)(x) = f(g(x)). Some papers use it for elementwise products.
Hyperbolic tangent 7 uses
An S-shaped activation squashing any number into (−1, 1).
- ,
Summation 4 uses
Add up the expression for every value of the index, from the bottom limit to the top.
Fraction 2 uses
Division: the top divided by the bottom.
Product 1 use
Multiply the expression for every value of the index.
Cases (piecewise) 1 use
A piecewise definition: the value on each line applies when that line’s condition holds.
Max and min 1 use
The largest (or smallest) value, over the arguments or over the range in the subscript.
Argmax 1 use
The input that makes the function largest, not the largest value itself.
Sets, shapes and definitions
Element of 22 uses
“Is in” or “belongs to”: x ∈ S says x is a member of the set S.
- , ,
Tensor shapes 22 uses
ℝ with a superscript of sizes joined by × declares an array’s shape: ℝ^{B×T×d} is a 3-axis tensor.
- , ,
Set braces 6 uses
A set: a collection of items. {x | condition} is every x that satisfies the condition.
Inequalities 1 use
Less than / greater than (or equal). ≪ means “much smaller than”.
1 thing the catalog has no entry for yet
\overleftarrow\overleftarrow12
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)
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale (ViT, 2020)