Papers · Generative models · 2014

Generative Adversarial NetsThanks: Sherjil Ozair is visiting Université de Montréal from Indian Institute of Technology DelhiThanks: Yoshua Bengio is a CIFAR Senior Fellow.

Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza and others

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

Read the paper on arXiv

Reading this paper

The GAN paper: a generator GG and a discriminator DD play a two-player game, min⁡Gmax⁡DV(D,G)\min_G \max_D V(D, G).

Three distributions appear: pdatap_{\text{data}} (the real data), pzp_{\boldsymbol{z}} (the noise fed to the generator) and pgp_g (what the generator produces). The subscripts are labels. D(x)D(\boldsymbol{x}) is a probability, the discriminator's belief that x\boldsymbol{x} is real, so log⁡D\log D and log⁡(1−D)\log(1 - D) are the log-probabilities of judging right.

Read from arXiv's HTML version: 11 displayed equations and 72 pieces of inline math. 33 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)
    min⁡Gmax⁡DV(D,G)=Ex∼pdata(x)[log⁡D(x)]+Ez∼pz(z)[log⁡(1−D(G(z)))].\min_{G}\max_{D}V(D,G)=\mathbb{E}_{\bm{x}\sim p_{\text{data}}(\bm{x})}[\log D(\bm{x})]+\mathbb{E}_{\bm{z}\sim p_{\bm{z}}(\bm{z})}[\log(1-D(G(\bm{z})))].
    Decode →
  2. ∇θd1m∑i=1m[log⁡D(x(i))+log⁡(1−D(G(z(i))))].\nabla_{\theta_{d}}\frac{1}{m}\sum_{i=1}^{m}\left[\log D\left(\bm{x}^{(i)}\right)+\log\left(1-D\left(G\left(\bm{z}^{(i)}\right)\right)\right)\right].
    Decode →
  3. ∇θg1m∑i=1mlog⁡(1−D(G(z(i)))).\nabla_{\theta_{g}}\frac{1}{m}\sum_{i=1}^{m}\log\left(1-D\left(G\left(\bm{z}^{(i)}\right)\right)\right).
    Decode →
  4. (2)
    DG∗(x)=pdata(x)pdata(x)+pg(x)D^{*}_{G}(\bm{x})=\frac{p_{\text{data}}(\bm{x})}{p_{\text{data}}(\bm{x})+p_{g}(\bm{x})}
    Decode →
  5. (3)
    V(G,D)=∫xpdata(x)log⁡(D(x))dx+∫zpz(z)log⁡(1−D(g(z)))dz=∫xpdata(x)log⁡(D(x))+pg(x)log⁡(1−D(x))dx\begin{gathered}V(G,D)= \int_{\bm{x}}p_{\text{data}}(\bm{x})\log(D(\bm{x}))dx+\int_{z}p_{\bm{z}}(\bm{z})\log(1-D(g(\bm{z})))dz \\ = \int_{\bm{x}}p_{\text{data}}(\bm{x})\log(D(\bm{x}))+p_{g}(\bm{x})\log(1-D(\bm{x}))dx\end{gathered}
    Decode →
  6. (4)
    C(G)=max⁡DV(G,D)=Ex∼pdata[log⁡DG∗(x)]+Ez∼pz[log⁡(1−DG∗(G(z)))]\begin{gathered}C(G)= \max_{D}V(G,D) \\ = \mathbb{E}_{\bm{x}\sim p_{\text{data}}}[\log D^{*}_{G}(\bm{x})]+\mathbb{E}_{\bm{z}\sim p_{\bm{z}}}[\log(1-D^{*}_{G}(G(\bm{z})))]\end{gathered}
    Decode →
  7. =Ex∼pdata[log⁡DG∗(x)]+Ex∼pg[log⁡(1−DG∗(x))]=Ex∼pdata[log⁡pdata(x)Pdata(x)+pg(x)]+Ex∼pg[log⁡pg(x)pdata(x)+pg(x)]\begin{gathered}= \mathbb{E}_{\bm{x}\sim p_{\text{data}}}[\log D^{*}_{G}(\bm{x})]+\mathbb{E}_{\bm{x}\sim p_{g}}[\log(1-D^{*}_{G}(\bm{x}))] \\ = \mathbb{E}_{\bm{x}\sim p_{\text{data}}}\left[\log\frac{p_{\text{data}}(\bm{x})}{P_{\text{data}}(\bm{x})+p_{g}(\bm{x})}\right]+\mathbb{E}_{\bm{x}\sim p_{g}}\left[\log\frac{p_{g}(\bm{x})}{p_{\text{data}}(\bm{x})+p_{g}(\bm{x})}\right]\end{gathered}
    Decode →
  8. Ex∼pdata[−log⁡2]+Ex∼pg[−log⁡2]=−log⁡4\mathbb{E}_{\bm{x}\sim p_{\text{data}}}\left[-\log 2\right]+\mathbb{E}_{\bm{x}\sim p_{g}}\left[-\log 2\right]=-\log 4
    Decode →
  9. (5)
    C(G)=−log⁡(4)+KL(pdata∥pdata+pg2)+KL(pg∥pdata+pg2)C(G)=-\log(4)+KL\left(p_{\text{data}}\left\|\frac{p_{\text{data}}+p_{g}}{2}\right.\right)+KL\left(p_{g}\left\|\frac{p_{\text{data}}+p_{g}}{2}\right.\right)
    Decode →
  10. (6)
    C(G)=−log⁡(4)+2⋅JSD(pdata∥pg)C(G)=-\log(4)+2\cdot JSD\left(p_{\text{data}}\left\|p_{g}\right.\right)
    Decode →
  11. Ex∼pdata[log⁡DG∗(x)]+Ex∼pg[log⁡(1−DG∗(x))]\mathbb{E}_{\bm{x}\sim p_{\text{data}}}[\log D^{*}_{G}(\bm{x})]+\mathbb{E}_{\bm{x}\sim p_{g}}[\log(1-D^{*}_{G}(\bm{x}))]
    Decode →

Famous equations in this paper

Symbols, by category

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

Notation conventions

  1. VV, DD, GG

    Italic letters (variables) 198 uses

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

  2. pdatap_{\text{data}}, pzp_{\bm{z}}, θd\theta_{d}

    Subscript (index or label) 112 uses

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

  3. DG∗D^{*}_{G}, D∗D^{*}, DG∗D_{G}^{*}

    Star (optimal) 12 uses

    As a superscript, the optimal value: θ* is the best θ. Between two terms, convolution.

  4. x(i)\bm{x}^{(i)}, z(i)\bm{z}^{(i)}, z(1)\bm{z}^{(1)}

    Superscript in parentheses 9 uses

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

  5. …\dots

    Dots (ellipsis) 3 uses

    “And so on”: continue the pattern.

Greek letters

  1. θ\theta

    Theta 7 uses

    The model’s parameters: all of its weights and biases, as one collection.

  2. α\alpha

    Alpha 6 uses

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

  3. σ\sigma

    Sigma (lowercase) 3 uses

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

  4. β\beta

    Beta 2 uses

    Usually a decay rate (Adam’s β₁, β₂), a shift parameter in normalization, or a weight on a loss term.

Vectors and matrices

  1. x\bm{x}, z\bm{z}, z\mathbf{z}

    Bold lowercase (vector) 100 uses

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

  2. ∥pdata+pg2\left\|\frac{p_{\text{data}}+p_{g}}{2}\right., ∥pg\left\|p_{g}\right.

    Norm 3 uses

    The length (size) of a vector. With subscript 2 or none, the Euclidean length √(Σxᵢ²).

  3. ⋅\cdot

    Centre dot 1 use

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

Calculus and gradients

  1. ∫x\int_{\bm{x}}, ∫z\int_{z}

    Integral 3 uses

    An integral: a continuous sum. In ML it is usually an expectation or a marginalization.

  2. ∇θd\nabla_{\theta_{d}}, ∇θg\nabla_{\theta_{g}}

    Nabla (gradient) 2 uses

    The gradient: the vector of partial derivatives. ∇_θ L is how the loss changes with each parameter.

  3. ∂\partial

    Partial derivative 2 uses

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

Probability and statistics

  1. pp, PP

    Probability p(x) 97 uses

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

  2. log⁡\log

    Logarithm 33 uses

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

  3. ∼\sim

    Distributed as (tilde) 13 uses

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

  4. Ex∼pdata(x)\mathbb{E}_{\bm{x}\sim p_{\text{data}}(\bm{x})}, Ez∼pz(z)\mathbb{E}_{\bm{z}\sim p_{\bm{z}}(\bm{z})}, Ex∼pdata\mathbb{E}_{\bm{x}\sim p_{\text{data}}}

    Expectation 12 uses

    The expected value: the average of what is inside, weighted by the probabilities in the subscript.

  5. ;;

    Semicolon (parameterized by) 3 uses

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

  6. ∣|, ∣\mid

    Given (conditional bar) 3 uses

    “Given”: p(y | x) is the probability of y given that x is known.

  7. KLKL

    KL divergence 2 uses

    How different distribution q is from p. Zero when they match; not symmetric.

Functions and operators

  1. 1m\frac{1}{m}, pdata+pg2\frac{p_{\text{data}}+p_{g}}{2}, 12\frac{1}{2}

    Fraction 15 uses

    Division: the top divided by the bottom.

  2. ±\pm

    Plus or minus 8 uses

    Both signs at once: a ± b means a + b and a − b. In results tables, a mean and its spread.

  3. min⁡G\min_{G}, max⁡D\max_{D}, sup⁡α∈A\sup_{\alpha\in\cal{A}}

    Max and min 6 uses

    The largest (or smallest) value, over the arguments or over the range in the subscript.

  4. ∑i=1m\sum_{i=1}^{m}

    Summation 2 uses

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

  5. →\rightarrow

    Arrow (maps to) 1 use

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

Reinforcement learning

  1. JJ

    Objective J 1 use

    J(θ) is the objective: the quantity to maximize, such as the expected return of a policy.

Sets, shapes and definitions

  1. {z(1),…,z(m)}\{\bm{z}^{(1)},\dots,\bm{z}^{(m)}\}, {x(1),…,x(m)}\{\bm{x}^{(1)},\dots,\bm{x}^{(m)}\}, {0,0}\{0,0\}

    Set braces 4 uses

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

  2. ∈\in

    Element of 4 uses

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

  3. R2\mathbb{R}^{2}

    Tensor shapes 1 use

    ℝ with a superscript of sizes joined by × declares an array’s shape: ℝ^{B×T×d} is a 3-axis tensor.

  4. ∖\setminus

    Set difference 1 use

    A ∖ B: everything in A that is not in B.

  5. ∪\cup

    Union and intersection 1 use

    Union ∪: in either set. Intersection ∩: in both.

4 things the catalog has no entry for yet
  • ∙\bullet \bullet 5
  • \cal \cal 2
  • arg⁡\arg \arg 1
  • ̸\not \not 1

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