DiverseFlow: Sample-Efficient Diverse Mode Coverage in Flows

Mashrur M. Morshed, Vishnu Boddeti · DOI

Introduction

Generative models, particularly flow-based models like Diffusion and Flow Matching, have achieved remarkable success in producing high-fidelity data. However, these models often suffer from a "diversity gap": they tend to collapse onto a few dominant modes of the data distribution, failing to explore the full range of possibilities inherent in a prompt. For instance, an ambiguous prompt like "a famous boxer" might consistently yield images of the dog breed, even if the model's training data includes human athletes. Achieving diversity typically requires generating a large number of independent samples (IID sampling), which is computationally expensive and inefficient.

DiverseFlow addresses this challenge with a training-free, inference-time method that encourages generative models to produce a more diverse set of samples. By coupling the sampling trajectories of a batch of images, DiverseFlow ensures that the generated outputs are "aware" of each other and pushed toward different modes of the distribution.

The Diversity Gap in Flow-Based Models

The mapping from initial Gaussian noise to the final data distribution in flow-based models is highly non-linear. Consequently, selecting diverse starting points in the noise space does not guarantee diverse outcomes in the image space. This leads to sample inefficiency, where many generated images are semantically redundant.

Comparison of IID sampling vs. DiverseFlow for the prompt 'letter'. DiverseFlow captures multiple semantic meanings (envelope, handwritten, block letters) within a single batch.

Methodology: Pushing Samples Apart

DiverseFlow introduces a novel sampling strategy that modifies the trajectory of flow-based models without requiring retraining.

Determinantal Point Processes (DPP)

The core of DiverseFlow is the use of a Determinantal Point Process (DPP) to measure and maximize diversity. In geometry, the determinant of a matrix represents the volume of the parallelepiped spanned by its column vectors. DiverseFlow treats a batch of samples as a set and calculates a similarity kernel between them in a high-level feature space (using pre-trained models like DINO or ViT). By maximizing the determinant of this kernel, the algorithm pushes samples to span the largest possible "volume" in the feature space, effectively encouraging them to represent distinct semantic modes.

Coupled ODEs and Quality Constraints

Instead of solving independent Ordinary Differential Equations (ODEs) for each sample, DiverseFlow couples them. Each sample's velocity is adjusted by a gradient derived from the DPP diversity term. To maintain image quality, a "quality term" is included to ensure samples remain within the high-probability regions of the original distribution. This prevents the "pushing" force from driving samples into unrealistic or noisy areas of the data manifold.

Experimental Evaluation

The authors evaluated DiverseFlow across several benchmarks, including synthetic 2D densities, a new Polysemous Prompt Set of 30 ambiguous nouns, ImageNet-256, and CelebA-HQ for inpainting tasks.

DiverseFlow results for the ambiguous prompt 'boxer', successfully generating both the human athlete and the dog breed.

Key Results

DiverseFlow demonstrates significant improvements in sample efficiency and mode coverage:

  • Mode Discovery: In synthetic tests, DiverseFlow discovered all 10 modes of a Gaussian mixture, whereas IID sampling found only 6.5 on average.
  • Semantic Diversity: On polysemous prompts, DiverseFlow increased the number of discovered meanings significantly (e.g., from 9 to 13 using Stable Diffusion v3).
  • ImageNet Performance: The method improved diversity metrics (Recall) while maintaining high image quality (Precision).
  • Inpainting: DiverseFlow produced a wide variety of facial features and expressions in inpainting tasks, avoiding the "neutral" bias of standard methods.

Conclusion and Future Work

DiverseFlow provides a principled, training-free approach to enhancing diversity in flow-based generative models. By treating diversity as a geometric volume problem in feature space, it enables the discovery of multiple semantic meanings and varied solutions with far fewer samples than traditional IID methods. While effective, future work may explore "trainable" versions of this coupling to embed diversity directly into the model's architecture.

Summary updated

BibTeX
@misc{morshed2025diverseflow,
  author = {Mashrur M. Morshed and Vishnu Boddeti},
  title = {{DiverseFlow: Sample-Efficient Diverse Mode Coverage in Flows}},
  year = {2025},
  eprint = {2504.07894},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.07894},
}
Figure