Entropy-based Training Methods for Scalable Neural Implicit Samplers

Weijian Luo, Boya Zhang, Zhihua Zhang

Introduction

In fields ranging from Bayesian statistics to physics simulations, researchers frequently need to draw samples from complex "target distributions." The catch is that these distributions are usually only known up to a constant—an un-normalized potential function.

Traditional tools like Markov Chain Monte Carlo (MCMC) are the gold standard for accuracy in these scenarios, but they are notoriously slow. They require hundreds or thousands of iterative steps to produce a single batch of samples, creating a severe bottleneck for high-dimensional problems like image generation or complex Bayesian inference.

Recent "Learning to Sample" (L2S) methods attempt to use neural networks to accelerate this process. However, Normalizing Flows are limited by strict mathematical requirements (invertibility), and Diffusion Models still require many iterative steps to "denoise" a sample. This paper introduces a "one-shot" solution: a neural network that maps simple noise directly to the target distribution without iterations or invertibility constraints.

The Neural Implicit Sampler

The authors introduce the Neural Implicit Sampler, defined by a transformation $x = g_\theta(z)$, where $z$ is simple Gaussian noise. Because this mapping isn't necessarily invertible, we don't have an explicit formula for the sampler's density, making it challenging to train using standard maximum likelihood methods.

To solve this, the researchers propose a training regime that alternates between two phases:

  1. Score Estimation Phase: A separate "score network" is trained to estimate the gradient of the log-density of the current samples produced by the generator.
  2. Sampler Update Phase: The estimated score is used to update the generator $g_\theta$ using one of two novel methods:
  3. KL Training: Minimizes the Kullback-Leibler (KL) divergence between the sampler and the target distribution.
  4. Fisher Training: Minimizes the Fisher divergence, which focuses on matching the "scores" (gradients) of the distributions.

A key theoretical contribution of the paper is proving that their Fisher training method is mathematically equivalent to the previously known "Fisher-Stein" sampler, but with a more efficient and flexible parametrization.

Experiments and Key Results

The authors evaluated their methods across three scales: 2D synthetic targets, a medium-dimensional real-world dataset (Covertype) for Bayesian Logistic Regression, and high-dimensional Energy-Based Models (EBMs) using MNIST.

Accuracy and Sample Quality

On eight 2D "toy" distributions with complex shapes (e.g., Donut, Rosenbrock, Squiggle), the neural implicit samplers successfully captured multi-modality.

Table 1: Maximum Mean Discrepancy (MMD) on 2D synthetic targets.

In Bayesian regression on the 55-dimensional Covertype dataset, the proposed KL-NS and Fisher-NS methods achieved the highest test accuracies (approximately 76%), outperforming standard MCMC methods like SGLD and SVGD. Furthermore, on the high-dimensional MNIST EBM task, the sampler produced images with quality (measured by FID/KID scores) comparable to MCMC-based sampling.

Massive Speedups

The most striking advantage of the Neural Implicit Sampler is its inference speed. By moving the heavy computational lifting to the training phase (learning the score), the inference phase becomes a simple, one-shot forward pass.

Table 2: Sampling time (seconds) for generating 10,000 samples on 2D targets.

In the 2D experiments, the neural sampler was 1,223 times faster than Hamiltonian Monte Carlo (HMC) and 154 times faster than Langevin Dynamics (LD). Similarly, on the high-dimensional MNIST task, the sampler was over 100 times more efficient than MCMC baselines while maintaining comparable sample quality.

Key Insights and Limitations

  • Freedom from Invertibility: Unlike Normalizing Flows, implicit samplers don't need to be invertible. This allows the use of much more powerful and flexible neural architectures, such as standard MLPs or CNNs.
  • KL vs. Fisher: The authors found that while Fisher training has elegant theoretical properties, KL training is often more robust in practice. Fisher training requires calculating the trace of a Jacobian, which becomes computationally expensive and unstable in high dimensions.
  • Training Overhead: While the sampler is incredibly fast at inference, the training process still requires a computationally demanding score estimation phase. Finding ways to bypass or further optimize this phase is a primary goal for future research.

Overall, Entropy-based Training for Neural Implicit Samplers presents a highly scalable, one-shot alternative to traditional iterative sampling, bridging the gap between the theoretical rigor of MCMC and the speed of modern neural networks.

Summary updated

BibTeX
@inproceedings{luo2023entropy,
  author = {Weijian Luo and Boya Zhang and Zhihua Zhang},
  title = {{Entropy-based Training Methods for Scalable Neural Implicit Samplers}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=lXOoR4KYcJ},
}
Figure