In Bayesian machine learning, the primary objective is to accurately sample from a posterior distribution. However, these distributions are frequently complex and multi-modal, characterized by intractable normalizing constants. Traditional gradient-based methods, such as Langevin Dynamics (LD) or Stein Variational Gradient Descent (SVGD), often struggle with these landscapes, frequently becoming trapped in a single mode and failing to capture the full diversity of the target distribution.
A recent paper presented at ICML 2024, "Path-Guided Particle-based Sampling" (PGPS), introduces a novel perspective. Instead of relying solely on local gradients to navigate toward a distant target, PGPS constructs a guided "density path" to lead particles from a simple initial distribution to the complex target.
The Challenge of Gradient Flow
Most modern particle-based sampling methods treat sampling as an optimization problem via gradient flow, moving particles to minimize a divergence (typically KL-divergence) to the target. These methods are heavily dependent on the local geometry of the target distribution. When a target has multiple high-probability modes separated by low-probability regions, particles often fail to cross these "valleys," leading to mode missing. In Bayesian Neural Networks (BNNs), this results in poor uncertainty calibration and overconfident predictions.
Methodology: Path-Guided Sampling
PGPS addresses these limitations by defining a continuous sequence of intermediate distributions—a path—starting from a simple, easy-to-sample distribution (e.g., a Gaussian) and terminating at the target distribution.
The Log-weighted Shrinkage (LwS) Path
The core innovation of PGPS is the Log-weighted Shrinkage (LwS) density path. This path employs two key mechanisms:
- Log-weighting: By creating a linear mixture of the log-densities of the initial and target distributions, the score function (the gradient of the log-density) evolves linearly, facilitating easier particle tracking.
- Shrinkage: Using hyperparameters ($\alpha, \beta$), the method "spreads out" the initial distribution and "thins" the target distribution during the transition. This ensures sufficient overlap between intermediate distributions, effectively building a bridge that guides particles across modes.
Learning the Vector Field
To move particles along this path, the authors utilize a training criterion derived from the Fokker-Planck equation. A neural network is trained to learn a vector field $\phi_t$, which dictates particle movement at any time $t$ to remain on the density path. This approach is "partition-free," meaning it does not require knowledge of the target distribution's normalizing constant.
Experimental Results
The authors evaluated PGPS against several benchmarks, including synthetic Gaussian mixtures, UCI datasets for BNN inference, and Noisy MNIST for robustness testing.
Key Findings
- Superior Mode Discovery: As illustrated in synthetic experiments, PGPS successfully identifies modes that LD and SVGD miss. It also provides more accurate estimates of the relative weights of these modes.
- Enhanced Calibration: In BNN tasks, PGPS consistently yielded lower Expected Calibration Error (ECE). This indicates that the model's predictive confidence is better aligned with its actual accuracy, which is vital for safety-critical applications.
- Improved Accuracy: PGPS outperformed baselines in testing accuracy across most UCI datasets. For instance, on the "Glass" dataset, PGPS achieved approximately 58.5% accuracy, compared to 53.8% for SVGD.
Discussion and Future Work
While PGPS offers significant advantages in mode seeking and calibration, it introduces some computational overhead due to the requirement of training a neural network to learn the vector field. The authors have proposed a "training-free" variant (tf-PGPS) to mitigate this, though it is slightly less robust than the full version.
Future research may focus on designing more sophisticated density paths and analyzing convergence properties for specific high-dimensional distributions common in deep learning. By shifting from local gradient optimization to global path guidance, PGPS represents a significant step forward in robust Bayesian inference.
Summary updated