TL;DR
Distance Marching is a novel time-unconditional generative modeling framework inspired by computer graphics distance fields. By introducing losses that implicitly prioritize closer targets, it eliminates the need for explicit time conditioning while outperforming standard flow matching models in both image quality and generation speed.
What Problem Does This Paper Address?
Modern generative models, such as diffusion and flow matching, rely heavily on explicit time or noise conditioning to guide the denoising process. While removing this time dependency simplifies the architecture and enables more flexible downstream tasks, existing time-unconditional models suffer from severe "target ambiguity."
Without a time step to specify the current noise level, a single noisy input can map to multiple noise levels and conflicting denoising directions. Standard training objectives average these incompatible targets out, causing the model to steer toward the global data mean rather than the actual data manifold. This results in wandering, inefficient sampling paths during generation.
Methods
The authors draw inspiration from distance-field-based surface reconstruction and rendering techniques in computer graphics to propose Distance Marching. Instead of tracking an explicit time variable, the model learns to navigate a spatial distance field toward the data manifold.
- Network Architecture: Given only the current spatial point $\mathbf{x}$, the model predicts two components: a scalar distance-like field $u_\theta(\mathbf{x})$ and a directional vector field $\mathbf{v}_\theta(\mathbf{x})$. To avoid the high computational cost and training instability of computing second-order derivatives via autograd, $\mathbf{v}_\theta(\mathbf{x})$ is predicted directly rather than enforcing it to be the exact gradient of $u_\theta$.
- Loss Functions: They introduce two novel objectives:
- One-Step Loss (OSL): Penalizes the discrepancy between a predicted one-step projection and the target data point. Crucially, it includes an inverse-distance denominator that naturally upweights closer targets.
- Directional Eikonal Loss (DEL): Regularizes the vector field to ensure the learned scalar field behaves like a valid, positive distance function.
- Inference Methods: During sampling, Distance Marching supports standard Gradient Descent (GD) as well as an adaptive, graphics-inspired Sphere Tracing (ST) method, where step sizes are dynamically scaled by the predicted distance to the manifold.
Datasets
The approach is evaluated on two standard image generation benchmarks:
- CIFAR-10: Used for unconditional image generation.
- ImageNet-256: Used for class-conditional generation across various transformer backbone sizes (S/2, B/2, L/2, XL/2).
Key Insights and Ideas
- Locality over Averaging: Standard flow matching suffers from length-induced bias where longer noise-to-target pairs dominate the gradients, pulling early generation steps toward the data mean. Distance Marching's OSL flips this dynamic by focusing on local, closer targets, resulting in straighter, more certain denoising paths.
- Avoiding the Hubness Trap: Explicitly searching for nearest neighbors in high-dimensional spaces typically causes severe mode collapse because a few low-contrast, grayish images act as "hubs" (becoming the nearest neighbors for almost all noisy points). Distance Marching elegantly bypasses this by implicitly prioritizing closer targets through its loss weighting without altering the training pairs.
- Distance as a Multi-Tool: Because the model learns an explicit scalar distance $u_\theta(\mathbf{x})$, this value serves as a natural, practical stopping signal for adaptive sampling (early stopping) and doubles as a highly effective out-of-distribution (OOD) detector.
Key Results
- State-of-the-Art Time-Unconditional Performance: Distance Marching consistently improves average FID by 13.5% on CIFAR-10 and ImageNet over recent time-unconditional baselines.
- Surpassing Time-Conditioned Models: On class-conditional ImageNet, Distance Marching actually surpasses strong time-conditioned flow matching models (SiT), reducing FID by 13.6% on average across different backbone sizes.
- Faster Convergence: It reaches the final FID performance of standard flow matching using less than 60% of the sampling steps.
- Efficient OOD Detection: Despite its distance head having a tiny fraction of the parameters (0.10M vs 130M for competing models), the distance predictor achieves an average AUROC of 0.79 on CIFAR-10 OOD benchmarks, significantly outperforming prior energy-based models.
Limitations and Future Work
- The vector field $\mathbf{v}_\theta$ is not structurally constrained to be curl-free (conservative). While the authors did not observe trajectories cycling or oscillating in practice, enforcing a zero-curl constraint in high dimensions remains an open challenge.
- The authors suggest that integrating practical, low-cost Markov Chain Monte Carlo (MCMC) refinement steps during the final stages of sampling could further boost sample diversity and quality.
Summary updated