AdjointDPM: Adjoint Sensitivity Method for Gradient Backpropagation of Diffusion Probabilistic Models
Jiachun Pan, Jun Hao Liew, Vincent Y. F. Tan, Jiashi Feng, Hanshu Yan
Abstract
This paper considers a ubiquitous problem underlying several applications of DPMs, i.e., optimizing the parameters of DPMs when the objective is a differentiable metric defined on the generated contents. Since the sampling procedure of DPMs involves recursive calls to the denoising UNet, naïve gradient backpropagation requires storing the intermediate states of all iterations, resulting in extremely high memory consumption. To overcome this issue, we propose a novel method AdjointDPM, which first generates new samples from diffusion models by solving the corresponding probability-flow ODEs. It then uses the adjoint sensitivity method to backpropagate the gradients of the loss to the models' parameters (including conditioning signals, network weights, and initial noises) by solving another augmented ODE. To reduce numerical errors in both the forward generation and gradient backpropagation processes, we further reparameterize the probability-flow ODE and augmented ODE as simple non-stiff ODEs using exponential integration. AdjointDPM can effectively compute the gradients of all types of parameters in DPMs, including the network weights, conditioning text prompts, and noisy states. Finally, we demonstrate the effectiveness of AdjointDPM on several interesting tasks: guided generation via modifying sampling trajectories, finetuning DPM weights for stylization, and converting visual effects into text embeddings. 1
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
9 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- High-Resolution Image Synthesis with Latent Diffusion Models cites Diffusion Models Beat GANs on Image Synthesis
- High-Resolution Image Synthesis with Latent Diffusion Models cites Denoising Diffusion Probabilistic Models
- PeRFlow: Piecewise Rectified Flow as Universal Plug-and-Play Accelerator cites High-Resolution Image Synthesis with Latent Diffusion Models
- PeRFlow: Piecewise Rectified Flow as Universal Plug-and-Play Accelerator cites Denoising Diffusion Probabilistic Models
- Training-Free Guidance Beyond Differentiability: Scalable Path Steering with Tree Search in Diffusion and Flow Models cites Diffusion Models Beat GANs on Image Synthesis
- Training-Free Guidance Beyond Differentiability: Scalable Path Steering with Tree Search in Diffusion and Flow Models cites Understanding and Improving Training-free Loss-based Diffusion Guidance
- Training-Free Guidance Beyond Differentiability: Scalable Path Steering with Tree Search in Diffusion and Flow Models cites Gradient Guidance for Diffusion Models: An Optimization Perspective
- Training-Free Guidance Beyond Differentiability: Scalable Path Steering with Tree Search in Diffusion and Flow Models cites Denoising Diffusion Probabilistic Models
- Training-Free Guidance Beyond Differentiability: Scalable Path Steering with Tree Search in Diffusion and Flow Models cites AdjointDEIS: Efficient Gradients for Diffusion Models
- Diffusion Models Beat GANs on Image Synthesis cites Learning Transferable Visual Models From Natural Language Supervision
- Diffusion Models Beat GANs on Image Synthesis cites Denoising Diffusion Probabilistic Models
- Understanding and Improving Training-free Loss-based Diffusion Guidance cites High-Resolution Image Synthesis with Latent Diffusion Models
- Understanding and Improving Training-free Loss-based Diffusion Guidance cites Diffusion Models Beat GANs on Image Synthesis
- Understanding and Improving Training-free Loss-based Diffusion Guidance cites Learning Transferable Visual Models From Natural Language Supervision
- Understanding and Improving Training-free Loss-based Diffusion Guidance cites Denoising Diffusion Probabilistic Models
- Gradient Guidance for Diffusion Models: An Optimization Perspective cites High-Resolution Image Synthesis with Latent Diffusion Models
- Gradient Guidance for Diffusion Models: An Optimization Perspective cites Diffusion Models Beat GANs on Image Synthesis
- Gradient Guidance for Diffusion Models: An Optimization Perspective cites Denoising Diffusion Probabilistic Models
- AdjointDEIS: Efficient Gradients for Diffusion Models cites High-Resolution Image Synthesis with Latent Diffusion Models
- AdjointDEIS: Efficient Gradients for Diffusion Models cites Denoising Diffusion Probabilistic Models
- AdjointDEIS: Efficient Gradients for Diffusion Models cites Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding
- Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding cites High-Resolution Image Synthesis with Latent Diffusion Models
- Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding cites Diffusion Models Beat GANs on Image Synthesis
- Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding cites Learning Transferable Visual Models From Natural Language Supervision
- Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding cites Denoising Diffusion Probabilistic Models
Cited by top-tier papers9
- PeRFlow: Piecewise Rectified Flow as Universal Plug-and-Play AcceleratorHanshu Yan, Xingchao Liu, Jiachun Pan, Jun Hao Liew et al.NeurIPS 2024 · 108 citations
- Gradient Guidance for Diffusion Models: An Optimization PerspectiveYingqing Guo, Hui Yuan, Yukang Yang, Minshuo Chen et al.NeurIPS 2024 · 79 citations
- Understanding and Improving Training-free Loss-based Diffusion GuidanceYifei Shen, Xinyang Jiang, Yifan Yang, Yezhen Wang et al.NeurIPS 2024 · 36 citations
- Training-Free Guidance Beyond Differentiability: Scalable Path Steering with Tree Search in Diffusion and Flow ModelsYingqing Guo, Yukang Yang, Hui Yuan, Mengdi WangNeurIPS 2025 · 29 citations
- AdjointDEIS: Efficient Gradients for Diffusion ModelsZander W. Blasingame, Chen LiuNeurIPS 2024 · 8 citations
Builds on27
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
- 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
- Photorealistic Text-to-Image Diffusion Models with Deep Language UnderstandingChitwan Saharia, William Chan, Saurabh Saxena, Lala Li et al.NeurIPS 2022 · 8,965 citations
Related papers
- Efficient Diffusion Models via Time Step Optimization with Consistent Training and Inference ConstraintsBinrui Wu, Zihao Cheng, Yuesen Liao, Weizhong ZhangICML 2026
- DPM-Solver: A Fast ODE Solver for Diffusion Probabilistic Model Sampling in Around 10 StepsCheng Lu, Yuhao Zhou, Fan Bao, Jianfei Chen et al.NeurIPS 2022 · 2,653 citations
- SEEDS: Exponential SDE Solvers for Fast High-Quality Sampling from Diffusion ModelsMartin Gonzalez, Nelson Fernández, Thuy Tran, Elies Gherbi et al.NeurIPS 2023 · 43 citations
- FlowGrad: Controlling the Output of Generative ODEs with GradientsXingchao Liu, Lemeng Wu, Shujian Zhang, Chengyue Gong et al.CVPR 2023
- On Exact Inversion of DPM-SolversSeongmin Hong, Kyeonghyun Lee, Suh Yoon Jeon, Hyewon Bae et al.CVPR 2024
