Source-linked AI summary

Iterative Flow Matching: Path Correction and Gradual Refinement for Enhanced Generative Modeling

Eldad Haber, Shadab Ahamed, Md. Shahriar Rahim Siddiqui, Niloufar Zakariaei, Moshe Eliasof

arXiv:2502.16445v4cs.LGcs.AIcs.CVstat.ML

TL;DR

Generative models can produce samples from distributions that differ from their targets, including out-of-distribution hallucinations. The paper proposes iterative refinement of trajectories using flow matching, and reports improved generative performance and reduced out-of-distribution effects across several datasets; end-path correction was more robust in the examples considered.

  • Problem

    Generative models may produce a distribution different from the target, with numerical and approximation issues contributing to out-of-distribution samples.

    Source: §1 · p. 2, §2.3 · p. 5
  • Method

    The paper iteratively updates trajectories to refine samples, proposing end-path correction and gradual refinement for integration with generative methods.

    Source: §7 · pp. 16–17
  • Results

    The authors report improved generative performance and reduced out-of-distribution effects across several datasets, with end-path correction more robust in the examples considered.

    Source: §7 · p. 17
  • Takeaways & Limitations

    Iterative refinement can improve sample quality by shortening each transport interval to address approximation and integration errors.

    Source: §6 · p. 15

    Each refinement stage learns a new velocity field, so generation cost scales linearly with iterations and limits immediate applicability to large-scale production models.

    Source: §6 · p. 15

Abstract

from arXiv · show

Generative models for image generation are now commonly used for a wide variety of applications, ranging from guided image generation for entertainment to solving inverse problems. Nonetheless, training a generator is a non-trivial feat that requires fine-tuning and can lead to so-called hallucinations, that is, the generation of images that are unrealistic. In this work, we explore image generation using flow matching. We explain and demonstrate why flow matching can generate hallucinations, and propose an iterative process to improve the generation process. Our iterative process can be integrated into virtually any generative modeling technique, thereby enhancing the performance and robustness of image synthesis systems.

1. Introduction.

High-dimensional generation is difficult, and generative models can produce samples from a distribution that differs from the target, yielding hallucinations. The paper proposes iterative flow-matching refinement as a way to improve generated samples, with accuracy traded against computational cost.

1. Introduction.

  • High-dimensional transport is difficult to solve directly, motivating generative models such as normalizing flows, GANs, VAEs, and flow matching.These approaches differ in their trade-offs among computational efficiency, sample quality, and training stability.Source: §1 · pp. 1–2
  • Generative models can produce a distribution different from the target, causing out-of-distribution hallucinations that are difficult to address through repeated model or training adjustments.The mismatch can arise from sample size, model fidelity, or numerical approximation.Source: §1 · p. 2
  • The paper uses flow matching to iteratively refine samples from a generative process, and the first iteration need not use flow matching.The process is described as applicable to virtually any generative modeling technique.Source: §1 · p. 2
  • The proposed process can make samples increasingly converge toward the target distribution, with accuracy gained at increased computational cost.The accuracy–complexity trade-off can be selected for the application and data quality.Source: §1 · p. 2

2. Flow Matching.

Flow matching learns a velocity field from interpolated source-to-target paths and integrates that field to generate samples. The section discusses velocity-field estimation and explains how interpolation and integration errors can cause generated trajectories to drift from the target distribution.

2.1. Flow matching - main concepts.

  • Flow matching constructs interpolated points between source and target samples, learns their velocity field, then integrates an ODE to obtain generated samples.The velocity field may be time-dependent, and trajectories can collide or pass close to one another at intermediate times.Source: §2.1 · pp. 3–4

2.2. Estimating the velocity field.

  • Velocity fields can be estimated with neural networks, particularly in high dimensions, or with radial basis functions for low-dimensional problems.The RBF approach uses a Gaussian kernel and can use sparse approximations for large-scale problems.Source: §2.2 · p. 4

2.3. Numerical difficulties.

  • Integration can drift from the training paths because the learned field is constrained to sampled regions, and the resulting trajectories may generate out-of-distribution samples.The Gaussian-mixture example illustrates this mismatch between the planned paths and the integrated trajectories.Source: §2.3 · p. 5, Figure 2 · p. 6

3. Iterative Approach.

The iterative approach addresses out-of-distribution samples caused by estimated trajectories drifting from their planned paths. It presents end-path correction and gradual refinement as two ways to correct that drift.

3. Iterative Approach.

  • Estimated velocities can produce trajectories that drift from the planned linear path, yielding out-of-distribution samples; the proposed frameworks correct this drift at the endpoint or gradually.Source: §3 · p. 6

3.1. End-path correction.

  • End-path correction repeats flow matching from the generated endpoint when its distribution is closer to the target, with a stopping criterion bounded by finite-sample limitations.Similarity can be assessed with closest-point distance for low-dimensional problems or FID or Inception scores for images.Source: §3.1 · pp. 6–7
  • A single end-path correction reduces the distance between point clouds by two orders of magnitude.Figure 3 illustrates correction of the final distribution produced by standard flow-matching optimization.Source: §3.1 · p. 7, Figure 3 · p. 8

3.2. Gradual refinement.

  • Gradual refinement divides the path into segments, corrects the integrated state at each checkpoint, and learns a corrected path whose training points come from the corresponding densities.The corrected homotopy carries the integrated distribution at a checkpoint toward the target over the shorter remaining interval.Source: §3.2 · pp. 7–9
  • Each gradual-refinement iteration reduces point-cloud distance to accuracy similar to end-path correction, though the approach is less robust.The authors note that trajectories intersect at x0 and the velocity there points toward the target's center of mass; further investigation is needed.Source: §3.2 · p. 9

4. Theoretical Properties.

The section gives a conditional convergence argument for both refinement algorithms. It links distribution proximity to smaller transport velocities and easier velocity approximation, while noting expressivity and dimensionality constraints.

4. Theoretical Properties.

  • The convergence argument assumes initial flow matching improves target approximation, sufficiently smooth distributions admit a contraction flow, and smaller velocity fields are easier to learn.The paper notes that inadequate flow-model expressivity can prevent a faithful interpolant.Source: §4 · pp. 9–10
  • Under the stated assumptions, both Algorithms 3.1 and 3.2 converge to the target distribution.The argument starts from the goal of improving target-distribution approximation through iterative refinement.Source: §4 · pp. 9–10
  • For Wasserstein-optimal transport, closer distributions have lower velocity norms; arbitrary flows need not obey this bound.The paper notes that unrestricted flow fields can be arbitrarily large, motivating the restriction to optimal transport flows.Source: §4 · pp. 11–12
  • For smooth, bounded gradient flows, radial-basis-function approximation requires a basis count that scales with accuracy, dimension, and smoothness.The paper says velocity approximation is easier in principle when the distributions are closer.Source: §4 · p. 12
  • The theory predicts progressively closer intermediate distributions, allowing sufficiently expressive velocity models to better approximate the target density.The claim applies to the sequences produced by both refinement algorithms.Source: §4 · p. 12
  • The argument depends on approximation quality, which deteriorates with problem dimension, and choosing a low-parameter, low-data approximation remains challenging.An insufficiently expressive flow model can fail to generate a faithful interpolant.Source: §4 · pp. 10, 12

5. Numerical Experiments.

Experiments on MNIST and CIFAR-10 test iterative flow matching in latent space; both show improvement toward data-derived similarity references.

5.1. Experiments with MNIST.

  • MNIST uses a 32-feature VAE latent space with an RBF velocity approximation; stochastic subset regression samples M = 10,000 data points and solves the kernel system iteratively.Source: §5.1 · p. 12
  • MNIST sample quality and EPS improve across iterations, with similarity approaching data self-similarity.Source: Figure 5 · p. 13, §5.1 · p. 13, Figure 6 · p. 14

5.2. Experiments with CIFAR-10.

  • For CIFAR-10, a Unet [30] learns the velocity field in four stages rather than one, within the experiments’ autoencoder latent-space setup.Source: §5 · p. 12, §5.2 · p. 14
  • CIFAR-10 iteration loss falls to a level similar to the internal loss measured within the dataset.Source: §5.2 · p. 14

6. Discussion.

The discussion frames refinement as a numerical correction with practical limits: it adds computation, and endpoint stiffness can remain difficult. It also distinguishes temporal refinement from transport-alignment approaches.

6. Discussion.

  • Near-singular endpoints can remain difficult even after refinement, and uniform time discretization may be suboptimal; the framework also permits non-uniform or adaptive refinement.Source: §6 · p. 14
  • Each refinement stage learns a new velocity field, so generation cost scales linearly with iterations and limits immediate production-scale applicability.Source: §6 · pp. 14–15
  • Optimal-transport couplings address spatial misalignment, whereas adaptive temporal refinement targets long-horizon integration and limited space-time coverage; combining them may reduce required iterations.Source: §6 · p. 16
  • Unlike greedy normalizing-flow and transport approaches, refinement is not driven by likelihood maximization or distributional simplification; it shortens integration intervals without changing the flow-matching objective.Source: §6 · p. 16

7. Conclusion.

Flow matching can fail to reach the target when interpolation artifacts produce a flow field that does not converge. The paper proposes iterative trajectory refinement and reports improved generative performance and reduced out-of-distribution effects.

7. Conclusion.

  • Interpolation artifacts can produce flow fields that fail to converge to the target distribution when extending trajectory-derived fields across the whole space.Source: §7 · p. 16
  • The proposed approach enhances generative performance and reduces out-of-distribution effects across tested datasets, including one regarded as difficult.The authors experimentally find end-path correction more robust than iterative gradual refinement for the examples considered.Source: §7 · p. 17
  • The proposed iterative refinement process updates trajectories and can, in principle, be integrated with any generative method.Source: §7 · p. 17
  • The paper explores end-path correction and iterative gradual refinement as two options for redesigning the flow plan.For the examples considered, end-path correction was experimentally more robust.Source: §7 · p. 17
Loading 2502.16445v4…