From 09f6f9951a5707475d3b0ff59eed4c5077453a58 Mon Sep 17 00:00:00 2001 From: chris-admin Date: Wed, 3 Sep 2025 19:28:05 +0200 Subject: [PATCH] Added Probabilistic View in chapter 10 --- Chapters/10-Autoencoders/INDEX.md | 50 +++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/Chapters/10-Autoencoders/INDEX.md b/Chapters/10-Autoencoders/INDEX.md index 3474685..0b79c4f 100644 --- a/Chapters/10-Autoencoders/INDEX.md +++ b/Chapters/10-Autoencoders/INDEX.md @@ -111,3 +111,53 @@ similar to a point, nor too far apart from each other*** $$ L(x) = ||x - \hat{x}||^{2}_{2} + KL[N(\mu_{x}, \Sigma_{x}), N(0, 1)] $$ + +### Probabilistic View + +- $\mathcal{X}$: Set of our data +- $\mathcal{Y}$: Latent variable set +- $p(x|y)$: Probabilistic encoder, tells us the distribution of $x$ given $y$ +- $p(y|x)$: Probabilistic decoder, tells us the distribution of $y$ given $x$ + +> [!NOTE] +> Bayesian a Posteriori Probability +> $$ +> \underbrace{p(A|B)}_{\text{Posterior}} = \frac{ +> \overbrace{p(B|A)}^{\text{Likelihood}} +> \overbrace{\cdot p(A)}^{\text{Prior}} +> }{ +> \underbrace{p(B)}_{\text{Marginalization}} +> } +> = \frac{p(B|A) \cdot p(A)}{\int{p(B|u)p(u)du}} +> $$ +> +> - **Posterior**: Probability of A being true given B +> - **Likelihood**: Probability of B being true +given A +> - **Prior**: Probability of A being true (knowledge) +> - **Marginalization**: Probability of B being true + +By making the assumption of the probability of +$y$ of being a gaussian with 0 mean and identity +deviation, and assuming $x$ and $y$ independent +and identically distributed: + +- $p(y) = \mathcal{N}(0, I) \rightarrow p(x|y) = \mathcal{N}(f(y), cI)$ + +Since we technically need an integral over the denominator, we use +**approximate techniques** such as **Variational INference** + +### Variational Inference + + + +### Reparametrization Trick + +Since $y$ is **technically sampled**, this makes it impossible +to backpropagate the `mean` and `std-dev`, thus we add another +variable, sampled from a *standard gaussian* $\zeta$, so that +we have + +$$ +y = \sigma_x \cdot \zeta + \mu_x +$$