Score-Based Deterministic Density Sampling

Vasily Ilin, Bamdad Hosseini, Jingwei HuFPI @ ICLR 2025

TL;DR

This paper introduces a novel deterministic sampling method called Score-Based Transport Modeling (SBTM) that can sample from complex probability distributions using only their score function (the gradient of the log-density), without needing explicit samples from the target distribution. SBTM offers smooth, predictable sampling trajectories and provably optimal convergence rates, making it a powerful alternative to traditional stochastic methods.

What Problem Does This Paper Address?

Sampling from complex, high-dimensional probability distributions is a fundamental challenge in many scientific fields, from machine learning to physics. Traditional methods like Langevin dynamics (a stochastic process) can be noisy and their convergence can be hard to diagnose. Diffusion generative models (DGMs) have shown great success, but they typically require training on many samples from the target distribution to learn its score function. This paper tackles a harder problem: how to sample from an unnormalized target density $\pi$ when you only have access to its score function, $\nabla \log \pi$, and no samples from $\pi$ itself. This is a more general setting than DGMs and presents a significant theoretical and practical hurdle.

Methods

The core of the proposed method, SBTM, is inspired by the "probability flow ODE" formulation of diffusion models. Instead of relying on pre-trained score models, SBTM learns the time-varying score of an intermediate distribution $f_t$ on the fly using score matching. This learned score, $\nabla \log f_t$, is then used to guide the sampling process.

The key components are:

  • Deterministic Gradient Flow: SBTM approximates the Wasserstein gradient flow of the KL divergence between the current distribution $f_t$ and the target $\pi$. This is achieved by solving a deterministic Ordinary Differential Equation (ODE).
  • Score Matching: A neural network is trained to approximate the score $\nabla \log f_t$ of the intermediate distribution $f_t$ at each time step. This is done by minimizing a score-matching loss.
  • Coupled Dynamics: The method involves a coupled system where the particles (representing samples) evolve according to the gradient flow, and the neural network (representing the score) is updated to match the score of the evolving particle distribution.
  • Annealed Dynamics: To handle challenging non-log-concave distributions, the authors extend SBTM to incorporate annealing schedules, which smoothly transition from a simple initial distribution to the target.

Datasets

The paper evaluates SBTM on various synthetic datasets designed to test different aspects of sampling, including:

  • Log-concave targets (e.g., Gaussian distributions)
  • Gaussian mixtures (both well-separated and with mild non-log-concavity)
  • A "noisy circle" density (non-log-concave)
  • High-dimensional MNIST digits (784-dimensional pixel space)

The MNIST experiment is notable for sampling directly in pixel space without using dimensionality reduction techniques like VAEs, thus maintaining the high dimensionality.

Key Insights and Ideas

  • Deterministic Sampling is Feasible and Beneficial: The paper demonstrates that deterministic sampling, guided by learned intermediate scores, can achieve comparable or better results than stochastic methods, offering smoother trajectories and easier analysis.
  • Score Matching "On the Fly" Works: A crucial insight is that learning the score of the intermediate distribution $f_t$ dynamically, rather than relying on a pre-trained score of the target $\pi$, is sufficient for effective sampling.
  • Built-in Convergence Diagnostic: By learning the score $\nabla \log f_t$, SBTM provides direct access to the relative Fisher information, which serves as a reliable metric for estimating convergence and the quality of the score approximation.
  • Smoothness and Predictability: The deterministic nature of SBTM leads to smooth trajectories for samples and key metrics (like KL divergence), making the sampling process more interpretable and predictable compared to noisy stochastic methods.
  • Early Mode Splitting: In experiments with multi-modal distributions, SBTM's deterministic dynamics show an ability to split into different modes earlier than stochastic methods, potentially leading to better exploration.

Key Results

  • Optimal Convergence Rate: Theoretical analysis proves that SBTM dissipates relative entropy at the optimal rate, matching the exact gradient flow, provided sufficient training of the score network.
  • Improved Sample Efficiency: In experiments, SBTM often demonstrates better sample efficiency than stochastic counterparts (like SDE/ULA), achieving lower KL divergence with fewer samples or shorter simulation times.
  • High-Quality Samples: SBTM generates high-quality samples, even in high-dimensional settings like MNIST, comparable to SDE.
  • Scalability: The method exhibits linear scaling in memory and runtime with respect to the number of particles ($O(n)$), making it suitable for large-scale problems.
  • Effective Annealing: The annealed version of SBTM successfully handles extremely non-log-concave targets, demonstrating early mode splitting and good density reconstruction.

Limitations and Future Work

  • NTK Assumption: The theoretical analysis of bounded score-matching loss relies on the Neural Tangent Kernel (NTK) being lower bounded. While this holds under certain conditions, the authors note that current NTK theory has limitations for very large neural networks and data sizes, suggesting this assumption might be weakened with future theoretical advancements.
  • Ensemble Properties: The paper mentions that while the marginal distributions of individual particles are the same between SBTM and SDE, the ensemble of particles has a different distribution due to SBTM's particle interactions via the neural network. A more detailed investigation of these ensemble properties is left as future work.
  • Meta-stability: For some non-log-concave targets, even with annealing, the dynamics can exhibit meta-stability, which is a general challenge for many sampling methods and is an area for further research.

Summary updated

BibTeX
@inproceedings{ilin2025score,
  author = {Vasily Ilin and Bamdad Hosseini and Jingwei Hu},
  title = {{Score-Based Deterministic Density Sampling}},
  booktitle = {FPI @ ICLR},
  year = {2025},
  url = {https://openreview.net/forum?id=UfHnDgQXFE},
}

Loading related content...

Figure