Source-linked AI summary

A Stein variational Newton method

Gianluca Detommaso, Tiangang Cui, Alessio Spantini, Youssef Marzouk, Robert Scheichl

arXiv:1806.03085v2stat.MLcs.LGcs.NAmath.NA

TL;DR

Approximating complex, intractable distributions with samples is a central challenge in statistics and machine learning. This paper extends SVGD with Newton-like second-order updates and geometry-aware kernels. Its reported numerical examples show that the convergence gains can outweigh added per-iteration work, while high-dimensional use of local Gaussian kernels remains challenging.

  • Problem

    Approximating intractable distributions with samples is a core challenge, especially when target densities are high-dimensional, non-Gaussian, or computationally intensive to evaluate.

    Source: §1 · p. 1
  • Method

    The paper adds Newton-like second-order updates to SVGD and designs geometry-aware Gaussian kernels using target-curvature information.

    Source: §1 · p. 2, §4 · p. 5
  • Results

    In several numerical examples, the faster convergence of SVN outweighs its additional work per iteration, and geometry-aware kernels converge substantially faster than isotropic-kernel SVGD or SVN.

    Source: §1 · p. 2
  • Takeaways & Limitations

    Curvature-aware kernels can help particles traverse the target’s support more efficiently by adapting distances to its geometry.

    Source: §4 · p. 5

    Local Gaussian kernels can pose further challenges in high dimensions, even though properly rescaled Gaussian kernels can improve SVN performance there.

    Source: §6 · p. 9

Abstract

from arXiv · show

Stein variational gradient descent (SVGD) was recently proposed as a general purpose nonparametric variational inference algorithm [Liu & Wang, NIPS 2016]: it minimizes the Kullback-Leibler divergence between the target distribution and its approximation by implementing a form of functional gradient descent on a reproducing kernel Hilbert space. In this paper, we accelerate and generalize the SVGD algorithm by including second-order information, thereby approximating a Newton-like iteration in function space. We also show how second-order information can lead to more effective choices of kernel. We observe significant computational gains over the original SVGD algorithm in multiple test cases.

1 Introduction

SVGD uses a sequence of RKHS-constrained transport maps to reduce the KL divergence between a reference distribution and a target. This paper adds Newton-like second-order updates and geometry-aware kernels to improve convergence.

1 Introduction

  • SVGD occupies a middle ground between cheap but potentially inaccurate mean-field variational inference and potentially slow-to-converge MCMC.The paper focuses on nonparametric variational inference, with close links to density estimation.Source: §1 · p. 1
  • SVGD builds transport maps by perturbing the identity along an RKHS-projected steepest-descent direction for the KL objective.The maps are composed sequentially to transform samples from a tractable reference distribution toward the target.Source: §1 · p. 2
  • The paper’s Stein variational Newton method replaces steepest descent with a Newton-like direction based on a local quadratic approximation of the objective.Second-order information can accelerate convergence, at the cost of additional work per iteration; several numerical examples favor this tradeoff.Source: §1 · p. 2
  • Geometry-aware Gaussian kernels use second-order information and yield substantially faster convergence than SVGD or SVN with an isotropic kernel.Kernel choice matters to the efficiency of both SVGD and SVN.Source: §1 · p. 2

2 Background

The background frames SVGD as iterative transport from a tractable reference distribution toward an intractable target. Each iteration selects a kernel-based map intended to reduce KL divergence, with particle updates balancing movement toward high-probability regions and dispersion across the target’s support.

2 Background

  • A transport map sends samples from a tractable reference density to approximate an intractable target, and the pushforward samples form an empirical approximation.The map is not unique: infinitely many can yield the target.Source: §2 · p. 2
  • SVGD minimizes KL divergence by iteratively composing identity perturbations chosen from a vector-valued RKHS.At each step, the next map is selected to further decrease the divergence between the current pushforward and the target.Source: §2 · pp. 2–3
  • The SVGD iteration uses a functional gradient at the zero map to choose the next transport perturbation.The resulting sequence of pushforward densities becomes increasingly closer to the target in KL divergence.Source: §2 · p. 3
  • The particle update combines a weighted descent direction for the log-target density with a repulsion force that spreads particles across the target’s support.The descent term moves particles toward high-probability regions, while repulsion helps prevent collapse around a mode.Source: §2 · p. 3

3 Stein variational Newton method

The Stein variational Newton method replaces SVGD’s steepest-descent update with a direction derived from a local quadratic approximation of the objective. A particle-based Galerkin approximation yields a linear system, while inexact solvers and block-diagonal approximations reduce its computational burden.

3 Stein variational Newton method

  • The SVN update replaces SVGD’s steepest-descent direction with an approximation of the Newton direction.The direction minimizes a local quadratic approximation of the objective, and the next transport map perturbs the identity along it.Source: §3 · pp. 3–4
  • Galerkin approximation restricts the Newton-direction search to a finite-dimensional space spanned by kernel functions evaluated at the particles.The coefficients are characterized by a linear system involving the second variation and the first variation evaluated at the particles.Source: §3 · p. 4
  • Inexact Newton–conjugate gradient avoids explicitly constructing the full Newton matrix and can guarantee a descent direction through its stopping rule.The full system has nd unknowns and may be impractical for many particles or high-dimensional parameters; direct Newton solutions may also fail to descend when the target is not log-concave.Source: §3 · p. 4
  • A block-diagonal second-variation approximation breaks the system into n decoupled d × d systems that can be solved in parallel.Both block-diagonal approximation and inexact NCG are more efficient than solving for the full Newton direction, and provide similar progress per SVN iteration.Source: §3 · p. 5
  • Second-order information gives a natural step-size scale of ε = O(1), and ε = 1 performs reasonably well in the reported experiments.The authors identify line search or a trust-region step as future refinements.Source: §3 · p. 5

4 Scaled Hessian kernel

The scaled Hessian kernel uses curvature information to adapt particle distances to the target’s geometry. Its dimension-dependent scaling can also affect kernel behavior in high-dimensional settings.

4 Scaled Hessian kernel

  • The kernel’s choice matters because it weights local descent contributions and spreads particles, so it should capture the target’s geometry.The paper uses curvature information from the log-target Hessian to design anisotropic kernels.Source: §4 · p. 5
  • The curvature metric is built from an approximation to the local Hessian of the negative log-target, averaged under the target distribution.Because the expectation under the target cannot be computed directly, the particle ensemble is used for an approximation; the Newton update already calculates approximations to the required Hessian.Source: §4 · p. 5
  • The scaled Hessian kernel uses an average-curvature metric to define anisotropic distances, stretching or compressing parameter-space directions according to curvature.The metric shapes both locally averaged gradients and particle repulsion, and tends to spread particles more effectively over high-probability regions.Source: §4 · pp. 5–6
  • The dimension-dependent scaling g(d) can make the rescaled norm converge to a functional L2 norm as discretization dimension increases, under stated technical conditions.For targets without a well-defined infinite-dimensional limit, an appropriate scaling can still improve discrimination among inter-particle distances.Source: §4 · p. 6

5 Test cases

The test cases compare SVN and SVGD across a two-dimensional bimodal banana-shaped posterior and a 100-dimensional conditioned diffusion. SVN-H reconstructs the diffusion posterior in agreement with reference MCMC, while in the banana case it converges rapidly with a more structured particle configuration than SVN-I.

5 Test cases

  • The test cases compare SVN and SVGD with scaled-Hessian or heuristically scaled isotropic kernels on multimodal and high-dimensional tasks.The two main cases are a two-dimensional bimodal banana-shaped posterior and a high-dimensional model arising from a Langevin SDE.Source: §5 · p. 6, §5.1 · p. 6, §5.2 · p. 7

5.1 Two-dimensional double banana

  • On the double-banana target, SVN-H converges by 10 iterations with structured particles; SVN-I converges by 47 iterations but remains rougher.Figure 1 shows particle configurations over the target-density contours.Source: Figure 1 · p. 7, §5.1 · p. 7
  • The Hessian kernel takes less computational time than the isotropic kernel, which recalculates particle distances at each iteration for heuristic rescaling.The comparison rescales iteration counts to make total CPU time approximately equal.Source: §5.1 · pp. 6–7

5.2 100-dimensional conditioned diffusion

  • With comparable computational effort, SVN-H reconstructs the posterior mean and credible intervals accurately, while SVGD-H and SVGD-I depart significantly from the true values.Figure 2 encodes the true path, reconstructed posterior mean, and marginal 90% credible intervals.Source: Figure 2 · p. 8, §5.2 · pp. 8–9
  • SVN-H's posterior means and marginal 90% credible intervals agree well with reference DILI MCMC using an effective sample size of 105.Both methods' posterior means are also comparable to the data-generating path.Source: Figure 3 · p. 9, §5.2 · p. 9

6 Discussion

The discussion flags locality in Gaussian kernels as a challenge in high dimensions, while noting that rescaling can improve SVN performance and that exploiting target structure is a sensible response.

  • Gaussian reproducing kernels may be problematic in high dimensions because of their locality.Source: §6 · p. 9
  • Properly rescaling a Gaussian kernel can improve SVN performance in high dimensions.Source: §6 · p. 9
  • The authors suggest designing algorithms to detect and exploit target structure, such as decaying correlation, conditional independence, low rank, or multiple scales.Source: §6 · p. 9

A Proof of Theorem 1

The proof develops first- and second-variation expressions for the objective, using Taylor expansions and the RKHS reproducing property.

The first variation takes the form

A Proof of Theorem 1

The first variation takes the form

B Proof of Corollary 1

The corollary proof approximates the Newton direction in a finite kernel span and derives a discrete system for its coefficients.

B Proof of Corollary 1

C.1 Comparison between the full and inexact Newton methods

The block-diagonal and inexact Newton–CG variants produce samples of similar quality to full Newton in two test cases, supporting their use on large-scale problems where the full direction is infeasible.

C.1 Comparison between the full and inexact Newton methods

  • SVNfull solves the fully coupled Newton system, SVNCG applies inexact Newton–CG to it, and SVNbd uses a block-diagonal approximation.Source: §C.1 · p. 12
  • On the two-dimensional double banana and a second test, both the block-diagonal approximation and inexact Newton–CG produced results of similar quality to full Newton; each used N=100 particles and 20 iterations.The authors propose these approximate SVN strategies for large-scale problems where computing the full Newton direction is not feasible.Source: §C.1 · p. 12

C.2 Bayesian neural network

The Bayesian neural network experiment compares SVN-H with SVGD-I on yacht hydrodynamics data. SVN-H yields validation prediction errors with smaller means and considerably reduced variances.

C.2 Bayesian neural network

  • The experiment uses 308 input–prediction pairs, dividing 247 pairs for training and 61 additional pairs for validation; its neural network has a 2,951-dimensional weight vector with independent Gaussian priors.Source: §C.2 · p. 13
  • At the posterior mode, the neural network’s predictions almost perfectly match the validation data.Source: Figure 6 · p. 14, §C.2 · p. 14
  • For the high-dimensional model, SVN uses inexact Newton–CG, compared with SVGD-I at 10, 20, and 30 iterations matched for computational cost.Source: §C.2 · p. 14
  • SVN-H yields validation prediction-error distributions with smaller means and considerably reduced variances than SVGD-I, while both have small overall error ranges.The comparison matches computational costs by rescaling SVGD-I iterations.Source: §C.2 · pp. 14–15

C.3 Scalability of kernels in high dimensions

The kernel comparison evaluates posterior reconstruction as parameter dimension grows, in both discretization-invariant and non-invariant problems. The scaled Hessian kernel estimates posterior uncertainty more effectively than the isotropic kernel in both settings.

Scalability experiments

  • The tests use 40, 60, 80, and 100 dimensions, with 1,000 particles and 50 SVN iterations; the non-invariant case uses identity prior covariance and uniformly drawn forward-operator coefficients.Source: §C.3 · p. 16

Discretization-invariant posterior distribution

  • For the discretization-invariant posterior, SVN-H estimates covariance trace consistently across dimensions; SVN-I underestimates it, indicating under-dispersed particles.Source: §C.3 · p. 16, Table 2 · p. 16
  • All algorithms recover the average posterior mean to the first three significant figures in the discretization-invariant case.Source: §C.3 · p. 16, Table 1 · p. 16

A posterior distribution that is not discretization invariant

  • In the non-discretization-invariant problem, the scaled Hessian kernel remains reasonably effective as dimension rises, while the isotropic kernel underestimates variances at every tested dimension.Source: §C.3 · p. 16, Table 4 · p. 16
Loading 1806.03085v2…