Papers
Topics
Authors
Recent
Search
2000 character limit reached

Primal-Dual Variational Inference

Updated 10 February 2026
  • PD-VI is a scalable variational inference method that reformulates mean-field inference as a constrained optimization using an augmented Lagrangian framework.
  • It employs mini-batch primal-dual updates to jointly optimize local and global parameters, ensuring robust convergence even in high-dimensional, non-conjugate settings.
  • Empirical evaluations demonstrate that PD-VI, especially its block-preconditioned variant, outperforms traditional methods by achieving faster convergence and improved performance on both synthetic and real-world data.

Primal–Dual Variational Inference (PD-VI) is a methodology for scalable mean-field variational inference (MFVI) that reformulates the inference problem as a constrained optimization suitable for mini-batch primal-dual algorithms. By introducing an augmented Lagrangian framework and leveraging both primal and dual variational parameter updates, PD-VI jointly optimizes local and global parameters in the variational family in a scalable and theoretically well-founded manner. The method includes a block-preconditioned extension (P²D-VI) to accommodate parameter heterogeneity and non-isotropic curvature in large-scale latent variable models, providing both improved robustness and optimization efficiency (Lyu et al., 7 Feb 2026).

1. Problem Formulation

Mean-field variational inference seeks to approximate an intractable posterior p(z,βx)p(z,\beta\mid x) by a factorized variational family,

qϕ,λ(z,β)=i=1nqϕi(zi)qλ(β),q_{\phi,\lambda}(z,\beta)=\prod_{i=1}^n q_{\phi_i}(z_i)\cdot q_\lambda(\beta),

with the objective of minimizing the Kullback–Leibler divergence,

KL(qp)=Eq[logq(z,β)logp(z,β,x)],\mathrm{KL}(q\|p) = \mathbb{E}_{q}[\log q(z,\beta)-\log p(z,\beta,x)],

which is equivalent to minimizing the evidence lower bound (ELBO),

minϕ,λf(ϕ,λ),f(ϕ,λ)=1ni=1nfi(ϕi,λ),\min_{\phi,\lambda} f(\phi,\lambda), \qquad f(\phi,\lambda)=\frac{1}{n}\sum_{i=1}^n f_i(\phi_i,\lambda),

where each local term fi(ϕi,λ)f_i(\phi_i,\lambda) expresses the evidence contribution of data point xix_i. To enable efficient mini-batch optimization, PD-VI introduces local copies λi\lambda_i of the global parameter λ\lambda and enforces consensus constraints λi=λ0\lambda_i = \lambda_0 for all ii. The resulting finite-sum problem is:

qϕ,λ(z,β)=i=1nqϕi(zi)qλ(β),q_{\phi,\lambda}(z,\beta)=\prod_{i=1}^n q_{\phi_i}(z_i)\cdot q_\lambda(\beta),0

2. Augmented Lagrangian and Primal–Dual Structure

Consensus constraints are incorporated via Lagrange multipliers qϕ,λ(z,β)=i=1nqϕi(zi)qλ(β),q_{\phi,\lambda}(z,\beta)=\prod_{i=1}^n q_{\phi_i}(z_i)\cdot q_\lambda(\beta),1 and a quadratic penalty parameter qϕ,λ(z,β)=i=1nqϕi(zi)qλ(β),q_{\phi,\lambda}(z,\beta)=\prod_{i=1}^n q_{\phi_i}(z_i)\cdot q_\lambda(\beta),2, yielding the (scaled) augmented Lagrangian,

qϕ,λ(z,β)=i=1nqϕi(zi)qλ(β),q_{\phi,\lambda}(z,\beta)=\prod_{i=1}^n q_{\phi_i}(z_i)\cdot q_\lambda(\beta),3

The optimization seeks a saddle point,

qϕ,λ(z,β)=i=1nqϕi(zi)qλ(β),q_{\phi,\lambda}(z,\beta)=\prod_{i=1}^n q_{\phi_i}(z_i)\cdot q_\lambda(\beta),4

and lends itself to alternating primal–dual updates, for which only a subset of local parameters is updated per iteration, conforming with large-scale data regimes.

3. Primal–Dual VI and Block-Preconditioned VI Algorithms

At each iteration, a subset qϕ,λ(z,β)=i=1nqϕi(zi)qλ(β),q_{\phi,\lambda}(z,\beta)=\prod_{i=1}^n q_{\phi_i}(z_i)\cdot q_\lambda(\beta),5 of data indices is sampled for batch updates. For each qϕ,λ(z,β)=i=1nqϕi(zi)qλ(β),q_{\phi,\lambda}(z,\beta)=\prod_{i=1}^n q_{\phi_i}(z_i)\cdot q_\lambda(\beta),6 (in parallel), the following local subproblem is solved (Oracle I):

qϕ,λ(z,β)=i=1nqϕi(zi)qλ(β),q_{\phi,\lambda}(z,\beta)=\prod_{i=1}^n q_{\phi_i}(z_i)\cdot q_\lambda(\beta),7

qϕ,λ(z,β)=i=1nqϕi(zi)qλ(β),q_{\phi,\lambda}(z,\beta)=\prod_{i=1}^n q_{\phi_i}(z_i)\cdot q_\lambda(\beta),8

Auxiliary variables accumulate parameter increments, and the global parameter is updated via:

qϕ,λ(z,β)=i=1nqϕi(zi)qλ(β),q_{\phi,\lambda}(z,\beta)=\prod_{i=1}^n q_{\phi_i}(z_i)\cdot q_\lambda(\beta),9

For heterogeneous parameter blocks, PD-VI is extended to P²D-VI. The parameter KL(qp)=Eq[logq(z,β)logp(z,β,x)],\mathrm{KL}(q\|p) = \mathbb{E}_{q}[\log q(z,\beta)-\log p(z,\beta,x)],0 is partitioned into KL(qp)=Eq[logq(z,β)logp(z,β,x)],\mathrm{KL}(q\|p) = \mathbb{E}_{q}[\log q(z,\beta)-\log p(z,\beta,x)],1 blocks with block-specific penalties KL(qp)=Eq[logq(z,β)logp(z,β,x)],\mathrm{KL}(q\|p) = \mathbb{E}_{q}[\log q(z,\beta)-\log p(z,\beta,x)],2 and block-wise preconditioner KL(qp)=Eq[logq(z,β)logp(z,β,x)],\mathrm{KL}(q\|p) = \mathbb{E}_{q}[\log q(z,\beta)-\log p(z,\beta,x)],3. The penalty norm becomes KL(qp)=Eq[logq(z,β)logp(z,β,x)],\mathrm{KL}(q\|p) = \mathbb{E}_{q}[\log q(z,\beta)-\log p(z,\beta,x)],4 and the dual update KL(qp)=Eq[logq(z,β)logp(z,β,x)],\mathrm{KL}(q\|p) = \mathbb{E}_{q}[\log q(z,\beta)-\log p(z,\beta,x)],5. Oracle II is:

KL(qp)=Eq[logq(z,β)logp(z,β,x)],\mathrm{KL}(q\|p) = \mathbb{E}_{q}[\log q(z,\beta)-\log p(z,\beta,x)],6

KL(qp)=Eq[logq(z,β)logp(z,β,x)],\mathrm{KL}(q\|p) = \mathbb{E}_{q}[\log q(z,\beta)-\log p(z,\beta,x)],7

Block-specific penalties KL(qp)=Eq[logq(z,β)logp(z,β,x)],\mathrm{KL}(q\|p) = \mathbb{E}_{q}[\log q(z,\beta)-\log p(z,\beta,x)],8 are chosen as KL(qp)=Eq[logq(z,β)logp(z,β,x)],\mathrm{KL}(q\|p) = \mathbb{E}_{q}[\log q(z,\beta)-\log p(z,\beta,x)],9, where minϕ,λf(ϕ,λ),f(ϕ,λ)=1ni=1nfi(ϕi,λ),\min_{\phi,\lambda} f(\phi,\lambda), \qquad f(\phi,\lambda)=\frac{1}{n}\sum_{i=1}^n f_i(\phi_i,\lambda),0 represents the Lipschitz constant for block minϕ,λf(ϕ,λ),f(ϕ,λ)=1ni=1nfi(ϕi,λ),\min_{\phi,\lambda} f(\phi,\lambda), \qquad f(\phi,\lambda)=\frac{1}{n}\sum_{i=1}^n f_i(\phi_i,\lambda),1.

Mini-Batch Primal–Dual VI (PD-VI) Pseudocode

fi(ϕi,λ)f_i(\phi_i,\lambda)8

Block-Preconditioned Oracle (P²D-VI) Pseudocode

fi(ϕi,λ)f_i(\phi_i,\lambda)9

Both algorithms employ constant step sizes, enable parallel parameter updates, and adapt to geometric differences in parameter blocks.

4. Convergence Properties

PD-VI and P²D-VI achieve provable convergence rates under mild smoothness assumptions without relying on conjugacy or explicit variance control. For nonconvex minϕ,λf(ϕ,λ),f(ϕ,λ)=1ni=1nfi(ϕi,λ),\min_{\phi,\lambda} f(\phi,\lambda), \qquad f(\phi,\lambda)=\frac{1}{n}\sum_{i=1}^n f_i(\phi_i,\lambda),2 that are strongly convex in minϕ,λf(ϕ,λ),f(ϕ,λ)=1ni=1nfi(ϕi,λ),\min_{\phi,\lambda} f(\phi,\lambda), \qquad f(\phi,\lambda)=\frac{1}{n}\sum_{i=1}^n f_i(\phi_i,\lambda),3 and step size minϕ,λf(ϕ,λ),f(ϕ,λ)=1ni=1nfi(ϕi,λ),\min_{\phi,\lambda} f(\phi,\lambda), \qquad f(\phi,\lambda)=\frac{1}{n}\sum_{i=1}^n f_i(\phi_i,\lambda),4 (with minϕ,λf(ϕ,λ),f(ϕ,λ)=1ni=1nfi(ϕi,λ),\min_{\phi,\lambda} f(\phi,\lambda), \qquad f(\phi,\lambda)=\frac{1}{n}\sum_{i=1}^n f_i(\phi_i,\lambda),5, minϕ,λf(ϕ,λ),f(ϕ,λ)=1ni=1nfi(ϕi,λ),\min_{\phi,\lambda} f(\phi,\lambda), \qquad f(\phi,\lambda)=\frac{1}{n}\sum_{i=1}^n f_i(\phi_i,\lambda),6), PD-VI yields

minϕ,λf(ϕ,λ),f(ϕ,λ)=1ni=1nfi(ϕi,λ),\min_{\phi,\lambda} f(\phi,\lambda), \qquad f(\phi,\lambda)=\frac{1}{n}\sum_{i=1}^n f_i(\phi_i,\lambda),7

For convex minϕ,λf(ϕ,λ),f(ϕ,λ)=1ni=1nfi(ϕi,λ),\min_{\phi,\lambda} f(\phi,\lambda), \qquad f(\phi,\lambda)=\frac{1}{n}\sum_{i=1}^n f_i(\phi_i,\lambda),8, the expected objective gap for averaged iterates is minϕ,λf(ϕ,λ),f(ϕ,λ)=1ni=1nfi(ϕi,λ),\min_{\phi,\lambda} f(\phi,\lambda), \qquad f(\phi,\lambda)=\frac{1}{n}\sum_{i=1}^n f_i(\phi_i,\lambda),9, and for strongly convex fi(ϕi,λ)f_i(\phi_i,\lambda)0, the weighted iterate gap contracts at rate fi(ϕi,λ)f_i(\phi_i,\lambda)1 with fi(ϕi,λ)f_i(\phi_i,\lambda)2. For P²D-VI, letting fi(ϕi,λ)f_i(\phi_i,\lambda)3 and fi(ϕi,λ)f_i(\phi_i,\lambda)4 chosen such that fi(ϕi,λ)f_i(\phi_i,\lambda)5 (constant), the same fi(ϕi,λ)f_i(\phi_i,\lambda)6 guarantee holds in the block-diagonal norm

fi(ϕi,λ)f_i(\phi_i,\lambda)7

enabling blockwise weighted descent (Lyu et al., 7 Feb 2026).

5. Empirical Evaluation

Empirical validation encompasses large-scale synthetic and real-world datasets. On synthetic Gaussian mixtures (100,000 points, 10 dimensions, 5 clusters) with biased mini-batches, both PD-VI and P²D-VI demonstrate faster convergence and reach lower Wasserstein distance to the true mixture than SVI, SGD, Adam, and CV-based methods. For spatial transcriptomics (MOSTA dataset: ≈150,000 spatial spots, 20,000 genes) using a non-conjugate Potts-augmented mixture model, PD-VI and especially P²D-VI achieve lower ELBO values, smaller gradient norms, and higher adjusted Rand index (ARI) in fewer iterations compared to SVI, RMSProp, and Adam. Domain clustering maps produced by these methods exhibit sharper and more anatomically coherent results, and the block-preconditioned extension confers further performance improvements.

6. Methodological Significance and Context

PD-VI and its block-preconditioned variant allow for scalable and robust variational inference in non-conjugate and high-dimensional settings. By employing primal-dual strategies native to constrained finite-sum optimization, the methodology simultaneously updates local and global variational parameters within a mini-batch framework without diminishing theoretical guarantees. The incorporation of block-adaptive penalties via P²D-VI offers improved adaptation to curvature heterogeneity, overcoming limitations of isotropic penalty approaches typical of classical SVI updates. This methodology is particularly advantageous where parameter block geometry varies or loss landscapes are highly anisotropic (Lyu et al., 7 Feb 2026).

A central distinction of PD-VI lies in its formulation as an augmented Lagrangian saddle-point problem, which contrasts with classical mean-field variational inference strategies (e.g., coordinate ascent VI, standard SVI), that rely on explicit ELBO maximization and often require either closed-form updates or careful tuning for stochastic optimization. PD-VI’s independence from conjugacy and bounded-gradient-variance assumptions substantially broadens its applicability. The use of primal-dual updates and block-diagonal preconditioning situates the method in the broader context of modern stochastic optimization with consensus constraints and blockwise adaptive learning rates. This suggests that PD-VI and P²D-VI may serve as templates for scalable posterior approximation in latent variable models across diverse scientific domains.


Reference: "Scalable Mean-Field Variational Inference via Preconditioned Primal-Dual Optimization" (Lyu et al., 7 Feb 2026).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Primal-Dual Variational Inference (PD-VI).