Abstract: We propose a family of First Hitting Diffusion Models (FHDM), deep generative models that generate data with a diffusion process that terminates at a random first hitting time. This yields an extension of the standard fixed-time diffusion models that terminate at a pre-specified deterministic time. Although standard diffusion models are designed for continuous unconstrained data, FHDM is naturally designed to learn distributions on continuous as well as a range of discrete and structure domains. Moreover, FHDM enables instance-dependent terminate time and accelerates the diffusion process to sample higher quality data with fewer diffusion steps. Technically, we train FHDM by maximum likelihood estimation on diffusion trajectories augmented from observed data with conditional first hitting processes (i.e., bridge) derived based on Doob's $h$-transform, deviating from the commonly used time-reversal mechanism. We apply FHDM to generate data in various domains such as point cloud (general continuous distribution), climate and geographical events on earth (continuous distribution on the sphere), unweighted graphs (distribution of binary matrices), and segmentation maps of 2D images (high-dimensional categorical distribution). We observe considerable improvement compared with the state-of-the-art approaches in both quality and speed.
Introduction
Standard diffusion models, such as Denoising Diffusion Probabilistic Models (DDPM) and score-matching models, have revolutionized generative modeling in continuous Euclidean spaces ($\mathbb{R}^d$). However, these models typically rely on a pre-specified, deterministic time $T$ to terminate the denoising process. This "one-size-fits-all" approach presents two significant challenges. First, real-world data often exists on constrained manifolds (e.g., spheres), discrete structures (e.g., graphs), or categorical domains (e.g., segmentation maps), which are not naturally handled by Gaussian diffusion without specialized heuristics. Second, fixed-time diffusion is computationally inefficient, as it allocates the same amount of processing to every sample regardless of its complexity.
To address these limitations, we introduce First Hitting Diffusion Models (FHDM). Instead of a fixed time horizon, FHDM utilizes a diffusion process that stops at a random first hitting time—the moment the trajectory first touches a defined domain boundary $\Omega$.
Methodology
First Hitting Mechanisms
The core innovation of FHDM is the replacement of fixed-time termination with domain-specific hitting schemes. This allows the model to naturally adapt to the geometry and structure of the data domain:
- Sphere Hitting: Designed for data on manifolds, such as geographical coordinates on Earth.
- Boolean Hitting: Tailored for binary data, such as the adjacency matrices of unweighted graphs.
- Categorical Hitting: Optimized for high-dimensional discrete data, such as pixel-wise image segmentation maps.
Training via Doob’s $h$-transform
Unlike standard diffusion models that learn to reverse time, FHDM learns to steer a process toward a boundary. We deviate from the traditional time-reversal mechanism and instead use Doob’s $h$-transform to derive "diffusion bridges." These are trajectories conditioned to hit a specific data point on the boundary.
As shown in the figure above, the model approximates the drift term $b(Z_t)$ using a neural network $NN(Z_t)$. The training objective is maximum likelihood estimation on these augmented trajectories. To enhance efficiency, we utilize a "rotation trick" for symmetric domains, allowing us to pre-simulate unconditioned trajectories and rotate them to target training points, thereby avoiding costly SDE simulations during every training step.
Experimental Results
We evaluated FHDM across diverse benchmarks, including ShapeNet point clouds, spherical Earth science datasets, and graph datasets (Community-small, Ego-small). In all cases, FHDM demonstrated superior performance in both quality and efficiency.
Efficiency and Speed
FHDM enables instance-adaptive termination. "Easier" components of a sample can hit the boundary and stop early, while more complex details continue to evolve. This leads to massive speedups:
- Graphs: FHDM requires only ~100 steps, compared to 6,000 steps for state-of-the-art methods like EDP-GNN.
- Segmentation: It achieved a 40x speedup over multinomial diffusion on the Cityscapes dataset.
Generative Quality
- Spherical Data: FHDM consistently outperformed Riemannian Continuous Normalizing Flows in log-likelihood.
- Graphs: The model achieved significantly lower Maximum Mean Discrepancy (MMD) across degree, cluster, and orbit statistics.
- Segmentation: FHDM reached an Evidence Lower Bound (ELBO) of 0.066, a substantial improvement over the previous best of 0.303.
Conclusion
First Hitting Diffusion Models provide a unified and efficient framework for generative modeling across continuous and discrete domains. By leveraging random hitting times and Doob’s $h$-transform, FHDM offers a principled way to handle constrained data while significantly reducing sampling time. Future work will explore more robust error bounds for specific domains and investigate deeper connections with Schrodinger-Follmer samplers for even faster inference.
Summary updated