Example-Based Sampling with Diffusion Models

Bastien Doignies, Nicolas Bonneel, David Coeurjolly, Julie Digne, Loïs Paulin, Jean-Claude Iehl, Victor Ostromoukhov · DOI

Abstract

Generating high-quality 2D point sets with specific mathematical properties is a cornerstone of computer graphics and scientific computing. Traditional samplers often struggle with a trade-off between speed, flexibility, and differentiability. This paper introduces a novel approach using Probabilistic Denoising Diffusion Models (DDPM) to learn and generate point distributions. By mapping scattered points to a regular grid via optimal transport, the authors enable standard convolutional architectures to "denoise" random noise into structured point sets that mimic complex samplers like Blue Noise or Sobol' sequences.

The Sampling Trilemma

In fields like rendering and Monte Carlo integration, "good" point sets are essential. These sets must often exhibit specific characteristics: even spread (Poisson disk), particular frequency spectra (Blue Noise), or low integration error (Low Discrepancy). However, existing methods face a "trilemma":

  1. Speed: High-quality optimization-based samplers are often slow.
  2. Flexibility: Combining multiple properties (e.g., Blue Noise and Low Discrepancy) is difficult.
  3. Differentiability: Most traditional samplers cannot be easily integrated into modern differentiable rendering pipelines.

Methodology: Bridging the Gap with Optimal Transport

Diffusion models typically operate on regular pixel grids. To apply them to scattered point data, the authors introduce a preprocessing step using Optimal Transport (OT) Matching.

Mapping scattered points to a regular grid using optimal transport offsets.

As shown above, example points are mapped to a uniform $N \times N$ grid. Each cell stores a 2D offset from its center to the assigned point. This transformation allows the use of a standard U-Net architecture with residual blocks and attention layers. The network learns to iteratively refine a grid of random offsets into the structured offsets characteristic of a target sampler. This convolutional approach also enables zero-shot scaling, allowing a model trained on smaller grids to generate points for larger ones.

Training and Datasets

The model is trained to imitate several "expert" samplers:

  • Low-Discrepancy (LDS): Sobol’ with Owen’s scrambling, LatNetBuilder, and Rank-1 lattices.
  • Blue Noise: Poisson Disk, Sliced Optimal Transport (SOT), and Generative Blue Noise (GBN).
  • Hybrid: Low-Discrepancy Blue Noise (LDBN).
  • Non-Uniform: Importance-sampled distributions following specific density functions.

Key Results and Spectral Accuracy

The diffusion-based approach demonstrates remarkable fidelity to the target distributions.

Comparison of point sets, Fourier power spectra, and radial profiles between original samplers and the proposed diffusion method.

As illustrated in the comparison above, the generated points almost perfectly match the Fourier power spectra of the target samplers, such as the characteristic "blue noise" ring. Key performance metrics include:

  • Integration Performance: Mean Squared Error (MSE) for Gaussian and Heaviside integrands is comparable to original high-quality samplers.
  • Efficiency: Synthesis is significantly faster than many optimization-based methods, generating 1,000 sets of 1024 samples in approximately 35 minutes.
  • Non-Uniform Sampling: The method successfully handles importance-sampled distributions, a task where previous deep learning attempts often failed.

Discussion and Future Work

A key insight of this work is that the grid structure acts as an approximate nearest-neighbor mechanism, allowing convolutions to efficiently enforce spatial relationships. Furthermore, the differentiability of the neural network allows for further optimization of starting noise to minimize specific losses, such as discrepancy.

However, challenges remain. The grid-based approach faces the "curse of dimensionality," making scaling to 3D or higher dimensions memory-intensive. Additionally, while the model is highly accurate, it can occasionally struggle with the "hard" minimum distance constraints of Poisson Disk sampling. Future research may focus on conditional "foundation models" capable of blending properties from multiple sampler types via a single input vector.

Summary updated

BibTeX
@inproceedings{doignies2023example,
  author = {Bastien Doignies and Nicolas Bonneel and David Coeurjolly and Julie Digne and Loïs Paulin and Jean-Claude Iehl and Victor Ostromoukhov},
  title = {{Example-Based Sampling with Diffusion Models}},
  booktitle = {SIGGRAPH Asia},
  year = {2023},
  doi = {10.1145/3610548.3618243},
}
Figure