---
title: "VAE reparameterized latent sample"
description: "Expresses a random posterior sample as a differentiable transformation of parameter-free noise so gradients can flow into encoder parameters."
canonical_url: "https://fanout.sh/labs/math-decoder/formula/vae-reparameterization-trick"
md_url: "https://fanout.sh/labs/math-decoder/formula/vae-reparameterization-trick.md"
last_updated: "2026-08-09"
access: "public"
---

# VAE reparameterized latent sample

Expresses a random posterior sample as a differentiable transformation of parameter-free noise so gradients can flow into encoder parameters.

## Public overview

Epsilon is sampled from a standard normal distribution, and latent z equals encoder mean mu phi of x plus encoder standard deviation sigma phi of x elementwise times epsilon.

Generate a posterior sample by stretching and shifting reusable standard noise instead of sampling from a parameter-dependent node directly.

The affine transformation of epsilon is the sampling mechanism; the distribution statement defines the only random input.

Because z is now a differentiable function of mu and sigma, automatic differentiation can estimate the ELBO's pathwise gradient.

---
This representation contains public Fanout content only. Protected Pro lessons, account data, billing, checkout, and pricing are not included.

Browse the public content map: https://fanout.sh/sitemap.md
