Denoising Implicit Variational Inference
Zitong Wang, Zekun Wu, Longlin Yu, Cheng Zhang
NeurIPS 2026
TL;DR. We propose a novel ELBO-based semi-implicit variational inference method by utilizing denoising score matching to approximate the marginal score.
Abstract. Semi-implicit variational inference (SIVI) expands the representational capacity of variational families, but optimizing the Evidence Lower Bound (ELBO) remains challenging because the marginal score of the semi-implicit distribution is generally intractable. Unbiased Implicit Variational Inference (UIVI) and related methods address this difficulty through reparameterized ELBO gradients, but existing approaches estimate the required score indirectly through reverse-conditional sampling or approximation, which can be computationally costly and unstable. We propose Denoising Implicit Variational Inference (DIVI), which learns the marginal score directly via denoising score matching. The learned score is used as a plug-in estimator in the pathwise ELBO gradient, replacing inner reverse-conditional sampling with a score-network evaluation. We analyze DIVI as inexact stochastic gradient ascent and show, under stated assumptions, that the averaged stationarity measure is controlled by the usual optimization term and the average score-matching error. Empirically, we evaluate DIVI on both synthetic distributions and a variety of real-data Bayesian inference tasks. The results show that DIVI improves over the current UIVI baselines while reducing the cost of ELBO-gradient estimation.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperedit · history
NeurIPS 2026
Accept (poster) · 3 reviews · OpenReview
Updated 25 Nov 2026, 03:44 UTC.
- Decision
- Accept (poster)
Read decision
Meta-review
This paper proposes a method for implicit variational inference. In short, rather than using an inner-loop with MCMC to estimate the necessary score term, this paper proposes to learn a score network and alternate between updates to that score network and updates to the main parameters. A 1/√T rate is given under the assumption that the score term can be learned well. All major concerns were resolved during the rebuttal period. I recommend accepting this paper and that the authors include the given experiments and address the clarity issues that were brought up, in particular clarifying when this method would be preferred against alternatives. (Not just experimentally, but in terms of setting/tradeoffs.)
Final justification
(Above)
- Final justification
- (Above)
Read meta-review
Meta-review
This paper proposes a method for implicit variational inference. In short, rather than using an inner-loop with MCMC to estimate the necessary score term, this paper proposes to learn a score network and alternate between updates to that score network and updates to the main parameters. A 1/√T rate is given under the assumption that the score term can be learned well. All major concerns were resolved during the rebuttal period. I recommend accepting this paper and that the authors include the given experiments and address the clarity issues that were brought up, in particular clarifying when this method would be preferred against alternatives. (Not just experimentally, but in terms of setting/tradeoffs.)
1 comment
- Rating
- 4/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 4/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The authors propose DIVI, a semi-implicit variational inference (VI) algorithm that leverages denoising score matching at each step to learn the intractable marginal score of the variational distribution. This learned score then serves as a surrogate for the true score in the evidence lower bound (ELBO) to the data log likelihood. The authors’ algorithm consists of two primary steps: (1) learning the marginal score corresponding to a fixed variational distribution ( step) and (2) using the learned score of the current variational distribution to update the variational parameters ( step). The key innovation of the paper lies in the first step, wherein the authors show that by the denoising score identity (Proposition 3.1), the intractable marginal score is the minimizer of a regression objective on the (tractable) conditional score.
After proposing their algorithm, the authors provide a theoretical analysis showing monotonic increase of the ELBO (Lemma 4.3) and that the algorithm will attain an approximate stationary point (Theorem 4.4), provided that the score is learned well at each iteration i.e., is small. This analysis reduces the convergence of their algorithm to the approximation error of the learned score.
Lastly, the authors compare DIVI against ELBO-based SIVI algorithms, namely SIVI, UIVI, and AIVI, each of which differ primarily in their approximation to the intractable marginal score of the variational distribution. They also compare against KSIVI, which minimizes a kernel Stein discrepancy to the posterior. Their experiments include unnormalized toy densities, a partially observed diffusion process (double-well), and Bayesian neural network regression.
Strengths and weaknesses
Strengths:
- The paper is well written; in particular, the exposition to semi-implicit variational inference (SIVI) provides the necessary background for an unfamiliar reader.
- The authors’ algorithm DIVI is well-explained in the main text and in Algorithm 1. It could be reproduced by an interested reader.
- The authors’ theoretical assumptions are well-documented and empirically validated to hold in practice (Appendix C); however, the constants appear to be quite large (Figures 4 and 5).
- The discussion of previous SIVI algorithms is well-done (e.g., Table 1), and the baselines considered in the experiments are well-chosen.
Weaknesses
There are two main weaknesses that limit the impact of the paper. They are discussed in turn.
Theory:
The authors’ theoretical contributions successfully establish that the DIVI will converge to a stationary point of the ELBO, provided the marginal score is learned well at each -step. However, the authors do not close the loop and discuss when the practitioner should expect the score to be learned well (so that is small). This is far from obvious and remains the topic of continued research (e.g., see [1, 2]).
Specifically, using the Gaussian conditional score, the regression objective becomes
where is standard normal. The conditional variance, given , of the target is , which is large when is small. In other words, the score will be hard to learn well at finite compute when the Gaussian variance is small. This setting seems relevant since the diagonal covariance is initialized to a small value in the experiments (, in Appendix B.1).
The manuscript would be improved by a theoretical discussion and empirical validation of the quality of the learned score (see weakness "Experiments" as well).
Experiments:
In the reviewer’s opinion, the experiments do not fully validate the central claims of the paper. To the reviewer’s understanding, the primary difference between the four SIVI algorithms—SIVI, UIVI, AISVI, and DIVI—is how they approximate the intractable score of the variational posterior. Specifically, in the infinite compute (and arbitrarily flexible score network) setting, all methods should learn the score exactly; therefore, discrepancies in the fidelity of the approximation are a consequence of limited computation.
However, the authors do not directly quantify the quality of the learned score at matched compute across methods, for example, in a setting where the true score is tractable. The reviewer recognizes the methods for computing the score are not directly comparable (Monte Carlo for SIVI, HMC for UIVI, importance sampling for AISVI), but the authors should propose a reasonable heuristic.
[1] Song, Y. and Kingma, D. P. How to train your energy-based models. arXiv preprint arXiv:2101.03288, 2021.
[2] De Bortoli, V., et al. Target score matching. arXiv preprint arXiv:2402.08667, 2024.
Questions
-
Have the authors considered using implicit score matching [3] or sliced score matching [4], rather than denoising score matching? This would not require regressing on the conditional score which, as mentioned, can lead to high variance when is small. It would, however, be more computationally expensive.
-
How should the practitioner choose the number of score update steps per VI step? How does the answer change depending on the batch size used for score matching?
-
When would semi-implicit VI be preferable to an expressive variational family with tractable densities? For example, one could parameterize their posterior as a normalizing flow. The motivation for implicit and semi-implicit VI in the paper is brief.
Limitations
The authors have adequately addressed the limitations of their work in the “Conclusion” section. The reviewer encourages the authors to address the weaknesses discussed in review section “Weaknesses”.
Final justification
The authors have addressed the reviewer's concerns regarding comparisons of the learned and true scores across semi-implicit VI algorithms as well as ablations of the number of reverse steps (i.e., number of steps used to estimate the variational score) and the reverse step batch size. The reviewer believes that DIVI represents a meaningful contribution to the topic of semi-implicit VI.
Still, the reviewer believes that the theoretical contributions are weaker than presented in the manuscript and do not account for the core difficulty of DIVI (estimating the intractable score).
For these reasons, the reviewer recommends weak acceptance.
Formatting concerns
The reviewer did not observe any major paper formatting issues.
6 comments
We thank the reviewer for the thoughtful comments.
Score Matching Error
The inner score-matching error explicitly appears on the right-hand side of the master convergence theorem. In the discussion below, we denote the standard-deviation matrix .
Theoretically, we agree that when some are extremely small, the conditional-score targets can have high variance. A sufficient condition for uniformly controlling this target variance is that the diagonal standard-deviation matrix admits a uniform lower bound $\sigma_\phi(\epsilon)\succeq\sigma_0 I_d $ for some . Note that $ q_\phi(z)=\int \mathcal {N}\left(z;\mu_\phi(\epsilon),\sigma_\phi(\epsilon)^2\right)q(\epsilon)d\epsilon $ and $s_\phi(z)=\nabla_z\log q_\phi(z)= \mathbb E_{q_\phi(\epsilon\mid z)} \left[ \nabla_z\log\mathcal N\left(z;\mu_\phi(\epsilon),\sigma_\phi(\epsilon)^2\right) \right] $.
Under the lower-bound assumption, is strictly positive and smooth, and its score is also smooth and hence locally Lipschitz. Moreover, by the conditional-score identity and Jensen's inequality,
\mathbb E_{q_\phi(z)}\left\\|s_\phi(z)\right\\|^2=\mathbb E_{q_\phi(z)}\left\\|\mathbb E_{q_\phi(\epsilon\mid z)}\left[\nabla_z\log\mathcal N\left(z;\mu_\phi(\epsilon),\sigma_\phi(\epsilon)^2\right)\right]\right\\|^2\leq\mathbb E_\epsilon\operatorname{tr}\left(\sigma_\phi(\epsilon)^{-2}\right)\leq\frac{d}{\sigma_0^2}.
The same quantity bounds the second moment of the conditional-score regression target. Hence, when the probability-weighted inverse variance remains moderate, both the marginal score and the DSM target have controlled second moments. Since is smooth and belongs to , standard neural-network approximation results imply that a sufficiently expressive auxiliary network can approximate it arbitrarily well in [11]. This provides a representational guarantee. In addition, for we have , so the variance of each conditional-score target component is uniformly bounded.
In practice, we impose a positive numerical floor on each to prevent near-degeneracy. To clarify, is the initial variance, thus the inverse is still under control at the beginning of the training stage. We set the lower bound for the variance to be during training. A region with small conditional variance has limited influence on the integrated error only when its probability-weighted inverse variance remains controlled. For the distributions considered in this work, we do not observe pervasive near-degenerate behavior. The bound becomes unfavorable when a conditional distribution approaches a Dirac distribution; however, such near-degeneracy is generally numerically challenging and is not specific to DIVI.
DSM is the standard score-learning objective underlying modern score-based and diffusion models [3–5]. Both our theorem and existing diffusion-model analyses depend on a distribution-averaged score error rather than uniform pointwise accuracy [12]. Consequently, an inaccurate score on a small-probability region need not dominate the outer optimization error, provided that its probability-weighted contribution remains controlled.
Following the reviewer's suggestions, we evaluate the quality of the learned score in terms of the squared score-estimation error . More specifically, we take the variational model trained by DIVI for 2000, 4000, 6000, 8000 and 10000 steps targeting the X-shaped distribution. For each variational model, we first generate samples from the variational model by sampling and then .
Following the UIVI score identity (Tweedie's formula), , we estimate the reference score by using HMC to sample the posterior . For every , we run 20 chains starting from the generating . Each chain uses 1,000 burn-in steps and 5,000 retained samples. The HMC sampling process reports , indicating good mixing behaviour.
We then pool all posterior epsilon samples from HMC and calculate .We evaluate every method on the same variational model obtained by training with DIVI; the methods differ only in how they estimate its score: SIVI uses prior-mixture samples, UIVI uses its native posterior-HMC estimator, AISIVI uses importance sampling with a normalizing-flow proposal optimized for 10,000 steps separately for each DIVI variational distribution, and DIVI uses its checkpointed denoising score network. We report mean sample standard deviation across 5 seeds, together with the score-estimation-only time for a batch of 128, measured over 100 synchronized calls on an RTX 3090. DIVI achieves consistently superior score-estimation accuracy while requiring less computation.
| Method | 2K Steps | 4K Steps | 6K Steps | 8K Steps | 10K Steps | Time for score estimation (ms) |
|---|---|---|---|---|---|---|
| SIVI | 154.381 ± 152.642 | 113.301 ± 60.589 | 78.763 ± 39.973 | 81.909 ± 61.060 | 107.791 ± 49.088 | 5.316 ± 0.183 |
| UIVI | 1,188.717 ± 1,139.425 | 889.808 ± 535.711 | 880.869 ± 703.761 | 972.443 ± 801.781 | 899.236 ± 611.035 | 204.523 ± 23.199 |
| AISIVI | 45.529 ± 76.908 | 13.478 ± 18.378 | 7.249 ± 4.671 | 20.203 ± 15.426 | 6.881 ± 6.990 | 8.096 ± 0.222 |
| DIVI | 0.899 ± 0.908 | 0.802 ± 0.867 | 0.407 ± 0.471 | 0.303 ± 0.307 | 0.331 ± 0.548 | 0.134 ± 0.003 |
We also evaluate the score matching error along the optimization trajectories of each method. We evaluate the squared L2 discrepancy between the variational score approximated by each method and the score of the target distribution throughout the training process. Specifically, we track the score estimated by each method of the variational model obtained by a given number of steps of that method, then compare it with the score of the target distribution at that point. We demonstrate the results targeting the X-shaped distribution, using 5 seeds for each method. It is clear that DIVI learns the best score among these methods across all training stages.
| Method | 2K Steps | 4K Steps | 6K Steps | 8K Steps | 10K Steps |
|---|---|---|---|---|---|
| SIVI | 4.479184 ± 2.652838 | 0.546264 ± 0.683984 | 0.298262 ± 0.554400 | 0.270472 ± 0.495099 | 0.190327 ± 0.339495 |
| UIVI | 5.062441 ± 0.504703 | 3.264981 ± 1.511872 | 3.022933 ± 0.618120 | 3.052291 ± 0.717330 | 3.039571 ± 0.796492 |
| AISIVI | 1704.845629 ± 3716.350683 | 282.646957 ± 362.166173 | 581.071230 ± 961.327048 | 100.475658 ± 62.394536 | 88.381492 ± 86.784476 |
| DIVI | 3.693960 ± 0.448128 | 0.411102 ± 0.108952 | 0.147958 ± 0.062954 | 0.142047 ± 0.085538 | 0.079085 ± 0.036935 |
Implicit or sliced score matching. Both ISM [1] and SSM [2] are viable alternatives when is nondegenerate and the regularity conditions required for integration by parts hold. However, the ISM objective contains . Computing this trace exactly requires computational overhead; equivalently, it is a Hessian trace when the score is parameterized as the gradient of a scalar potential. SSM reduces this cost by estimating the trace through random projections and Jacobian-vector products, but the finite number of projections introduces additional variance. Increasing the number of projections or using control variates reduces this variance but also increases computation [2]. In contrast, DSM exploits the tractable conditional Gaussian score and requires neither exact Hessian traces nor stochastic trace estimation. It is also the standard training principle underlying modern score-based generative models [3–5]. We therefore chose DSM for its computational efficiency and training stability, while ISM and SSM variants remain useful alternatives for future exploration.
Number of score updates per VI update On the experiments considered in this paper, setting inner score updates per outer VI update to two to five worked consistently well. The optimal choice of depends on the dimension, network capacity, batch size, and how rapidly changes, as is typical in inexact bilevel and two-timescale optimization [6–10]. Note that DIVI warm-starts from the preceding iteration, so each inner loop tracks a changing score rather than learning it from scratch. In practice, one can initialize from a relatively larger value (e.g., ) and then adaptively lower it, say, by a factor of 2, if there is not much loss in performance when using some distributional metric (e.g., ELBO, W2) as selection criteria. The number of steps reflects a tradeoff between accuracy and computational efficiency. We provide the empirical ablation results in the following tables, evaluated on the X-shaped distribution and repeated across 5 seeds. The first table evaluates differentnumbers of reverse steps with a shared batch size of 2048.
| Reverse steps | ↓ | W2 ↓ | Runtime (s) |
|---|---|---|---|
| 1 | 0.2083 ± 0.1503 | 0.2517 ± 0.0526 | 171.6 ± 1.1 |
| 2 | 0.02253 ± 0.00725 | 0.2402 ± 0.0375 | 216.5 ± 3.4 |
| 5 (default) | 0.004619 ± 0.001524 | 0.1127 ± 0.0279 | 352.8 ± 4.8 |
| 10 | 0.002708 ± 0.000824 | 0.07333 ± 0.00553 | 571.7 ± 7.2 |
The second table evaluates different batch sizes with 5 reverse steps.
| Reverse batch size | ↓ | W2 ↓ | Runtime (s) |
|---|---|---|---|
| 512 | 0.01058 ± 0.00520 | 0.1592 ± 0.0387 | 339.6 ± 3.6 |
| 1,024 | 0.008070 ± 0.001921 | 0.1480 ± 0.0249 | 339.4 ± 5.5 |
| 2,048 (default) | 0.004619 ± 0.001524 | 0.1127 ± 0.0279 | 352.8 ± 4.8 |
| 4,096 | 0.004079 ± 0.001026 | 0.07773 ± 0.01072 | 351.1 ± 4.1 |
| 8,192 | 0.001978 ± 0.000539 | 0.06823 ± 0.00606 | 344.7 ± 5.2 |
Semi-implicit VI versus tractable families Normalizing-flow VI is attractive when an invertible tractable-density architecture adequately represents the target because its density and score are directly available. Semi-implicit VI offers a different tradeoff: its implicit mixture construction can represent complex multimodal structure without requiring the overall sampler to be a globally invertible map, at the cost of an intractable marginal density and score. DIVI addresses this score bottleneck rather than replacing normalizing-flow VI in every setting. As a concrete comparison, we train a four-layer RealNVP for 10,000 optimization steps with batch size 128 on the eight-Gaussian target and aggregate its results across 5 seeds.
| Method | ELBO ↑ | W2 ↓ | Parameter count |
|---|---|---|---|
| DIVI | −0.355 ± 0.082 | 0.327 ± 0.060 | 26,054 |
| RealNVP | −0.374 ± 0.006 | 0.402 ± 0.053 | 137,236 |
DIVI achieves the better mean ELBO and in this benchmark with fewer parameters, although this single experiment does not establish universal dominance. We will use it to clarify the regime in which the flexibility of a semi-implicit mixture can justify the additional score-estimation machinery.
- Rating
- 5/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
-
Semi-implicit variational families have a tractable conditional density but an intractable marginal score . Existing exact-ELBO methods estimate this score through samples from, or approximations to, the reverse conditional .
-
DIVI trains a score network by regressing the tractable conditional score on samples from the semi-implicit hierarchy. The conditional expectation of this target given is the marginal score. DIVI then plugs into the pathwise ELBO gradient.
-
The theory treats the update as stochastic gradient ascent with a biased gradient. It bounds the average squared ELBO gradient by the usual optimization term plus the average population score-estimation error. Experiments cover two-dimensional targets, a 100-dimensional conditioned diffusion path, and six Bayesian neural-network regression datasets.
Strengths and weaknesses
Strengths: This is a very interesting paper. The construction is clean. Proposition 3.1 states the right regression identity, and the algorithm follows directly from that identity. I would be interested in trying this algorithm on difficult Bayesian inference problems.
Weaknesses: The experiments could also measure the quantity that drives the method and theorem. On low-dimensional semi-implicit families, the authors could compute the marginal score by quadrature and report error.
Note the toy figure and Table 5 omit SIVI and KSIVI; can they be included?
Questions
The theory is mostly a generic biased-gradient argument rather than a result specific to the alternating DIVI procedure. Is this the case?
Can the analysis cover the alternating algorithm? It appears to me that it doesn't, but perhaps I am missing it. (I mentioned this above.)
Limitations
Yes
Final justification
I read the authors response and it does not change my (positive) score. This is a very interesting paper.
Formatting concerns
None
2 comments
The authors thank the reviewer for these constructive suggestions and address each point below.
Score Estimation Quality. We report an evaluation of the marginal score error on low-dimensional semi-implicit families. To obtain the ground truth of the marginal score, the fine-grained mesh quadrature approach tends to be computationally intensive and we therefore opted for long-chain HMC instead. More specifically, we follow the identity
$ \nabla_z\log q_\phi(z)= \mathbb{E}_{q_\phi(\epsilon\mid z)}[ \nabla_z\log q_\phi(z\mid\epsilon)]$ (also used in UIVI [1]) and use multiple long HMC chains to sample the posterior .
For evaluation, we use the variational models obtained after 2000, 4000, 6000, 8000, and 10,000 training steps of DIVI on the X-shaped target. For each model, we generate evaluation pairs by sampling from the semi-implicit variational distribution with and then .
For every , we run 20 HMC chains initialized at , following UIVI, with 1000 burn-in steps and 5000 retained samples per chain. The HMC sampling process reports , indicating good mixing behavior. We then pool all obtained reverse-conditional samples to construct and calculate
$ \mathcal{E}^2=\frac{1}{N}\sum_{i=1}^N \|\widehat{s}_{\mathrm{method}}(z_i)-s_{\mathrm{HMC}}(z_i)\|^2$.
The score-error entries report the mean sample standard deviation across 5 seeds. The timing entries measure score evaluation for a batch of 128 excluding the cost of training the score network or proposal, timed separately across 100 calls. The score-estimation error of DIVI generally decreases over the course of training, helping keep the convergence bound informative.
| Steps | 2000 | 4000 | 6000 | 8000 | 10000 | runtime(ms) |
|---|---|---|---|---|---|---|
| Error | 0.899 ± 0.908 | 0.802 ± 0.867 | 0.407 ± 0.471 | 0.303 ± 0.307 | 0.331 ± 0.548 | 0.134 ± 0.003 |
Complementary target-score discrepancy. We additionally compare each method's estimated variational score with the analytic target score throughout training on the X-shaped target. We evaluate the squared L2 discrepancy between the variational score approximated by each method and the score of the target distribution throughout the training process. Specifically, we track the score estimated by each method of the variational model obtained by a given number of steps of that method, then compare it with the analytical score of the target distribution at that point. We report the mean sample standard deviation across 5 seeds.
| Method | 2K Steps | 4K Steps | 6K Steps | 8K Steps | 10K Steps |
|---|---|---|---|---|---|
| SIVI | 4.479 ± 2.653 | 0.546 ± 0.684 | 0.298 ± 0.554 | 0.270 ± 0.495 | 0.190 ± 0.339 |
| UIVI | 5.062 ± 0.505 | 3.265 ± 1.512 | 3.023 ± 0.618 | 3.052 ± 0.717 | 3.040 ± 0.796 |
| AISIVI | 1,704.846 ± 3,716.351 | 282.647 ± 362.166 | 581.071 ± 961.327 | 100.476 ± 62.395 | 88.381 ± 86.784 |
| DIVI | 3.694 ± 0.448 | 0.411 ± 0.109 | 0.148 ± 0.063 | 0.142 ± 0.086 | 0.079 ± 0.037 |
DIVI obtains the lowest mean target-score discrepancy at every reported checkpoint.
SIVI and KSIVI baselines on the toy targets. We agree that the requested comparison concerns the toy experiments, where differences in geometry and mode coverage can be inspected directly. We have run both SIVI and KSIVI and will add them to the toy figure and quantitative toy table alongside UIVI, AISIVI, and DIVI. All methods use the same semi-implicit variational-family architecture and evaluation protocol, and we additionally report their end-to-end wall-clock times.
| Target | Metric | SIVI | KSIVI | AISIVI | UIVI | DIVI |
|---|---|---|---|---|---|---|
| X-shaped | ||||||
| X-shaped | ||||||
| Student UC | ||||||
| Student UC | ||||||
| 8 Gaussians | ||||||
| 8 Gaussians | ||||||
| All three | Wall-clock time (s) | 266 | 391 | 387 | 803 |
DIVI obtains the lowest error on four of the six quality metrics and the second-lowest error on the remaining two, while SIVI is strongest on the Student UC and eight-Gaussian KL metrics. DIVI also has the lowest end-to-end wall-clock time in this comparison.
Scope of theoretical analysis. Thanks for the observation! We agree that the final descent argument follows a general biased-gradient analysis. The DIVI-specific step is Proposition 4.2, which proves that the squared bias of the plug-in ELBO gradient satisfies . The resulting theorem permits to change at every iteration and therefore applies to the outer iterates generated by the alternating algorithm, conditional on the realized score-error sequence . Proposition 3.1 shows that the population score-matching objective has the exact marginal score as its function-space minimizer, but finite model capacity, finite samples, and incomplete inner optimization can leave a nonzero residual. A complete coupled guarantee would require additional score-tracking assumptions and a stochastic bilevel or two-timescale analysis [2,3]. We will clarify this scope explicitly and add more discussion of the theorem in the revision.
References
[1] M. K. Titsias and F. Ruiz. Unbiased Implicit Variational Inference. AISTATS, 2019.
[2] K. Ji, J. Yang, and Y. Liang. Bilevel Optimization: Convergence Analysis and Enhanced Design. ICML, 2021.
[3] M. Hong, H.-T. Wai, Z. Wang, and Z. Yang. A Two-Timescale Stochastic Algorithm Framework for Bilevel Optimization: Complexity Analysis and Application to Actor-Critic. SIAM Journal on Optimization, 2023.
- Rating
- 5/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The authors considered the problem of implicit variational inference, where the goal is to approximate a posterior distribution by an implicitly-defined variational family. The key observation is that the gradient of the KL objective involves the score function of the posterior and the marginal score function of the variational approximation. Since the score of the posterior is usually available, the authors proposed to apply score matching to learn the marginal score of the variational approximation through its conditional score, which is then plugged into the gradient to iterate. The whole procedure can be treated as stochastic gradient descent with a biased gradient estimator. Under standard assumptions the authors established an ergodic convergence rate for the expected gradient norm, up to the errors incurred in each step of score matching. The authors conducted small-scale experiments (toy datasets and 5 UCI datasets for Bayesian NNs) to demonstrate the efficacy of the proposed algorithm.
Strengths and weaknesses
The main idea is quite natural and well-presented. The connection with and the difference from prior works are sufficiently discussed, giving enough context for the reader to appreciate the contributions on the authors' side. The experiments, albeit of a small scale, did showcase the efficacy of the proposed algorithm.
As far as I can tell, there are two weaknesses:
-
the presentation on when the proposed method should be favored could be more detailed and clear (see details below)
-
the current convergence guarantee does not lead to consistency (yet), unless one is willing to assume the error of each score matching step goes to 0 sufficiently fast, which is too strong (in my opinion). Not to mention that Assumptions 1-3 are a bit strong too.
Questions
Here are some comments that hopefully can help improve presentation:
-
It took me a while to figure out when the proposed algorithm should be favored against straightforward baselines. I suggest the authors make their problem setting clear at the beginning, namely that the score of the posterior is available (line 90), and we need to be able to efficiently sample from the variational family. Without the second condition, one may simply run the stochastic gradient Langevin dynamics (SGLD) of Welling and Teh (ICML'11), since the score of the posterior is available. The only downside of SGLD is that each sample of the posterior requires many simulation steps while the authors' algorithm learns a "generator" that is much more efficient to sample.
-
This brings me to a second alternative: sample many z using SGLD and then train a GAN/Flow to obtain a more efficient generator. This is a bit costly but maybe not too different from repeatedly conducting score matching.
-
And finally let's push the alternative even further: we simply apply the normalizing flow approach for variational inference (see e.g., "Variational inference with normalizing flows", Rezende & Mohamed, ICML'15), where we parameterize the variational family (push-forward of the noise distribution , parameterized by ) and we apply the change-of-variable formula to obtain a closed-form of the density (and hence its score). This should allow us to directly compute the gradient in Eq (3) and we can efficiently sample after training. Note that it is much easier to establish a consistent guarantee for this last alternative, as it is simply SGD on the KL objective. What could be its downside, compare to the proposed method? (In line 32 the authors mentioned in passing that such approach restricts the admissible variational family. I'd appreciate more details or experiments on this point, especially in comparison to the variational family in Eq. (1) where some differentiation is also needed.)
Some minor comments:
-
In Eq (3), it may be helpful to point out that the partial derivative vanishes in expectation and hence is omitted.
-
The displayed equation before Proposition 3.1 should be minimizing over (not )
-
line 150, the hand-waving argument about projecting the iterates needs some care: one you perform projection, the proof for some stationarity measure (the gradient norm no longer suffices) can be much more involved.
-
it would be nice to find a way to interpret the updates on and as some stochastic update on a single objective, for this will lead to a much nicer convergence theory. The one alternative I can think of is to match the conditional score with the score of the posterior (which is an upper bound of the score matching loss of the marginal?): $\min_{\phi} E[ |\nabla \log q_{\phi}(z| \epsilon) - \nabla \log p(D, z)|^2 ]. Not sure if this makes much sense, except it does try to strike a balance between fitting the score of the posterior and minimizing the variance of the conditional score.
-
In Section 6.2, can you make clear what corresponds to D and z? In particular, is available?
Limitations
Yes
Final justification
I thank the authors for the response, which reasonably addressed my questions. Please incorporate the additional discussions in the next revision. I also agree with other reviewers in the score estimation error: it seems to be left as is but perhaps it is the real interesting (and difficult) question.
Formatting concerns
NA
3 comments
Rebuttal
We thank the reviewer for the constructive comments. We will revise the Introduction and Background to clarify the motivation, relevant alternatives, and scope of the theoretical result.
Clarifying the variational inference setting. Our setting is the standard VI setting in which a posterior or other target distribution is available through its unnormalized differentiable density, while its normalizing constant and a direct sampling procedure are unavailable. VI trades asymptotic exactness for a one-time optimization cost that produces a reusable approximate sampler. After training, independent samples from the variational approximation can be generated in parallel through forward evaluations, which is advantageous when many posterior samples or repeated downstream expectations are required. By contrast, stochastic-gradient MCMC methods such as SGLD [1] avoid variational approximation error under appropriate asymptotic conditions, but incur transition and mixing costs and produce correlated samples. For difficult high-dimensional targets, obtaining sufficiently mixed and effectively independent MCMC samples can require many transition steps [2]. Neither approach uniformly dominates the other: MCMC may be preferable when asymptotic exactness is essential, whereas VI is attractive when fast repeated sampling is important. DIVI retains the standard ELBO objective and semi-implicit variational setting; its contribution is a new way to estimate the otherwise intractable marginal score needed for ELBO optimization. We will make this standard setting and computational tradeoff explicit in the revision.
Training a GAN or flow on MCMC samples. The suggested strategy of first obtaining many SGLD samples and then training a GAN/Flow faces two separate difficulties. First, it requires obtaining a sufficiently large number of well-mixed MCMC samples from the target distribution, which is itself computationally expensive, especially for complex high-dimensional distributions. Second, learning a global generative model from finite MCMC samples introduces an additional density modeling problem. For example, GAN-based approaches may suffer from mode coverage issues [3], while normalizing flows require architectural constraints due to invertibility and tractable Jacobian computation [4,5]. Therefore, this strategy does not eliminate the original MCMC sampling difficulty, but instead requires simultaneously addressing both the MCMC sampling problem and the global generative modeling problem. In contrast, our method directly optimizes the ELBO without relying on a pre-generated set of sufficiently mixed MCMC samples.
Comparison with Normalizing Flow VI. NFVI [4] provides explicit variational distributions through invertible transformations with tractable Jacobians. However, a normalizing flow is generally a diffeomorphic mapping of the base distribution, and this topological constraint may make it challenging for standard flows with simple base distributions to accurately represent complex multimodal targets, especially when different modes are well separated [5]. In contrast, semi-implicit variational families naturally introduce implicit mixture representations, which provide additional flexibility for capturing multimodal posterior structures [6].
We will include an NFVI baseline in the multimodal toy experiment. In particular, on the eight-Gaussian benchmark, we observe qualitatively that normalizing flow models produce bridges between mode, while DIVI achieves better mode coverage and sampling quality compared with the flow-based baseline with a smaller network and much fewer parameters. We also present the quantitative results in the table below, aggregated across 5 seeds for NFVI. We used a 4 layer RealNVP and 10,000 optimization steps with 128 batch size.
| Method | ELBO ↑ | W2 ↓ | Parameter count |
|---|---|---|---|
| DIVI | −0.355 ± 0.082 | 0.327 ± 0.060 | 26,054 |
| RealNVP | −0.374 ± 0.006 | 0.402 ± 0.053 | 137,236 |
Convergence guarantee and assumptions. With finite computation and model capacity, our theorem characterizes the practical setting as an inexact stochastic optimization problem: the score approximation error induces a persistent gradient bias. As standard in stochastic optimization with biased gradients [7], convergence is then guaranteed to a neighborhood of a stationary point rather than exact stationarity, with the neighborhood size controlled by the magnitude of the gradient bias. In our case, this bias is bounded by the average score error. Assumption 1 is a standard smoothness assumption in nonconvex optimization. We agree that Assumptions 2--3, which require bounded higher-order moments, are stronger. Their roles are discussed in Lines 152--156 and examined numerically in Appendix C. We also discuss the issues in the Conclusion part, and will further emphasize these limitations in the revised manuscript.
Minor comments.
-
Equation (3). We will explicitly note that under the usual regularity conditions, which is why this term is omitted.
-
Typo before Proposition 3.1. Thank you for identifying this typo. We will correct the optimization variable.
-
Projection . The projection step is introduced to ensure bounded iterates. A fully rigorous treatment of projected stochastic optimization would use the projected gradient mapping as the stationarity measure rather than the vanilla gradient norm. Such an analysis follows the framework of projected stochastic nonconvex optimization [8]. Since our current theorem focuses on the effect of score approximation error under bounded iterates, we leave a refined projected-stationarity analysis to future work.
-
A joint objective for and . Our current formulation follows the standard bilevel variational inference framework, where the score estimator update is regarded as an inner optimization problem and the variational parameter update is the outer optimization problem. Similar nested optimization structures have been studied in bilevel-learning and iterative amortized variational inference [9-11]. Reformulating the two updates as stochastic optimization of a single joint objective is an interesting direction; however, it would correspond to a different objective and requires additional analysis. In this work, we focus on the bilevel formulation and provide convergence guarantees under the corresponding score approximation error.
-
Notation in Section 6.2. Here, the observations correspond to , and the latent diffusion path corresponds to . We will make this explicit and include the discretized prior:
References
[1] M. Welling and Y. W. Teh. Bayesian Learning via Stochastic Gradient Langevin Dynamics. ICML, 2011.
[2] R. M. Neal. MCMC Using Hamiltonian Dynamics. In Handbook of Markov Chain Monte Carlo, 2011.
[3] A. Srivastava, L. Valkov, C. Russell, M. U. Gutmann, and C. Sutton. VEEGAN: Reducing Mode Collapse in GANs Using Implicit Variational Learning. NeurIPS, 2017.
[4] D. J. Rezende and S. Mohamed. Variational Inference with Normalizing Flows. ICML, 2015.
[5] R. Cornish, A. L. Caterini, G. Deligiannidis, and A. Doucet. Relaxing Bijectivity Constraints with Continuously Indexed Normalising Flows. ICML, 2020.
[6] M. Yin and M. Zhou. Semi-Implicit Variational Inference. ICML, 2018.
[7] A. Ajalloeian and S. U. Stich. On the Convergence of SGD with Biased Gradients. arXiv:2008.00051, 2020.
[8] S. Ghadimi, G. Lan, and H. Zhang. Mini-batch Stochastic Approximation Methods for Nonconvex Stochastic Composite Optimization. Mathematical Programming, 155:267–305, 2016.
[9] L. Franceschi, P. Frasconi, S. Salzo, R. Grazzi, and M. Pontil. Bilevel Programming for Hyperparameter Optimization and Meta-Learning. ICML, 2018.
[10] Y. Kim, S. Wiseman, A. C. Miller, D. Sontag, and A. M. Rush. Semi-Amortized Variational Autoencoders. ICML, 2018.
[11] J. Marino, Y. Yue, and S. Mandt. Iterative Amortized Inference. ICML, 2018.
Thank you for the response. I think my concerns are reasonably addressed.
We sincerely thank the reviewer for the positive assessment and for the time invested in reviewing our manuscript and engaging in the discussion. We greatly appreciate your constructive comments and suggestions, and are pleased that our response addressed your concerns.
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
We thank the Area Chair for highlighting the score-estimation error and its practical implications. To measure the quantity appearing in our theorem, we evaluated all four score estimators on the same fixed DIVI variational checkpoints using a large-sample reverse-conditional HMC reference. DIVI achieves the lowest mean score-estimation error at every checkpoint from 2K to 10K steps; at 10K, its error is 0.331±0.548, compared with 6.881±6.990 for the next-best method, AISIVI. DIVI also has the lowest score-evaluation latency under the tested practical configurations.
We agree that a small conditional variance can increase the variance of the denoising regression target. The reported value 0.01725 is the conditional variance, corresponding to a standard deviation of approximately 0.131. In practice, we mitigate this issue through a positive numerical floor, warm-starting, large score batches, and multiple inner updates. Our new ablations show that increasing either the score-update count or batch size improves the resulting KL and Wasserstein metrics, with the expected computational tradeoff.
We also agree that the theoretical contribution should be characterized carefully. Our theorem provides a finite-time stationarity bound for the outer VI iterates conditional on the realized score-estimation errors; it does not prove that finite inner updates make these errors vanish or establish joint convergence of both parameter sequences. We will clarify this scope and include the new score-error results and ablations in the revision. We are grateful that Reviewer LGT5 found these additional experiments convincing and informative for practitioners.
Best regards, The Authors