TL;DR
Variational Autoencoders (VAEs) often struggle with "inference suboptimality"—a gap between the true log-likelihood of the data and the model's lower bound. This paper reveals that this gap is primarily driven by the amortization gap (the encoder's inability to predict optimal parameters) rather than the approximation gap (the simplicity of the distribution family). Crucially, the authors show that decoders actually "self-censor," learning simpler generative distributions to accommodate the limitations of the encoder.
The Problem: Amortized Inference and the ELBO Gap
In the world of VAEs, models utilize a technique called amortized inference. Instead of finding the best latent variables for every single image one by one via slow iterative optimization, we train a neural network (the encoder) to predict them instantly for any input.
However, there is always a "gap" between the evidence lower bound (ELBO) we optimize and the true marginal log-likelihood. Researchers have historically assumed this gap existed because we use simple distributions (like Gaussians) that cannot match complex, "wiggly" true posteriors. This paper asks a fundamental question: Is the problem the math (the distribution family is too simple) or the model (the encoder network isn't powerful enough to find the right parameters)?
Decomposing the Inference Gap
The authors decompose the total Inference Gap into two measurable components:
- Approximation Gap: The distance between the true posterior and the best possible distribution within a chosen family (e.g., the absolute best Gaussian fit).
- Amortization Gap: The extra error introduced because the encoder network fails to find those "best possible" parameters for a specific data point.
To isolate these variables, the authors compared standard amortized VAEs against "local optimization." In the local optimization setup, they bypassed the encoder and spent extra computational effort to find the absolute best variational parameters for individual data points. They also tested Flexible Approximate Posteriors, specifically Normalizing Flows (Real NVP) and Auxiliary Variables, to see if making the distribution more complex helps more with "approximation" or "amortization."
Key Insights and Discoveries
- Amortization is the Bigger Bottleneck: On complex datasets like CIFAR-10, the amortization gap is significantly larger than the approximation gap. Improving the encoder's ability to map inputs to parameters is often more important than making the output distribution more complex.
- The Decoder Accommodates: In a fascinating "aha" moment, the authors found that the decoder (the generator) actually learns to produce data in a way that results in simpler posteriors. If you use a Gaussian encoder, the decoder learns a model where the true posterior looks Gaussian to accommodate the encoder's limitations.
- Flows Reduce Amortization Error: Interestingly, adding Normalizing Flows doesn't just help by making the distribution more flexible (reducing the approximation gap); it also acts as a more powerful architecture that helps the encoder generalize better, significantly reducing the amortization gap.
- Overfitting in Inference: The authors observed that the encoder often overfits the training set's inference requirements. This leads to a larger amortization gap on validation data, whereas the approximation gap remains relatively stable across splits.
Experimental Results
The study evaluates these gaps across three standard benchmarks: MNIST, Fashion-MNIST, and 3-BIT CIFAR-10.
- Gap Breakdown: On MNIST, the approximation and amortization gaps are nearly equal. However, on the more complex 3-BIT CIFAR, the Amortization gap (~37.47 nats) is more than double the Approximation gap (~14.75 nats).
- Flow Impact: In a controlled experiment on MNIST, switching from a simple Gaussian to a Flow distribution reduced the Amortization gap from 43.22 to 12.86. This proves that the "expressiveness" of flows is largely helping the encoder find better parameters, rather than just fitting a more complex shape.
- Decoder Capacity: Increasing the number of hidden layers in the decoder from 0 to 4 reduced the approximation gap from 3.90 to 1.63, confirming that a more powerful generator can "simplify" the posterior to fit the variational family.
Limitations and Future Work
The primary limitation of this research is the computational cost of the analysis itself. Calculating the "optimal" local parameters requires expensive iterative optimization for every data point, which isn't feasible for massive datasets or real-time applications.
The authors suggest that future work should focus on better encoder architectures and optimization techniques to close the amortization gap, rather than solely designing increasingly complex posterior distributions. They also recommend exploring how these gaps behave with different likelihood functions beyond simple Bernoulli or Gaussian outputs.
Summary updated