Abstract: We present Posterior Matching, a framework that enables pre-trained Variational Autoencoders (VAEs) to perform arbitrary conditioning—predicting missing features $x_u$ given observed features $x_o$. By training a secondary partial encoder to match the latent distribution of the full encoder, we achieve a model-agnostic solution that avoids expensive marginalization. Our method outperforms specialized state-of-the-art models in imputation tasks and provides a 219x speedup in active feature acquisition.
Introduction
Variational Autoencoders (VAEs) are powerful generative models capable of learning complex joint distributions $p(x)$. However, a significant limitation in standard VAEs is their inability to perform arbitrary conditioning: predicting a subset of unobserved features $x_u$ given an arbitrary subset of observed features $x_o$. While theoretically possible via marginalization, this process is computationally intractable for high-dimensional data.
Existing approaches often require specialized architectures or complex training procedures. Researchers at UNC Chapel Hill have proposed Posterior Matching, a model-agnostic framework that enables pre-trained VAEs to handle missing data without modifying the original model's weights.
Methodology: Posterior Matching
The core innovation of Posterior Matching lies in the latent space $z$. Instead of directly modeling the conditional distribution $p(x_u | x_o)$ in the high-dimensional data space, the framework aligns the posterior of a "partially observed" encoder with that of the full VAE encoder.
The process involves three main components:
- Pre-trained VAE: A standard VAE with encoder $q(z|x)$ and decoder $p(x|z)$.
- Partial Encoder: A secondary network $q_\theta(z|x_o)$ designed to map partial observations to the latent space.
- Matching Objective: The partial encoder is trained to minimize the divergence from the full encoder's output. Theorem 3.1 in the paper demonstrates that minimizing this latent-space divergence is mathematically equivalent to maximizing the conditional likelihood of the missing data.
This approach allows the partial encoder to be highly expressive (e.g., using autoregressive architectures) without impacting the inference speed of the base VAE.
Experimental Results
The framework was evaluated across image (MNIST, CelebA), tabular (UCI benchmarks), and clustering tasks.
Image Imputation and Tabular Data
On image inpainting tasks, Posterior Matching combined with a Very Deep VAE (VDVAE) outperformed specialized models like VAEAC and ACFlow. In tabular data benchmarks, the method consistently achieved higher log-likelihoods and more accurate imputations than previous VAE-based conditioning techniques.
Active Feature Acquisition
A significant advantage of this framework is its efficiency in Active Feature Acquisition (AFA). By utilizing "lookahead" posteriors, the model can estimate the reduction in uncertainty for a feature before it is measured. This method yielded a 219x speedup over traditional sampling-based acquisition strategies while maintaining competitive accuracy.
Discussion and Limitations
Posterior Matching provides a "plug-and-play" solution for arbitrary conditioning. Its model-agnostic nature means it can benefit from future advances in VAE architectures. However, the method typically requires fully observed data during the initial VAE training phase. Additionally, the quality of the conditional predictions is fundamentally bounded by the representational quality of the underlying VAE's latent space.
Future research may extend these principles to other latent variable models, further generalizing the ability to perform efficient inference under partial observability.
Summary updated