Introduction
Variational Autoencoders (VAEs) have revolutionized generative modeling by employing amortized inference. Instead of performing costly per-sample optimization, VAEs use a neural network (the encoder) to map inputs directly to latent representations. However, standard VAEs are typically "singly amortized"—they are optimized for a specific, static data distribution. When faced with distribution shifts, such as rotated or scaled images, these models often fail to generalize because their inference networks are not designed to adapt to new contexts.
This paper introduces Meta-Amortized Variational Inference, a "doubly-amortized" framework that enables generative models to adapt to novel, unseen data distributions. By sharing computation across both individual observations and a family of related probabilistic models, the proposed MetaVAE learns transferable representations that remain robust under significant transformations.
Methodology: Double Amortization
The core innovation of this work is the transition from single to double amortization. While standard amortized inference maps an observation $x$ to a latent $z$, meta-amortized inference maps a set of observations from a distribution to an inference procedure for that distribution.
The MetaVAE Framework
The authors propose a meta-inference model $g_\phi(D_i, x)$ that takes two inputs:
- Context Set ($D_i$): A small collection of samples representing the current distribution (e.g., a few examples of digits at a specific rotation).
- Query ($x$): The specific observation to be encoded.
The architecture consists of a Summary Network, which extracts global features from the context set using a permutation-invariant operation, and an Aggregation Network, which combines these global features with the query $x$ to produce the latent representation $z$.
As shown in Figure 3, MetaVAE differs from previous approaches like the Neural Statistician (NS) and Variational Homoencoder (VHE). While NS and VHE use a global latent variable $c$ to represent the distribution, MetaVAE adopts a semi-parametric approach. It avoids forcing the distribution of "models" into a specific prior (like a Gaussian), which enhances flexibility and robustness to complex shifts.
Experimental Evaluation
The authors evaluated MetaVAE across diverse domains, ranging from synthetic exponential families to complex 3D object datasets like Small NORB.
Key Findings
- Learning Sufficient Statistics: MetaVAE demonstrates a remarkable ability to learn "sufficient statistics" for unseen distributions. For instance, a model trained on Gaussian distributions could successfully estimate parameters for a Weibull distribution, a family it never encountered during training.
- Invariance to Transformations: By leveraging the context set, MetaVAE learns to disentangle nuisance variables (like rotation angle or lighting) from salient features (object identity). On Transformed MNIST, MetaVAE outperformed NS and VHE by 10-50% in downstream classification tasks.
- Real-World Robustness: On the Small NORB dataset, which involves simultaneous variations in lighting, elevation, and azimuth, MetaVAE showed improvements of 10-35% over baselines, maintaining high representation stability even under extreme shifts.
Conclusion
Meta-Amortized Variational Inference provides a powerful path toward more adaptable generative models. By treating the inference network itself as a function of the data distribution, MetaVAE achieves a level of systematic generalization that standard VAEs lack. Future work may extend this "doubly-amortized" logic to dynamic environments, such as video prediction or online learning scenarios.
Summary updated