Þ¤pathÙ;/home/runner/work/LINMA2472/LINMA2472/Lectures/diffusion.jl¨metadata€¬cell_resultsÞ@Ù$0e01c57f-65b1-480c-a258-9a76513ac8d6Чrunning§runtimeÎŽ£¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$0e01c57f-65b1-480c-a258-9a76513ac8d6¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÚt

For any random variables $X$, $Y$ and $Z$, we have

$$\log(f_X(x)) = D_\text{KL}((Y|X = x) \parallel (Z | X = x)) + \mathcal{L}(x)$$

where the evidence lower bound [KW13]

$$\mathcal{L}(x) = -D_\text{KL}((Y|X = x) \parallel Z) + \mathbb{E}[\log(f_{X|Z}(x|Y)) | X = x]$$

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸب¿_�°persist_js_state·has_pluto_hook_featuresÂÙ$6fd4e448-992f-4976-82e9-6313ba038d26Чrunning§runtimeÎ ²C¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$6fd4e448-992f-4976-82e9-6313ba038d26¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÚ¬

Image from [PY24; Figure 1]. Deterministic DDIM : move from a variance estimate $\sigma_t$ to $\sigma_{t-1}$:

$$\begin{align} X_t & = X_0 + \sigma_t \mathcal{E}\\ \mathbb{E}[X_{t-1}|X_t = x_{t}] & = \mathbb{E}[X_0|X_t = x_t] + \sigma_{t-1} \mathbb{E}[\mathcal{E}|X_t = x_t]\\ & = \mathbb{E}[X_t|X_t = x_t] - \sigma_t \mathbb{E}[\mathcal{E}|X_t = x_t] + \sigma_{t-1} \mathbb{E}[\mathcal{E}|X_t = x_t]\\ & = x_t + (\sigma_{t-1} - \sigma_t) \mathbb{E}[\mathcal{E}|X_t = x_t]\\ \end{align}$$

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸب¤1'°persist_js_state·has_pluto_hook_featuresÂÙ$a9e46466-cdbf-4539-ae36-a3113634b353Чrunning§runtime͸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$a9e46466-cdbf-4539-ae36-a3113634b353¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÙD

Acceleration

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئï»�°persist_js_state·has_pluto_hook_featuresÂÙ$3cdcd14a-9102-4ed4-b186-629ce183b73cЧrunning§runtimeÎCÑ*¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$3cdcd14a-9102-4ed4-b186-629ce183b73c¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÛ‘¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئǰpersist_js_state·has_pluto_hook_featuresÂÙ$abc07fcf-35f5-43eb-90aa-23ec0b581e56Чrunning§runtimeΩ r¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$abc07fcf-35f5-43eb-90aa-23ec0b581e56¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÚ ô
Proof

Using the fact that $\mathcal{E}$ is normally distributed, we have

$$\begin{align} \nabla_y f_\mathcal{E}((y - x)/\sigma) & = \frac{1}{\sqrt{2\pi}} \nabla_y \exp\left(-\frac{1}{2\sigma^2}\|x-y\|^2\right)\\ & = -\frac{\nabla_y \|x-y\|^2}{2\sigma^2} f_\mathcal{E}((y - x)/\sigma)\\ & = \frac{x-y}{\sigma^2} f_\mathcal{E}((y - x)/\sigma)\\ \end{align}$$

We have

$$\begin{align*} f_{X,Y}(x,y) & = f_X(x) f_\mathcal{E}((y - x)/\sigma)\\ \nabla_y f_{X,Y}(x,y) & = f_X(x) \nabla_y f_\mathcal{E}((y - x)/\sigma)\\ & = \frac{x-y}{\sigma^2} f_X(x) f_\mathcal{E}((y - x)/\sigma)\\ & = \frac{x-y}{\sigma^2} f_{X,Y}(x,y)\\ f_Y(y) & = \int_x f_{X,Y}(x,y) \, \text{d} x\\ \nabla_y f_Y(y) & = \int_x \nabla_y f_{X,Y}(x,y) \, \text{d} x\\ & = \int_x \frac{x-y}{\sigma^2} f_{X,Y}(x,y) \, \text{d} x\\ \sigma^2 \nabla_y f_Y(y) & = \int_x x f_{X,Y}(x,y) \, \text{d} x - y \int_x f_{X,Y}(x,y) \, \text{d} x\\ & = \int_x x f_{X|Y}(x|y) \, \text{d} x f_{Y}(y) - y f_{Y}(y)\\ \sigma^2 \nabla_y f_Y(y) / f_{Y}(y) & = \mathbb{E}[X | Y = y] - y\\ y + \sigma^2 \nabla_y \log f_Y(y) & = \mathbb{E}[X | Y = y]. \end{align*}$$

Now we have

$$\begin{align} \mathbb{E}[\mathcal{E}|Y=y] & = \frac{\mathbb{E}[Y|Y=y] - \mathbb{E}[X|Y=y]}{\sigma}\\ & = \frac{ y - (y + \sigma^2 \nabla_y \log f_Y(y)) }{\sigma}\\ & = -\sigma \nabla_y \log f_Y(y). \end{align}$$

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئ‡×¶°persist_js_state·has_pluto_hook_featuresÂÙ$d826a144-2c79-4c1e-ae3f-c11a4b5353d4Чrunning§runtimeάã߸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$d826a144-2c79-4c1e-ae3f-c11a4b5353d4¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÛ¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئÊó|°persist_js_state·has_pluto_hook_featuresÂÙ$6d63c708-6f10-4a21-b57b-a9bd138b5c8cЧrunning§runtime͸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$6d63c708-6f10-4a21-b57b-a9bd138b5c8c¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÙr

Evidence Lower BOund (ELBO)

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئñiϰpersist_js_state·has_pluto_hook_featuresÂÙ$0788ac02-dab8-4ddd-9130-2a632d8d3685Чrunning§runtimeÍ3®¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$0788ac02-dab8-4ddd-9130-2a632d8d3685¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÙF

Gaussian ELBO

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئôq°persist_js_state·has_pluto_hook_featuresÂÙ$0886ac78-6530-417b-80a5-5410c4719dd2Чrunning§runtimeÎÖ�¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$0886ac78-6530-417b-80a5-5410c4719dd2¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÚ

If $\sigma$ is too small then the support of $X + \sigma \mathcal{E}$ may not cover the whole state space → inaccurate $\epsilon_\theta(y)$ in these parts. More formally, the loss is the Fisher divergence:

$$\mathbb{E}[\|\epsilon_\theta(y) + \sigma \nabla_y \log f_Y(y)\|^2] = \int_y f_Y(y) \|\epsilon_\theta(y) + \sigma \nabla_y \log f_Y(y)\|^2 \,\text{d}y$$

so it is inaccurate for $y$ such that $f_Y(y)$ is too small. Image source.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸؤc’ó°persist_js_state·has_pluto_hook_featuresÂÙ$a7435857-1526-4155-b934-4c4cda9f6b30Чrunning§runtimeÍ!t¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$a7435857-1526-4155-b934-4c4cda9f6b30¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÙ\

Variance-dependent score

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئÍ<%°persist_js_state·has_pluto_hook_featuresÂÙ$19741723-3cc3-40df-83a3-fb2727504cd1Чrunning§runtimeÎH´û¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$19741723-3cc3-40df-83a3-fb2727504cd1¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÙ$qa (generic function with 2 methods)¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAڸئ

Score matching

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئºÿz°persist_js_state·has_pluto_hook_featuresÂÙ$410eac96-a384-48fa-b3f3-478be5bd236cЧrunning§runtimeÎ˸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$410eac96-a384-48fa-b3f3-478be5bd236c¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÚÓ

Improvement for conditioned diffusion for multi-modal distributions: use classifier [DN24]. Issue: need to train a classifier...

This classifier-guided strategy was replaced in [HS22] by a simpler trick: Train both a conditioned (with condition $\tau$) and an unconditioned diffusion model, and combine them with:

$$\bar{\epsilon}_t = \textcolor{purple}{\lambda} \epsilon_\theta(x_t, \sigma_t, \tau) \textcolor{purple}{+ (1 - \lambda) \epsilon_\theta(x_t, \sigma_t)} \qquad \text{with } \lambda > 1$$

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸبÀŰpersist_js_state·has_pluto_hook_featuresÂÙ$c3574e26-6e50-4f08-852a-df3ae91c197fЧrunning§runtimeÍ$1¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$c3574e26-6e50-4f08-852a-df3ae91c197f¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÙ^

Denoising with randomness

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئíÔª°persist_js_state·has_pluto_hook_featuresÂÙ$2cc866e8-fb23-4010-bec1-29d00202c7e1Чrunning§runtimeμÁ!¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$2cc866e8-fb23-4010-bec1-29d00202c7e1¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÚ]
What is the order between $\sigma_{t-1}, \sigma_t$ and $\sigma_{t'}$ ?

We have $\sigma_{t-1} < \sigma_t$ by assumption. Then, because $\sigma_{t-1}$ is the geometric mean of $\sigma_{t'}$ and $\sigma_t$, it must be between so $\sigma_{t'} < \sigma_{t-1} < \sigma_t$.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئîÍİpersist_js_state·has_pluto_hook_featuresÂÙ$40f21927-1d88-41f4-b55d-6b81ca2ec211Чrunning§runtimeÎý¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$40f21927-1d88-41f4-b55d-6b81ca2ec211¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÚ�
What is the solution if $E$ and $D$ were linear (i.e. matrices) ?

Given a matrix of data $X$, consider the SVD $X = U\Sigma V^\top$:

$$\begin{align} \|X - DEX\|_F^2 & = \|U \Sigma V^\top - DEU \Sigma V^\top\|_F^2\\ & = \|\Sigma - U^\top DEU \Sigma\|_F^2\\ \end{align}$$

The matrix $DE$ can be any matrix of rank equal to the dimension of the latent space. So the optimal solution is $DE = U\text{Diag}(\mathbf{1}_r, \mathbf{0}_{n-r})U^\top$ where $r$ is the dimension of the latent space.

This is similar to the PCA $D\hat{E} = U\text{Diag}(\sigma_1, \ldots, \sigma_r, \mathbf{0}_{n-r})V^\top$ which is the minimizer of $\|X - D\hat{E}\|_F^2$. More precisely, given the optimal rank-$r$ solution $D = U_{:,1:r}, \hat{E} = \text{Diag}(\sigma_1, \ldots, \sigma_r)U_{:,1:r}^\top$, an optimal solution of the linear auto-encoder can be obtained with $E = \hat{E}X^\dagger$ when $X^\dagger = V\Sigma^{-1}U^\top$.

In view of this, an Auto-Encoder can be thought of as a nonlinear generalization of PCA.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئð®S°persist_js_state·has_pluto_hook_featuresÂÙ$8cf52c38-a9a6-4614-a80b-b36e9d4e563fЧrunning§runtimeÎÓx¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$8cf52c38-a9a6-4614-a80b-b36e9d4e563f¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÚÏ

[DN24] P. Dhariwal and A. Nichol. Diffusion Models Beat GANs on Image Synthesis. In: Proceedings of the 35th International Conference on Neural Information Processing Systems, NIPS '21 (Curran Associates Inc., Red Hook, NY, USA, Jun 2024); pp. 8780–8794. Accessed on Nov 26, 2024.
[HS22] J. Ho and T. Salimans. Classifier-Free Diffusion Guidance (Jul 2022), arXiv:2207.12598. Accessed on Nov 26, 2024.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸة[Ô_°persist_js_state·has_pluto_hook_featuresÂÙ$23f3de75-0617-4232-bb71-bd9f3e355a1eЧrunning§runtimeÎ-L¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$23f3de75-0617-4232-bb71-bd9f3e355a1e¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÚÙ

The Maximum Likelihood Estimator (MLE) maximizes the following sum over our datapoints $x$ with its ELBO:

$$\sum_x \log(f_X(x)) \ge \sum_x -D_\text{KL}((Y|X = x) \parallel Z) + \mathbb{E}[\log(f_{X|Z}(x|Y))]$$

So the MLE minimizes the loss

$$-\mathbb{E}[\log(f_{X|Z}(x|Y))].$$

with the KL-regularizer

$$D_\text{KL}((Y|X = x) \parallel Z)$$

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸؤd0˰persist_js_state·has_pluto_hook_featuresÂÙ$687f5cb9-5a17-49cb-8d96-a35b66fbcba3Чrunning§runtimeÎÍå¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$687f5cb9-5a17-49cb-8d96-a35b66fbcba3¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÚ¸

Diffusion models are also known as energy-based models and then score-matching.

For fixed $\sigma$, the matching is $\epsilon_\theta(y) \approx \mathbb{E}[\mathcal{E}|X + \sigma \mathcal{E} = y] = -\sigma \nabla_y \log f_{X+\sigma\mathcal{E}}(y)$.

Training: sample $x$ / pick $x$ in dataset, sample $\varepsilon$, update $\theta$ to minimize (e.g., using gradient descent), the loss:

$$\mathbb{E}[\|\epsilon_\theta(X + \sigma \mathcal{E}) - \mathcal{E}\|^2]$$

Image source.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸؤcy:°persist_js_state·has_pluto_hook_featuresÂÙ$45382f1f-89d7-4972-96df-1d9288a52102Чrunning§runtimeÎ÷®r¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$45382f1f-89d7-4972-96df-1d9288a52102¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÚ‹

Given $0 \le \mu < 1$, pick $\sigma_{t'}$ such that $\sigma_{t-1} = \sigma_t^\mu\sigma_{t'}^{1 - \mu}$ we have the following sampler of [PY24]:

$$\begin{align} x_{t - 1} & = x_t + (\textcolor{purple}{\sigma_{t'}} - \sigma_t) \epsilon_\theta(x_t, \sigma_t) \textcolor{purple}{+ \eta w_t} \qquad w_t \sim \mathcal{N}(0, I) \end{align}$$

For $\mu = 0$, $\sigma_{t'} = \sigma_{t-1}$ and we recover deterministic DDIM. For $\mu = 1/2$, we have DDPM of [HJA20]

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸب¯~°persist_js_state·has_pluto_hook_featuresÂÙ$e0ba3b61-a618-49ce-9466-e6a8f674bd53Чrunning§runtimeΔ”¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$e0ba3b61-a618-49ce-9466-e6a8f674bd53¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÙJ

Source: [RBL+22; Figure 3]

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸب¿äÁ°persist_js_state·has_pluto_hook_featuresÂÙ$e50cffb2-ac51-483a-92d0-a19531ebb547Чrunning§runtimeÎ䩸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$e50cffb2-ac51-483a-92d0-a19531ebb547¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÚR
What should $\eta$ be ?

We want the noise level of $x_{t-1}$ to be at $\sigma_{t-1}$. So we want

$$\sigma_{t-1}^2 = \text{Var}(\sigma_{t'} \mathcal{E}_\theta(x_t, \sigma_t) + \eta W_t)$$

As $W_t$ and $\mathcal{E}_\theta(x_t, \sigma_t)$ are independent, their covariance is zero so

$$\sigma_{t-1}^2 = \sigma_{t'}^2 \text{Var}(\mathcal{E}_\theta(x_t, \sigma_t)) + \eta^2 \text{Var}(W_t)$$

Their variance is one, so we have

$$\sigma_{t-1}^2 = \sigma_{t'}^2 + \eta^2$$

This means that we should take $\eta = \sqrt{\sigma_{t-1}^2 - \sigma_{t'}^2}$.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئîý]°persist_js_state·has_pluto_hook_featuresÂÙ$a835f101-bfd0-428e-adba-64f5de7af14cЧrunning§runtimeÍ1ë¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$a835f101-bfd0-428e-adba-64f5de7af14c¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÙ^

Issue with small variance

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئÈ$°persist_js_state·has_pluto_hook_featuresÂÙ$d077a471-6b43-41df-8218-e3b4a7e38550Чrunning§runtimeÎÝž¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$d077a471-6b43-41df-8218-e3b4a7e38550¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÙ%cite (generic function with 1 method)¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAڸبˆ$ê°persist_js_state·has_pluto_hook_featuresÂÙ$c3af23f7-8919-4e27-a97e-6013038b8d8cЧrunning§runtimeÎo¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$c3af23f7-8919-4e27-a97e-6013038b8d8c¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÛN’õ

The matching is $\epsilon_\theta(y\textcolor{red}{, \sigma}) \approx -\sigma \nabla_y \log f_{X+\sigma\mathcal{E}}(y)$.

Training: sample $x$ / pick $x$ in dataset, sample $\textcolor{red}{\sigma, }\varepsilon$, update $\theta$ to minimize (e.g., using gradient descent), the loss:

$$\mathbb{E}[\|\epsilon_\theta(X + \sigma \mathcal{E} \textcolor{red}{, \sigma}) - \mathcal{E}\|^2]$$

Animation generated with smalldiffusion using a deterministic (i.e. $w_k=0$) sampler.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئë¢I°persist_js_state·has_pluto_hook_featuresÂÙ$423874b8-6d4c-423a-bf45-39d590600066Чrunning§runtime·á¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$423874b8-6d4c-423a-bf45-39d590600066¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÚº

Let $\sigma$ be a constant and consider a random variable $X$ with probability density function $f_X$ as well as a random Gaussian noise $\mathcal{E} \sim \mathcal{N}(0, 1)$ that is independent from $X$. If $Y = X + \sigma \mathcal{E}$ then

$$\mathbb{E}[X|Y=y] = y + \sigma^2 \nabla_y \log f_Y(y) \qquad \mathbb{E}[\mathcal{E}|Y=y] = -\sigma \nabla_y \log f_Y(y).$$

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸؤcS;°persist_js_state·has_pluto_hook_featuresÂÙ$7e7e2845-4bee-4dbc-b0f9-d964cd362248Чrunning§runtimeÍ.\¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$7e7e2845-4bee-4dbc-b0f9-d964cd362248¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÙ^

Issue with large variance

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئ˥ü°persist_js_state·has_pluto_hook_featuresÂÙ$53b3d56e-f11d-44c2-96ca-3714f4b4f929Чrunning§runtimeÎË­¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$53b3d56e-f11d-44c2-96ca-3714f4b4f929¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÚ¦

[HJA20] J. Ho, A. Jain and P. Abbeel. Denoising Diffusion Probabilistic Models. In: Proceedings of the 34th International Conference on Neural Information Processing Systems, NIPS '20 (Curran Associates Inc., Red Hook, NY, USA, Dec 2020); pp. 6840–6851. Accessed on Nov 26, 2024.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸةT},°persist_js_state·has_pluto_hook_featuresÂÙ$06e194ec-42dc-46aa-8935-86c4ed04b7c8Чrunning§runtimeÎôì¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$06e194ec-42dc-46aa-8935-86c4ed04b7c8¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÛ%§¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئÌyÿ°persist_js_state·has_pluto_hook_featuresÂÙ$8f51a619-d0ad-42d2-bac9-acb9eab7cccbЧrunning§runtimeÍ))¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$8f51a619-d0ad-42d2-bac9-acb9eab7cccb¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÙz

Variational AutoEncoders (VAEs)

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئõ}¯°persist_js_state·has_pluto_hook_featuresÂÙ$d821d85c-74ae-44d0-909b-02d3099d8201Чrunning§runtimeÎD¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$d821d85c-74ae-44d0-909b-02d3099d8201¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÚ¼

$\mathcal{L}(x)$ is a lower bound to $\log(f_X(x))$ as the Kullback-Leibler divergence $D_\text{KL}((Y|X = x) \parallel (Z | X = x))$ is always nonnegative.

In the context of VAEs, $Z$ represents the actual latent variable and $Y$ represents the estimated random variables, so $D_\text{KL}((Y|X = x) \parallel (Z | X = x))$ is a measure of the error made by our estimator.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸؤd?°persist_js_state·has_pluto_hook_featuresÂÙ$f50e757b-2f0d-458c-a577-3de499d9ba14Чrunning§runtimeξT¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$f50e757b-2f0d-458c-a577-3de499d9ba14¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÚ

Variational Auto-Encoder

We add artificial noise to improve learning:

$$\mathbb{E}[\|X - D(E_\mu(X) + \mathcal{E} \odot E_\sigma(X))\|_2^2]$$

An insightful way to model this is as follows.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸؤcèO°persist_js_state·has_pluto_hook_featuresÂÙ$c1fe952e-c074-49c1-91a4-0de76d235f25Чrunning§runtime΋Y¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$c1fe952e-c074-49c1-91a4-0de76d235f25¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÙ%refs (generic function with 1 method)¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAڸبÈ$…°persist_js_state·has_pluto_hook_featuresÂÙ$530110cc-1dc9-427e-950b-64c0d04fc0daЧrunning§runtimeÍ)ú¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$530110cc-1dc9-427e-950b-64c0d04fc0da¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÙ\

Classifier-Free Guidance

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئø‰Ò°persist_js_state·has_pluto_hook_featuresÂÙ$cddf4399-c659-4bbd-bae1-6d88f37a9b93Чrunning§runtimeÍ#J¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$cddf4399-c659-4bbd-bae1-6d88f37a9b93¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÙN

Optical illusions

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئú±°persist_js_state·has_pluto_hook_featuresÂÙ$2a0f227f-28b4-419e-9f82-f8bd13fca8c0Чrunning§runtimeÍ!̸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$2a0f227f-28b4-419e-9f82-f8bd13fca8c0¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÙ6

Utils

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئúݰpersist_js_state·has_pluto_hook_featuresÂÙ$b94dd60a-2116-43ce-a5c3-5f1ff24479c0Чrunning§runtime΄¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$b94dd60a-2116-43ce-a5c3-5f1ff24479c0¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÛФmime©text/html¬rootassigneeÀ²last_run_timestampËAڸئ÷ °persist_js_state·has_pluto_hook_featuresÂÙ$e33b16ec-4526-4dbe-affa-3e68aa508ab8Чrunning§runtimeÎ\¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$e33b16ec-4526-4dbe-affa-3e68aa508ab8¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÚ÷

If $\sigma$ is too large then $\epsilon_\theta(y) \approx -\sigma \nabla_y \log f_{X+\sigma\mathcal{E}}(y)$ everywhere but the distribution $Y \sim X + \sigma \mathcal{E}$ is too noisy, less specific to $X$ (small signal to noise ratio). Image source.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸؤc¨ë°persist_js_state·has_pluto_hook_featuresÂÙ$2a728c9a-4268-40ff-905d-60b3b4c5b99bЧrunning§runtimeÎZ„w›¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$2a728c9a-4268-40ff-905d-60b3b4c5b99b¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÚ

[HJA20] J. Ho, A. Jain and P. Abbeel. Denoising Diffusion Probabilistic Models. In: Proceedings of the 34th International Conference on Neural Information Processing Systems, NIPS '20 (Curran Associates Inc., Red Hook, NY, USA, Dec 2020); pp. 6840–6851. Accessed on Nov 26, 2024.
[PY24] F. Permenter and C. Yuan. Interpreting and Improving Diffusion Models from an Optimization Perspective (Jun 2024), arXiv:2306.04848. Accessed on Nov 26, 2024.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸةPIk°persist_js_state·has_pluto_hook_featuresÂÙ$de5ddee9-7a4c-4ae7-b6e2-ccdf1a406919Чrunning§runtimeΚ)¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$de5ddee9-7a4c-4ae7-b6e2-ccdf1a406919¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÚÑ

Find encoder $E$ and decoder $D$ that minimize the loss:

$$\mathbb{E}[\|X - D(E(X))\|_2^2]$$

The code (aka latent variable) $z = E(x)$ typically has a smaller size compared to $x$ to force the model to only keep essential features.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸؤcÂ/°persist_js_state·has_pluto_hook_featuresÂÙ$df9e106b-16c3-4605-b5f6-0a4e82dd4b3bЧrunning§runtimeÎɼJ¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$df9e106b-16c3-4605-b5f6-0a4e82dd4b3b¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÛu›

From Tweedie's formula, $\epsilon$ is estimated to be $-\sigma \nabla_y \log f_Y(y)$.

Sampler Langevin dynamics:

$$\begin{multline} y_{k+1} = y_k + \delta_k \nabla_y \log f_Y(y_k) + \sqrt{2\delta_k} w_k\\ \text{where } w_k \sim \mathcal{N}(0, 1) \end{multline}$$

Image source.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئº2º°persist_js_state·has_pluto_hook_featuresÂÙ$e728cc9a-c17f-4143-9e0e-12c03a965becЧrunning§runtimeÎ�ô¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$e728cc9a-c17f-4143-9e0e-12c03a965bec¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÚà

[RBL+22] R. Rombach, A. Blattmann, D. Lorenz et al. High-Resolution Image Synthesis With Latent Diffusion Models. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (2022); pp. 10684–10695. Accessed on Aug 26, 2024.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸة[ ¢°persist_js_state·has_pluto_hook_featuresÂÙ$3fde5f41-32a9-4585-9b6a-131173947346Чrunning§runtimeÎ2ƒÿÚ¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$3fde5f41-32a9-4585-9b6a-131173947346¹depends_on_disabled_cells¦queued¤logs�¦output†¤body ¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAڸإè=�°persist_js_state·has_pluto_hook_featuresÂÙ$4b272be9-6881-41e8-9168-3fe471527aa8Чrunning§runtimeÎi�¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$4b272be9-6881-41e8-9168-3fe471527aa8¹depends_on_disabled_cells¦queued¤logs�¦output†¤body ¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAڸا‘°persist_js_state·has_pluto_hook_featuresÂÙ$44bb88d2-2fc7-4901-9fc3-890e54754932Чrunning§runtimeÍ5�¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$44bb88d2-2fc7-4901-9fc3-890e54754932¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÙV

Tweedie's formula

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئ`Gܰpersist_js_state·has_pluto_hook_featuresÂÙ$fbb03a1a-99ef-4d98-8ba4-10d3cc026abcЧrunning§runtimeÎÜ`M¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$fbb03a1a-99ef-4d98-8ba4-10d3cc026abc¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÚn

[PY24] F. Permenter and C. Yuan. Interpreting and Improving Diffusion Models from an Optimization Perspective (Jun 2024), arXiv:2306.04848. Accessed on Nov 26, 2024.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸةR+�°persist_js_state·has_pluto_hook_featuresÂÙ$784608dc-cf8f-483b-964f-b66575dc430eЧrunning§runtimeÍ'Q¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$784608dc-cf8f-483b-964f-b66575dc430e¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÙ<

Sampling

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئìjϰpersist_js_state·has_pluto_hook_featuresÂÙ$1a1335db-6bc5-4a0e-a138-3513f7a2140dЧrunning§runtimeÎÊ£¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$1a1335db-6bc5-4a0e-a138-3513f7a2140d¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÚn

$$\begin{align} \text{Auto-Encoder} & & D(E(X))\\ \text{Variational Auto-Encoder} & & D(E(X) + \mathcal{E})\\ \text{Denoising Auto-Encoder} & & D(E(X + \sigma \mathcal{E}))\\ \end{align}$$

The goal of the diffusion model is, given a noisy image $Y = X + \sigma \mathcal{E}$ and $\sigma$, to find the noise $\mathcal{E}$. The denoising Auto-Encoder instead attempts to find the original image $X$. At the limit $\sigma \to 0$, the denoising Auto-Encoder $D(E(X + \sigma \mathcal{E}))$ is a classical Auto-Encoder, hence the name.

To train the denoising Auto-Encoder, we can use the Evidence Lower-Bound with $Y = X + \sigma \mathcal{E}$ and $Z$ such that $X = D(Z)$ [HJA20]:

$$-\log(f_X(x)) \le \mathbb{E}[-\log(f_{X|Z}(x|Y))] + D((Y|X = x) \parallel Z)$$

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸب¿½˜°persist_js_state·has_pluto_hook_featuresÂÙ$78dd39e3-d549-4012-92d1-3a1c8033ac29Чrunning§runtimeÎ +¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$78dd39e3-d549-4012-92d1-3a1c8033ac29¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÚR

As $\epsilon_\theta(x_t, \sigma_t)$ is more accurate than $\epsilon_\theta(x_{t+1}, \sigma_{t+1})$, [PY24; Section 5] suggests accelerating the convergence by correcting part of the previous step. That is, we take:

$$\bar{\epsilon}_t = \textcolor{purple}{\gamma} \epsilon_\theta(x_t, \sigma_t) \textcolor{purple}{+ (1 - \gamma) \epsilon_\theta(x_{t+1}, \sigma_{t+1})}$$

with $\gamma > 1$.

Image is [PY24; Figure 3].

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸب¿-#°persist_js_state·has_pluto_hook_featuresÂÙ$228d70f8-dd36-48a6-9c95-b2744c5b20b6Чrunning§runtimeÎÜX¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$228d70f8-dd36-48a6-9c95-b2744c5b20b6¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÚ

This can be approximated using Monte-Carlo given $L$ samples $\epsilon_1, \ldots \epsilon_L$ from the distribution $\mathcal{N}(0, I)$ as

$$\mathbb{E}[\log(f_{X|Z}(x|Y))] \approx \frac{1}{L} \sum_{i=1}^L \log(f_{X|Z}(x|E_\mu(x) + \epsilon_i \odot E_\sigma(x))).$$

In the simpler case where $D_\sigma(z) = \mathbf{1}$, we recognize the classical L2 norm:

$$\begin{align} \mathbb{E}[\log(f_{X|Z}(x|Y))] & \approx -\frac{\log(2\pi)}{2}+\frac{1}{L}\sum_{i=1}^L\|x - D_\mu(E_\mu(x) + \epsilon_i \odot E_\sigma(x))\|_2^2. \end{align}$$

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸؤdM°persist_js_state·has_pluto_hook_featuresÂÙ$76eaa13b-e76a-4e31-b702-78fd9694a059Чrunning§runtimeÍ$‰¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$76eaa13b-e76a-4e31-b702-78fd9694a059¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÙT

Monte-Carlo sampling

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئôÁ°persist_js_state·has_pluto_hook_featuresÂÙ$ca8b4f75-f8c7-4384-80ae-fbbdba85bd46Чrunning§runtimeÍ$Ÿdepends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$ca8b4f75-f8c7-4384-80ae-fbbdba85bd46¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÙX

Denoising Auto-Encoder

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئöEJ°persist_js_state·has_pluto_hook_featuresÂÙ$7d05bc54-a693-11ef-2d83-a5caeb91676eЧrunning§runtimeÍ'Q¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$7d05bc54-a693-11ef-2d83-a5caeb91676e¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÙL

Diffusion Models

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئ_tÞ°persist_js_state·has_pluto_hook_featuresÂÙ$cd8567a7-f4fe-4592-ae4c-facdc35db563Чrunning§runtimeα=}ܸdepends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$cd8567a7-f4fe-4592-ae4c-facdc35db563¹depends_on_disabled_cells¦queued¤logs’ˆ¥group¥utils¤lineÿ£msg’ÙXLoading bibliography from `/home/runner/work/LINMA2472/LINMA2472/Lectures/biblio.bib`...ªtext/plain¥level¤Info¢id¹Main_workspace#3_a1ed908b§cell_idÙ$cd8567a7-f4fe-4592-ae4c-facdc35db563¦kwargs�¤fileÙ7/home/runner/work/LINMA2472/LINMA2472/Lectures/utils.jlˆ¥group¥utils¤lineÿ£msg’²Loading completed.ªtext/plain¥level¤Info¢id¹Main_workspace#3_d0c2d7aa§cell_idÙ$cd8567a7-f4fe-4592-ae4c-facdc35db563¦kwargs�¤fileÙ7/home/runner/work/LINMA2472/LINMA2472/Lectures/utils.jl¦output†¤body…¦prefixÙ(DocumenterCitations.CitationBibliography¨elementsœ’§bibfile’Ù;"/home/runner/work/LINMA2472/LINMA2472/Lectures/biblio.bib"ªtext/plain’¥style’¬AlphaStyle()ªtext/plain’ªinsert_css’¤trueªtext/plain’ªshow_hover’¤trueªtext/plain’®show_backlinks’¤trueªtext/plain’§entries’…¦prefixÙ9OrderedCollections.OrderedDict{String, BibInternal.Entry}¨elements›’’¸"arechiga2023Dragguided"ªtext/plain’…¦prefix¥Entry¨elementsœ’¦access’…¦prefix¦Access¨elements“’£doi’»"10.48550/arXiv.2306.09935"ªtext/plain’¬howpublished’¢""ªtext/plain’£url’Ù!"http://arxiv.org/abs/2306.09935"ªtext/plain¤type¦struct¬prefix_short¦Access¨objectid°f45a2585d7d92123Ù!application/vnd.pluto.tree+object’§authors’…¦prefix°BibInternal.Name¨elements‘¤more¤type¥Array¬prefix_short ¨objectid°ee7b1912500591adÙ!application/vnd.pluto.tree+object’©booktitle’¢""ªtext/plain’¤date’…¦prefix¤Date¨elements“’£day’¢""ªtext/plain’¥month’¦"June"ªtext/plain’¤year’¦"2023"ªtext/plain¤type¦struct¬prefix_short¤Date¨objectid°5c9158b2610a0fafÙ!application/vnd.pluto.tree+object’§editors’…¦prefix°BibInternal.Name¨elements�¤type¥Array¬prefix_short ¨objectid°2efc9df3d108c3b3Ù!application/vnd.pluto.tree+object’¦eprint’…¦prefix¦Eprint¨elements“’®archive_prefix’§"arXiv"ªtext/plain’¦eprint’¬"2306.09935"ªtext/plain’­primary_class’¢""ªtext/plain¤type¦struct¬prefix_short¦Eprint¨objectid°2183054acef567a7Ù!application/vnd.pluto.tree+object’¢id’¸"arechiga2023Dragguided"ªtext/plain’¢in’…¦prefix¢In¨elementsž’§address’¢""ªtext/plain’§chapter’¢""ªtext/plain’§edition’¢""ªtext/plain’«institution’¢""ªtext/plain’¤isbn’¢""ªtext/plain’¤issn’¢""ªtext/plain’§journal’¢""ªtext/plain’¦number’²"arXiv:2306.09935"ªtext/plain’¬organization’¢""ªtext/plain’¥pages’¢""ªtext/plain’©publisher’§"arXiv"ªtext/plain’¦school’¢""ªtext/plain’¦series’¢""ªtext/plain’¦volume’¢""ªtext/plain¤type¦struct¬prefix_short¢In¨objectid°bd4cf4363b79b8a5Ù!application/vnd.pluto.tree+object’¦fields’…¦prefix´Dict{String, String}¨elements‘¤more¤type¤Dict¬prefix_short¤Dict¨objectid°adf64d04d25067afÙ!application/vnd.pluto.tree+object’¤note’¢""ªtext/plain’¥title’Ù;"Drag-Guided Diffusion Models for Vehicle Image Generation"ªtext/plain’¤type’¦"misc"ªtext/plain¤type¦struct¬prefix_short¥Entry¨objectid°454428e77305f844Ù!application/vnd.pluto.tree+object’’­"ba2016Layer"ªtext/plain’…¦prefix¥Entry¨elementsœ’¦access’…¦prefix¦Access¨elements“’£doi’»"10.48550/arXiv.1607.06450"ªtext/plain’¬howpublished’¢""ªtext/plain’£url’Ù!"http://arxiv.org/abs/1607.06450"ªtext/plain¤type¦struct¬prefix_short¦Access¨objectid°8d6486162109689eÙ!application/vnd.pluto.tree+object’§authors’…¦prefix°BibInternal.Name¨elements‘¤more¤type¥Array¬prefix_short ¨objectid°dbe8a6f3ab257eb0Ù!application/vnd.pluto.tree+object’©booktitle’¢""ªtext/plain’¤date’…¦prefix¤Date¨elements“’£day’¢""ªtext/plain’¥month’¦"July"ªtext/plain’¤year’¦"2016"ªtext/plain¤type¦struct¬prefix_short¤Date¨objectid°c809205db2cebaa0Ù!application/vnd.pluto.tree+object’§editors’…¦prefix°BibInternal.Name¨elements�¤type¥Array¬prefix_short ¨objectid°c4a815d1fca49df5Ù!application/vnd.pluto.tree+object’¦eprint’…¦prefix¦Eprint¨elements“’®archive_prefix’§"arXiv"ªtext/plain’¦eprint’¬"1607.06450"ªtext/plain’­primary_class’¢""ªtext/plain¤type¦struct¬prefix_short¦Eprint¨objectid°ac64071b138d2c2bÙ!application/vnd.pluto.tree+object’¢id’­"ba2016Layer"ªtext/plain’¢in’…¦prefix¢In¨elementsž’§address’¢""ªtext/plain’§chapter’¢""ªtext/plain’§edition’¢""ªtext/plain’«institution’¢""ªtext/plain’¤isbn’¢""ªtext/plain’¤issn’¢""ªtext/plain’§journal’¢""ªtext/plain’¦number’²"arXiv:1607.06450"ªtext/plain’¬organization’¢""ªtext/plain’¥pages’¢""ªtext/plain’©publisher’§"arXiv"ªtext/plain’¦school’¢""ªtext/plain’¦series’¢""ªtext/plain’¦volume’¢""ªtext/plain¤type¦struct¬prefix_short¢In¨objectid°2e8c7337a4c0d9a2Ù!application/vnd.pluto.tree+object’¦fields’…¦prefix´Dict{String, String}¨elements‘¤more¤type¤Dict¬prefix_short¤Dict¨objectid°2766622145b1a8a2Ù!application/vnd.pluto.tree+object’¤note’¢""ªtext/plain’¥title’¹"Layer {{Normalization}}"ªtext/plain’¤type’¦"misc"ªtext/plain¤type¦struct¬prefix_short¥Entry¨objectid°d5dea3db3c692636Ù!application/vnd.pluto.tree+object’’´"bahdanau2016Neural"ªtext/plain’…¦prefix¥Entry¨elementsœ’¦access’…¦prefix¦Access¨elements“’£doi’º"10.48550/arXiv.1409.0473"ªtext/plain’¬howpublished’¢""ªtext/plain’£url’Ù "http://arxiv.org/abs/1409.0473"ªtext/plain¤type¦struct¬prefix_short¦Access¨objectid°ab7a73d42104c5d7Ù!application/vnd.pluto.tree+object’§authors’…¦prefix°BibInternal.Name¨elements‘¤more¤type¥Array¬prefix_short ¨objectid°a1d0b90f36d2d75cÙ!application/vnd.pluto.tree+object’©booktitle’¢""ªtext/plain’¤date’…¦prefix¤Date¨elements“’£day’¢""ªtext/plain’¥month’¥"May"ªtext/plain’¤year’¦"2016"ªtext/plain¤type¦struct¬prefix_short¤Date¨objectid°cb906d6a65d51f82Ù!application/vnd.pluto.tree+object’§editors’…¦prefix°BibInternal.Name¨elements�¤type¥Array¬prefix_short ¨objectid°edab3f0bce880d2cÙ!application/vnd.pluto.tree+object’¦eprint’…¦prefix¦Eprint¨elements“’®archive_prefix’§"arXiv"ªtext/plain’¦eprint’«"1409.0473"ªtext/plain’­primary_class’¢""ªtext/plain¤type¦struct¬prefix_short¦Eprint¨objectid°2935460f0ee56ae6Ù!application/vnd.pluto.tree+object’¢id’´"bahdanau2016Neural"ªtext/plain’¢in’…¦prefix¢In¨elementsž’§address’¢""ªtext/plain’§chapter’¢""ªtext/plain’§edition’¢""ªtext/plain’«institution’¢""ªtext/plain’¤isbn’¢""ªtext/plain’¤issn’¢""ªtext/plain’§journal’¢""ªtext/plain’¦number’±"arXiv:1409.0473"ªtext/plain’¬organization’¢""ªtext/plain’¥pages’¢""ªtext/plain’©publisher’§"arXiv"ªtext/plain’¦school’¢""ªtext/plain’¦series’¢""ªtext/plain’¦volume’¢""ªtext/plain¤type¦struct¬prefix_short¢In¨objectid°fa93cc5ffa14e8fcÙ!application/vnd.pluto.tree+object’¦fields’…¦prefix´Dict{String, String}¨elements‘¤more¤type¤Dict¬prefix_short¤Dict¨objectid°e59d43e2c0505df6Ù!application/vnd.pluto.tree+object’¤note’¢""ªtext/plain’¥title’ÙW"Neural {{Machine Translation}} by {{Jointly Learning}} to {{Align}} and {{Translate}}"ªtext/plain’¤type’¦"misc"ªtext/plain¤type¦struct¬prefix_short¥Entry¨objectid°bdb65c2d5adca81fÙ!application/vnd.pluto.tree+object’’²"bengio2000Neural"ªtext/plain’…¦prefix¥Entry¨elementsœ’¦access’…¦prefix¦Access¨elements“’£doi’¢""ªtext/plain’¬howpublished’¢""ªtext/plain’£url’Ùn"https://proceedings.neurips.cc/pape" ⋯ 36 bytes ⋯ "bf572b5940d7d9a8fa4c-Abstract.html"ªtext/plain¤type¦struct¬prefix_short¦Access¨objectid°e2f24048c6c99cd6Ù!application/vnd.pluto.tree+object’§authors’…¦prefix°BibInternal.Name¨elements‘¤more¤type¥Array¬prefix_short ¨objectid°59c8657426bf42efÙ!application/vnd.pluto.tree+object’©booktitle’Ù7"Advances in {{Neural Information Processing Systems}}"ªtext/plain’¤date’…¦prefix¤Date¨elements“’£day’¢""ªtext/plain’¥month’¢""ªtext/plain’¤year’¦"2000"ªtext/plain¤type¦struct¬prefix_short¤Date¨objectid¯d76741a550985b8Ù!application/vnd.pluto.tree+object’§editors’…¦prefix°BibInternal.Name¨elements�¤type¥Array¬prefix_short ¨objectid°5a2ee443a78c26b2Ù!application/vnd.pluto.tree+object’¦eprint’…¦prefix¦Eprint¨elements“’®archive_prefix’¢""ªtext/plain’¦eprint’¢""ªtext/plain’­primary_class’¢""ªtext/plain¤type¦struct¬prefix_short¦Eprint¨objectid¯d1f4caf2f8d6d2aÙ!application/vnd.pluto.tree+object’¢id’²"bengio2000Neural"ªtext/plain’¢in’…¦prefix¢In¨elementsž’§address’¢""ªtext/plain’§chapter’¢""ªtext/plain’§edition’¢""ªtext/plain’«institution’¢""ªtext/plain’¤isbn’¢""ªtext/plain’¤issn’¢""ªtext/plain’§journal’¢""ªtext/plain’¦number’¢""ªtext/plain’¬organization’¢""ªtext/plain’¥pages’¢""ªtext/plain’©publisher’«"MIT Press"ªtext/plain’¦school’¢""ªtext/plain’¦series’¢""ªtext/plain’¦volume’¤"13"ªtext/plain¤type¦struct¬prefix_short¢In¨objectid°679c3c49b9a9b110Ù!application/vnd.pluto.tree+object’¦fields’…¦prefix´Dict{String, String}¨elements‘¤more¤type¤Dict¬prefix_short¤Dict¨objectid°9fc7b5d7b4a4d3cdÙ!application/vnd.pluto.tree+object’¤note’¢""ªtext/plain’¥title’Ù+"A {{Neural Probabilistic Language Model}}"ªtext/plain’¤type’¯"inproceedings"ªtext/plain¤type¦struct¬prefix_short¥Entry¨objectid°905c2754735ed0d3Ù!application/vnd.pluto.tree+object’’»"bradley2024ClassifierFree"ªtext/plain’…¦prefix¥Entry¨elementsœ’¦access’…¦prefix¦Access¨elements“’£doi’¢""ªtext/plain’¬howpublished’¢""ªtext/plain’£url’Ù,"https://openreview.net/forum?id=8K36RkrI7N"ªtext/plain¤type¦struct¬prefix_short¦Access¨objectid°4dd0dc756140887cÙ!application/vnd.pluto.tree+object’§authors’…¦prefix°BibInternal.Name¨elements‘¤more¤type¥Array¬prefix_short ¨objectid°77bf4a83e2645b1aÙ!application/vnd.pluto.tree+object’©booktitle’ÙM"The {{Thirteenth International Conference}} on {{Learning Representations}}"ªtext/plain’¤date’…¦prefix¤Date¨elements“’£day’¢""ªtext/plain’¥month’©"October"ªtext/plain’¤year’¦"2024"ªtext/plain¤type¦struct¬prefix_short¤Date¨objectid°2cf7433e0909f5bfÙ!application/vnd.pluto.tree+object’§editors’…¦prefix°BibInternal.Name¨elements�¤type¥Array¬prefix_short ¨objectid°fc95995e6c10ef35Ù!application/vnd.pluto.tree+object’¦eprint’…¦prefix¦Eprint¨elements“’®archive_prefix’¢""ªtext/plain’¦eprint’¢""ªtext/plain’­primary_class’¢""ªtext/plain¤type¦struct¬prefix_short¦Eprint¨objectid¯d1f4caf2f8d6d2aÙ!application/vnd.pluto.tree+object’¢id’»"bradley2024ClassifierFree"ªtext/plain’¢in’…¦prefix¢In¨elementsž’§address’¢""ªtext/plain’§chapter’¢""ªtext/plain’§edition’¢""ªtext/plain’«institution’¢""ªtext/plain’¤isbn’¢""ªtext/plain’¤issn’¢""ªtext/plain’§journal’¢""ªtext/plain’¦number’¢""ªtext/plain’¬organization’¢""ªtext/plain’¥pages’¢""ªtext/plain’©publisher’¢""ªtext/plain’¦school’¢""ªtext/plain’¦series’¢""ªtext/plain’¦volume’¢""ªtext/plain¤type¦struct¬prefix_short¢In¨objectid°65e642c9e0261cc0Ù!application/vnd.pluto.tree+object’¦fields’…¦prefix´Dict{String, String}¨elements‘¤more¤type¤Dict¬prefix_short¤Dict¨objectid°413d166af78c300dÙ!application/vnd.pluto.tree+object’¤note’¢""ªtext/plain’¥title’Ù;"Classifier-{{Free Guidance}} Is a {{Predictor-Corrector}}"ªtext/plain’¤type’¯"inproceedings"ªtext/plain¤type¦struct¬prefix_short¥Entry¨objectid°84e11f9b98eb1d64Ù!application/vnd.pluto.tree+object’’²"britz2017Massive"ªtext/plain’…¦prefix¥Entry¨elementsœ’¦access’…¦prefix¦Access¨elements“’£doi’»"10.48550/arXiv.1703.03906"ªtext/plain’¬howpublished’¢""ªtext/plain’£url’Ù!"http://arxiv.org/abs/1703.03906"ªtext/plain¤type¦struct¬prefix_short¦Access¨objectid°a30cc6bffe564c76Ù!application/vnd.pluto.tree+object’§authors’…¦prefix°BibInternal.Name¨elements‘¤more¤type¥Array¬prefix_short ¨objectid°ddca47dcae7a2172Ù!application/vnd.pluto.tree+object’©booktitle’¢""ªtext/plain’¤date’…¦prefix¤Date¨elements“’£day’¢""ªtext/plain’¥month’§"March"ªtext/plain’¤year’¦"2017"ªtext/plain¤type¦struct¬prefix_short¤Date¨objectid°f1083a01d970c7d5Ù!application/vnd.pluto.tree+object’§editors’…¦prefix°BibInternal.Name¨elements�¤type¥Array¬prefix_short ¨objectid°c06c321ff3a547c5Ù!application/vnd.pluto.tree+object’¦eprint’…¦prefix¦Eprint¨elements“’®archive_prefix’§"arXiv"ªtext/plain’¦eprint’¬"1703.03906"ªtext/plain’­primary_class’¢""ªtext/plain¤type¦struct¬prefix_short¦Eprint¨objectid°53a834c7b4a1652eÙ!application/vnd.pluto.tree+object’¢id’²"britz2017Massive"ªtext/plain’¢in’…¦prefix¢In¨elementsž’§address’¢""ªtext/plain’§chapter’¢""ªtext/plain’§edition’¢""ªtext/plain’«institution’¢""ªtext/plain’¤isbn’¢""ªtext/plain’¤issn’¢""ªtext/plain’§journal’¢""ªtext/plain’¦number’²"arXiv:1703.03906"ªtext/plain’¬organization’¢""ªtext/plain’¥pages’¢""ªtext/plain’©publisher’§"arXiv"ªtext/plain’¦school’¢""ªtext/plain’¦series’¢""ªtext/plain’¦volume’¢""ªtext/plain¤type¦struct¬prefix_short¢In¨objectid°60039b91202a02eaÙ!application/vnd.pluto.tree+object’¦fields’…¦prefix´Dict{String, String}¨elements‘¤more¤type¤Dict¬prefix_short¤Dict¨objectid°db0cf822aad115aeÙ!application/vnd.pluto.tree+object’¤note’¢""ªtext/plain’¥title’ÙI"Massive {{Exploration}} of {{Neural Machine Translation Architectures}}"ªtext/plain’¤type’¦"misc"ªtext/plain¤type¦struct¬prefix_short¥Entry¨objectid°773d58c9345b24b3Ù!application/vnd.pluto.tree+object’’³"brown2020Language"ªtext/plain’…¦prefix¥Entry¨elementsœ’¦access’…¦prefix¦Access¨elements“’£doi’»"10.48550/arXiv.2005.14165"ªtext/plain’¬howpublished’¢""ªtext/plain’£url’Ù!"http://arxiv.org/abs/2005.14165"ªtext/plain¤type¦struct¬prefix_short¦Access¨objectid°cd50b61de508b700Ù!application/vnd.pluto.tree+object’§authors’…¦prefix°BibInternal.Name¨elements‘¤more¤type¥Array¬prefix_short ¨objectid°c3ba5315fa3ef14dÙ!application/vnd.pluto.tree+object’©booktitle’¢""ªtext/plain’¤date’…¦prefix¤Date¨elements“’£day’¢""ªtext/plain’¥month’¦"July"ªtext/plain’¤year’¦"2020"ªtext/plain¤type¦struct¬prefix_short¤Date¨objectid°87e71ceee8081b78Ù!application/vnd.pluto.tree+object’§editors’…¦prefix°BibInternal.Name¨elements�¤type¥Array¬prefix_short ¨objectid¯a5133720776b734Ù!application/vnd.pluto.tree+object’¦eprint’…¦prefix¦Eprint¨elements“’®archive_prefix’§"arXiv"ªtext/plain’¦eprint’¬"2005.14165"ªtext/plain’­primary_class’¢""ªtext/plain¤type¦struct¬prefix_short¦Eprint¨objectid°fc3fb3939df590f7Ù!application/vnd.pluto.tree+object’¢id’³"brown2020Language"ªtext/plain’¢in’…¦prefix¢In¨elementsž’§address’¢""ªtext/plain’§chapter’¢""ªtext/plain’§edition’¢""ªtext/plain’«institution’¢""ªtext/plain’¤isbn’¢""ªtext/plain’¤issn’¢""ªtext/plain’§journal’¢""ªtext/plain’¦number’²"arXiv:2005.14165"ªtext/plain’¬organization’¢""ªtext/plain’¥pages’¢""ªtext/plain’©publisher’§"arXiv"ªtext/plain’¦school’¢""ªtext/plain’¦series’¢""ªtext/plain’¦volume’¢""ªtext/plain¤type¦struct¬prefix_short¢In¨objectid°9f18c19f70d24eb4Ù!application/vnd.pluto.tree+object’¦fields’…¦prefix´Dict{String, String}¨elements‘¤more¤type¤Dict¬prefix_short¤Dict¨objectid°56efdb30a2965c6cÙ!application/vnd.pluto.tree+object’¤note’¢""ªtext/plain’¥title’Ù/"Language {{Models}} Are {{Few-Shot Learners}}"ªtext/plain’¤type’¦"misc"ªtext/plain¤type¦struct¬prefix_short¥Entry¨objectid°8d0507eae2149b42Ù!application/vnd.pluto.tree+object’’¶"burgert2023Diffusion"ªtext/plain’…¦prefix¥Entry¨elementsœ’¦access’…¦prefix¦Access¨elements“’£doi’»"10.48550/arXiv.2312.03817"ªtext/plain’¬howpublished’¢""ªtext/plain’£url’Ù!"http://arxiv.org/abs/2312.03817"ªtext/plain¤type¦struct¬prefix_short¦Access¨objectid°7871e5abb012efe8Ù!application/vnd.pluto.tree+object’§authors’…¦prefix°BibInternal.Name¨elements‘¤more¤type¥Array¬prefix_short ¨objectid°fb5b860a697db941Ù!application/vnd.pluto.tree+object’©booktitle’¢""ªtext/plain’¤date’…¦prefix¤Date¨elements“’£day’¢""ªtext/plain’¥month’ª"December"ªtext/plain’¤year’¦"2023"ªtext/plain¤type¦struct¬prefix_short¤Date¨objectid°9187a69e042e0ae9Ù!application/vnd.pluto.tree+object’§editors’…¦prefix°BibInternal.Name¨elements�¤type¥Array¬prefix_short ¨objectid°7243669ed74d9e70Ù!application/vnd.pluto.tree+object’¦eprint’…¦prefix¦Eprint¨elements“’®archive_prefix’§"arXiv"ªtext/plain’¦eprint’¬"2312.03817"ªtext/plain’­primary_class’¢""ªtext/plain¤type¦struct¬prefix_short¦Eprint¨objectid°1f2ed3014161845bÙ!application/vnd.pluto.tree+object’¢id’¶"burgert2023Diffusion"ªtext/plain’¢in’…¦prefix¢In¨elementsž’§address’¢""ªtext/plain’§chapter’¢""ªtext/plain’§edition’¢""ªtext/plain’«institution’¢""ªtext/plain’¤isbn’¢""ªtext/plain’¤issn’¢""ªtext/plain’§journal’¢""ªtext/plain’¦number’²"arXiv:2312.03817"ªtext/plain’¬organization’¢""ªtext/plain’¥pages’¢""ªtext/plain’©publisher’§"arXiv"ªtext/plain’¦school’¢""ªtext/plain’¦series’¢""ªtext/plain’¦volume’¢""ªtext/plain¤type¦struct¬prefix_short¢In¨objectid°c2a191f4b5852dbfÙ!application/vnd.pluto.tree+object’¦fields’…¦prefix´Dict{String, String}¨elements‘¤more¤type¤Dict¬prefix_short¤Dict¨objectid°44465d90fd70ab05Ù!application/vnd.pluto.tree+object’¤note’¢""ªtext/plain’¥title’Ù?"Diffusion {{Illusions}}: {{Hiding Images}} in {{Plain Sight}}"ªtext/plain’¤type’¦"misc"ªtext/plain¤type¦struct¬prefix_short¥Entry¨objectid°2131fd9bb83cb3e6Ù!application/vnd.pluto.tree+object’’³"cho2014Properties"ªtext/plain’…¦prefix¥Entry¨elementsœ’¦access’…¦prefix¦Access¨elements“’£doi’º"10.48550/arXiv.1409.1259"ªtext/plain’¬howpublished’¢""ªtext/plain’£url’Ù "http://arxiv.org/abs/1409.1259"ªtext/plain¤type¦struct¬prefix_short¦Access¨objectid°b2b4f985fef788bbÙ!application/vnd.pluto.tree+object’§authors’…¦prefix°BibInternal.Name¨elements‘¤more¤type¥Array¬prefix_short ¨objectid°b5417d21dd37bb85Ù!application/vnd.pluto.tree+object’©booktitle’¢""ªtext/plain’¤date’…¦prefix¤Date¨elements“’£day’¢""ªtext/plain’¥month’©"October"ªtext/plain’¤year’¦"2014"ªtext/plain¤type¦struct¬prefix_short¤Date¨objectid°e0d003272dec03dcÙ!application/vnd.pluto.tree+object’§editors’…¦prefix°BibInternal.Name¨elements�¤type¥Array¬prefix_short ¨objectid°1df7410c2ea36850Ù!application/vnd.pluto.tree+object’¦eprint’…¦prefix¦Eprint¨elements“’®archive_prefix’§"arXiv"ªtext/plain’¦eprint’«"1409.1259"ªtext/plain’­primary_class’¢""ªtext/plain¤type¦struct¬prefix_short¦Eprint¨objectid°bca0d6882f556f51Ù!application/vnd.pluto.tree+object’¢id’³"cho2014Properties"ªtext/plain’¢in’…¦prefix¢In¨elementsž’§address’¢""ªtext/plain’§chapter’¢""ªtext/plain’§edition’¢""ªtext/plain’«institution’¢""ªtext/plain’¤isbn’¢""ªtext/plain’¤issn’¢""ªtext/plain’§journal’¢""ªtext/plain’¦number’±"arXiv:1409.1259"ªtext/plain’¬organization’¢""ªtext/plain’¥pages’¢""ªtext/plain’©publisher’§"arXiv"ªtext/plain’¦school’¢""ªtext/plain’¦series’¢""ªtext/plain’¦volume’¢""ªtext/plain¤type¦struct¬prefix_short¢In¨objectid°5cc2f78480ab813cÙ!application/vnd.pluto.tree+object’¦fields’…¦prefix´Dict{String, String}¨elements‘¤more¤type¤Dict¬prefix_short¤Dict¨objectid°8b6f1a498b423e5dÙ!application/vnd.pluto.tree+object’¤note’¢""ªtext/plain’¥title’ÙY"On the {{Properties}} of {{Neural Machine Translation}}: {{Encoder-Decoder Approaches}}"ªtext/plain’¤type’¦"misc"ªtext/plain¤type¦struct¬prefix_short¥Entry¨objectid°2292f683de0544b9Ù!application/vnd.pluto.tree+object’’·"dhariwal2024Diffusion"ªtext/plain’…¦prefix¥Entry¨elementsœ’¦access’…¦prefix¦Access¨elements“’£doi’¢""ªtext/plain’¬howpublished’¢""ªtext/plain’£url’Ù0"https://dl.acm.org/doi/10.5555/3540261.3540933"ªtext/plain¤type¦struct¬prefix_short¦Access¨objectid°28c594d5bb7e9683Ù!application/vnd.pluto.tree+object’§authors’…¦prefix°BibInternal.Name¨elements‘¤more¤type¥Array¬prefix_short ¨objectid°5453b3119b58add6Ù!application/vnd.pluto.tree+object’©booktitle’Ùo"Proceedings of the 35th {{Internati" ⋯ 27 bytes ⋯ "al Information Processing Systems}}"ªtext/plain’¤date’…¦prefix¤Date¨elements“’£day’¢""ªtext/plain’¥month’¦"June"ªtext/plain’¤year’¦"2024"ªtext/plain¤type¦struct¬prefix_short¤Date¨objectid°287e7dab246d0a90Ù!application/vnd.pluto.tree+object’§editors’…¦prefix°BibInternal.Name¨elements�¤type¥Array¬prefix_short ¨objectid°c80afdd082c73aaaÙ!application/vnd.pluto.tree+object’¦eprint’…¦prefix¦Eprint¨elements“’®archive_prefix’¢""ªtext/plain’¦eprint’¢""ªtext/plain’­primary_class’¢""ªtext/plain¤type¦struct¬prefix_short¦Eprint¨objectid¯d1f4caf2f8d6d2aÙ!application/vnd.pluto.tree+object’¢id’·"dhariwal2024Diffusion"ªtext/plain’¢in’…¦prefix¢In¨elementsž’§address’³"Red Hook, NY, USA"ªtext/plain’§chapter’¢""ªtext/plain’§edition’¢""ªtext/plain’«institution’¢""ªtext/plain’¤isbn’³"978-1-71384-539-3"ªtext/plain’¤issn’¢""ªtext/plain’§journal’¢""ªtext/plain’¦number’¢""ªtext/plain’¬organization’¢""ªtext/plain’¥pages’¬"8780--8794"ªtext/plain’©publisher’¸"Curran Associates Inc."ªtext/plain’¦school’¢""ªtext/plain’¦series’®"{{NIPS}} '21"ªtext/plain’¦volume’¢""ªtext/plain¤type¦struct¬prefix_short¢In¨objectid°c1002b636c4a579cÙ!application/vnd.pluto.tree+object’¦fields’…¦prefix´Dict{String, String}¨elements‘¤more¤type¤Dict¬prefix_short¤Dict¨objectid°c523798efeacf5b3Ù!application/vnd.pluto.tree+object’¤note’¢""ªtext/plain’¥title’Ù3"Diffusion Models Beat {{GANs}} on Image Synthesis"ªtext/plain’¤type’¯"inproceedings"ªtext/plain¤type¦struct¬prefix_short¥Entry¨objectid°e0108f99dd240886Ù!application/vnd.pluto.tree+object¤more¤type¤Dict¬prefix_short«OrderedDict¨objectid°bc7b766454610fdcÙ!application/vnd.pluto.tree+object’©citations’…¦prefixÙ-OrderedCollections.OrderedDict{String, Int64}¨elements�¤type¤Dict¬prefix_short«OrderedDict¨objectid°e89d82cc332324bfÙ!application/vnd.pluto.tree+object’®page_citations’…¦prefix¹Dict{String, Set{String}}¨elements�¤type¤Dict¬prefix_short¤Dict¨objectid°60b166a1234aead7Ù!application/vnd.pluto.tree+object’ªanchor_map’…¦prefix´Documenter.AnchorMap¨elements’’£map’…¦prefixÙ5Dict{String, Dict{String, Vector{Documenter.Anchor}}}¨elements�¤type¤Dict¬prefix_short¤Dict¨objectid°20c33ce3236e994cÙ!application/vnd.pluto.tree+object’¥count’¡0ªtext/plain¤type¦struct¬prefix_short©AnchorMap¨objectid°97e43b7a9dfee7d1Ù!application/vnd.pluto.tree+object’«anchor_keys’…¦prefixÙPBijections.Bijection{String, String, Dict{String, String}, Dict{String, String}}¨elements�¤type¤Dict¬prefix_short©Bijection¨objectid°8d9b729d4ea52428Ù!application/vnd.pluto.tree+object’­hover_entries’…¦prefixÙ#Dict{String, Tuple{String, String}}¨elements�¤type¤Dict¬prefix_short¤Dict¨objectid¯cc54f45fb720b36Ù!application/vnd.pluto.tree+object’©backlinks’…¦prefixÙ6Dict{String, Vector{DocumenterCitations.CitationSite}}¨elements�¤type¤Dict¬prefix_short¤Dict¨objectid°c935f453f45356b7Ù!application/vnd.pluto.tree+object¤type¦struct¬prefix_short´CitationBibliography¨objectid°66b6ddf286b6ad99¤mimeÙ!application/vnd.pluto.tree+object¬rootassignee¦biblio²last_run_timestampËAڸب}Œ‡°persist_js_state·has_pluto_hook_featuresÂÙ$97d6e0da-0b53-4467-95f3-a524575daa49Чrunning§runtimeÎyʸdepends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$97d6e0da-0b53-4467-95f3-a524575daa49¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÛű¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئùPß°persist_js_state·has_pluto_hook_featuresÂÙ$c64fc228-d1e3-423f-8fb3-b8e7dff9d097Чrunning§runtimeι�¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$c64fc228-d1e3-423f-8fb3-b8e7dff9d097¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÙÞ

[KW13] D. P. Kingma and M. Welling. Auto-Encoding Variational Bayes (Dec 2013). Accessed on Nov 26, 2024.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸةS̰persist_js_state·has_pluto_hook_featuresÂÙ$09829600-3488-492a-a507-53a4bbcb1cfcЧrunning§runtimeÎÍP~¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$09829600-3488-492a-a507-53a4bbcb1cfc¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÚË

[BLL+23] R. Burgert, X. Li, A. Leite et al. Diffusion Illusions: Hiding Images in Plain Sight (Dec 2023), arXiv:2312.03817. Accessed on Nov 27, 2024.
[GPO24] D. Geng, I. Park and A. Owens. Visual Anagrams: Generating Multi-View Optical Illusions with Diffusion Models (Apr 2024), arXiv:2311.17919. Accessed on Nov 27, 2024.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸة`¨v°persist_js_state·has_pluto_hook_featuresÂÙ$76643525-2649-48b9-9d09-6d7dcef6e355Чrunning§runtimeÎ âã¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$76643525-2649-48b9-9d09-6d7dcef6e355¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÚ«

Consider two deterministic functions $E_\mu, E_\sigma : \mathbb{R}^n \to \mathbb{R}^r$ and $D_\mu, D_\sigma : \mathbb{R}^r \to \mathbb{R}^n$. Suppose $X = D_\mu(Z) + \mathcal{E}_1 \odot D_\sigma(Z)$ and $Y = E_\mu(X) + \mathcal{E}_2 \odot E_\sigma(X)$ with $\mathcal{E}_1, \mathcal{E}_2 \sim \mathcal{N}(0, I)$. We have (see [KW13; Appendix B] for a proof):

$$2D_\text{KL}((Y|X = x) \parallel Z) = \|E_\mu(X)\|_2^2 + \|E_\sigma(X)\|_2^2 - r - \sum_{i=1}^r \log((E_\sigma(X))_i^2)$$

For the second part of the ELBO, we have

$$\begin{align} & \mathbb{E}[\log(f_{X|Z}(x|Y))]\\ & = \mathbb{E}[\log(f_{X|Z}(x|E_\mu(x) + \mathcal{E}_2 \odot E_\sigma(x)))]\\ & = \mathbb{E}[\log(f_{\mathcal{E}_1}(\text{Diag}(D_\sigma(E_\mu(x) + \mathcal{E}_2 \odot E_\sigma(x)))^{-1} (x - D_\mu(E_\mu(x) + \mathcal{E}_2 \odot E_\sigma(x)))))]\\ & = -\frac{\log(2\pi)}{2}+\mathbb{E}[\|\text{Diag}(D_\sigma(E_\mu(x) + \mathcal{E}_2 \odot E_\sigma(x)))^{-1} (x - D_\mu(E_\mu(x) + \mathcal{E}_2 \odot E_\sigma(x)))\|_2^2]. \end{align}$$

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸب¿œ=°persist_js_state·has_pluto_hook_featuresÂÙ$9cd90023-cf5d-4291-ae69-bc902c5c41beЧrunning§runtimeÎ vR¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$9cd90023-cf5d-4291-ae69-bc902c5c41be¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÛSÕ

It was shown in [BLL+23] how to train a diffusion model to generate illusions. Suprisingly, [GPO24] showed that you don't need a specialized model and you can use a pre-trained diffusion model. Given $N$ transformations $v_1, \ldots, v_N$ [GPO24; Equation (2)]:

$$\bar{\epsilon}_t = \textcolor{purple}{\frac{1}{N} \sum_{i=1}^N v_i^{-1}(}\epsilon_\theta(\textcolor{purple}{v_i(}x_t\textcolor{purple}{)}, \sigma_t, \tau)\textcolor{purple}{)}$$

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸبÀA°persist_js_state·has_pluto_hook_featuresÂÙ$0708fa36-bf99-44e3-a69e-991ad521d34bЧrunning§runtimeÎóI¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$0708fa36-bf99-44e3-a69e-991ad521d34b¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÙÞ

[KW13] D. P. Kingma and M. Welling. Auto-Encoding Variational Bayes (Dec 2013). Accessed on Nov 26, 2024.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸةSݰpersist_js_state·has_pluto_hook_featuresÂÙ$ca68ba1d-5f02-4f80-8cd1-d0c297f19f58Чrunning§runtimeͱ¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$ca68ba1d-5f02-4f80-8cd1-d0c297f19f58¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÙV

Conditioned diffusion

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئ÷°persist_js_state·has_pluto_hook_featuresÂÙ$d3792580-6a04-4934-ad5a-cd054a5b4421Чrunning§runtimeÍ#|¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$d3792580-6a04-4934-ad5a-cd054a5b4421¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÙD

Auto-Encoder

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئð~(°persist_js_state·has_pluto_hook_featuresÂÙ$8e39960f-ab0a-4103-bd6b-00e779333b01Чrunning§runtimeÎáë¸depends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$8e39960f-ab0a-4103-bd6b-00e779333b01¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÚ�
Proof

Reminder: $D_\text{KL}(A \parallel B) = \sum_{a \in \text{Dom}(A)} f_A(a) \log \frac{f_A(a)}{f_B(a)} = \mathbb{E}[\log f_A(A) - \log f_B(A)]$

$$\begin{align} D_\text{KL}((Y|X = x) \parallel (Z | X = x)) & = \mathbb{E}[\log(f_{Y|X}(Y|x)) - \log(f_{Z|X}(Y|x)) | X = x]\\ & = \mathbb{E}[\log(f_{Y|X}(Y|x)) - \log(f_{Z,X}(Y,x)) | X = x]\\ & \qquad + \log(f_{X}(x))\\ & = \mathbb{E}[\log(f_{Y|X}(Y|x)) - \log(f_{X|Z}(x|Y)) - \log(f_{Z}(Y)) | X = x]\\ & \qquad + \log(f_{X}(x))\\ & = D_\text{KL}((Y|X = x) \parallel Z) - \mathbb{E}[\log(f_{X|Z}(x|Y)) | X = x]\\ & \qquad + \log(f_{X}(x)) \end{align}$$

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAڸئóEt°persist_js_state·has_pluto_hook_featuresÂÙ$87f3dafc-6452-4a3f-b635-9b7497e1481aЧrunning§runtimeÎ'иdepends_on_skipped_cellsµpublished_object_keys�§errored§cell_idÙ$87f3dafc-6452-4a3f-b635-9b7497e1481a¹depends_on_disabled_cells¦queued¤logs�¦output†¤bodyÛ3ͤmime©text/html¬rootassigneeÀ²last_run_timestampËAڸئí'°persist_js_state·has_pluto_hook_features±published_objects€¥bonds€´cell_execution_orderÜ@Ù$3fde5f41-32a9-4585-9b6a-131173947346Ù$19741723-3cc3-40df-83a3-fb2727504cd1Ù$7d05bc54-a693-11ef-2d83-a5caeb91676eÙ$44bb88d2-2fc7-4901-9fc3-890e54754932Ù$423874b8-6d4c-423a-bf45-39d590600066Ù$abc07fcf-35f5-43eb-90aa-23ec0b581e56Ù$df9e106b-16c3-4605-b5f6-0a4e82dd4b3bÙ$eaf0bcaa-75d9-4d9c-9e19-ca5a8532ed35Ù$687f5cb9-5a17-49cb-8d96-a35b66fbcba3Ù$3cdcd14a-9102-4ed4-b186-629ce183b73cÙ$a835f101-bfd0-428e-adba-64f5de7af14cÙ$0886ac78-6530-417b-80a5-5410c4719dd2Ù$d826a144-2c79-4c1e-ae3f-c11a4b5353d4Ù$7e7e2845-4bee-4dbc-b0f9-d964cd362248Ù$e33b16ec-4526-4dbe-affa-3e68aa508ab8Ù$06e194ec-42dc-46aa-8935-86c4ed04b7c8Ù$a7435857-1526-4155-b934-4c4cda9f6b30Ù$c3af23f7-8919-4e27-a97e-6013038b8d8cÙ$784608dc-cf8f-483b-964f-b66575dc430eÙ$87f3dafc-6452-4a3f-b635-9b7497e1481aÙ$c3574e26-6e50-4f08-852a-df3ae91c197fÙ$2cc866e8-fb23-4010-bec1-29d00202c7e1Ù$e50cffb2-ac51-483a-92d0-a19531ebb547Ù$a9e46466-cdbf-4539-ae36-a3113634b353Ù$d3792580-6a04-4934-ad5a-cd054a5b4421Ù$de5ddee9-7a4c-4ae7-b6e2-ccdf1a406919Ù$40f21927-1d88-41f4-b55d-6b81ca2ec211Ù$f50e757b-2f0d-458c-a577-3de499d9ba14Ù$6d63c708-6f10-4a21-b57b-a9bd138b5c8cÙ$8e39960f-ab0a-4103-bd6b-00e779333b01Ù$d821d85c-74ae-44d0-909b-02d3099d8201Ù$0788ac02-dab8-4ddd-9130-2a632d8d3685Ù$76eaa13b-e76a-4e31-b702-78fd9694a059Ù$228d70f8-dd36-48a6-9c95-b2744c5b20b6Ù$8f51a619-d0ad-42d2-bac9-acb9eab7cccbÙ$23f3de75-0617-4232-bb71-bd9f3e355a1eÙ$ca8b4f75-f8c7-4384-80ae-fbbdba85bd46Ù$ca68ba1d-5f02-4f80-8cd1-d0c297f19f58Ù$b94dd60a-2116-43ce-a5c3-5f1ff24479c0Ù$530110cc-1dc9-427e-950b-64c0d04fc0daÙ$97d6e0da-0b53-4467-95f3-a524575daa49Ù$cddf4399-c659-4bbd-bae1-6d88f37a9b93Ù$2a0f227f-28b4-419e-9f82-f8bd13fca8c0Ù$4b272be9-6881-41e8-9168-3fe471527aa8Ù$cd8567a7-f4fe-4592-ae4c-facdc35db563Ù$d077a471-6b43-41df-8218-e3b4a7e38550Ù$6fd4e448-992f-4976-82e9-6313ba038d26Ù$45382f1f-89d7-4972-96df-1d9288a52102Ù$78dd39e3-d549-4012-92d1-3a1c8033ac29Ù$0e01c57f-65b1-480c-a258-9a76513ac8d6Ù$76643525-2649-48b9-9d09-6d7dcef6e355Ù$1a1335db-6bc5-4a0e-a138-3513f7a2140dÙ$e0ba3b61-a618-49ce-9466-e6a8f674bd53Ù$410eac96-a384-48fa-b3f3-478be5bd236cÙ$9cd90023-cf5d-4291-ae69-bc902c5c41beÙ$c1fe952e-c074-49c1-91a4-0de76d235f25Ù$2a728c9a-4268-40ff-905d-60b3b4c5b99bÙ$fbb03a1a-99ef-4d98-8ba4-10d3cc026abcÙ$c64fc228-d1e3-423f-8fb3-b8e7dff9d097Ù$0708fa36-bf99-44e3-a69e-991ad521d34bÙ$53b3d56e-f11d-44c2-96ca-3714f4b4f929Ù$e728cc9a-c17f-4143-9e0e-12c03a965becÙ$8cf52c38-a9a6-4614-a80b-b36e9d4e563fÙ$09829600-3488-492a-a507-53a4bbcb1cfc®process_status¥ready­julia_version§v1.13.3ªcell_orderÜ@Ù$7d05bc54-a693-11ef-2d83-a5caeb91676eÙ$44bb88d2-2fc7-4901-9fc3-890e54754932Ù$423874b8-6d4c-423a-bf45-39d590600066Ù$abc07fcf-35f5-43eb-90aa-23ec0b581e56Ù$df9e106b-16c3-4605-b5f6-0a4e82dd4b3bÙ$eaf0bcaa-75d9-4d9c-9e19-ca5a8532ed35Ù$687f5cb9-5a17-49cb-8d96-a35b66fbcba3Ù$3cdcd14a-9102-4ed4-b186-629ce183b73cÙ$a835f101-bfd0-428e-adba-64f5de7af14cÙ$0886ac78-6530-417b-80a5-5410c4719dd2Ù$d826a144-2c79-4c1e-ae3f-c11a4b5353d4Ù$7e7e2845-4bee-4dbc-b0f9-d964cd362248Ù$e33b16ec-4526-4dbe-affa-3e68aa508ab8Ù$06e194ec-42dc-46aa-8935-86c4ed04b7c8Ù$a7435857-1526-4155-b934-4c4cda9f6b30Ù$c3af23f7-8919-4e27-a97e-6013038b8d8cÙ$784608dc-cf8f-483b-964f-b66575dc430eÙ$87f3dafc-6452-4a3f-b635-9b7497e1481aÙ$6fd4e448-992f-4976-82e9-6313ba038d26Ù$c3574e26-6e50-4f08-852a-df3ae91c197fÙ$45382f1f-89d7-4972-96df-1d9288a52102Ù$2cc866e8-fb23-4010-bec1-29d00202c7e1Ù$e50cffb2-ac51-483a-92d0-a19531ebb547Ù$2a728c9a-4268-40ff-905d-60b3b4c5b99bÙ$a9e46466-cdbf-4539-ae36-a3113634b353Ù$78dd39e3-d549-4012-92d1-3a1c8033ac29Ù$fbb03a1a-99ef-4d98-8ba4-10d3cc026abcÙ$d3792580-6a04-4934-ad5a-cd054a5b4421Ù$de5ddee9-7a4c-4ae7-b6e2-ccdf1a406919Ù$40f21927-1d88-41f4-b55d-6b81ca2ec211Ù$f50e757b-2f0d-458c-a577-3de499d9ba14Ù$6d63c708-6f10-4a21-b57b-a9bd138b5c8cÙ$0e01c57f-65b1-480c-a258-9a76513ac8d6Ù$8e39960f-ab0a-4103-bd6b-00e779333b01Ù$d821d85c-74ae-44d0-909b-02d3099d8201Ù$c64fc228-d1e3-423f-8fb3-b8e7dff9d097Ù$0788ac02-dab8-4ddd-9130-2a632d8d3685Ù$76643525-2649-48b9-9d09-6d7dcef6e355Ù$0708fa36-bf99-44e3-a69e-991ad521d34bÙ$76eaa13b-e76a-4e31-b702-78fd9694a059Ù$228d70f8-dd36-48a6-9c95-b2744c5b20b6Ù$8f51a619-d0ad-42d2-bac9-acb9eab7cccbÙ$23f3de75-0617-4232-bb71-bd9f3e355a1eÙ$ca8b4f75-f8c7-4384-80ae-fbbdba85bd46Ù$1a1335db-6bc5-4a0e-a138-3513f7a2140dÙ$53b3d56e-f11d-44c2-96ca-3714f4b4f929Ù$ca68ba1d-5f02-4f80-8cd1-d0c297f19f58Ù$b94dd60a-2116-43ce-a5c3-5f1ff24479c0Ù$e0ba3b61-a618-49ce-9466-e6a8f674bd53Ù$e728cc9a-c17f-4143-9e0e-12c03a965becÙ$530110cc-1dc9-427e-950b-64c0d04fc0daÙ$410eac96-a384-48fa-b3f3-478be5bd236cÙ$97d6e0da-0b53-4467-95f3-a524575daa49Ù$8cf52c38-a9a6-4614-a80b-b36e9d4e563fÙ$cddf4399-c659-4bbd-bae1-6d88f37a9b93Ù$9cd90023-cf5d-4291-ae69-bc902c5c41beÙ$09829600-3488-492a-a507-53a4bbcb1cfcÙ$2a0f227f-28b4-419e-9f82-f8bd13fca8c0Ù$3fde5f41-32a9-4585-9b6a-131173947346Ù$4b272be9-6881-41e8-9168-3fe471527aa8Ù$19741723-3cc3-40df-83a3-fb2727504cd1Ù$cd8567a7-f4fe-4592-ae4c-facdc35db563Ù$d077a471-6b43-41df-8218-e3b4a7e38550Ù$c1fe952e-c074-49c1-91a4-0de76d235f25«cell_inputsÞ@Ù$0e01c57f-65b1-480c-a258-9a76513ac8d6„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$0e01c57f-65b1-480c-a258-9a76513ac8d6«code_foldedäcodeÚHmd""" For any random variables ``X``, ``Y`` and ``Z``, we have ```math \log(f_X(x)) = D_\text{KL}((Y|X = x) \parallel (Z | X = x)) + \mathcal{L}(x) ``` where the *evidence lower bound* $(cite("kingma2013AutoEncoding")) ```math \mathcal{L}(x) = -D_\text{KL}((Y|X = x) \parallel Z) + \mathbb{E}[\log(f_{X|Z}(x|Y)) | X = x] ``` """Ù$6fd4e448-992f-4976-82e9-6313ba038d26„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$6fd4e448-992f-4976-82e9-6313ba038d26«code_foldedäcodeÚmd""" Image from $(cite("permenter2024Interpretinga", "Figure 1")). Deterministic DDIM : move from a variance estimate ``\sigma_t`` to ``\sigma_{t-1}``: ```math \begin{align} X_t & = X_0 + \sigma_t \mathcal{E}\\ \mathbb{E}[X_{t-1}|X_t = x_{t}] & = \mathbb{E}[X_0|X_t = x_t] + \sigma_{t-1} \mathbb{E}[\mathcal{E}|X_t = x_t]\\ & = \mathbb{E}[X_t|X_t = x_t] - \sigma_t \mathbb{E}[\mathcal{E}|X_t = x_t] + \sigma_{t-1} \mathbb{E}[\mathcal{E}|X_t = x_t]\\ & = x_t + (\sigma_{t-1} - \sigma_t) \mathbb{E}[\mathcal{E}|X_t = x_t]\\ \end{align} ``` """Ù$a9e46466-cdbf-4539-ae36-a3113634b353„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$a9e46466-cdbf-4539-ae36-a3113634b353«code_foldedäcodeºframetitle("Acceleration")Ù$3cdcd14a-9102-4ed4-b186-629ce183b73c„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$3cdcd14a-9102-4ed4-b186-629ce183b73c«code_foldedäcode¬img("score")Ù$abc07fcf-35f5-43eb-90aa-23ec0b581e56„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$abc07fcf-35f5-43eb-90aa-23ec0b581e56«code_foldedäcodeÚ\qa(md"Proof", md""" Using the fact that ``\mathcal{E}`` is normally distributed, we have ```math \begin{align} \nabla_y f_\mathcal{E}((y - x)/\sigma) & = \frac{1}{\sqrt{2\pi}} \nabla_y \exp\left(-\frac{1}{2\sigma^2}\|x-y\|^2\right)\\ & = -\frac{\nabla_y \|x-y\|^2}{2\sigma^2} f_\mathcal{E}((y - x)/\sigma)\\ & = \frac{x-y}{\sigma^2} f_\mathcal{E}((y - x)/\sigma)\\ \end{align} ``` We have ```math \begin{align*} f_{X,Y}(x,y) & = f_X(x) f_\mathcal{E}((y - x)/\sigma)\\ \nabla_y f_{X,Y}(x,y) & = f_X(x) \nabla_y f_\mathcal{E}((y - x)/\sigma)\\ & = \frac{x-y}{\sigma^2} f_X(x) f_\mathcal{E}((y - x)/\sigma)\\ & = \frac{x-y}{\sigma^2} f_{X,Y}(x,y)\\ f_Y(y) & = \int_x f_{X,Y}(x,y) \, \text{d} x\\ \nabla_y f_Y(y) & = \int_x \nabla_y f_{X,Y}(x,y) \, \text{d} x\\ & = \int_x \frac{x-y}{\sigma^2} f_{X,Y}(x,y) \, \text{d} x\\ \sigma^2 \nabla_y f_Y(y) & = \int_x x f_{X,Y}(x,y) \, \text{d} x - y \int_x f_{X,Y}(x,y) \, \text{d} x\\ & = \int_x x f_{X|Y}(x|y) \, \text{d} x f_{Y}(y) - y f_{Y}(y)\\ \sigma^2 \nabla_y f_Y(y) / f_{Y}(y) & = \mathbb{E}[X | Y = y] - y\\ y + \sigma^2 \nabla_y \log f_Y(y) & = \mathbb{E}[X | Y = y]. \end{align*} ``` Now we have ```math \begin{align} \mathbb{E}[\mathcal{E}|Y=y] & = \frac{\mathbb{E}[Y|Y=y] - \mathbb{E}[X|Y=y]}{\sigma}\\ & = \frac{ y - (y + \sigma^2 \nabla_y \log f_Y(y)) }{\sigma}\\ & = -\sigma \nabla_y \log f_Y(y). \end{align} ``` """)Ù$d826a144-2c79-4c1e-ae3f-c11a4b5353d4„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$d826a144-2c79-4c1e-ae3f-c11a4b5353d4«code_foldedäcodeµimg("inaccurate.jpg")Ù$6d63c708-6f10-4a21-b57b-a9bd138b5c8c„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$6d63c708-6f10-4a21-b57b-a9bd138b5c8c«code_foldedäcodeÙ)frametitle("Evidence Lower BOund (ELBO)")Ù$0788ac02-dab8-4ddd-9130-2a632d8d3685„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$0788ac02-dab8-4ddd-9130-2a632d8d3685«code_foldedäcode»frametitle("Gaussian ELBO")Ù$0886ac78-6530-417b-80a5-5410c4719dd2„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$0886ac78-6530-417b-80a5-5410c4719dd2«code_foldedäcodeÚúmd""" If ``\sigma`` is too small then the support of ``X + \sigma \mathcal{E}`` may not cover the whole state space → inaccurate ``\epsilon_\theta(y)`` in these parts. More formally, the loss is the Fisher divergence: ```math \mathbb{E}[\|\epsilon_\theta(y) + \sigma \nabla_y \log f_Y(y)\|^2] = \int_y f_Y(y) \|\epsilon_\theta(y) + \sigma \nabla_y \log f_Y(y)\|^2 \,\text{d}y ``` so it is inaccurate for ``y`` such that ``f_Y(y)`` is too small. [Image source](https://yang-song.net/blog/2021/score/). """Ù$a7435857-1526-4155-b934-4c4cda9f6b30„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$a7435857-1526-4155-b934-4c4cda9f6b30«code_foldedäcodeÙ&frametitle("Variance-dependent score")Ù$19741723-3cc3-40df-83a3-fb2727504cd1„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$19741723-3cc3-40df-83a3-fb2727504cd1«code_folded¤code³include("utils.jl")Ù$eaf0bcaa-75d9-4d9c-9e19-ca5a8532ed35„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$eaf0bcaa-75d9-4d9c-9e19-ca5a8532ed35«code_foldedäcode¼frametitle("Score matching")Ù$410eac96-a384-48fa-b3f3-478be5bd236c„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$410eac96-a384-48fa-b3f3-478be5bd236c«code_foldedäcodeÚ@md""" Improvement for conditioned diffusion for multi-modal distributions: use classifier $(cite("dhariwal2024Diffusion")). **Issue**: need to train a classifier... This classifier-guided strategy was replaced in $(cite("ho2022ClassifierFree")) by a simpler trick: Train both a conditioned (with condition ``\tau``) and an unconditioned diffusion model, and combine them with: ```math \bar{\epsilon}_t = \textcolor{purple}{\lambda} \epsilon_\theta(x_t, \sigma_t, \tau) \textcolor{purple}{+ (1 - \lambda) \epsilon_\theta(x_t, \sigma_t)} \qquad \text{with } \lambda > 1 ``` """Ù$c3574e26-6e50-4f08-852a-df3ae91c197f„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$c3574e26-6e50-4f08-852a-df3ae91c197f«code_foldedäcodeÙ'frametitle("Denoising with randomness")Ù$2cc866e8-fb23-4010-bec1-29d00202c7e1„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$2cc866e8-fb23-4010-bec1-29d00202c7e1«code_foldedäcodeÚ+qa(md"What is the order between ``\sigma_{t-1}, \sigma_t`` and ``\sigma_{t'}`` ?", md""" We have ``\sigma_{t-1} < \sigma_t`` by assumption. Then, because ``\sigma_{t-1}`` is the geometric mean of ``\sigma_{t'}`` and ``\sigma_t``, it must be between so ``\sigma_{t'} < \sigma_{t-1} < \sigma_t``. """)Ù$40f21927-1d88-41f4-b55d-6b81ca2ec211„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$40f21927-1d88-41f4-b55d-6b81ca2ec211«code_foldedäcodeÚqa(md"What is the solution if ``E`` and ``D`` were linear (i.e. matrices) ?", md""" Given a matrix of data ``X``, consider the SVD ``X = U\Sigma V^\top``: ```math \begin{align} \|X - DEX\|_F^2 & = \|U \Sigma V^\top - DEU \Sigma V^\top\|_F^2\\ & = \|\Sigma - U^\top DEU \Sigma\|_F^2\\ \end{align} ``` The matrix ``DE`` can be any matrix of rank equal to the dimension of the latent space. So the optimal solution is ``DE = U\text{Diag}(\mathbf{1}_r, \mathbf{0}_{n-r})U^\top`` where ``r`` is the dimension of the latent space. This is similar to the PCA ``D\hat{E} = U\text{Diag}(\sigma_1, \ldots, \sigma_r, \mathbf{0}_{n-r})V^\top`` which is the minimizer of ``\|X - D\hat{E}\|_F^2``. More precisely, given the optimal rank-``r`` solution ``D = U_{:,1:r}, \hat{E} = \text{Diag}(\sigma_1, \ldots, \sigma_r)U_{:,1:r}^\top``, an optimal solution of the linear auto-encoder can be obtained with ``E = \hat{E}X^\dagger`` when ``X^\dagger = V\Sigma^{-1}U^\top``. In view of this, an Auto-Encoder can be thought of as a nonlinear generalization of PCA. """ )Ù$8cf52c38-a9a6-4614-a80b-b36e9d4e563f„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$8cf52c38-a9a6-4614-a80b-b36e9d4e563f«code_foldedäcodeÙ7refs(["dhariwal2024Diffusion", "ho2022ClassifierFree"])Ù$23f3de75-0617-4232-bb71-bd9f3e355a1e„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$23f3de75-0617-4232-bb71-bd9f3e355a1e«code_foldedäcodeÚÑmd""" * We want to learn the distribution of our data represented by the random variable ``X``. * The encoder maps a data point ``x`` to a Gaussian distribution ``Y \sim \mathcal{N}(E_\mu(x), E_{\sigma}(x))`` over the latent space * The decoder maps a latent variable ``z \sim Z`` to a the Gaussian distribution ``\mathcal{N}(D_\mu(z), D_\sigma(z))`` The Maximum Likelihood Estimator (MLE) maximizes the following sum over our datapoints ``x`` with its ELBO: ```math \sum_x \log(f_X(x)) \ge \sum_x -D_\text{KL}((Y|X = x) \parallel Z) + \mathbb{E}[\log(f_{X|Z}(x|Y))] ``` So the MLE minimizes the loss ```math -\mathbb{E}[\log(f_{X|Z}(x|Y))]. ``` with the KL-regularizer ```math D_\text{KL}((Y|X = x) \parallel Z) ``` """Ù$687f5cb9-5a17-49cb-8d96-a35b66fbcba3„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$687f5cb9-5a17-49cb-8d96-a35b66fbcba3«code_foldedäcodeÚ/md""" Diffusion models are also known as *energy-based models* and then *score-matching*. For **fixed** ``\sigma``, the matching is ``\epsilon_\theta(y) \approx \mathbb{E}[\mathcal{E}|X + \sigma \mathcal{E} = y] = -\sigma \nabla_y \log f_{X+\sigma\mathcal{E}}(y)``. **Training**: sample ``x`` / pick ``x`` in dataset, sample ``\varepsilon``, update ``\theta`` to minimize (e.g., using gradient descent), the loss: ```math \mathbb{E}[\|\epsilon_\theta(X + \sigma \mathcal{E}) - \mathcal{E}\|^2] ``` [Image source](https://yang-song.net/blog/2021/score/). """Ù$45382f1f-89d7-4972-96df-1d9288a52102„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$45382f1f-89d7-4972-96df-1d9288a52102«code_foldedäcodeÚmd""" Given ``0 \le \mu < 1``, pick ``\sigma_{t'}`` such that ``\sigma_{t-1} = \sigma_t^\mu\sigma_{t'}^{1 - \mu}`` we have the following sampler of $(cite(["permenter2024Interpretinga"])): ```math \begin{align} x_{t - 1} & = x_t + (\textcolor{purple}{\sigma_{t'}} - \sigma_t) \epsilon_\theta(x_t, \sigma_t) \textcolor{purple}{+ \eta w_t} \qquad w_t \sim \mathcal{N}(0, I) \end{align} ``` For ``\mu = 0``, ``\sigma_{t'} = \sigma_{t-1}`` and we recover deterministic DDIM. For ``\mu = 1/2``, we have DDPM of $(cite("ho2020Denoising")) """Ù$e0ba3b61-a618-49ce-9466-e6a8f674bd53„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$e0ba3b61-a618-49ce-9466-e6a8f674bd53«code_foldedäcodeÙ@md"""Source: $(cite("rombach2022HighResolution", "Figure 3"))"""Ù$e50cffb2-ac51-483a-92d0-a19531ebb547„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$e50cffb2-ac51-483a-92d0-a19531ebb547«code_foldedäcodeÚVqa(md"What should ``\eta`` be ?", md""" We want the noise level of ``x_{t-1}`` to be at ``\sigma_{t-1}``. So we want ```math \sigma_{t-1}^2 = \text{Var}(\sigma_{t'} \mathcal{E}_\theta(x_t, \sigma_t) + \eta W_t) ``` As ``W_t`` and ``\mathcal{E}_\theta(x_t, \sigma_t)`` are independent, their covariance is zero so ```math \sigma_{t-1}^2 = \sigma_{t'}^2 \text{Var}(\mathcal{E}_\theta(x_t, \sigma_t)) + \eta^2 \text{Var}(W_t) ``` Their variance is one, so we have ```math \sigma_{t-1}^2 = \sigma_{t'}^2 + \eta^2 ``` This means that we should take ``\eta = \sqrt{\sigma_{t-1}^2 - \sigma_{t'}^2}``. """)Ù$a835f101-bfd0-428e-adba-64f5de7af14c„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$a835f101-bfd0-428e-adba-64f5de7af14c«code_foldedäcodeÙ'frametitle("Issue with small variance")Ù$d077a471-6b43-41df-8218-e3b4a7e38550„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$d077a471-6b43-41df-8218-e3b4a7e38550«code_folded¤codeÙ(cite(args...) = bibcite(biblio, args...)Ù$c3af23f7-8919-4e27-a97e-6013038b8d8c„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$c3af23f7-8919-4e27-a97e-6013038b8d8c«code_foldedäcodeÚIHAlign(md""" The matching is ``\epsilon_\theta(y\textcolor{red}{, \sigma}) \approx -\sigma \nabla_y \log f_{X+\sigma\mathcal{E}}(y)``. **Training**: sample ``x`` / pick ``x`` in dataset, sample ``\textcolor{red}{\sigma, }\varepsilon``, update ``\theta`` to minimize (e.g., using gradient descent), the loss: ```math \mathbb{E}[\|\epsilon_\theta(X + \sigma \mathcal{E} \textcolor{red}{, \sigma}) - \mathcal{E}\|^2] ``` Animation generated with [`smalldiffusion`](https://github.com/yuanchenyang/smalldiffusion) using a deterministic (i.e. ``w_k=0``) sampler. """, img("spiral.gif"), )Ù$423874b8-6d4c-423a-bf45-39d590600066„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$423874b8-6d4c-423a-bf45-39d590600066«code_foldedäcodeÚ‹md""" Let ``\sigma`` be a constant and consider a random variable ``X`` with probability density function ``f_X`` as well as a random Gaussian noise ``\mathcal{E} \sim \mathcal{N}(0, 1)`` that is independent from ``X``. If ``Y = X + \sigma \mathcal{E}`` then ```math \mathbb{E}[X|Y=y] = y + \sigma^2 \nabla_y \log f_Y(y) \qquad \mathbb{E}[\mathcal{E}|Y=y] = -\sigma \nabla_y \log f_Y(y). ``` """Ù$7e7e2845-4bee-4dbc-b0f9-d964cd362248„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$7e7e2845-4bee-4dbc-b0f9-d964cd362248«code_foldedäcodeÙ'frametitle("Issue with large variance")Ù$53b3d56e-f11d-44c2-96ca-3714f4b4f929„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$53b3d56e-f11d-44c2-96ca-3714f4b4f929«code_foldedäcode·refs("ho2020Denoising")Ù$06e194ec-42dc-46aa-8935-86c4ed04b7c8„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$06e194ec-42dc-46aa-8935-86c4ed04b7c8«code_foldedäcode³img("accurate.jpg")Ù$8f51a619-d0ad-42d2-bac9-acb9eab7cccb„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$8f51a619-d0ad-42d2-bac9-acb9eab7cccb«code_foldedäcodeÙ-frametitle("Variational AutoEncoders (VAEs)")Ù$d821d85c-74ae-44d0-909b-02d3099d8201„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$d821d85c-74ae-44d0-909b-02d3099d8201«code_foldedäcodeÚ�md""" ``\mathcal{L}(x)`` is a **lower bound** to ``\log(f_X(x))`` as the Kullback-Leibler divergence ``D_\text{KL}((Y|X = x) \parallel (Z | X = x))`` is always nonnegative. In the context of VAEs, ``Z`` represents the actual latent variable and ``Y`` represents the estimated random variables, so ``D_\text{KL}((Y|X = x) \parallel (Z | X = x))`` is a measure of the error made by our estimator. """Ù$f50e757b-2f0d-458c-a577-3de499d9ba14„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$f50e757b-2f0d-458c-a577-3de499d9ba14«code_foldedäcodeÚðmd""" ## Variational Auto-Encoder We add artificial noise to improve learning: ```math \mathbb{E}[\|X - D(E_\mu(X) + \mathcal{E} \odot E_\sigma(X))\|_2^2] ``` An insightful way to model this is as follows. * Assume our dataset come from a distribution ``X`` that is obtained from a latent space ``Z`` using a decoder ``X = D(Z)``. * If we knew the latent variable ``z``, we would search for a decoder ``D`` that maximizes ``\mathbb{E}[\log(f_{X|Z}(x|z))]``. * Since we do not know ``z``, we make an estimate of ``y`` using an encoder ``Y = E(X)``. * The validity of these encoder and decoder models can now be measured with a Maximum Likelihood Estimator that searches for the encoder and decoder models that maximize ``\mathbb{E}[\log(f_X(X))]``. """Ù$c1fe952e-c074-49c1-91a4-0de76d235f25„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$c1fe952e-c074-49c1-91a4-0de76d235f25«code_folded¤codeÙ(refs(args...) = bibrefs(biblio, args...)Ù$530110cc-1dc9-427e-950b-64c0d04fc0da„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$530110cc-1dc9-427e-950b-64c0d04fc0da«code_foldedäcodeÙ&frametitle("Classifier-Free Guidance")Ù$cddf4399-c659-4bbd-bae1-6d88f37a9b93„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$cddf4399-c659-4bbd-bae1-6d88f37a9b93«code_foldedäcode¿frametitle("Optical illusions")Ù$2a0f227f-28b4-419e-9f82-f8bd13fca8c0„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$2a0f227f-28b4-419e-9f82-f8bd13fca8c0«code_foldedäcode°section("Utils")Ù$b94dd60a-2116-43ce-a5c3-5f1ff24479c0„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$b94dd60a-2116-43ce-a5c3-5f1ff24479c0«code_foldedäcode·img("stable_diffusion")Ù$e33b16ec-4526-4dbe-affa-3e68aa508ab8„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$e33b16ec-4526-4dbe-affa-3e68aa508ab8«code_foldedäcodeÚ8md""" If ``\sigma`` is too large then ``\epsilon_\theta(y) \approx -\sigma \nabla_y \log f_{X+\sigma\mathcal{E}}(y)`` everywhere but the distribution ``Y \sim X + \sigma \mathcal{E}`` is too noisy, less specific to ``X`` (small signal to noise ratio). [Image source](https://yang-song.net/blog/2021/score/). """Ù$2a728c9a-4268-40ff-905d-60b3b4c5b99b„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$2a728c9a-4268-40ff-905d-60b3b4c5b99b«code_foldedäcodeÙ7refs(["ho2020Denoising", "permenter2024Interpretinga"])Ù$de5ddee9-7a4c-4ae7-b6e2-ccdf1a406919„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$de5ddee9-7a4c-4ae7-b6e2-ccdf1a406919«code_foldedäcodeÚmd""" Find encoder ``E`` and decoder ``D`` that minimize the loss: ```math \mathbb{E}[\|X - D(E(X))\|_2^2] ``` The *code* (aka *latent variable*) ``z = E(x)`` typically has a smaller size compared to ``x`` to force the model to only keep essential features. """Ù$df9e106b-16c3-4605-b5f6-0a4e82dd4b3b„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$df9e106b-16c3-4605-b5f6-0a4e82dd4b3b«code_foldedäcodeÚŠHAlign(md""" From Tweedie's formula, ``\epsilon`` is estimated to be ``-\sigma \nabla_y \log f_Y(y)``. **Sampler** *Langevin dynamics*: ```math \begin{multline} y_{k+1} = y_k + \delta_k \nabla_y \log f_Y(y_k) + \sqrt{2\delta_k} w_k\\ \text{where } w_k \sim \mathcal{N}(0, 1) \end{multline} ``` [Image source](https://yang-song.net/blog/2021/score/). """, img("langevin.gif", :width => 200), )Ù$e728cc9a-c17f-4143-9e0e-12c03a965bec„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$e728cc9a-c17f-4143-9e0e-12c03a965bec«code_foldedäcodeÙ!refs("rombach2022HighResolution")Ù$3fde5f41-32a9-4585-9b6a-131173947346„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$3fde5f41-32a9-4585-9b6a-131173947346«code_folded¤codeÙZusing PlutoUI, DataFrames, PrettyTables, LinearAlgebra, Luxor, LaTeXStrings, MathTeXEngineÙ$4b272be9-6881-41e8-9168-3fe471527aa8„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$4b272be9-6881-41e8-9168-3fe471527aa8«code_folded¤codeÙ(import DocumenterCitations, CSV, LoggingÙ$44bb88d2-2fc7-4901-9fc3-890e54754932„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$44bb88d2-2fc7-4901-9fc3-890e54754932«code_foldedäcode¿frametitle("Tweedie's formula")Ù$fbb03a1a-99ef-4d98-8ba4-10d3cc026abc„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$fbb03a1a-99ef-4d98-8ba4-10d3cc026abc«code_foldedäcodeÙ"refs("permenter2024Interpretinga")Ù$784608dc-cf8f-483b-964f-b66575dc430e„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$784608dc-cf8f-483b-964f-b66575dc430e«code_foldedäcode¶frametitle("Sampling")Ù$1a1335db-6bc5-4a0e-a138-3513f7a2140d„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$1a1335db-6bc5-4a0e-a138-3513f7a2140d«code_foldedäcodeÚ2md""" ```math \begin{align} \text{Auto-Encoder} & & D(E(X))\\ \text{Variational Auto-Encoder} & & D(E(X) + \mathcal{E})\\ \text{Denoising Auto-Encoder} & & D(E(X + \sigma \mathcal{E}))\\ \end{align} ``` The goal of the diffusion model is, given a noisy image ``Y = X + \sigma \mathcal{E}`` and ``\sigma``, to find the noise ``\mathcal{E}``. The denoising Auto-Encoder instead attempts to find the original image ``X``. At the limit ``\sigma \to 0``, the denoising Auto-Encoder ``D(E(X + \sigma \mathcal{E}))`` is a classical Auto-Encoder, hence the name. To train the denoising Auto-Encoder, we can use the Evidence Lower-Bound with ``Y = X + \sigma \mathcal{E}`` and ``Z`` such that ``X = D(Z)`` $(cite("ho2020Denoising")): ```math -\log(f_X(x)) \le \mathbb{E}[-\log(f_{X|Z}(x|Y))] + D((Y|X = x) \parallel Z) ``` """Ù$78dd39e3-d549-4012-92d1-3a1c8033ac29„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$78dd39e3-d549-4012-92d1-3a1c8033ac29«code_foldedäcodeÚHAlign( md""" As ``\epsilon_\theta(x_t, \sigma_t)`` is more accurate than ``\epsilon_\theta(x_{t+1}, \sigma_{t+1})``, $(cite("permenter2024Interpretinga", "Section 5")) suggests accelerating the convergence by correcting part of the previous step. That is, we take: ```math \bar{\epsilon}_t = \textcolor{purple}{\gamma} \epsilon_\theta(x_t, \sigma_t) \textcolor{purple}{+ (1 - \gamma) \epsilon_\theta(x_{t+1}, \sigma_{t+1})} ``` with ``\gamma > 1``. Image is $(cite("permenter2024Interpretinga", "Figure 3")). """, img("ge_step") )Ù$228d70f8-dd36-48a6-9c95-b2744c5b20b6„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$228d70f8-dd36-48a6-9c95-b2744c5b20b6«code_foldedäcodeÚ3md""" This can be approximated using Monte-Carlo given ``L`` samples ``\epsilon_1, \ldots \epsilon_L`` from the distribution ``\mathcal{N}(0, I)`` as ```math \mathbb{E}[\log(f_{X|Z}(x|Y))] \approx \frac{1}{L} \sum_{i=1}^L \log(f_{X|Z}(x|E_\mu(x) + \epsilon_i \odot E_\sigma(x))). ``` In the simpler case where ``D_\sigma(z) = \mathbf{1}``, we recognize the classical L2 norm: ```math \begin{align} \mathbb{E}[\log(f_{X|Z}(x|Y))] & \approx -\frac{\log(2\pi)}{2}+\frac{1}{L}\sum_{i=1}^L\|x - D_\mu(E_\mu(x) + \epsilon_i \odot E_\sigma(x))\|_2^2. \end{align} ``` """Ù$76eaa13b-e76a-4e31-b702-78fd9694a059„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$76eaa13b-e76a-4e31-b702-78fd9694a059«code_foldedäcodeÙ"frametitle("Monte-Carlo sampling")Ù$ca8b4f75-f8c7-4384-80ae-fbbdba85bd46„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$ca8b4f75-f8c7-4384-80ae-fbbdba85bd46«code_foldedäcodeÙ$frametitle("Denoising Auto-Encoder")Ù$7d05bc54-a693-11ef-2d83-a5caeb91676e„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$7d05bc54-a693-11ef-2d83-a5caeb91676e«code_foldedäcode»section("Diffusion Models")Ù$cd8567a7-f4fe-4592-ae4c-facdc35db563„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$cd8567a7-f4fe-4592-ae4c-facdc35db563«code_folded¤code·biblio = load_biblio!()Ù$97d6e0da-0b53-4467-95f3-a524575daa49„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$97d6e0da-0b53-4467-95f3-a524575daa49«code_foldedäcode¯img("guidance")Ù$c64fc228-d1e3-423f-8fb3-b8e7dff9d097„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$c64fc228-d1e3-423f-8fb3-b8e7dff9d097«code_foldedäcode¾refs("kingma2013AutoEncoding")Ù$09829600-3488-492a-a507-53a4bbcb1cfc„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$09829600-3488-492a-a507-53a4bbcb1cfc«code_foldedäcodeÙ0refs(["burgert2023Diffusion", "geng2024Visual"])Ù$76643525-2649-48b9-9d09-6d7dcef6e355„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$76643525-2649-48b9-9d09-6d7dcef6e355«code_foldedäcodeÚ2md""" Consider two deterministic functions ``E_\mu, E_\sigma : \mathbb{R}^n \to \mathbb{R}^r`` and ``D_\mu, D_\sigma : \mathbb{R}^r \to \mathbb{R}^n``. Suppose ``X = D_\mu(Z) + \mathcal{E}_1 \odot D_\sigma(Z)`` and ``Y = E_\mu(X) + \mathcal{E}_2 \odot E_\sigma(X)`` with ``\mathcal{E}_1, \mathcal{E}_2 \sim \mathcal{N}(0, I)``. We have (see $(cite("kingma2013AutoEncoding", "Appendix B")) for a proof): ```math 2D_\text{KL}((Y|X = x) \parallel Z) = \|E_\mu(X)\|_2^2 + \|E_\sigma(X)\|_2^2 - r - \sum_{i=1}^r \log((E_\sigma(X))_i^2) ``` For the second part of the ELBO, we have ```math \begin{align} & \mathbb{E}[\log(f_{X|Z}(x|Y))]\\ & = \mathbb{E}[\log(f_{X|Z}(x|E_\mu(x) + \mathcal{E}_2 \odot E_\sigma(x)))]\\ & = \mathbb{E}[\log(f_{\mathcal{E}_1}(\text{Diag}(D_\sigma(E_\mu(x) + \mathcal{E}_2 \odot E_\sigma(x)))^{-1} (x - D_\mu(E_\mu(x) + \mathcal{E}_2 \odot E_\sigma(x)))))]\\ & = -\frac{\log(2\pi)}{2}+\mathbb{E}[\|\text{Diag}(D_\sigma(E_\mu(x) + \mathcal{E}_2 \odot E_\sigma(x)))^{-1} (x - D_\mu(E_\mu(x) + \mathcal{E}_2 \odot E_\sigma(x)))\|_2^2]. \end{align} ``` """Ù$9cd90023-cf5d-4291-ae69-bc902c5c41be„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$9cd90023-cf5d-4291-ae69-bc902c5c41be«code_foldedäcodeÚ$HAlign( md""" It was shown in $(cite("burgert2023Diffusion")) how to train a diffusion model to generate illusions. Suprisingly, $(cite("geng2024Visual")) showed that you don't need a specialized model and you can use a pre-trained diffusion model. Given ``N`` transformations ``v_1, \ldots, v_N`` $(cite("geng2024Visual", "Equation (2)")): ```math \bar{\epsilon}_t = \textcolor{purple}{\frac{1}{N} \sum_{i=1}^N v_i^{-1}(}\epsilon_\theta(\textcolor{purple}{v_i(}x_t\textcolor{purple}{)}, \sigma_t, \tau)\textcolor{purple}{)} ``` """, img("flips") )Ù$0708fa36-bf99-44e3-a69e-991ad521d34b„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$0708fa36-bf99-44e3-a69e-991ad521d34b«code_foldedäcode¾refs("kingma2013AutoEncoding")Ù$ca68ba1d-5f02-4f80-8cd1-d0c297f19f58„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$ca68ba1d-5f02-4f80-8cd1-d0c297f19f58«code_foldedäcodeÙ#frametitle("Conditioned diffusion")Ù$d3792580-6a04-4934-ad5a-cd054a5b4421„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$d3792580-6a04-4934-ad5a-cd054a5b4421«code_foldedäcodeºframetitle("Auto-Encoder")Ù$8e39960f-ab0a-4103-bd6b-00e779333b01„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$8e39960f-ab0a-4103-bd6b-00e779333b01«code_foldedäcodeÚ“qa(md"Proof", md""" > Reminder: ``D_\text{KL}(A \parallel B) = \sum_{a \in \text{Dom}(A)} f_A(a) \log \frac{f_A(a)}{f_B(a)} = \mathbb{E}[\log f_A(A) - \log f_B(A)]`` ```math \begin{align} D_\text{KL}((Y|X = x) \parallel (Z | X = x)) & = \mathbb{E}[\log(f_{Y|X}(Y|x)) - \log(f_{Z|X}(Y|x)) | X = x]\\ & = \mathbb{E}[\log(f_{Y|X}(Y|x)) - \log(f_{Z,X}(Y,x)) | X = x]\\ & \qquad + \log(f_{X}(x))\\ & = \mathbb{E}[\log(f_{Y|X}(Y|x)) - \log(f_{X|Z}(x|Y)) - \log(f_{Z}(Y)) | X = x]\\ & \qquad + \log(f_{X}(x))\\ & = D_\text{KL}((Y|X = x) \parallel Z) - \mathbb{E}[\log(f_{X|Z}(x|Y)) | X = x]\\ & \qquad + \log(f_{X}(x)) \end{align} ``` """, )Ù$87f3dafc-6452-4a3f-b635-9b7497e1481a„¨metadataƒ¨disabled©show_logsîskip_as_script§cell_idÙ$87f3dafc-6452-4a3f-b635-9b7497e1481a«code_foldedäcode«img("DDIM")´last_hot_reload_time˱cell_dependenciesÞ@Ù$0e01c57f-65b1-480c-a258-9a76513ac8d6„´precedence_heuristic §cell_idÙ$0e01c57f-65b1-480c-a258-9a76513ac8d6´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¨getindex�¤cite‘Ù$d077a471-6b43-41df-8218-e3b4a7e38550Ù$6fd4e448-992f-4976-82e9-6313ba038d26„´precedence_heuristic §cell_idÙ$6fd4e448-992f-4976-82e9-6313ba038d26´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¨getindex�¤cite‘Ù$d077a471-6b43-41df-8218-e3b4a7e38550Ù$a9e46466-cdbf-4539-ae36-a3113634b353„´precedence_heuristic §cell_idÙ$a9e46466-cdbf-4539-ae36-a3113634b353´downstream_cells_map€²upstream_cells_map�ªframetitle�Ù$3cdcd14a-9102-4ed4-b186-629ce183b73c„´precedence_heuristic §cell_idÙ$3cdcd14a-9102-4ed4-b186-629ce183b73c´downstream_cells_map€²upstream_cells_map�£img�Ù$abc07fcf-35f5-43eb-90aa-23ec0b581e56„´precedence_heuristic §cell_idÙ$abc07fcf-35f5-43eb-90aa-23ec0b581e56´downstream_cells_map€²upstream_cells_mapƒ¢qa�§@md_str�¨getindex�Ù$d826a144-2c79-4c1e-ae3f-c11a4b5353d4„´precedence_heuristic §cell_idÙ$d826a144-2c79-4c1e-ae3f-c11a4b5353d4´downstream_cells_map€²upstream_cells_map�£img�Ù$6d63c708-6f10-4a21-b57b-a9bd138b5c8c„´precedence_heuristic §cell_idÙ$6d63c708-6f10-4a21-b57b-a9bd138b5c8c´downstream_cells_map€²upstream_cells_map�ªframetitle�Ù$0788ac02-dab8-4ddd-9130-2a632d8d3685„´precedence_heuristic §cell_idÙ$0788ac02-dab8-4ddd-9130-2a632d8d3685´downstream_cells_map€²upstream_cells_map�ªframetitle�Ù$0886ac78-6530-417b-80a5-5410c4719dd2„´precedence_heuristic §cell_idÙ$0886ac78-6530-417b-80a5-5410c4719dd2´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$a7435857-1526-4155-b934-4c4cda9f6b30„´precedence_heuristic §cell_idÙ$a7435857-1526-4155-b934-4c4cda9f6b30´downstream_cells_map€²upstream_cells_map�ªframetitle�Ù$19741723-3cc3-40df-83a3-fb2727504cd1„´precedence_heuristic§cell_idÙ$19741723-3cc3-40df-83a3-fb2727504cd1´downstream_cells_map€²upstream_cells_map�§include�Ù$eaf0bcaa-75d9-4d9c-9e19-ca5a8532ed35„´precedence_heuristic §cell_idÙ$eaf0bcaa-75d9-4d9c-9e19-ca5a8532ed35´downstream_cells_map€²upstream_cells_map�ªframetitle�Ù$410eac96-a384-48fa-b3f3-478be5bd236c„´precedence_heuristic §cell_idÙ$410eac96-a384-48fa-b3f3-478be5bd236c´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¨getindex�¤cite‘Ù$d077a471-6b43-41df-8218-e3b4a7e38550Ù$c3574e26-6e50-4f08-852a-df3ae91c197f„´precedence_heuristic §cell_idÙ$c3574e26-6e50-4f08-852a-df3ae91c197f´downstream_cells_map€²upstream_cells_map�ªframetitle�Ù$2cc866e8-fb23-4010-bec1-29d00202c7e1„´precedence_heuristic §cell_idÙ$2cc866e8-fb23-4010-bec1-29d00202c7e1´downstream_cells_map€²upstream_cells_mapƒ¢qa�§@md_str�¨getindex�Ù$40f21927-1d88-41f4-b55d-6b81ca2ec211„´precedence_heuristic §cell_idÙ$40f21927-1d88-41f4-b55d-6b81ca2ec211´downstream_cells_map€²upstream_cells_mapƒ¢qa�§@md_str�¨getindex�Ù$8cf52c38-a9a6-4614-a80b-b36e9d4e563f„´precedence_heuristic §cell_idÙ$8cf52c38-a9a6-4614-a80b-b36e9d4e563f´downstream_cells_map€²upstream_cells_map�¤refs‘Ù$c1fe952e-c074-49c1-91a4-0de76d235f25Ù$23f3de75-0617-4232-bb71-bd9f3e355a1e„´precedence_heuristic §cell_idÙ$23f3de75-0617-4232-bb71-bd9f3e355a1e´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$687f5cb9-5a17-49cb-8d96-a35b66fbcba3„´precedence_heuristic §cell_idÙ$687f5cb9-5a17-49cb-8d96-a35b66fbcba3´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$45382f1f-89d7-4972-96df-1d9288a52102„´precedence_heuristic §cell_idÙ$45382f1f-89d7-4972-96df-1d9288a52102´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¨getindex�¤cite‘Ù$d077a471-6b43-41df-8218-e3b4a7e38550Ù$e0ba3b61-a618-49ce-9466-e6a8f674bd53„´precedence_heuristic §cell_idÙ$e0ba3b61-a618-49ce-9466-e6a8f674bd53´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¨getindex�¤cite‘Ù$d077a471-6b43-41df-8218-e3b4a7e38550Ù$e50cffb2-ac51-483a-92d0-a19531ebb547„´precedence_heuristic §cell_idÙ$e50cffb2-ac51-483a-92d0-a19531ebb547´downstream_cells_map€²upstream_cells_mapƒ¢qa�§@md_str�¨getindex�Ù$a835f101-bfd0-428e-adba-64f5de7af14c„´precedence_heuristic §cell_idÙ$a835f101-bfd0-428e-adba-64f5de7af14c´downstream_cells_map€²upstream_cells_map�ªframetitle�Ù$d077a471-6b43-41df-8218-e3b4a7e38550„´precedence_heuristic §cell_idÙ$d077a471-6b43-41df-8218-e3b4a7e38550´downstream_cells_map�¤cite™Ù$6fd4e448-992f-4976-82e9-6313ba038d26Ù$45382f1f-89d7-4972-96df-1d9288a52102Ù$78dd39e3-d549-4012-92d1-3a1c8033ac29Ù$0e01c57f-65b1-480c-a258-9a76513ac8d6Ù$76643525-2649-48b9-9d09-6d7dcef6e355Ù$1a1335db-6bc5-4a0e-a138-3513f7a2140dÙ$e0ba3b61-a618-49ce-9466-e6a8f674bd53Ù$410eac96-a384-48fa-b3f3-478be5bd236cÙ$9cd90023-cf5d-4291-ae69-bc902c5c41be²upstream_cells_map‚§bibcite�¦biblio‘Ù$cd8567a7-f4fe-4592-ae4c-facdc35db563Ù$c3af23f7-8919-4e27-a97e-6013038b8d8c„´precedence_heuristic §cell_idÙ$c3af23f7-8919-4e27-a97e-6013038b8d8c´downstream_cells_map€²upstream_cells_map„¦HAlign�£img�§@md_str�¨getindex�Ù$423874b8-6d4c-423a-bf45-39d590600066„´precedence_heuristic §cell_idÙ$423874b8-6d4c-423a-bf45-39d590600066´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$7e7e2845-4bee-4dbc-b0f9-d964cd362248„´precedence_heuristic §cell_idÙ$7e7e2845-4bee-4dbc-b0f9-d964cd362248´downstream_cells_map€²upstream_cells_map�ªframetitle�Ù$53b3d56e-f11d-44c2-96ca-3714f4b4f929„´precedence_heuristic §cell_idÙ$53b3d56e-f11d-44c2-96ca-3714f4b4f929´downstream_cells_map€²upstream_cells_map�¤refs‘Ù$c1fe952e-c074-49c1-91a4-0de76d235f25Ù$06e194ec-42dc-46aa-8935-86c4ed04b7c8„´precedence_heuristic §cell_idÙ$06e194ec-42dc-46aa-8935-86c4ed04b7c8´downstream_cells_map€²upstream_cells_map�£img�Ù$8f51a619-d0ad-42d2-bac9-acb9eab7cccb„´precedence_heuristic §cell_idÙ$8f51a619-d0ad-42d2-bac9-acb9eab7cccb´downstream_cells_map€²upstream_cells_map�ªframetitle�Ù$d821d85c-74ae-44d0-909b-02d3099d8201„´precedence_heuristic §cell_idÙ$d821d85c-74ae-44d0-909b-02d3099d8201´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$f50e757b-2f0d-458c-a577-3de499d9ba14„´precedence_heuristic §cell_idÙ$f50e757b-2f0d-458c-a577-3de499d9ba14´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$c1fe952e-c074-49c1-91a4-0de76d235f25„´precedence_heuristic §cell_idÙ$c1fe952e-c074-49c1-91a4-0de76d235f25´downstream_cells_map�¤refs˜Ù$2a728c9a-4268-40ff-905d-60b3b4c5b99bÙ$fbb03a1a-99ef-4d98-8ba4-10d3cc026abcÙ$c64fc228-d1e3-423f-8fb3-b8e7dff9d097Ù$0708fa36-bf99-44e3-a69e-991ad521d34bÙ$53b3d56e-f11d-44c2-96ca-3714f4b4f929Ù$e728cc9a-c17f-4143-9e0e-12c03a965becÙ$8cf52c38-a9a6-4614-a80b-b36e9d4e563fÙ$09829600-3488-492a-a507-53a4bbcb1cfc²upstream_cells_map‚§bibrefs�¦biblio‘Ù$cd8567a7-f4fe-4592-ae4c-facdc35db563Ù$530110cc-1dc9-427e-950b-64c0d04fc0da„´precedence_heuristic §cell_idÙ$530110cc-1dc9-427e-950b-64c0d04fc0da´downstream_cells_map€²upstream_cells_map�ªframetitle�Ù$cddf4399-c659-4bbd-bae1-6d88f37a9b93„´precedence_heuristic §cell_idÙ$cddf4399-c659-4bbd-bae1-6d88f37a9b93´downstream_cells_map€²upstream_cells_map�ªframetitle�Ù$2a0f227f-28b4-419e-9f82-f8bd13fca8c0„´precedence_heuristic §cell_idÙ$2a0f227f-28b4-419e-9f82-f8bd13fca8c0´downstream_cells_map€²upstream_cells_map�§section�Ù$b94dd60a-2116-43ce-a5c3-5f1ff24479c0„´precedence_heuristic §cell_idÙ$b94dd60a-2116-43ce-a5c3-5f1ff24479c0´downstream_cells_map€²upstream_cells_map�£img�Ù$e33b16ec-4526-4dbe-affa-3e68aa508ab8„´precedence_heuristic §cell_idÙ$e33b16ec-4526-4dbe-affa-3e68aa508ab8´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$2a728c9a-4268-40ff-905d-60b3b4c5b99b„´precedence_heuristic §cell_idÙ$2a728c9a-4268-40ff-905d-60b3b4c5b99b´downstream_cells_map€²upstream_cells_map�¤refs‘Ù$c1fe952e-c074-49c1-91a4-0de76d235f25Ù$de5ddee9-7a4c-4ae7-b6e2-ccdf1a406919„´precedence_heuristic §cell_idÙ$de5ddee9-7a4c-4ae7-b6e2-ccdf1a406919´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$df9e106b-16c3-4605-b5f6-0a4e82dd4b3b„´precedence_heuristic §cell_idÙ$df9e106b-16c3-4605-b5f6-0a4e82dd4b3b´downstream_cells_map€²upstream_cells_map…¦HAlign�£img�§@md_str�¨getindex�¢=>�Ù$e728cc9a-c17f-4143-9e0e-12c03a965bec„´precedence_heuristic §cell_idÙ$e728cc9a-c17f-4143-9e0e-12c03a965bec´downstream_cells_map€²upstream_cells_map�¤refs‘Ù$c1fe952e-c074-49c1-91a4-0de76d235f25Ù$3fde5f41-32a9-4585-9b6a-131173947346„´precedence_heuristic§cell_idÙ$3fde5f41-32a9-4585-9b6a-131173947346´downstream_cells_map‡­LinearAlgebra�­MathTeXEngine�§PlutoUI�¬PrettyTables�¬LaTeXStrings�¥Luxor�ªDataFrames�²upstream_cells_map€Ù$4b272be9-6881-41e8-9168-3fe471527aa8„´precedence_heuristic §cell_idÙ$4b272be9-6881-41e8-9168-3fe471527aa8´downstream_cells_mapƒ³DocumenterCitations�§Logging�£CSV�²upstream_cells_map€Ù$44bb88d2-2fc7-4901-9fc3-890e54754932„´precedence_heuristic §cell_idÙ$44bb88d2-2fc7-4901-9fc3-890e54754932´downstream_cells_map€²upstream_cells_map�ªframetitle�Ù$fbb03a1a-99ef-4d98-8ba4-10d3cc026abc„´precedence_heuristic §cell_idÙ$fbb03a1a-99ef-4d98-8ba4-10d3cc026abc´downstream_cells_map€²upstream_cells_map�¤refs‘Ù$c1fe952e-c074-49c1-91a4-0de76d235f25Ù$784608dc-cf8f-483b-964f-b66575dc430e„´precedence_heuristic §cell_idÙ$784608dc-cf8f-483b-964f-b66575dc430e´downstream_cells_map€²upstream_cells_map�ªframetitle�Ù$1a1335db-6bc5-4a0e-a138-3513f7a2140d„´precedence_heuristic §cell_idÙ$1a1335db-6bc5-4a0e-a138-3513f7a2140d´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¨getindex�¤cite‘Ù$d077a471-6b43-41df-8218-e3b4a7e38550Ù$78dd39e3-d549-4012-92d1-3a1c8033ac29„´precedence_heuristic §cell_idÙ$78dd39e3-d549-4012-92d1-3a1c8033ac29´downstream_cells_map€²upstream_cells_map…¦HAlign�£img�§@md_str�¨getindex�¤cite‘Ù$d077a471-6b43-41df-8218-e3b4a7e38550Ù$228d70f8-dd36-48a6-9c95-b2744c5b20b6„´precedence_heuristic §cell_idÙ$228d70f8-dd36-48a6-9c95-b2744c5b20b6´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$76eaa13b-e76a-4e31-b702-78fd9694a059„´precedence_heuristic §cell_idÙ$76eaa13b-e76a-4e31-b702-78fd9694a059´downstream_cells_map€²upstream_cells_map�ªframetitle�Ù$ca8b4f75-f8c7-4384-80ae-fbbdba85bd46„´precedence_heuristic §cell_idÙ$ca8b4f75-f8c7-4384-80ae-fbbdba85bd46´downstream_cells_map€²upstream_cells_map�ªframetitle�Ù$7d05bc54-a693-11ef-2d83-a5caeb91676e„´precedence_heuristic §cell_idÙ$7d05bc54-a693-11ef-2d83-a5caeb91676e´downstream_cells_map€²upstream_cells_map�§section�Ù$cd8567a7-f4fe-4592-ae4c-facdc35db563„´precedence_heuristic §cell_idÙ$cd8567a7-f4fe-4592-ae4c-facdc35db563´downstream_cells_map�¦biblio’Ù$d077a471-6b43-41df-8218-e3b4a7e38550Ù$c1fe952e-c074-49c1-91a4-0de76d235f25²upstream_cells_map�¬load_biblio!�Ù$97d6e0da-0b53-4467-95f3-a524575daa49„´precedence_heuristic §cell_idÙ$97d6e0da-0b53-4467-95f3-a524575daa49´downstream_cells_map€²upstream_cells_map�£img�Ù$c64fc228-d1e3-423f-8fb3-b8e7dff9d097„´precedence_heuristic §cell_idÙ$c64fc228-d1e3-423f-8fb3-b8e7dff9d097´downstream_cells_map€²upstream_cells_map�¤refs‘Ù$c1fe952e-c074-49c1-91a4-0de76d235f25Ù$09829600-3488-492a-a507-53a4bbcb1cfc„´precedence_heuristic §cell_idÙ$09829600-3488-492a-a507-53a4bbcb1cfc´downstream_cells_map€²upstream_cells_map�¤refs‘Ù$c1fe952e-c074-49c1-91a4-0de76d235f25Ù$76643525-2649-48b9-9d09-6d7dcef6e355„´precedence_heuristic §cell_idÙ$76643525-2649-48b9-9d09-6d7dcef6e355´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¨getindex�¤cite‘Ù$d077a471-6b43-41df-8218-e3b4a7e38550Ù$9cd90023-cf5d-4291-ae69-bc902c5c41be„´precedence_heuristic §cell_idÙ$9cd90023-cf5d-4291-ae69-bc902c5c41be´downstream_cells_map€²upstream_cells_map…¦HAlign�£img�§@md_str�¨getindex�¤cite‘Ù$d077a471-6b43-41df-8218-e3b4a7e38550Ù$0708fa36-bf99-44e3-a69e-991ad521d34b„´precedence_heuristic §cell_idÙ$0708fa36-bf99-44e3-a69e-991ad521d34b´downstream_cells_map€²upstream_cells_map�¤refs‘Ù$c1fe952e-c074-49c1-91a4-0de76d235f25Ù$ca68ba1d-5f02-4f80-8cd1-d0c297f19f58„´precedence_heuristic §cell_idÙ$ca68ba1d-5f02-4f80-8cd1-d0c297f19f58´downstream_cells_map€²upstream_cells_map�ªframetitle�Ù$d3792580-6a04-4934-ad5a-cd054a5b4421„´precedence_heuristic §cell_idÙ$d3792580-6a04-4934-ad5a-cd054a5b4421´downstream_cells_map€²upstream_cells_map�ªframetitle�Ù$8e39960f-ab0a-4103-bd6b-00e779333b01„´precedence_heuristic §cell_idÙ$8e39960f-ab0a-4103-bd6b-00e779333b01´downstream_cells_map€²upstream_cells_mapƒ¢qa�§@md_str�¨getindex�Ù$87f3dafc-6452-4a3f-b635-9b7497e1481a„´precedence_heuristic §cell_idÙ$87f3dafc-6452-4a3f-b635-9b7497e1481a´downstream_cells_map€²upstream_cells_map�£img�©shortpath¬diffusion.jl®last_save_timeËAڸؤaˆ«notebook_idÙ$4759090c-d3ab-11f1-ad54-473ef7860f2c¥nbpkgŠ­busy_packages�Ù,waiting_for_permission_but_probably_disabled§enabledðterminal_outputs‹­MathTeXEngineÚ‹ Resolving... ===  Project No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_edstpiwogr/Project.toml`  Updating `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_edstpiwogr/Manifest.toml` [deac9b47] ↑ LibCURL_jll v8.18.0+1 ⇒ v8.22.0+0 [e37daf67] ↑ LibGit2_jll v1.9.1+0 ⇒ v1.9.7+0 [29816b5a] ↑ LibSSH2_jll v1.11.103+0 ⇒ v1.11.104+0 [14a3606d] ↑ MozillaCACerts_jll v2026.8.13 ⇒ v2026.10.20 [458c3c95] ↑ OpenSSL_jll v3.5.6+0 ⇒ v3.5.8+0 [efcefdf7] ↑ PCRE2_jll v10.46.0+0 ⇒ v10.47.0+0 [83775a58] ↑ Zlib_jll v1.3.1+2 ⇒ v1.3.2+0 [8e850ede] ↑ nghttp2_jll v1.67.1+0 ⇒ v1.70.0+0 [3f19e933] ↑ p7zip_jll v17.8.2+0 ⇒ v17.8.3+0 Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...¬PrettyTablesÚ‹ Resolving... ===  Project No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_edstpiwogr/Project.toml`  Updating `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_edstpiwogr/Manifest.toml` [deac9b47] ↑ LibCURL_jll v8.18.0+1 ⇒ v8.22.0+0 [e37daf67] ↑ LibGit2_jll v1.9.1+0 ⇒ v1.9.7+0 [29816b5a] ↑ LibSSH2_jll v1.11.103+0 ⇒ v1.11.104+0 [14a3606d] ↑ MozillaCACerts_jll v2026.8.13 ⇒ v2026.10.20 [458c3c95] ↑ OpenSSL_jll v3.5.6+0 ⇒ v3.5.8+0 [efcefdf7] ↑ PCRE2_jll v10.46.0+0 ⇒ v10.47.0+0 [83775a58] ↑ Zlib_jll v1.3.1+2 ⇒ v1.3.2+0 [8e850ede] ↑ nghttp2_jll v1.67.1+0 ⇒ v1.70.0+0 [3f19e933] ↑ p7zip_jll v17.8.2+0 ⇒ v17.8.3+0 Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...¬LaTeXStringsÚ‹ Resolving... ===  Project No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_edstpiwogr/Project.toml`  Updating `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_edstpiwogr/Manifest.toml` [deac9b47] ↑ LibCURL_jll v8.18.0+1 ⇒ v8.22.0+0 [e37daf67] ↑ LibGit2_jll v1.9.1+0 ⇒ v1.9.7+0 [29816b5a] ↑ LibSSH2_jll v1.11.103+0 ⇒ v1.11.104+0 [14a3606d] ↑ MozillaCACerts_jll v2026.8.13 ⇒ v2026.10.20 [458c3c95] ↑ OpenSSL_jll v3.5.6+0 ⇒ v3.5.8+0 [efcefdf7] ↑ PCRE2_jll v10.46.0+0 ⇒ v10.47.0+0 [83775a58] ↑ Zlib_jll v1.3.1+2 ⇒ v1.3.2+0 [8e850ede] ↑ nghttp2_jll v1.67.1+0 ⇒ v1.70.0+0 [3f19e933] ↑ p7zip_jll v17.8.2+0 ⇒ v17.8.3+0 Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...³DocumenterCitationsÚ‹ Resolving... ===  Project No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_edstpiwogr/Project.toml`  Updating `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_edstpiwogr/Manifest.toml` [deac9b47] ↑ LibCURL_jll v8.18.0+1 ⇒ v8.22.0+0 [e37daf67] ↑ LibGit2_jll v1.9.1+0 ⇒ v1.9.7+0 [29816b5a] ↑ LibSSH2_jll v1.11.103+0 ⇒ v1.11.104+0 [14a3606d] ↑ MozillaCACerts_jll v2026.8.13 ⇒ v2026.10.20 [458c3c95] ↑ OpenSSL_jll v3.5.6+0 ⇒ v3.5.8+0 [efcefdf7] ↑ PCRE2_jll v10.46.0+0 ⇒ v10.47.0+0 [83775a58] ↑ Zlib_jll v1.3.1+2 ⇒ v1.3.2+0 [8e850ede] ↑ nghttp2_jll v1.67.1+0 ⇒ v1.70.0+0 [3f19e933] ↑ p7zip_jll v17.8.2+0 ⇒ v17.8.3+0 Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...ªnbpkg_syncÚ‹ Resolving... ===  Project No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_edstpiwogr/Project.toml`  Updating `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_edstpiwogr/Manifest.toml` [deac9b47] ↑ LibCURL_jll v8.18.0+1 ⇒ v8.22.0+0 [e37daf67] ↑ LibGit2_jll v1.9.1+0 ⇒ v1.9.7+0 [29816b5a] ↑ LibSSH2_jll v1.11.103+0 ⇒ v1.11.104+0 [14a3606d] ↑ MozillaCACerts_jll v2026.8.13 ⇒ v2026.10.20 [458c3c95] ↑ OpenSSL_jll v3.5.6+0 ⇒ v3.5.8+0 [efcefdf7] ↑ PCRE2_jll v10.46.0+0 ⇒ v10.47.0+0 [83775a58] ↑ Zlib_jll v1.3.1+2 ⇒ v1.3.2+0 [8e850ede] ↑ nghttp2_jll v1.67.1+0 ⇒ v1.70.0+0 [3f19e933] ↑ p7zip_jll v17.8.2+0 ⇒ v17.8.3+0 Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...£CSVÚ‹ Resolving... ===  Project No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_edstpiwogr/Project.toml`  Updating `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_edstpiwogr/Manifest.toml` [deac9b47] ↑ LibCURL_jll v8.18.0+1 ⇒ v8.22.0+0 [e37daf67] ↑ LibGit2_jll v1.9.1+0 ⇒ v1.9.7+0 [29816b5a] ↑ LibSSH2_jll v1.11.103+0 ⇒ v1.11.104+0 [14a3606d] ↑ MozillaCACerts_jll v2026.8.13 ⇒ v2026.10.20 [458c3c95] ↑ OpenSSL_jll v3.5.6+0 ⇒ v3.5.8+0 [efcefdf7] ↑ PCRE2_jll v10.46.0+0 ⇒ v10.47.0+0 [83775a58] ↑ Zlib_jll v1.3.1+2 ⇒ v1.3.2+0 [8e850ede] ↑ nghttp2_jll v1.67.1+0 ⇒ v1.70.0+0 [3f19e933] ↑ p7zip_jll v17.8.2+0 ⇒ v17.8.3+0 Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...§LoggingÚ‹ Resolving... ===  Project No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_edstpiwogr/Project.toml`  Updating `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_edstpiwogr/Manifest.toml` [deac9b47] ↑ LibCURL_jll v8.18.0+1 ⇒ v8.22.0+0 [e37daf67] ↑ LibGit2_jll v1.9.1+0 ⇒ v1.9.7+0 [29816b5a] ↑ LibSSH2_jll v1.11.103+0 ⇒ v1.11.104+0 [14a3606d] ↑ MozillaCACerts_jll v2026.8.13 ⇒ v2026.10.20 [458c3c95] ↑ OpenSSL_jll v3.5.6+0 ⇒ v3.5.8+0 [efcefdf7] ↑ PCRE2_jll v10.46.0+0 ⇒ v10.47.0+0 [83775a58] ↑ Zlib_jll v1.3.1+2 ⇒ v1.3.2+0 [8e850ede] ↑ nghttp2_jll v1.67.1+0 ⇒ v1.70.0+0 [3f19e933] ↑ p7zip_jll v17.8.2+0 ⇒ v17.8.3+0 Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...§PlutoUIÚ‹ Resolving... ===  Project No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_edstpiwogr/Project.toml`  Updating `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_edstpiwogr/Manifest.toml` [deac9b47] ↑ LibCURL_jll v8.18.0+1 ⇒ v8.22.0+0 [e37daf67] ↑ LibGit2_jll v1.9.1+0 ⇒ v1.9.7+0 [29816b5a] ↑ LibSSH2_jll v1.11.103+0 ⇒ v1.11.104+0 [14a3606d] ↑ MozillaCACerts_jll v2026.8.13 ⇒ v2026.10.20 [458c3c95] ↑ OpenSSL_jll v3.5.6+0 ⇒ v3.5.8+0 [efcefdf7] ↑ PCRE2_jll v10.46.0+0 ⇒ v10.47.0+0 [83775a58] ↑ Zlib_jll v1.3.1+2 ⇒ v1.3.2+0 [8e850ede] ↑ nghttp2_jll v1.67.1+0 ⇒ v1.70.0+0 [3f19e933] ↑ p7zip_jll v17.8.2+0 ⇒ v17.8.3+0 Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...­LinearAlgebraÚ‹ Resolving... ===  Project No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_edstpiwogr/Project.toml`  Updating `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_edstpiwogr/Manifest.toml` [deac9b47] ↑ LibCURL_jll v8.18.0+1 ⇒ v8.22.0+0 [e37daf67] ↑ LibGit2_jll v1.9.1+0 ⇒ v1.9.7+0 [29816b5a] ↑ LibSSH2_jll v1.11.103+0 ⇒ v1.11.104+0 [14a3606d] ↑ MozillaCACerts_jll v2026.8.13 ⇒ v2026.10.20 [458c3c95] ↑ OpenSSL_jll v3.5.6+0 ⇒ v3.5.8+0 [efcefdf7] ↑ PCRE2_jll v10.46.0+0 ⇒ v10.47.0+0 [83775a58] ↑ Zlib_jll v1.3.1+2 ⇒ v1.3.2+0 [8e850ede] ↑ nghttp2_jll v1.67.1+0 ⇒ v1.70.0+0 [3f19e933] ↑ p7zip_jll v17.8.2+0 ⇒ v17.8.3+0 Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...¥LuxorÚ‹ Resolving... ===  Project No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_edstpiwogr/Project.toml`  Updating `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_edstpiwogr/Manifest.toml` [deac9b47] ↑ LibCURL_jll v8.18.0+1 ⇒ v8.22.0+0 [e37daf67] ↑ LibGit2_jll v1.9.1+0 ⇒ v1.9.7+0 [29816b5a] ↑ LibSSH2_jll v1.11.103+0 ⇒ v1.11.104+0 [14a3606d] ↑ MozillaCACerts_jll v2026.8.13 ⇒ v2026.10.20 [458c3c95] ↑ OpenSSL_jll v3.5.6+0 ⇒ v3.5.8+0 [efcefdf7] ↑ PCRE2_jll v10.46.0+0 ⇒ v10.47.0+0 [83775a58] ↑ Zlib_jll v1.3.1+2 ⇒ v1.3.2+0 [8e850ede] ↑ nghttp2_jll v1.67.1+0 ⇒ v1.70.0+0 [3f19e933] ↑ p7zip_jll v17.8.2+0 ⇒ v17.8.3+0 Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...ªDataFramesÚ‹ Resolving... ===  Project No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_edstpiwogr/Project.toml`  Updating `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_edstpiwogr/Manifest.toml` [deac9b47] ↑ LibCURL_jll v8.18.0+1 ⇒ v8.22.0+0 [e37daf67] ↑ LibGit2_jll v1.9.1+0 ⇒ v1.9.7+0 [29816b5a] ↑ LibSSH2_jll v1.11.103+0 ⇒ v1.11.104+0 [14a3606d] ↑ MozillaCACerts_jll v2026.8.13 ⇒ v2026.10.20 [458c3c95] ↑ OpenSSL_jll v3.5.6+0 ⇒ v3.5.8+0 [efcefdf7] ↑ PCRE2_jll v10.46.0+0 ⇒ v10.47.0+0 [83775a58] ↑ Zlib_jll v1.3.1+2 ⇒ v1.3.2+0 [8e850ede] ↑ nghttp2_jll v1.67.1+0 ⇒ v1.70.0+0 [3f19e933] ↑ p7zip_jll v17.8.2+0 ⇒ v17.8.3+0 Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...¶waiting_for_permission·restart_recommended_msgÀ´restart_required_msgÀ²installed_versionsŒ§Logging¦stdlib­MathTeXEngine¥0.6.9§PlutoUI¦0.7.83¬PrettyTables¥3.4.8¬LaTeXStrings¥1.4.1Ù!__internal_julia_manifest_version¦1.13.3­LinearAlgebra¦stdlib³DocumenterCitations¥1.5.0¸__internal_julia_version¦1.13.3£CSV¥1.0.0ªDataFrames¥1.8.2¥Luxor¥4.5.0¯install_time_nsÎÇ>ë~¬instantiatedípluto_version¦v1.1.0«in_temp_dirÂ