Constrained Diffusion Models via Dual Training

Diffusion models have attained prominence for their ability to synthesize a probability distribution for a given dataset via a diffusion process, enabling the generation of new data points with high fidelity. However, diffusion processes are prone to generating samples that reflect biases in a training dataset. To address this issue, we develop constrained diffusion models by imposing diffusion constraints based on desired distributions that are informed by requirements. Specifically, we cast the training of diffusion models under requirements as a constrained distribution optimization problem that aims to reduce the distribution difference between original and generated data while obeying constraints on the distribution of generated data. We show that our constrained diffusion models generate new data from a mixture data distribution that achieves the optimal trade-off among objective and constraints. To train constrained diffusion models, we develop a dual training algorithm and characterize the optimality of the trained constrained diffusion model. We empirically demonstrate the effectiveness of our constrained models in two constrained generation tasks: (i) we consider a dataset with one or more underrepresented classes where we train the model with constraints to ensure fairly sampling from all classes during inference; (ii) we fine-tune a pre-trained diffusion model to sample from a new dataset while avoiding overfitting.

Paper

References (81)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer Zh955/10 · confidence 3/52024-07-06

Summary

In this paper, the authors introduce a novel approach termed `Dual Training` for training constrained diffusion models, particularly focusing on scenarios involving `biased data generation`. Initially, the authors adeptly derive the learning objectives for diffusion models within a constrained optimization framework. Subsequently, they develop corresponding learning methodologies based on the principles of Lagrangian duality and propose an innovative training procedure. The effectiveness of their approach is rigorously validated through experiments on two distinct generative tasks.

Strengths

1. **Robust Derivation Procedure**: The authors present a thorough and well-founded derivation procedure throughout the manuscript, which stands out as particularly compelling. This rigorous approach significantly strengthens the theoretical foundation of their work. 2. **Relevant Application Scenario**: The authors explore a critical yet underrepresented field in their research. This focus not only highlights the relevance of their study but also underscores its potential impact in areas that have previously received limited attention.

Weaknesses

**Major Issues:** 1. The authors state, "Compared with the loss re-weighting method [9], our constrained formulation provides an optimal trade-off between matching given data distribution and following reference distribution." It would be helpful if the authors could clarify whether the re-weighting-based approach can be considered a special case of the proposed method in this manuscript. 2. The discussion on diffusion models appears to focus predominantly on the DDPM model. Could the authors explore whether this proposed approach can be extended to other diffusion processes, such as the Variance Exploding Stochastic Diffusion? 3. There seems to be an unclear transition from (U-KL) to (U-LOSS). Can the authors directly justify this conversion? It would be beneficial to include a derivation or a more detailed explanation, especially how it relates to equations (6) and (U-MIX). 4. The manuscript lacks comparative results with baseline models. Given that the authors suggest this approach provides a more general framework for generative models, could comparisons be made with other methods mentioned in reference [1]? 5. Could the authors discuss whether this approach can be interpreted from the perspective of partial optimal transport? The constraints discussed appear to share similarities with those in unbalanced optimal transport approaches, such as those outlined in equation 3 of reference [2]. 6. The paper discusses a dual training procedure involving primal-dual optimization. In the context of augmented direction multiplier methods used in directed acyclic graph learning, batch size is known to significantly influence model efficacy. Could the authors provide a sensitivity analysis regarding batch size effects? **Minor Issue:** 1. Under Assumption 1, should the range of $\zeta \in (0, b_i)$, considering that KL divergence cannot be negative? 2. Regarding the term (U-LOSS), should the subject be revised to $\nabla{\log{q^i(x_t)}}$? Additionally, it would be helpful if the authors could provide a detailed explanation or derivation of how the constraint term is converted into the (U-LOSS) term. --- **References** [1] Choi, Kristy, et al. "Fair generative modeling via weak supervision." International Conference on Machine Learning. PMLR, 2020. [2] Duque, Andrés F., Guy Wolf, and Kevin R. Moon. "Diffusion transport alignment." International Symposium on Intelligent Data Analysis. Cham: Springer Nature Switzerland, 2023.

Questions

Please see weaknesses.

Rating

5

Confidence

3

Soundness

3

Presentation

2

Contribution

3

Limitations

1. **Organization:** The manuscript lacks a dedicated section for related work, which is essential for contextualizing the study within the existing literature. The absence of this section diminishes the foundational motivation of the manuscript, potentially limiting the reader's understanding of its contributions relative to prior research. 2. **Baseline Comparison:** The authors did not include experiments comparing their methods against established baselines. Such comparisons are crucial for demonstrating the efficacy and advancements of the proposed approach over existing techniques. 3. **Hyper-parameter Sensitivity Analysis:** The manuscript does not address hyper-parameter sensitivity. Including such analysis is important to evaluate the robustness and reliability of the model across various parameter settings.

Reviewer Zh952024-08-11

Thank you for your rebuttal

Dear Authors, Thank you for your detailed responses to my questions. I am satisfied with the clarifications provided and will accordingly increase my evaluation score. For your revised manuscript, I would appreciate the inclusion of an expanded section on related works and a more comprehensive derivation of the key concepts regarding major issue 2. Sincerely, Reviewer Zh95

Authorsrebuttal2024-08-12

We sincerely thank the reviewer for reading our rebuttal and reevaluating our paper. As per their suggestion, we will expand the related work section in our introduction and add derivations emphasizing our clarification on major issue 2 in the main paper. We would also be happy to address any remaining concerns they might have.

Reviewer c1z85/10 · confidence 3/52024-07-09

Summary

This paper proposes Dual Training, a method designed to constrain the distributions that denoising diffusion models can learn. The authors propose an extension to the standard diffusion model training objective that minimizes the Kullback-Leibler (KL) divergence of the learned distribution with respect to two components: (1) the original data distribution and (2) a set of auxiliary distributions representing relevant constraints. The authors derive a tractable algorithmic approximation of their approach and apply it to two scenarios: the fair generation of underrepresented image classes and the fine-tuning of pre-trained models on new data while preserving image classes from the pre-training dataset.

Strengths

* The paper proposes an original approach to addressing two critical challenges in diffusion-based image generation: fairness and the ability to integrate new data with pre-trained diffusion models. * The method is well-motivated and the theoretical analysis of both the constrained optimization problem and the proposed solution embeds it in a rigorous mathematical framework. * Experimental results demonstrate the efficacy of the proposed approach on two relevant tasks (fair generation and fine-tuning), showcasing quantitative and qualitative improvements over unconstrained and pre-trained baselines.

Weaknesses

* The experimental evaluation in the main text is limited, focusing primarily on the MNIST and CelebA datasets. While some results on CIFAR-10 are provided in the appendix, they are not referenced in the main text. A more comprehensive empirical evaluation using more challenging datasets would strengthen the experimental section and better demonstrate the method's utility. * The empirical evaluation lacks relevant baselines. For instance, the fine-tuning experiments do not provide quantitative results for models fine-tuned without constraints. More generally, it would be beneficial to see how the model compares with standard conditioning approaches capable of enforcing similar constraints, for example, training a model with classifier-free guidance on datasets with underrepresented classes and providing balanced conditioning information at inference time. * The empirical results do not include uncertainty estimates or measures of statistical significance, which would enhance the robustness of the findings.

Questions

* Can you provide more details on the computational overhead of dual training compared to standard diffusion model training? * How does the method compare to other approaches that explicitly aim to fit mixture distributions, e.g. [1]? * How sensitive are the results to the choice of hyperparameters (number of dual iterations, primal/dual batch sizes, primal/dual learning rates, etc.)? Is there a principled way to set these values? --- [1] Du, Yilun, et al. "Reduce, reuse, recycle: Compositional generation with energy-based diffusion models and MCMC." International conference on machine learning. PMLR, 2023.

Rating

5

Confidence

3

Soundness

2

Presentation

2

Contribution

3

Limitations

The authors discuss some limitations, including the need to experiment with more datasets/attributes and explore converting other types of constraints into the KL divergence formulation. It would be good to also discuss and compare the computational overhead of the proposed formulation as this would be beneficial to evaluate the method's practical implications and trade-offs

Authorsrebuttal2024-08-12

We sincerely thank the reviewer for their detailed response. We address their remaining concerns below. >Could you briefly touch on why they are so much higher than the results reported in other works (e.g. 3.17 in [1] for unconditional image generation on CIFAR-10)? **Response:** Our FID scores are higher because we train our models on a biased subset of the dataset and compute the FID scores by comparing to the entire balanced dataset. Please refer to our response to weakness 3 of reviewer Rjho for more detail. >In addition to the conceptual considerations provided in response to Question 1 of Reviewer EijC, I think it would be helpful to add an actual empirical comparison of the computational cost of standard and dual training approaches in the paper. **Response:** We will include both the conceptual considerations and an empirical comparison of the computational costs of standard and dual training in the appendix. > Since this approach enables the specification of arbitrary class labels at inference time, it should be straightforward to sample them uniformly before sample generation **Response:** We thank the reviewer for clarifying the question. Regarding the suggested approach in conditional diffusion models with guidance, tuning the guidance parameter gives us a trade-off between sample diversity and fairness to all classes. In theory, our approach promotes sample diversity subject to the constraints (see our response to weakness 1 of reviewer Rjho). Therefore, it would be informative to compare these two approaches in terms of sample diversity and we will include this comparison in the final version. > ... The reasoning behind this question is to better understand the potential practical impact the proposed approach, compared to simply adapting existing diffusion model techniques to the experimental settings investigated in the manuscript. **Response:** While extending our proposed framework to conditional models is beyond the scope of the current work, we believe our approach would be practically relevant in this setting as we explain next. A model with classifier-free guidance learns both a conditional and unconditional model and weighs them according to the guidance parameter during sampling [a]. However, when the training data, and consequently the unconditional model are biased, this would make using the same guidance parameter for different conditioning information problematic, e.g., for underrepresented classes a larger guidance parameter would be needed to ensure sampling from that class. Our approach could alleviate this by using constrained training to ensure the learned unconditional model is unbiased. Hopefully, our response would add your openness of reevaluating our paper. We are happy to address any further concerns/questions you might have. **Reference** [a] Luo, Calvin. "Understanding diffusion models: A unified perspective." arXiv preprint arXiv:2208.11970 (2022).

Reviewer Rjho5/10 · confidence 5/52024-07-12

Summary

This paper studies the constrained diffusion models, motivated by customizing the generation by specific tasks. The idea is to formulate KL divergence-constrained optimization problem (U-KL), which is shown to have zero duality gap. The convergence (rate) of the sampling process is given by assuming a mixture initial distribution. Several experiments have been conducted, e.g., on MNIST and on the fairness.

Strengths

The paper provides a thorough study on the KL-constrained diffusion models: both optimization and sampling aspects are considered. The paper is overall interesting (methodologically). I also checked most proofs, and they are correct.

Weaknesses

There are several weaknesses (and questions): (1) The problem (U-KL) is still abstract. It is not clear how to choose $b_i$ to represent desired properties, or what are the right interpretations of the KL constraints (e.g., Section 3.2 on the fairness). (2) Theorem 7: the authors may emphasize that Theorem 7 is valid under the assumption that the initial distribution is a mixture. Also I think DDPM is used. The authors may also compare Theorem 7 with the results in [28]. (3) Experiments: the authors consider MNIST, CIFAR 10 and Celeb-A. However, the FID obtained seems to be large compared to the existing results. For instance, for MNIST the FID is typically less than 1 while the paper reports ~20-40; for CIFAR 10 the FID is less than 3 (the best is around 1.8) while the paper reports ~50. The authors may explain why this happens, otherwise the experiment results are not so convincing. (4) Literature and comments: There have also been a line of work on the SDE-based diffusion models (see ref. a), which show good empirical results. Related to (3), ref b. reports the FID 1.8 for CIFAR 10, and ref c. reports the FID 0.8 for MNIST (both without constraints). The authors may refer to these results on the continuous-time (SDE-based) models, and explain why there is so large difference in the empirical results. Another suggestion is that the authors may consider fine-tuning in the continuous framework, as in [45] and ref d. a. Score-Based Generative Modeling through Stochastic Differential Equations, Song et al., arXiv:2011.13456. b. Elucidating the Design Space of Diffusion-Based Generative Models, Karras, Aittala, Aila and Laine, arXiv:2206.00364. c. Contractive Diffusion Probabilistic Models, Tang and Zhao, arXiv:2401.13115. d. Fine-tuning of diffusion models via stochastic control: entropy regularization and beyond, Tang, arXiv:2403.06279. I would be happy to raise the score if some (or all) of the above concerns are addressed.

Questions

See weakness

Rating

5

Confidence

5

Soundness

3

Presentation

3

Contribution

3

Limitations

NA

Reviewer EijC6/10 · confidence 4/52024-07-13

Summary

This paper aims to address the issue of generating biased data based on the training dataset for diffusion models. The authors introduce a constrained diffusion model by imposing the diffusion constraints based on desired diffusions that are informed by requirements/constraints. They propose a dual training algorithm to train the model, and characterize the convergence of the trained model. Two constrained generation tasks are explored: ensuring fairness to underrepresented classes and adapting a pretrained model to new data.

Strengths

- The paper is well written and easy to follow. - Its key idea is using the quadratic loss formulation of score matching, which is equivalent to the ELBO of diffusion models. The authors employ Lagrangian duality to update both the parameters of the diffusion model and dual variables of constraints. While Lagrangian duality is commonly used for constrained optimization, particularly for constrained generative models, see [1,2,3], this paper first introduces this approach for diffusion models. - Thanks to the quadratic loss minimization of diffusion models, the authors can establish the convergence of the proposed constrained models. I think this is the most novel part of the paper. [1] Liu et al., Sampling with trustworthy constraints: a variational gradient framework , NeurIPS 2021. [2] Danilo et al., Generalized ELBO with Constrained Optimization, GECO, Bayesian Deep Learning (NeurIPS 2018). [3] Ferdinando et al., Lagrangian Duality for Constrained Deep Learning, ECMLPKDD 2020.

Weaknesses

- This paper shares a close connection to [1] regarding its motivation: formulating fairness as a constrained distributional optimization. Both of them employs a methodology based on primal-dual optimization derived from Lagrangian duality to address the constraints. While [1] focuses on the constrained SVGD, this paper focuses on constrained diffusion models. - Some minor corrections: +) Algorithm 1, line 4: x_{\theta}(h) should be s_{\theta}(h) +) Section 5, line 314, q(x_0:T) should be q_{i}(x_0:T) (constraint part)

Questions

- How efficient the model is as the number of constraints increases? Each time the model updates the duality variables, it needs to train a diffusion model, which is slow. - how the proposed method differs from existing constrained generative models, for example [1].

Rating

6

Confidence

4

Soundness

3

Presentation

3

Contribution

2

Limitations

The paper can be improved by: - a discussion of the efficiency of the proposed constrained diffusion models should be included. - a discussion of how the proposed method differs from existing constrained generative models should be added.

Reviewer EijC2024-08-11

Dear Authors, I would like to thank the authors for the response, and would like to remain the score unchanged. Best regards, Reviewer EijC

Authorsrebuttal2024-08-12

We sincerely thank the reviewer for reading and responding to our rebuttal. We would be happy to address any remaining concerns they might have.

Reviewer c1z82024-08-11

Response to Rebuttal

I thank the authors for the detailed response. I have raised my score in response to the additional empirical results and clarifications and will outline my remaining concerns below. --- **Re Weakness 1**: ... more challenging datasets ... Thank you for providing these additional results. I believe that they are helpful and strengthen the empirical evaluation presented in the paper. **Re Weakness 2**: ... quantitative results for models fine-tuned without constraints ... baselines ... > We refer to Figure (2b) in the paper which in fact provides a quantitative baseline for models fine-tuned without constraints, both as generated samples and its FID score. Thank you for pointing out the FID scores in the figure captions. They do indeed provide the quantitative results I was referring to. Could you briefly touch on why they are so much higher than the results reported in other works (e.g. 3.17 in [1] for unconditional image generation on CIFAR-10)? > Regarding the second point, we believe there is no meaningful metric of comparing a constrained unconditional model to existing conditional models since the conditional model can sample from any class if it is conditioned to do so. The suggested approach of using a conditional model with balanced conditioning information at inference time is interesting. However, we were unable to find any existing baselines using the suggested approach. Hence, we believe implementing such a novel approach to use as a baseline is beyond the scope of this paper. I am not sure I understand this point. Conditioning diffusion models via classifier-free guidance [2] is a standard approach in image diffusion models, including the latent diffusion model [3] that I assume was used for the additional ImageNet results. Since this approach enables the specification of arbitrary class labels at inference time, it should be straightforward to sample them uniformly before sample generation. Since all class labels need to be known at training time to specify the KL divergence-constrained optimization problem (U-KL), it seems reasonable to compare the method to other approaches that use class labels to train conditional diffusion models that allow us to flexibly constrain the sample generation process. The reasoning behind this question is to better understand the potential practical impact the proposed approach, compared to simply adapting existing diffusion model techniques to the experimental settings investigated in the manuscript. **Re Questions 1-3**: I appreciate the detailed response and the primal/dual batch size sensitivity study. In addition to the conceptual considerations provided in response to Question 1 of Reviewer EijC, I think it would be helpful to add an actual empirical comparison of the computational cost of standard and dual training approaches in the paper. --- ### References [1] Ho, Jonathan, Ajay Jain, and Pieter Abbeel. "Denoising diffusion probabilistic models." Advances in neural information processing systems 33 (2020): 6840-6851. [2] Ho, Jonathan, and Tim Salimans. "Classifier-Free Diffusion Guidance." NeurIPS 2021 Workshop on Deep Generative Models and Downstream Applications. 2021. [3] Rombach, Robin, et al. "High-resolution image synthesis with latent diffusion models." Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 2022.

Reviewer Rjho2024-08-11

I would thank the authors for the response, and will keep my score unchanged.

Authorsrebuttal2024-08-12

We sincerely thank the reviewer for taking the time to read our rebuttal. We believe we have adequately addressed all the concerns pointed out by the reviewer (especially weaknesses 1,2, and 3). We would thus kindly ask the reviewer to let us know which parts of our rebuttal they found unclear or unconvincing so that we could hopefully clarify them further before the end of the discussion period on Aug 13th.

Authorsrebuttal2024-08-13

Dear Reviewers and Area Chairs, We thank the reviewers as most of their concerns are important clarifying questions about our method and its relation to existing literature. We believe these are not weaknesses in our approach or the paper's soundness, as we have addressed in the rebuttals. In light of the discussions, we summarize the strengths of our paper in four aspects below: **Originality:** Utilizing constrained optimization with ELBO constraints to train diffusion models is unique to our work. Our rigorous theoretical characterization of the solution and convergence guarantees are also novel. In our rebuttals, we have further clarified key ways in which our approach stands apart from previous work referenced by reviewers. **Significance:** Significance of our work lies in providing a principled framework to ensure certain biases of data are not replicated by the generative model. The implications of our approach promoting sample diversity and extending our framework to state-of-art conditional diffusion models (see our responses to reviewers Rjho, c1z8 respectively) are directions to build on the foundation laid in this work. **Quality:** The theory and experiments validate our approach and reviewers appear to agree the paper is technically sound. We've addressed concerns regarding the scope of experiments by providing additional empirical results on more challenging data (noted by reviewer c1z8 in their response). **Clarity:** We appreciate the reviewers noting that the paper is well-written, well-motivated, and easy to follow. We have further addressed all clarifying questions from reviewers (noted by reviewers Zh95, c1z8 in their responses). We will include additional details to aid in reproducibility and clarity of experiments, namely hyper-parameter sensitivity analysis (like we provided in rebuttals for batch size) and comparison of computation costs. We humbly ask you to consider these points in the final evaluation of our paper. We would be happy to address any other concerns or questions. \ Thank you for your consideration, Authors of Submission 21568

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC