On the Asymptotics of Importance Weighted Variational Inference

Randal Douc, Hugo MarivalarXiv 2025 · DOI

TL;DR

This paper provides the first rigorous theoretical foundation for Importance Weighted Variational Inference (IWVI), a popular technique used in models like Importance Weighted Autoencoders (IWAEs). The authors prove that IWVI estimates are consistent and asymptotically efficient—meaning they perform as well as the ideal maximum likelihood estimator—provided the number of importance samples grows at a specific rate relative to the dataset size.

What Problem Does This Paper Address?

In machine learning, we often work with latent variable models, where we observe some data ($x$) but believe it's generated by hidden factors ($z$). To train these models, we want to maximize the "marginal likelihood," but this requires solving a difficult integral over all possible hidden factors.

Standard Variational Inference (VI) solves this by optimizing a "lower bound" (the ELBO). Importance Weighted Variational Inference (IWVI) takes this a step further by using $k$ importance samples to create a much tighter bound. While IWVI has been a massive empirical success in deep learning, we lacked a formal "large sample theory" for it. Specifically:

  1. Does the estimate actually converge to the true parameters as we get more data ($n$) and more samples ($k$)?
  2. How fast does $k$ need to grow compared to $n$ to reach peak efficiency?
  3. How does IWVI relate to older statistical methods like Maximum Simulated Likelihood Estimation (MSLE)?

Methods

The authors treat the IWVI objective as a deterministic function—the expectation of a log-importance-sampling estimate. They use a combination of the reparameterization trick (standard in VAEs) and asymptotic analysis to study the behavior of the estimators $\theta$ (model parameters) and $\phi$ (variational parameters).

The key methodological contribution is the comparison between IWVI and MSLE. While MSLE maximizes a random function (based on one set of samples), IWVI maximizes a deterministic expectation. This subtle difference makes IWVI more stable and theoretically "cleaner" to analyze in the limit.

Datasets

The paper is primarily a theoretical work, but the authors validate their findings using a simulation study:

  • Cameron-Trivedi Dataset: A classic dataset from the book Microeconometrics: Methods and Applications (2005).
  • Unobserved Heterogeneity Model: They used a Gumbel-Gaussian model, which is common in econometrics but lacks a closed-form likelihood, making it a perfect test case for IWVI.

Key Insights and Ideas

  • The Stability of Expectations: Because IWVI maximizes an expectation over samples rather than a single realization of samples (like MSLE), it avoids much of the "simulation noise" that plagues older methods.
  • The Phase Transition of $k$: The authors identified that the efficiency of the estimator depends on the relationship between $n$ (data points) and $k$ (importance samples). For the estimator to be "efficient" (matching the best possible statistical performance), $k$ must grow faster than $\sqrt{n}$, but the exact threshold depends on the "smoothness" and moments of the importance weights.
  • Variational Parameter Convergence: Interestingly, the variational parameter $\phi$ doesn't just wander; it is proven to converge to the value that minimizes the variance of the importance weights. This confirms that IWVI naturally "learns" the best importance distribution.
  • Lower Bias: The simulation shows that for any finite number of samples $k$, IWVI generally results in a smaller total error (bias + variance) than MSLE.

Key Results

  • Consistency: The authors proved that as both $n$ and $k$ go to infinity, the IWVI estimator $\hat{\theta}_n^k$ converges to the true parameter $\theta^*$ (Theorem 1).
  • Asymptotic Normality: They established that the error of the estimator follows a bell curve (normal distribution) in large samples, allowing for the creation of confidence intervals (Theorem 3).
  • Efficiency Threshold: The paper quantifies the "rate of growth" required for $k$. If $k$ grows fast enough (specifically $k_n / n^{\delta/2} \to \infty$), IWVI achieves the same asymptotic variance as the Maximum Likelihood Estimator (MLE), which is the gold standard in statistics.

Limitations and Future Work

  • Smoothness Assumptions: The proofs rely on certain assumptions about the smoothness of the importance ratios (Assumptions A4 and A9). In extremely complex, non-smooth deep learning models (like those using ReLU activations in very high dimensions), these conditions might be harder to satisfy.
  • Global vs. Local Optima: Like most asymptotic theory, this paper assumes we can find the global maximum of the objective function. In practice, stochastic gradient descent might get stuck in local minima, a challenge not addressed here.
  • Future Directions: The authors suggest that future work could explore "black-box" scenarios where the importance distribution is even more flexible or where the model is misspecified (i.e., the "true" distribution isn't in the model family).

Summary updated

BibTeX
@misc{douc2025asymptotics,
  author = {Randal Douc and Randal Douc and Hugo Marival and Hugo Marival},
  title = {{On the Asymptotics of Importance Weighted Variational Inference}},
  year = {2025},
  eprint = {2501.08477},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2501.08477},
  howpublished = {arXiv},
}
Figure