NEW
Also known as: Pathwise Derivative Estimator, Stochastic Reparameterization
Technique expressing random variables as deterministic transforms of noise to enable low-variance gradient estimates via backpropagation.
DESCRIPTION
The reparameterization trick rewrites stochastic nodes as deterministic functions of parameters and auxiliary noise. It allows gradients to pass through sampling operations, dramatically reducing variance versus score-function estimators. Popularized by variational autoencoders, it enables efficient optimization of the ELBO. Common forms include z = μ + σ ⊙ ε for Gaussian latents. Not all distributions are reparameterizable; alternatives include implicit reparameterization, Gumbel–Softmax, or score-function methods. Frameworks like PyTorch and TensorFlow Probability provide utilities for reparameterized sampling.
ALTERNATIVE DEFINITIONS
Kingma & Welling (AEVB)
We propose a stochastic gradient estimator using the reparameterization trick: expressing the random variable as a deterministic function of a parameter and a noise variable to allow backpropagation.
Original formulation connecting deterministic transforms of noise to gradient estimation.
PyTorch
Reparameterized samples allow gradients to flow through random draws by expressing samples as differentiable transformations of base noise.
Emphasizes implementation in autodiff frameworks for differentiable sampling.
TensorFlow Probability
The reparameterization trick rewrites stochastic nodes as deterministic functions of parameters and auxiliary noise, enabling lower-variance gradient estimates.
Highlights reduced variance in variational inference implementations.
RELATED TERMS
Variational Inference Variational Autoencoder Evidence Lower Bound REINFORCE Low-Variance Gradient Automatic Differentiation Gaussian Reparameterization Monte Carlo Data Gradient Estimation
COMPETING TERMS
Score Function Estimator Likelihood Ratio Estimator
KNOWLEDGE AREAS
TARGET AUDIENCE
AI Engineer Data Scientist MLOps Engineer
EXTERNAL SOURCES
- Wikipedia - Reparameterization trick
- Kingma & Welling - Original VAE paper introducing trick
- PyTorch - PyTorch distributions and reparameterization
- TensorFlow Probability - TF Probability overview and examples
TOP QUESTIONS
What is the Reparameterization Trick in variational inference?
It rewrites random sampling as a differentiable transform of noise, enabling backpropagation through stochastic nodes and lowering gradient variance.
Category: Definition
Why is the Reparameterization Trick important for VAEs?
It allows efficient optimization of the ELBO by enabling stable gradient-based learning of latent variables and parameters.
Category: Relevancy
What distributions are commonly reparameterizable?
Normal, log-normal, and some location-scale families are straightforward. Others need implicit methods or relaxations like Gumbel–Softmax.
Category: Requirements
How does the Reparameterization Trick compare to REINFORCE?
It typically yields lower-variance gradients than score-function estimators, improving convergence and sample efficiency.
Category: Alternatives
What are common mistakes using the Reparameterization Trick?
Incorrectly treating non-reparameterizable distributions, ignoring pathwise differentiability, or misusing stop-gradients can break learning.
Category: Mistakes
How is the trick implemented in PyTorch or TensorFlow?
Use distribution classes with reparameterized sampling, e.g., rsample() in PyTorch or TF Probability reparameterized distributions.
Category: Application
What is implicit reparameterization?
It differentiates through the inverse CDF or other implicit transforms, extending reparameterization to broader distribution families.
Category: Definition
Is the Reparameterization Trick always better?
No. For discrete variables or complex distributions, relaxations or score-function estimators might be necessary or simpler.
Category: Opinion
Where did the Reparameterization Trick originate?
It was popularized by Kingma and Welling’s variational autoencoder work and has roots in pathwise derivative ideas.
Category: Origin