Papers · Reinforcement learning and alignment · 2024
DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
The notation of the GRPO paper, explained: its 21 displayed equations, then every symbol it uses, grouped by category and shown the way the paper writes it.
Reading this paper
DeepSeekMath introduced GRPO, a variant of PPO that needs no value network: it samples a group of answers to each question and scores each against the group.
is the -th sampled output and its -th token. The advantage is the answer's reward minus the group's mean, divided by the group's standard deviation. is the policy that sampled the group, the reference model for the KL penalty weighted by , and the clipping range, as in PPO.
Read from arXiv's HTML version: 21 displayed equations and 62 pieces of inline math. 47 symbols and constructs from the catalog, read as reinforcement learning.
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) 351 uses
A subscript picks an element (xᵢ), a time step (h_t), a named copy (W_q), or the parameters (p_θ).
- , ,
Italic letters (variables) 280 uses
A plain italic letter is a variable; conventions say what kind (x input, y target, W weights…).
- , ,
Superscript (power or label) 30 uses
Usually a power (x² = x·x), but a capital or a word up there is often just a label (W^Q).
Hat (estimate) 12 uses
A hat marks an estimate or prediction: ŷ is the model’s guess for y.
Dots (ellipsis) 7 uses
“And so on”: continue the pattern.
Dataset (𝒟) 6 uses
The dataset: usually N input-label pairs.
- ,
Multi-letter names 4 uses
A run of italic letters like pos or model is usually one name, not a product of single letters.
Tilde accent 3 uses
A modified version of the variable: noisy, corrupted, proposed or intermediate.
Underbrace and overbrace 2 uses
A horizontal brace under or over part of a formula labels that part. It adds no math.
Greek letters
Theta 109 uses
The model’s parameters: all of its weights and biases, as one collection.
Pi 97 uses
A policy π(a | s) in reinforcement learning, or the constant 3.14159…
Beta 14 uses
Usually a decay rate (Adam’s β₁, β₂), a shift parameter in normalization, or a weight on a loss term.
Epsilon 9 uses
A tiny constant for numerical safety (10⁻⁸ in Adam), or noise ε ~ 𝒩(0, I).
Phi 5 uses
The parameters of a second model (often the encoder q_φ), or a feature map φ(x).
Sigma (lowercase) 2 uses
Either the sigmoid function σ(z) = 1/(1+e⁻ᶻ) or a standard deviation. The context decides.
Psi 2 uses
The parameters of a third network (after θ and φ), a feature map, or the digamma function ψ(x).
Mu 2 uses
A mean: the average of a distribution, a batch, or a layer’s features.
Vectors and matrices
- , ,
Absolute value (bars) 34 uses
Absolute value of a number; for a set, its size; for a matrix, sometimes its determinant.
- , ,
Dagger / pseudo-inverse 19 uses
The Moore–Penrose pseudo-inverse A⁺ (written A† in many ML papers); in physics, the conjugate transpose.
Bold lowercase (vector) 3 uses
A bold lowercase letter is a vector: a list of numbers.
Bold uppercase (matrix) 3 uses
A bold capital letter is a matrix (or a higher-order tensor).
Centre dot 1 use
A dot product between vectors, plain multiplication between numbers, or an empty slot f(·).
Calculus and gradients
Nabla (gradient) 15 uses
The gradient: the vector of partial derivatives. ∇_θ L is how the loss changes with each parameter.
Probability and statistics
- ,
Probability p(x) 140 uses
A probability or probability density; p is usually the true or model distribution, q an approximation.
- ,
Given (conditional bar) 66 uses
“Given”: p(y | x) is the probability of y given that x is known.
Distributed as (tilde) 39 uses
“Is drawn from” or “is distributed as”: x ~ p means x is a sample from the distribution p.
Logarithm 18 uses
A logarithm, almost always the natural log (base e) in ML papers.
Expectation 15 uses
The expected value: the average of what is inside, weighted by the probabilities in the subscript.
Indicator function 4 uses
1 when the condition inside is true, 0 when it is false.
KL divergence 2 uses
How different distribution q is from p. Zero when they match; not symmetric.
Functions and operators
- , ,
Fraction 41 uses
Division: the top divided by the bottom.
- , ,
Summation 21 uses
Add up the expression for every value of the index, from the bottom limit to the top.
Arrow (maps to) 5 uses
Maps to (f: X → Y), tends to (x → 0), or implies (⇒).
Max and min 4 uses
The largest (or smallest) value, over the arguments or over the range in the subscript.
- ,
Clip 4 uses
Limit a value to a range: clip(x, a, b) is a if x < a, b if x > b, else x.
Assignment arrow 3 uses
Assignment in an algorithm: replace the variable on the left with the value on the right.
Reinforcement learning
Return G 36 uses
Gₜ is the return: the total discounted reward from step t onward. The agent maximizes its expectation.
- ,
State s and action a 36 uses
sₜ is the state at step t, aₜ the action taken there; s′ is the next state.
Reward r 27 uses
rₜ is the reward received at step t; R(s, a) is the reward function that hands it out.
Advantage A 21 uses
A(s, a) = Q − V: how much better action a is than the policy’s average action in state s.
Objective J 20 uses
J(θ) is the objective: the quantity to maximize, such as the expected return of a policy.
Action-value function Q 20 uses
Q(s, a) is the expected total reward from taking action a in state s, then following the policy.
State and action spaces 3 uses
𝒮 is the set of all states and 𝒜 the set of all actions in a Markov decision process.
Value function V 2 uses
V(s) is how much total discounted reward to expect from state s onward.
Sets, shapes and definitions
- , ,
Inequalities 54 uses
Less than / greater than (or equal). ≪ means “much smaller than”.
- , ,
Set braces 17 uses
A set: a collection of items. {x | condition} is every x that satisfies the condition.
Element of 1 use
“Is in” or “belongs to”: x ∈ S says x is a member of the set S.
5 things the catalog has no entry for yet
-
\footnotesize11 -
\rm7 -
D2 -
\small1 -
weight\_decay1
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 reinforcement learning and alignment papers
- Direct Preference Optimization: Your Language Model is Secretly a Reward Model (DPO, 2023)
- Trust Region Policy Optimization (TRPO, 2015)
- High-Dimensional Continuous Control Using Generalized Advantage Estimation (GAE, 2015)
- Continuous control with deep reinforcement learning (DDPG, 2015)
- Soft Actor-Critic: Off-Policy Maximum Entropy Deep Reinforcement Learning with a Stochastic Actor (SAC, 2018)