Diffusion-SDPO: Safeguarded Direct Preference Optimization for Diffusion Models

Minghao Fu, Guo-Hua Wang, Tianyu Cui, Qing-Guo Chen, Zhao Xu, Weihua Luo, Kaifu Zhang

TL;DR

Direct Preference Optimization (DPO) for diffusion models often suffers from a critical flaw: it widens the preference gap by degrading the "loser" image rather than improving the "winner," leading to over-saturation and training collapse. To fix this, the authors introduce Diffusion-SDPO, a lightweight, model-agnostic safeguard that adaptively scales down the loser's gradient when it conflicts with the winner's gradient. This simple modification guarantees that the absolute quality of preferred outputs is preserved or enhanced, stabilizing training across various architectures like Stable Diffusion and FLUX.

What Problem Does This Paper Address?

Fine-tuning text-to-image diffusion models using human feedback often relies on Direct Preference Optimization (DPO). DPO works by maximizing the preference margin between a preferred image ("winner") and a less-preferred image ("loser").

However, the authors uncover a fundamental pathology: maximizing this relative margin does not guarantee absolute generation quality. In standard Diffusion-DPO, the denoising losses for both the winner and loser branches actually increase over time. The model essentially learns to "win" by making the loser catastrophically worse, dragging down the quality of the winner in the process. This manifests as over-saturation, texture artifacts, and eventual training collapse during extended fine-tuning.

Figure 1. Training dynamics of preference losses during DPO finetuning without (left) and with (right) our safe-λ mechanism on SD 1.5 [32]. Images beneath the plots illustrate samples generated at training steps {0, 500, 1000, 1500, 2000}.

Methods

To protect the winner's absolute quality, the authors propose a "winner-preserving" update rule called Diffusion-SDPO (Safeguarded DPO).

  1. First-Order Safety Condition: The authors analyze a linearized preference objective and derive a theoretical constraint on the loser's gradient weight ($\lambda$). By enforcing that the first-order Taylor expansion of the winner's loss is non-increasing ($\Delta \mathcal{L}^w \le 0$), they calculate a closed-form upper bound for $\lambda$.
  2. Output-Space Proxy: Calculating this bound in parameter space is computationally prohibitive for large models. Instead, the authors project the gradients into the model's output space (e.g., predicted noise residuals).
  3. Safety Slack ($\mu$): To avoid computing expensive Jacobian matrices, they introduce a scalar safety slack parameter ($\mu \in [0,1]$) that safely contracts the proxy. The final adaptive scaling factor is computed as: $$\lambda_{\text{safe}} = \frac{(1-\mu)\|g^w\|_2^2}{g^{w\top}g^l}$$

If the loser's gradient aligns poorly or conflicts with the winner's gradient ($g^{w\top}g^l > 0$), $\lambda_{\text{safe}}$ dynamically downweights the loser's contribution.

Figure 2. Training dynamics of λsafe on SD 1.5 (left) and Ovis-U1 (right) with two computation schemes (using output-space gradi- ents vs. parameter-space gradients). The trajectories closely match throughout training, and the output-space variant requires substan- tially less computation while maintaining comparable aesthetic re- wards (see Table 4).

Datasets

  • Pick-a-Pic V2 (Pick V2): Used for fine-tuning Stable Diffusion 1.5 and SDXL, as well as providing evaluation prompt sets.
  • HPS V2 & PartiPrompts: Used as evaluation benchmarks for automated preference, aesthetics, and prompt alignment.
  • In-house Mixed Preference Corpus: A dataset of 186K high-quality examples (re-captioned using the Qwen-VL-Max vision-language model) used to train and evaluate the large-scale FLUX.1-dev model.

Key Insights and Ideas

  • Relative Alignment $\neq$ Absolute Quality: A model can successfully optimize a preference margin by making bad outputs worse rather than making good outputs better. True alignment requires an absolute quality safeguard.
  • Output Space Mirrors Parameter Space: One of the most elegant findings is that gradient alignment geometry in the low-cost output space (the model's direct predictions) acts as an incredibly accurate proxy for the high-cost parameter space, as seen in Figure 2.
  • Geometry over Loss Form: SDPO stabilizes training across multiple DPO variants (like DSPO and DMPO) because it fixes harmful update directions based on gradient geometry rather than the specific mathematical formulation of the loss function.

Key Results

  • Eliminating Training Collapse: On high-capacity models like FLUX.1-dev, standard DPO completely degrades the model at standard learning rates (causing metrics to collapse). Diffusion-SDPO prevents this collapse, consistently improving PickScore, HPS V2, and ImageReward metrics simultaneously.
  • Architecture Agnostic: The method works seamlessly across UNet backbones (SD 1.5, SDXL) and DiT backbones (Ovis-U1, FLUX.1-dev).
  • Negligible Overhead: Because it computes gradients in the output space using already-available loss gradients, it adds virtually zero runtime or memory overhead (e.g., 184s vs 183s per step compared to standard DPO).

Limitations and Future Work

  • First-Order Assumption: The safeguard relies on a first-order Taylor approximation. In regions of the loss landscape with highly complex or sharp curvature, this assumption weakens, meaning the winner's loss could still experience minor increases.
  • Heuristic Slack Tuning: The safety slack parameter $\mu$ currently requires manual tuning or simple heuristics based on early-phase training behavior.
  • Future Directions: The authors point toward developing second-order or trust-region safeguards that can explicitly constrain curvature impacts without sacrificing computational efficiency.

Summary updated

BibTeX
@misc{fu2025diffusion,
  author = {Minghao Fu and Guo-Hua Wang and Tianyu Cui and Qing-Guo Chen and Zhao Xu and Weihua Luo and Kaifu Zhang},
  title = {{Diffusion-SDPO: Safeguarded Direct Preference Optimization for Diffusion Models}},
  year = {2025},
  eprint = {2511.03317},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.03317},
}
Figure