Flow-Based Generative Models · UFRJ · 2026.2
Today is none of those. Today is the foundation all three stand on.
We prove one result. Then we announce, on one slide, the three later sessions that use it.
When each of those three moments arrives, I will point back at this board.
Everything else in this session exists so that the promise can be stated precisely.
Ask it of every conditional expectation you meet: which panel is this?
Write \(f^{*}(y) = \mathbb{E}[X \mid Y = y]\).
Then for every square-integrable function \(f\) of \(Y\): \[ \mathbb{E}\big\Vert f(Y) - X \big\Vert^{2} = \mathbb{E}\big\Vert f^{*}(Y) - X \big\Vert^{2} + \mathbb{E}\big\Vert f(Y) - f^{*}(Y) \big\Vert^{2} . \] So \(f^{*}\) minimizes the left side, and it is the only minimizer.
Square-integrable, throughout: \(\mathbb{E}\Vert X\Vert^{2} < \infty\) and \(\mathbb{E}\Vert f(Y)\Vert^{2} < \infty\).
The proof is on the board. It is one expansion, and one cross term that dies.
The vertical edge is a floor. The horizontal edge is the only part training can move.
Tattoo it somewhere.
\(\psi_{\#}\, p\) is the distribution of \(\psi(x)\) when \(x \sim p\): \[ \mathbb{E}_{y \sim \psi_{\#} p}\big[ g(y) \big] = \mathbb{E}_{x \sim p}\big[ g(\psi(x)) \big] \quad \text{for every bounded } g . \]
Read it as an instruction: to sample from \(\psi_{\#}\, p\), sample from \(p\) and apply \(\psi\).
You built one in the primer: \(x = \mu + \sigma\varepsilon\) is \(\mathcal{N}(\mu, \sigma^2) = \psi_{\#}\,\mathcal{N}(0,1)\).
The symbol \(\psi_{\#}\) is the course standard, after (Lipman et al. 2024) §3.3.
\[ p_\theta = \big(\psi^{\theta}\big)_{\#}\, p_0 , \qquad p_0 = \mathcal{N}(0, I_d) \]
\[ \operatorname*{arg\,max}_{\theta}\; \mathbb{E}_{x_1 \sim q}\big[ \log p_\theta(x_1) \big] \;=\; \operatorname*{arg\,min}_{\theta}\; \mathrm{KL}\big(q \,\Vert\, p_\theta\big) . \]
Two lines: expand the divergence, drop the term with no \(\theta\) in it.
The data sits in the first argument — the mass-covering direction of the primer’s §3.3.
But maximum likelihood needs \(\log p_\theta(x_1)\), and the definition above only gives you samples.
| Unit | Strategy | What it costs |
|---|---|---|
| U1 | invertible by construction | what the map is allowed to be |
| U2 | volume change by calculus | a solver inside every training step |
| U3 | refuse to play | nothing yet — this is where the Lemma returns |
And one thing that cannot even be written down yet: comparing two whole paths of distributions, rather than two distributions.
\(X \sim \mathcal{N}(\mu_0, \sigma_0^{2} I_d)\), and \(Y = X + \sigma\varepsilon\).
(a) Compute \(\mathbb{E}[X \mid Y = y]\) in closed form, from the toolkit sheet.
(b) In \(d = 1\): train a small network on samples \((y, x)\) with the square loss. Plot it against your closed form.
(c) Replace the target \(X\) by \(Z = X + \eta\) with \(\mathbb{E}[\eta \mid Y] = 0\). Retrain. The losses differ; the learned function does not.
This exercise has a secret identity, to be revealed in U3.