Calculus and gradients

∫p(x∣z) p(z) dz\int p(x \mid z)\, p(z)\, dz Integral

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

In ML papers

∫f(x) dx\int f(x)\, dx adds up ff over all values of xx. In ML papers integrals mostly appear in two places: expectations over a continuous variable, Ep[f]=∫f(x)p(x) dx\mathbb{E}_{p}[f] = \int f(x) p(x)\, dx, and marginalizing a variable out, p(x)=∫p(x∣z)p(z) dzp(x) = \int p(x \mid z) p(z)\, dz. These are usually intractable, which is why sampling and bounds like the ELBO exist.

How to type it

LaTeXShows
\int∫\int
\int_a^b f(x)\, dx∫abf(x) dx\int_a^b f(x)\, dx

A worked example

∫012x dx=[x2]01=1\int_0^1 2x \, dx = \left[x^2\right]_0^1 = 1

The density 2x2x on [0,1][0, 1] integrates to 1, as every probability density must.

Related

Ex∼p[f(x)]\mathbb{E}_{x \sim p}[f(x)]Expectation∑i=1Nxi\sum_{i=1}^{N} x_iSummationdydx\frac{dy}{dx}Derivative (d/dx)

Decode this example →