TL;DR
Fine-tuning diffusion models usually optimizes for average performance on the training data, which can leave rare or under-represented groups behind. When the test-time mix of inputs shifts toward those neglected groups, model quality can plummet. This paper introduces GDRGO (Group-Distributionally Robust Generative Optimization), a method that mathematically decouples worst-case group weighting from model fine-tuning—achieving stronger robustness to distribution shifts in a single fine-tuning run, without the heavy overhead of alternating optimization.
What Problem Does This Paper Address?
Pretrained diffusion models (both continuous ones for images and discrete ones for biological sequences) are often fine-tuned to maximize a downstream reward—like visual aesthetics or protein stability—while staying close to the original pretrained distribution via a Kullback–Leibler (KL) divergence penalty.
The catch? Standard fine-tuning maximizes expected reward under the training distribution's natural group proportions. If 37% of your text prompts are about humans and only 4% are about food, a standard fine-tuner can happily boost human images while ignoring food. That looks fine on average during training, but if a user at test time mostly asks for food, performance tanks.
Existing "group-robust" approaches try to fix this by alternating between:
- Evaluating the current model to see which groups are doing poorly, and
- Updating the model with higher weights on those struggling groups.
For diffusion models, where generating samples requires iterative denoising, repeatedly sampling and re-evaluating the model during training is computationally expensive.
Methods
The authors formulate GDRGO as a KL-regularized max–min optimization problem: maximize the worst-case expected reward over an uncertainty set of group mixtures $\mathcal{W}_{\text{KL}}(\epsilon) = \{w \in \Delta_G : D_{\text{KL}}(w \| w^0) \le \epsilon\}$. Here, $w^0$ is the nominal training group proportion, and $\epsilon$ controls how much test-time shift you want to guard against.
What's new: Instead of solving this max–min problem by alternating between weights and model updates, the authors prove an exact reformulation (Theorem 1) that collapses the problem into a finite-dimensional convex minimization over the group weights $w$ alone. This leads to a clean two-stage algorithm:
- Stage 1 (Lightweight Weight Optimization): Using only samples from the pretrained model, estimate the optimal worst-case group weights $\widehat{w}$ via stochastic mirror descent. No model fine-tuning happens here.
- Stage 2 (Single Fine-Tuning Run): Rescale each prompt's reward by the ratio of its robust weight to its nominal weight, $\tilde{r}_{\widehat{w}}(x, s) = \frac{\widehat{w}_{G(s)}}{w^0_{G(s)}} r(x, s)$, and run standard KL-regularized fine-tuning once (using off-the-shelf solvers like Adjoint Matching or DiffusionNFT).
Datasets
The authors evaluate GDRGO across three settings:
- 2D Illustrative Example: A controlled 2-group Gaussian mixture with $w^0 = (0.2, 0.8)$ and a linear reward, allowing closed-form comparison.
- Text-to-Image Generation: Stable-Diffusion v1-5 fine-tuned with ImageReward on prompts partitioned into 7 semantic groups (
animal,food,human,architecture,landscape,vehicle,abstract), wherehumandominates (37%) andfood/vehicleare rare (~4% each). - Protein Inverse Folding: A discrete diffusion model (following the DRAKES setup) on the Megascale benchmark, partitioned into two structural classes:
With β-strands(the harder, worst-performing group) andHelix-only, evaluated with a separate stability oracle.
Key Insights and Ideas
- Alternating optimization is unnecessary: Because the optimal fine-tuned policy for any fixed group weights is an exponential tilt of the pretrained model, you can find the worst-case group weights before touching the model's parameters.
- Standard fine-tuning can widen group gaps: In the 2D example, standard fine-tuning naturally gives more reward gain to high-variance majority groups, widening the reward gap between groups from $3.29$ to $8.32$. GDRGO tilts the minority group much more strongly, shrinking the gap to $0.00$.
- A built-in performance certificate: Optimizing against the worst-case mixture in $\mathcal{W}_{\text{KL}}(\epsilon)$ guarantees that for any test-time group mixture inside that KL ball, the model's performance will be no worse than the certified robust value.
Key Results
- 2D Example: GDRGO raises the worst-group reward from $-0.50$ (standard fine-tuning) to $3.77$.
- Text-to-Image (Table 1): With $\epsilon = 0.05$, GDRGO achieves the best worst-group reward ($-0.008$ vs. $-0.100$ for standard fine-tuning), the best unweighted group average ($0.579$ vs. $0.547$), and the best overall average ($0.672$ vs. $0.641$). Compared to the alternating baseline AGDRO ($\epsilon = 0.05$), GDRGO achieves slightly better rewards while avoiding AGDRO's $13.5\%$ increase in wall-clock time.
- Protein Inverse Folding (Table 2): With $\epsilon = 0.05$, GDRGO boosts the worst-group (
With β-strands) stability reward from $0.630$ (standard fine-tuning) to $0.818$, and overall average from $0.644$ to $0.773$, with only a minor dip onHelix-only($0.653$ vs. $0.681$).
Limitations and Future Work
- Finite-sample bias & rare-group sensitivity: Stage 1 gradient estimates use finite-sample importance sampling from the pretrained model, which introduces bias (though it vanishes as sample size and steps grow). Additionally, sensitivity to weight-estimation errors scales with $1/w^0_g$ and $1/\alpha$, meaning very rare groups or very weak KL regularization require more care.
- Beyond group-proportion shifts: GDRGO specifically addresses shifts in the proportions of predefined groups. Extending the framework to handle distribution shifts within groups or across unseen domains is left for future work.
Summary updated