D-Flow: Differentiating through Flows for Controlled Generation
Heli Ben-Hamu, Omri Puny, Itai Gat, Brian Karrer, Uriel Singer, Yaron Lipman
Abstract
Taming the generation outcome of state of the art Diffusion and Flow-Matching (FM) models without having to re-train a task-specific model unlocks a powerful tool for solving inverse problems, conditional generation, and controlled generation in general. In this work we introduce D-Flow, a simple framework for controlling the generation process by differentiating through the flow, optimizing for the source (noise) point. We motivate this framework by our key observation stating that for Diffusion/FM models trained with Gaussian probability paths, differentiating through the generation process projects gradient on the data manifold, implicitly injecting the prior into the optimization process. We validate our framework on linear and non-linear controlled generation problems including: image and audio inverse problems and conditional molecule generation reaching state of the art performance across all.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers53
- ReNO: Enhancing One-step Text-to-Image Models through Reward-based Noise OptimizationLuca Eyring, Shyamgopal Karthik, Karsten Roth, Alexey Dosovitskiy et al.NeurIPS 2024 · 131 citations
- Gradient Guidance for Diffusion Models: An Optimization PerspectiveYingqing Guo, Hui Yuan, Yukang Yang, Minshuo Chen et al.NeurIPS 2024 · 79 citations
- Flow Priors for Linear Inverse Problems via Iterative Corrupted Trajectory MatchingYasi Zhang, Peiyu Yu, Yaxuan Zhu, Yingshan Chang et al.NeurIPS 2024 · 61 citations
- Physics-Constrained Flow Matching: Sampling Generative Models with Hard ConstraintsUtkarsh Utkarsh, Pengfei Cai, Alan Edelman, Rafael Gómez-Bombarelli et al.NeurIPS 2025 · 60 citations
- Inference-Time Scaling for Flow Models via Stochastic Generation and Rollover Budget ForcingJaihoon Kim, Taehoon Yoon, Jisung Hwang, Minhyuk SungNeurIPS 2025 · 43 citations
Builds on28
- Denoising Diffusion Probabilistic ModelsJonathan Ho, Ajay Jain, Pieter AbbeelNeurIPS 2020 · 35,902 citations
- Diffusion Models Beat GANs on Image SynthesisPrafulla Dhariwal, Alexander Quinn NicholNeurIPS 2021 · 13,211 citations
- High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser et al.CVPR 2022 · 13,123 citations
- GLIDE: Towards Photorealistic Image Generation and Editing with Text-Guided Diffusion ModelsAlexander Quinn Nichol, Prafulla Dhariwal, Aditya Ramesh, Pranav Shyam et al.ICML 2022 · 4,691 citations
- Elucidating the Design Space of Diffusion-Based Generative ModelsTero Karras, Miika Aittala, Timo Aila, Samuli LaineNeurIPS 2022 · 3,959 citations
Related papers
- DNF-Intrinsic: Deterministic Noise-Free Diffusion for Indoor Inverse RenderingRongjia Zheng, Qing Zhang, Chengjiang Long, Wei-Shi ZhengICCV 2025 · 2 citations
- FlowDPS: Flow-Driven Posterior Sampling for Inverse ProblemsJeongsol Kim, Bryan Sangwoo Kim, Jong Chul YeICCV 2025 · 6 citations
- Training Free Guided Flow-Matching with Optimal ControlLuran Wang, Chaoran Cheng, Yizhen Liao, Yanru Qu et al.ICLR 2025
- Controlled Generation with Equivariant Variational Flow MatchingFloor Eijkelboom, Heiko Zimmermann, Sharvaree Vadgama, Erik J. Bekkers et al.ICML 2025
- Training-Free Reward-Guided Image Editing via Trajectory Optimal ControlJinho Chang, Jaemin Kim, Jong Chul YeICLR 2026 · 2 citations
