Table of Contents
Fetching ...

Distance Marching for Generative Modeling

Zimo Wang, Ishit Mehta, Haolin Lu, Chung-En Sun, Ge Yan, Tsui-Wei Weng, Tzu-Mao Li

TL;DR

Distance Marching reframes time-unconditional image generation as learning a distance-like scalar field $u_\theta(\mathbf{x})$ and a direction field $\mathbf{v}_\theta(\mathbf{x})$ that steer samples toward the data manifold without explicit time conditioning. By introducing loss functions that emphasize closer targets (One-Step Loss) and constrain gradient directions (Directional Eikonal Loss), the method mitigates target ambiguity and yields denoising directions that align with the data manifold. It offers two inference modes—gradient descent and sphere tracing—and demonstrates state-of-the-art or competitive performance on CIFAR-10 and ImageNet across unconditional and class-conditional tasks, with faster sampling and useful distance-estimation signals for early stopping and OOD detection. The work provides both theoretical insights into why locality matters in the denoising process and practical benefits, suggesting distance-field modeling as a principled lens for high-dimensional generative modeling and potential extensions to few-step generation and MCMC refinement.

Abstract

Time-unconditional generative models learn time-independent denoising vector fields. But without time conditioning, the same noisy input may correspond to multiple noise levels and different denoising directions, which interferes with the supervision signal. Inspired by distance field modeling, we propose Distance Marching, a new time-unconditional approach with two principled inference methods. Crucially, we design losses that focus on closer targets. This yields denoising directions better directed toward the data manifold. Across architectures, Distance Marching consistently improves FID by 13.5% on CIFAR-10 and ImageNet over recent time-unconditional baselines. For class-conditional ImageNet generation, despite removing time input, Distance Marching surpasses flow matching using our losses and inference methods. It achieves lower FID than flow matching's final performance using 60% of the sampling steps and 13.6% lower FID on average across backbone sizes. Moreover, our distance prediction is also helpful for early stopping during sampling and for OOD detection. We hope distance field modeling can serve as a principled lens for generative modeling.

Distance Marching for Generative Modeling

TL;DR

Distance Marching reframes time-unconditional image generation as learning a distance-like scalar field and a direction field that steer samples toward the data manifold without explicit time conditioning. By introducing loss functions that emphasize closer targets (One-Step Loss) and constrain gradient directions (Directional Eikonal Loss), the method mitigates target ambiguity and yields denoising directions that align with the data manifold. It offers two inference modes—gradient descent and sphere tracing—and demonstrates state-of-the-art or competitive performance on CIFAR-10 and ImageNet across unconditional and class-conditional tasks, with faster sampling and useful distance-estimation signals for early stopping and OOD detection. The work provides both theoretical insights into why locality matters in the denoising process and practical benefits, suggesting distance-field modeling as a principled lens for high-dimensional generative modeling and potential extensions to few-step generation and MCMC refinement.

Abstract

Time-unconditional generative models learn time-independent denoising vector fields. But without time conditioning, the same noisy input may correspond to multiple noise levels and different denoising directions, which interferes with the supervision signal. Inspired by distance field modeling, we propose Distance Marching, a new time-unconditional approach with two principled inference methods. Crucially, we design losses that focus on closer targets. This yields denoising directions better directed toward the data manifold. Across architectures, Distance Marching consistently improves FID by 13.5% on CIFAR-10 and ImageNet over recent time-unconditional baselines. For class-conditional ImageNet generation, despite removing time input, Distance Marching surpasses flow matching using our losses and inference methods. It achieves lower FID than flow matching's final performance using 60% of the sampling steps and 13.6% lower FID on average across backbone sizes. Moreover, our distance prediction is also helpful for early stopping during sampling and for OOD detection. We hope distance field modeling can serve as a principled lens for generative modeling.
Paper Structure (41 sections, 5 theorems, 41 equations, 35 figures, 12 tables)

This paper contains 41 sections, 5 theorems, 41 equations, 35 figures, 12 tables.

Key Result

Theorem 1.1

Under def:genproc, fix a spatial location and work under this condition given $\mathbf{X}=\mathbf{x}$. We rewrite the conditional expectation as $\mathbb{E}_{\mathbf{x}}[\cdot]:=\mathbb{E}[\cdot\mid \mathbf{X}=\mathbf{x}]$.

Figures (35)

  • Figure 1: We propose Distance Marching to generate images without time input. It is inspired by distance modeling and produces a denoising direction focusing on closer targets, while flow matching loss learns a direction biased toward the data mean in the early stage. We compare outcomes after 20% of the steps to show our generation wanders less. See detailed analysis in \ref{['sec:analysis']}.
  • Figure 2: In 2D, we learn a distance-like scalar field $u_\theta(\mathbf{x})$ (\ref{['fig:2d_motivation:a']} and \ref{['fig:2d_motivation:b']}) that transports samples onto the support of the data distribution (\ref{['fig:2d_motivation:a']}). In contrast, prior energy-based methods (\ref{['fig:2d_motivation:c']}, \ref{['fig:2d_motivation:d']}), even when using minibatch closest rematching during training to disambiguate targets, do not capture energy landscape details. Because they inherit the flow-matching loss, they become unreliable for determining denoising directions once rematching is impractical due to high-dimensional hubness, as analyzed in \ref{['sec:analysis']}. See \ref{['app:2d_exp']} for more details.
  • Figure 3: 1D $\hat{d}(\mathbf{x})$ to the origin; lighter line, larger $c_0$.
  • Figure 4: These $8$ images are the nearest neighbors for $92.8\%$ of noise-end samples. The leftmost one alone accounts for $62.2\%$ due to its grayness and low contrast.
  • Figure 5: Flow matching does not always help denoising. We compare the minimizer vectors induced by flow matching (red), directional eikonal loss (blue), and one-step loss (orange) at the same location and show the posterior over random matches from 8-Gaussians to two-moons conditioned on this point. The right panel shows the posterior of the interpolation coefficient $t$ (gray) and azimuth angles of each minimizer at that position conditioned on different values of $t$.
  • ...and 30 more figures

Theorems & Definitions (12)

  • Definition 3.1
  • proof
  • proof
  • Theorem 1.1
  • Theorem 1.2: Posterior on index
  • proof
  • Theorem 1.3: Bayes-optimal update under \ref{['eq:osl']}
  • proof
  • Corollary 1.4: Discrete posterior over dataset indices
  • Corollary 1.5: Pointwise Bayes solution for time-unconditional weighted regression
  • ...and 2 more