Flow Density Control: Generative Optimization Beyond Entropy-Regularized Fine-Tuning

Riccardo De Santi, Marin Vlastelica, Ya-Ping Hsieh, Zebang Shen, Niao He, Andreas Krause

Abstract

Current generative model fine-tuning methods primarily focus on maximizing expected rewards under KL-divergence constraints. However, many real-world applications require optimizing for non-linear utilities such as risk-aversion or novelty-seeking. We present Flow Density Control (FDC), a framework based on Mirror Descent that enables fine-tuning flow and diffusion models for arbitrary distributional utilities and divergence metrics. By linearizing complex objectives, FDC provides a scalable approach to generative optimization with rigorous convergence guarantees.

Introduction

The standard paradigm for fine-tuning generative models, such as Stable Diffusion or flow-based models, involves maximizing the average reward of generated samples while maintaining proximity to a pre-trained reference model. This proximity is typically enforced using Kullback-Leibler (KL) divergence. While effective for general alignment, this "linear" approach is insufficient for tasks requiring nuanced distributional control.

For instance, in safety-critical robotics, avoiding rare catastrophic failures (risk-aversion) is more important than high average performance. Conversely, in drug discovery, the goal is often to identify rare, high-performing outliers (novelty-seeking) rather than typical molecules. Furthermore, KL-divergence lacks geometric awareness; in physical domains like protein folding, small geometric shifts can result in disproportionately large KL penalties.

Comparison of current linear fine-tuning vs. the proposed general framework.

Methodology: Flow Density Control (FDC)

To address these limitations, we introduce the Generative Optimization (GO) problem, which seeks to optimize any distributional utility under any divergence metric. The proposed solution, Flow Density Control (FDC), leverages an iterative Mirror Descent approach.

The core insight of FDC is the use of the first variation of a complex, non-linear objective. By treating the distributional utility as a functional, we can approximate it locally with a linear surrogate—essentially an infinite-dimensional gradient.

  1. Iterative Wrapper: FDC operates as an outer loop that calculates the "gradient" of the complex goal at each step.
  2. Linear Inner Loop: This gradient is passed to a standard linear fine-tuning solver (e.g., Adjoint Matching).
  3. Convergence: Through successive iterations, the model converges to the global optimum of the original non-linear objective.
Visualization of generative optimization via flow model fine-tuning and the resulting expressivity hierarchy.

This framework allows for the replacement of KL-divergence with more geometrically meaningful metrics like Wasserstein distance (Optimal Transport), enabling regularization based on physical or semantic distance.

Experimental Results

We validated FDC across three distinct domains: synthetic 2D tasks, molecular design, and text-to-image generation.

Risk-Aversion and Novelty-Seeking

In 2D toy tasks, FDC successfully steered model density away from "catastrophic" zones that standard expected-reward methods failed to avoid. Specifically, FDC reduced the 1%-worst-case cost from 288.2 to 90.0. In molecular design using the QM9 dataset and the FlowMol model, FDC prioritized high-reward outliers, boosting the top 0.2% reward (SQ score) to 41.8, outperforming the baseline of 39.7.

Diversity in Image Generation

Applied to Stable Diffusion 1.4, FDC was used to enhance the diversity of "creative bridge designs." By optimizing for the Vendi score, FDC increased diversity from 2.36 to 2.47 while simultaneously improving alignment with the text prompt (CLIP score).

Discussion and Limitations

FDC demonstrates that complex distributional goals can be achieved by iteratively solving simpler linear tasks. A key advantage is that the "first variation" trick avoids the need for full density estimation for most utilities, making the algorithm computationally feasible.

However, FDC introduces iterative overhead, requiring multiple fine-tuning passes. While the authors demonstrate that $K=2$ iterations often suffice, it remains more resource-intensive than single-shot methods. Additionally, selecting the sequence of regularization weights requires careful tuning to ensure stable convergence. Future work may explore FDC for model de-biasing and more sophisticated experimental design.

Summary updated

BibTeX
@inproceedings{santi2025flow,
  author = {Riccardo De Santi and Marin Vlastelica and Ya-Ping Hsieh and Zebang Shen and Niao He and Andreas Krause},
  title = {{Flow Density Control: Generative Optimization Beyond Entropy-Regularized Fine-Tuning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=JzCjNJlSxI},
}
Figure