A VAE encodes data into a structured latent space z~N(μ,σ²) and decodes samples back. The ELBO loss = reconstruction + KL divergence pushes the latent space toward a Gaussian prior.
Left: 2D latent space showing encoded class distributions (colored ellipses = μ±σ). Gray contours = N(0,I) prior. Red cursor = current decode point. Right: Decoded "image" at cursor z — interpolation between class prototypes reveals the learned manifold structure.