← Back to Deep Learning Mind Map
🧠 Deep LearningID: vae

VAE & Reparameterization

VAE 与重参数化
🎯Core Definition
A VAE is a variational generative model trained on the evidence lower bound: log⁡p(x)≥Eq(z∣x)[log⁡p(x∣z)]−DKL(q(z∣x)∥p(z))\log p(x) \ge \mathbb{E}_{q(z|x)}[\log p(x|z)] - D_{KL}(q(z|x) \Vert p(z)) — a reconstruction term plus a KL regularizer toward the prior. Because sampling from q(z∣x)q(z|x) gives an expectation non-differentiable w.r.t. parameters, the reparameterization trick writes z=μ+σ⊙ϵz = \mu + \sigma \odot \epsilon with ϵ∼N(0,I)\epsilon \sim \mathcal{N}(0, I), moving the randomness into parameter-free noise so the sampling path is backprop-compatible.
💡Use Cases
generative modeling, latent representation learning, anomaly detection, and as the conceptual foundation of diffusion models (the noising process is a hierarchical VAE); interviews drill ELBO derivation and the reparameterization trick.
⚡Key Problems Solved
maximizing log⁡p(x)\log p(x) directly requires an intractable marginal integral; VAEs turn inference into an SGD-optimizable lower bound. Unlike an autoencoder — a deterministic encoder with no prior constraint, giving an unstructured latent space that cannot be sampled for generation — the VAE pushes q(z∣x)q(z|x) toward the prior p(z)p(z) and becomes generative; the cost is blurry samples (mode averaging: one zz must explain many modes, so outputs average over them) from the Gaussian pixel likelihood — the mirror image of GANs, which are sharp but hard to train.
🎯Core Interview Exam Points
Fundamentals · Production Scenarios · Deep Dive
Core Def
Explain the core definition, underlying mechanism/math, and key principles of VAE & Reparameterization.
Use Cases
In production engineering, what are the primary use cases for VAE & Reparameterization and what core pain points does it solve?
🔥 High-Frequency Deep-Dive Questions
1
Derive the VAE ELBO. Why is it a lower bound on log⁡p(x)\log p(x)?
2
What problem does the reparameterization trick solve? Why can't we sample straight from q(z∣x)q(z|x)?
3
Core difference between VAE and AE? Why can't an AE generate new samples?
4
Why are VAE samples blurry? The mechanism of mode averaging?
5
How are the KL and reconstruction terms balanced? What are β\beta-VAE and posterior collapse?
Updated 2026-08-12
🎯
Verify Mastery: Practice Exam Questions for "VAE & Reparameterization"
Take pitfall multiple-choice questions with derivation options; mistakes are automatically logged.
🚀 Start Card Practice ➔
← Previous CardWGAN & WassersteinNext Card →Training Debugging

🔗 More Deep Learning Knowledge Cards

引用出处: TalentMe 450+ 工业级 AI 架构考点知识库 (Tech Vault) · 遵循 CC-BY-4.0 知识共享协议
URL: https://talentme.airsota.com/resources/tech/roadmap/mindmap/DL/card/vae
中文速览与面试要点

VAE 与重参数化 (VAE & Reparameterization)

定义: VAE 是变分生成模型, 优化证据下界 ELBO: p(x) E_q(z|x)[ p(x|z)] - D_KL(q(z|x) p(z)), 即重构项 + 先验 KL 正则。由于直接从 q(z|x) 采样得到的期望对参数不可导, 用重参数化技巧 z = + , 其中 N(0, I), 把随机性转移到与参数无关的噪声, 使采样路径可反向传播。 使用场景: 生成模型、隐空间表示学习、异常检测、扩散模型 (加噪过程可视为层次 VAE) 的前置知识; 面试必考 ELBO 推导与重参数化技巧。 解决的问题: 直接最大化 p(x) 需要难解的边际积分, VAE 把推断转化为可 SGD 优化的下界。与 AE 的区别: AE 的编码器是确定性映射、无先验约束, 隐空间无结构、无法采样生成; VAE 强制 q(z|x) 靠近先验 p(z), 获得可采样性与生成能力, 代价是逐像素高斯似然导致样本模糊 — 模式平均: 一个 z 要覆盖多个真实模式, 输出取平均; 而 GAN 相反, 样本锐利但训练不稳。

核心要点

  • 推导 VAE 的 ELBO? 为什么它是 p(x) 的下界?
  • 重参数化技巧解决什么问题? 为什么不直接从 q(z|x) 采样?
  • VAE 与 AE 的核心区别? 为什么 AE 不能生成新样本?
  • VAE 生成图像为什么模糊? 模式平均的机理?
  • KL 项与重构项如何平衡? 什么是 -VAE 与 posterior collapse?