Papers · Generative models · 2016

Density estimation using Real NVP

Laurent Dinh, Jascha Sohl-Dickstein, Samy Bengio

The notation of the RealNVP paper, explained: its 21 displayed equations, then every symbol it uses, grouped by category and shown the way the paper writes it.

Read the paper on arXiv

Read from arXiv's HTML version: 21 displayed equations and 90 pieces of inline math. 49 symbols and constructs from the catalog.

The paper's displayed equations

Open any of them in the decoder for a symbol-by-symbol reading.

  1. (1)
    pX(x)=pZ(z)∣det⁡(∂g(z)∂zT)∣−1.p_{X}(x)=p_{Z}(z)\left|\det\left(\frac{\partial g(z)}{\partial z^{T}}\right)\right|^{-1}.
    Decode →
  2. (2)
    pX(x)=pZ(f(x))∣det⁡(∂f(x)∂xT)∣p_{X}(x) =p_{Z}\big(f(x)\big)\left|\det\left(\cfrac{\partial f(x)}{\partial x^{T}}\right)\right|
    Decode →
  3. (3)
    log⁡(pX(x))=log⁡(pZ(f(x)))+log⁡(∣det⁡(∂f(x)∂xT)∣),\log\left(p_{X}(x)\right) =\log\Big(p_{Z}\big(f(x)\big)\Big)+\log\left(\left|\det\left(\frac{\partial f(x)}{\partial x^{T}}\right)\right|\right),
    Decode →
  4. (4)
    y1:d=x1:dy_{1:d} =x_{1:d}
    Decode →
  5. (5)
    yd+1:D=xd+1:D⊙exp⁡(s(x1:d))+t(x1:d),y_{d+1:D} =x_{d+1:D}\odot\exp\big(s(x_{1:d})\big)+t(x_{1:d}),
    Decode →
  6. ∂y∂xT=[Id0∂yd+1:D∂x1:dTdiag⁡(exp⁡[s(x1:d)])],\frac{\partial y}{\partial x^{T}}=\left[\begin{array}{cc}{\mathbb{I}}_{d}&0\\ \frac{\partial y_{d+1:D}}{\partial x_{1:d}^{T}}&\operatorname{diag}\big(\exp\left[s\left(x_{1:d}\right)\right]\big)\end{array}\right],
    Decode →
  7. (8)
    {y1:d=x1:dyd+1:D=xd+1:D⊙exp⁡(s(x1:d))+t(x1:d)\begin{cases}y_{1:d}&=x_{1:d}\\ y_{d+1:D}&=x_{d+1:D}\odot\exp\big(s(x_{1:d})\big)+t(x_{1:d})\end{cases}
    Decode →
  8. (9)
    ⇔{x1:d=y1:dxd+1:D=(yd+1:D−t(y1:d))⊙exp⁡(−s(y1:d)),\Leftrightarrow\begin{cases}x_{1:d}&=y_{1:d}\\ x_{d+1:D}&=\big(y_{d+1:D}-t(y_{1:d})\big)\odot\exp\big(-s(y_{1:d})\big),\end{cases}
    Decode →
  9. (10)
    y=b⊙x+(1−b)⊙(x⊙exp⁡(s(b⊙x))+t(b⊙x)).y=b\odot x+(1-b)\odot\Big(x\odot\exp\big(s(b\odot x)\big)+t(b\odot x)\Big).
    Decode →
  10. (11)
    ∂(fb∘fa)∂xaT(xa)=∂fa∂xaT(xa)⋅∂fb∂xbT(xb=fa(xa))\cfrac{\partial(f_{b}\circ f_{a})}{\partial x_{a}^{T}}(x_{a}) =\cfrac{\partial f_{a}}{\partial x_{a}^{T}}(x_{a})\cdot\cfrac{\partial f_{b}}{\partial x_{b}^{T}}\big(x_{b}=f_{a}(x_{a})\big)
    Decode →
  11. (12)
    det⁡(A⋅B)=det⁡(A)det⁡(B).\det(A\cdot B) =\det(A)\det(B).
    Decode →
  12. (13)
    (fb∘fa)−1=fa−1∘fb−1.(f_{b}\circ f_{a})^{-1}=f_{a}^{-1}\circ f_{b}^{-1}.
    Decode →

Symbols, by category

Most used first. The examples are written as the paper writes them.

Notation conventions

  1. xx, zz, gg

    Italic letters (variables) 226 uses

    A plain italic letter is a variable; conventions say what kind (x input, y target, W weights…).

  2. pXp_{X}, pZp_{Z}, y1:dy_{1:d}

    Subscript (index or label) 85 uses

    A subscript picks an element (xᵢ), a time step (h_t), a named copy (W_q), or the parameters (p_θ).

  3. σ~2\tilde{\sigma}^{2}, σ~i2\tilde{\sigma}_{i}^{2}, σ~t+12\tilde{\sigma}^{2}_{t+1}

    Superscript (power or label) 15 uses

    Usually a power (x² = x·x), but a capital or a word up there is often just a label (W^Q).

  4. μ~\tilde{\mu}, σ~\tilde{\sigma}

    Tilde accent 13 uses

    A modified version of the variable: noisy, corrupted, proposed or intermediate.

  5. h(0)h^{(0)}, z(i+1)z^{(i+1)}, h(i+1)h^{(i+1)}

    Superscript in parentheses 11 uses

    An index in a superscript: x⁽ⁱ⁾ is the i-th training example, W⁽ˡ⁾ the weights of layer l. Not a power.

  6. μ^\hat{\mu}, σ^\hat{\sigma}, p^\hat{p}

    Hat (estimate) 8 uses

    A hat marks an estimate or prediction: ŷ is the model’s guess for y.

  7. …\dots, ⋯\cdots

    Dots (ellipsis) 6 uses

    “And so on”: continue the pattern.

  8. X\mathcal{X}, Z\mathcal{Z}

    Calligraphic letters 4 uses

    A script capital usually names a set, a space, a distribution or a loss.

Greek letters

  1. ϕ\phi

    Phi 28 uses

    The parameters of a second model (often the encoder q_φ), or a feature map φ(x).

  2. σ\sigma

    Sigma (lowercase) 10 uses

    Either the sigmoid function σ(z) = 1/(1+e⁻ᶻ) or a standard deviation. The context decides.

  3. π\pi

    Pi 10 uses

    A policy π(a | s) in reinforcement learning, or the constant 3.14159…

  4. μ\mu

    Mu 9 uses

    A mean: the average of a distribution, a batch, or a layer’s features.

  5. ρ\rho

    Rho 5 uses

    A correlation coefficient, a decay rate (RMSprop, Adadelta), or an importance ratio in RL.

  6. α\alpha

    Alpha 3 uses

    Often a learning rate or step size; also attention weights αᵢⱼ or a mixing weight.

  7. ϵ\epsilon

    Epsilon 2 uses

    A tiny constant for numerical safety (10⁻⁸ in Adam), or noise ε ~ 𝒩(0, I).

Vectors and matrices

  1. ×\times

    Times (cross) 40 uses

    Usually the “by” in a shape (n × d); also plain multiplication or a cross product.

  2. zTz^{T}, xTx^{T}, x1:dTx_{1:d}^{T}

    Transpose 10 uses

    Swap rows and columns. xᵀy is a dot product; xyᵀ is an outer product.

  3. ⊙\odot

    Hadamard (elementwise) product 10 uses

    Multiply two arrays of the same shape entry by entry.

  4. (fb∘fa)−1(f_{b}\circ f_{a})^{-1}, fa−1f_{a}^{-1}, fb−1f_{b}^{-1}

    Inverse 9 uses

    The matrix inverse, A⁻¹A = I; for a function, its inverse function; for a number, 1/x.

  5. det⁡\det

    Determinant 7 uses

    A number from a square matrix: how much it scales volume. Zero means it is not invertible.

  6. ⋅\cdot, (⋅)(\cdot)

    Centre dot 5 uses

    A dot product between vectors, plain multiplication between numbers, or an empty slot f(·).

  7. Absolute value (bars) 3 uses

    Absolute value of a number; for a set, its size; for a matrix, sometimes its determinant.

  8. diag⁡\operatorname{diag}

    Diag 2 uses

    Build a diagonal matrix from a vector, or pull out the diagonal of a matrix.

  9. x\mathbf{x}

    Bold lowercase (vector) 2 uses

    A bold lowercase letter is a vector: a list of numbers.

  10. Bold uppercase (matrix) 1 use

    A bold capital letter is a matrix (or a higher-order tensor).

Calculus and gradients

  1. ϕ′\phi^{\prime}, y′y^{\prime}, x′x^{\prime}

    Prime 18 uses

    Either a derivative, f′(x), or simply "another one": x′ is a second sample, s′ the next state.

  2. ∂g(z)∂zT\frac{\partial g(z)}{\partial z^{T}}, ∂f(x)∂xT\cfrac{\partial f(x)}{\partial x^{T}}, ∂f(x)∂xT\frac{\partial f(x)}{\partial x^{T}}

    Partial derivative 10 uses

    A partial derivative: how one quantity changes when one input changes and the others are held fixed.

Probability and statistics

  1. pp

    Probability p(x) 16 uses

    A probability or probability density; p is usually the true or model distribution, q an approximation.

  2. exp⁡\exp

    Exponential 8 uses

    The exponential function eˣ, with e ≈ 2.718. Always positive.

  3. ∼\sim

    Distributed as (tilde) 5 uses

    “Is drawn from” or “is distributed as”: x ~ p means x is a sample from the distribution p.

  4. log⁡\log

    Logarithm 3 uses

    A logarithm, almost always the natural log (base e) in ML papers.

  5. ;;

    Semicolon (parameterized by) 2 uses

    In p(x; θ), the semicolon separates the variable x from fixed parameters θ.

  6. I\mathbb{I}

    Indicator function 1 use

    1 when the condition inside is true, 0 when it is false.

Functions and operators

  1. ::, ↦\mapsto, ⇒\Rightarrow

    Arrow (maps to) 29 uses

    Maps to (f: X → Y), tends to (x → 0), or implies (⇒).

  2. 12\frac{1}{2}, s2\frac{s}{2}, x256\frac{x}{256}

    Fraction 15 uses

    Division: the top divided by the bottom.

  3. ∘\circ

    Composition (circle) 3 uses

    Function composition: (f ∘ g)(x) = f(g(x)). Some papers use it for elementwise products.

  4. cos⁡\cos

    Cosine 3 uses

    The cosine function; in ML papers usually cosine similarity, a cosine schedule, or positional encodings.

  5. sin⁡\sin

    Sine 3 uses

    The sine function; in ML papers mostly inside positional encodings and rotary embeddings.

  6. Cases (piecewise) 2 uses

    A piecewise definition: the value on each line applies when that line’s condition holds.

  7. σ~2+ϵ\sqrt{\tilde{\sigma}^{2}+\epsilon}

    Square root 1 use

    The square root. In attention, dividing by √d_k keeps dot products at a sensible scale.

  8. ∏i\prod_{i}

    Product 1 use

    Multiply the expression for every value of the index.

  9. ⇐\Leftarrow

    Assignment arrow 1 use

    Assignment in an algorithm: replace the variable on the left with the value on the right.

  10. ∑j\sum_{j}

    Summation 1 use

    Add up the expression for every value of the index, from the bottom limit to the top.

  11. logit\text{logit}

    Logit and logits 1 use

    The log-odds log(p/(1−p)), the inverse of the sigmoid; “logits” are the raw scores before a softmax.

  12. arg max⁡\argmax

    Argmax 1 use

    The input that makes the function largest, not the largest value itself.

Sets, shapes and definitions

  1. ∈\in

    Element of 7 uses

    “Is in” or “belongs to”: x ∈ S says x is a member of the set S.

  2. {0,π4,⋯ ,7π4}\{0,\frac{\pi}{4},\cdots,\frac{7\pi}{4}\}

    Set braces 5 uses

    A set: a collection of items. {x | condition} is every x that satisfies the condition.

  3. <<

    Inequalities 2 uses

    Less than / greater than (or equal). ≪ means “much smaller than”.

  4. ⇔\Leftrightarrow

    If and only if 1 use

    “If and only if”: each side implies the other, so they are true together or false together.

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 generative models papers