NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Diffusion-PINN Sampler

Zhekun Shi, Longlin Yu, Tianyu Xie, Cheng Zhang · DOI

Introduction

Sampling from unnormalized probability densities $\pi(x)$ is a fundamental challenge in Bayesian statistics and statistical physics. While generative diffusion models have seen immense success in data-driven tasks, their application to sampling—where the density is known but data points are not—remains problematic. Traditional score-based diffusion methods often suffer from "weight blindness": they can identify the locations of modes but fail to accurately capture the relative probability mass (mixing proportions) between them, especially when modes are well-separated.

The Diffusion-PINN Sampler (DPS)

The Diffusion-PINN Sampler (DPS) addresses these limitations by reframing the sampling problem as a partial differential equation (PDE) task. Instead of learning a score function (the gradient of the log-density), DPS directly solves the log-density Fokker-Planck Equation (FPE).

Methodology

  1. Log-density FPE: DPS models the evolution of the log-density as noise is added during the forward diffusion process. This global approach ensures that normalization is maintained throughout the process.
  2. Physics-Informed Neural Networks (PINNs): By treating the PDE residual as a loss function, PINNs allow the model to approximate the log-density across the entire space-time manifold without requiring pre-existing samples.
  3. Target-Informed Initialization: The network is initialized to match the target distribution at $t=0$, providing a strong prior that simplifies the learning process.
  4. Collocation Strategy: To efficiently evaluate the PDE, DPS uses a combination of short-run Langevin Monte Carlo (LMC) and forward diffusion to place collocation points in regions where the probability mass actually resides.
  5. Scalable Computation: The authors employ a modified Hutchinson’s trace estimator to handle high-dimensional Laplacian terms efficiently, mitigating the computational overhead typically associated with second-order derivatives in high dimensions.

Key Insight: Overcoming Weight Blindness

The core advantage of DPS lies in its use of the log-density rather than the score function. The Score FPE is inherently "blind" to the relative weights of isolated modes because the score (the gradient) is a local property. Two distributions can have nearly identical scores but vastly different total masses in their respective peaks.

As illustrated in the figure below, the Fisher divergence (a measure of score-level error) can remain near zero even when the relative weights of modes are incorrect. In contrast, the $L^2$ error of the log-density and the KL divergence are highly sensitive to these mixing proportions. By solving for the log-density, DPS preserves global normalization and ensures accurate mode weighting.

Error metric analysis. The left panel demonstrates "weight blindness": Fisher divergence remains low regardless of the mixture weight $w_1$, while $L^2$ log-density error and KL divergence correctly identify discrepancies. The middle and right panels show the temporal evolution of these errors during the forward diffusion process.

Experimental Results

The authors evaluated DPS against several strong baselines, including Langevin Monte Carlo (LMC), Reverse Diffusion Monte Carlo (RDMC), and Path Integral Samplers (PIS), across various synthetic benchmarks:

  • 9-Gaussians (2D): A grid of nine isolated modes with varied weights. DPS achieved an $L^2$ error in mixing proportions of 0.0006, significantly outperforming baselines which ranged from 0.13 to 0.72.
  • 30D Double-well: A high-dimensional distribution with eight distinct modes. DPS reached a KL divergence of 0.0273, compared to 0.0969 for the best-performing baseline (PIS).
  • Complex Geometries: On "Rings" and "Funnel" distributions, DPS consistently captured all modes with high visual and numerical fidelity, whereas other methods often collapsed to a single mode.

Conclusion and Future Directions

DPS represents a significant step forward in diffusion-based sampling by leveraging the global constraints of the log-density FPE. By moving beyond score-matching, it successfully addresses the long-standing issue of mode-weighting in multi-modal distributions.

While it offers superior accuracy, challenges remain regarding the "curse of dimensionality" inherent to PINNs and the computational cost of training a model for each new target density. Future work may focus on improving mode discovery through more robust initial collocation strategies and scaling the approach to higher-dimensional spaces like those found in image generation.

Summary updated

BibTeX
@misc{shi2024diffusion,
  author = {Zhekun Shi and Longlin Yu and Tianyu Xie and Cheng Zhang},
  title = {{Diffusion-PINN Sampler}},
  year = {2024},
  eprint = {2410.15336},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.15336},
}
Figure