Table of Contents
Fetching ...

Diffusion Models as Constrained Samplers for Optimization with Unknown Constraints

Lingkai Kong, Yuanqi Du, Wenhao Mu, Kirill Neklyudov, Valentin De Bortoli, Dongxia Wu, Haorui Wang, Aaron Ferber, Yi-An Ma, Carla P. Gomes, Chao Zhang

TL;DR

This work tackles optimization under unknown constraints by learning the feasible data manifold with diffusion models and reframing the problem as sampling from a product of the data density and a Boltzmann objective $\pi_\beta(x) \propto p(x) \exp[-\beta h(x)]$. It introduces two diffusion-based strategies: a differentiable-objective two-stage method combining guided diffusion and Langevin dynamics, and a derivative-free approach based on iterative self-normalized importance sampling with diffusion-guided proposals. The method, DiffOPT, is validated on a synthetic Branin task, offline DesignBench problems, and a multi-objective molecule-optimization task, achieving competitive or superior performance to state-of-the-art baselines and supporting high sample validity. Overall, DiffOPT provides a principled framework to enforce feasibility via data priors while converging toward low-objective samples, with practical implications for high-dimensional design problems where explicit constraints are unavailable.

Abstract

Addressing real-world optimization problems becomes particularly challenging when analytic objective functions or constraints are unavailable. While numerous studies have addressed the issue of unknown objectives, limited research has focused on scenarios where feasibility constraints are not given explicitly. Overlooking these constraints can lead to spurious solutions that are unrealistic in practice. To deal with such unknown constraints, we propose to perform optimization within the data manifold using diffusion models. To constrain the optimization process to the data manifold, we reformulate the original optimization problem as a sampling problem from the product of the Boltzmann distribution defined by the objective function and the data distribution learned by the diffusion model. Depending on the differentiability of the objective function, we propose two different sampling methods. For differentiable objectives, we propose a two-stage framework that begins with a guided diffusion process for warm-up, followed by a Langevin dynamics stage for further correction. For non-differentiable objectives, we propose an iterative importance sampling strategy using the diffusion model as the proposal distribution. Comprehensive experiments on a synthetic dataset, six real-world black-box optimization datasets, and a multi-objective molecule optimization dataset show that our method achieves better or comparable performance with previous state-of-the-art baselines.

Diffusion Models as Constrained Samplers for Optimization with Unknown Constraints

TL;DR

This work tackles optimization under unknown constraints by learning the feasible data manifold with diffusion models and reframing the problem as sampling from a product of the data density and a Boltzmann objective . It introduces two diffusion-based strategies: a differentiable-objective two-stage method combining guided diffusion and Langevin dynamics, and a derivative-free approach based on iterative self-normalized importance sampling with diffusion-guided proposals. The method, DiffOPT, is validated on a synthetic Branin task, offline DesignBench problems, and a multi-objective molecule-optimization task, achieving competitive or superior performance to state-of-the-art baselines and supporting high sample validity. Overall, DiffOPT provides a principled framework to enforce feasibility via data priors while converging toward low-objective samples, with practical implications for high-dimensional design problems where explicit constraints are unavailable.

Abstract

Addressing real-world optimization problems becomes particularly challenging when analytic objective functions or constraints are unavailable. While numerous studies have addressed the issue of unknown objectives, limited research has focused on scenarios where feasibility constraints are not given explicitly. Overlooking these constraints can lead to spurious solutions that are unrealistic in practice. To deal with such unknown constraints, we propose to perform optimization within the data manifold using diffusion models. To constrain the optimization process to the data manifold, we reformulate the original optimization problem as a sampling problem from the product of the Boltzmann distribution defined by the objective function and the data distribution learned by the diffusion model. Depending on the differentiability of the objective function, we propose two different sampling methods. For differentiable objectives, we propose a two-stage framework that begins with a guided diffusion process for warm-up, followed by a Langevin dynamics stage for further correction. For non-differentiable objectives, we propose an iterative importance sampling strategy using the diffusion model as the proposal distribution. Comprehensive experiments on a synthetic dataset, six real-world black-box optimization datasets, and a multi-objective molecule optimization dataset show that our method achieves better or comparable performance with previous state-of-the-art baselines.
Paper Structure (30 sections, 5 theorems, 41 equations, 9 figures, 6 tables, 3 algorithms)

This paper contains 30 sections, 5 theorems, 41 equations, 9 figures, 6 tables, 3 algorithms.

Key Result

Proposition 1

Assume that $h \in \mathrm{C}^3(\mathbb{R}^d, \mathbb{R})$. Assume that $\{x_i^\star\}_{i=1}^M$ is the set of minimizers of $h$. Let $p$ be a density on $\mathbb{R}^d$ such that there exists $i_0 \in \{1, \dots, M\}$ with $p(x_{i_0}^\star) > 0$. Then $Q_\beta$ the distribution with density w.r.t the with $a_i = p(x_i^\star) \det(\nabla^2 h(x_i^\star))^{-1/2}$.

Figures (9)

  • Figure 1: Constrained optimization as a sampling from the product of densities. That is, we minimize the objective function $h(x)$ (red stars denote the minimizers) within the feasible set $C$, which is given by samples $\{x_i\}_{i=1}^N \sim p(x)$. This problem is equivalent to sampling from the density $\pi_\beta(x) \propto p(x) \exp[-\beta h(x)]$, which concentrates around minimizers of $h(x)$ within the feasible set $C$. The distribution we sample from is shown on the left and the trajectory we take to sample is shown on the right.
  • Figure 2: Sampling trajectory of DiffOPT in the synthetic Branin experiment with unknown constraints. Red stars denote the minimizes, and the blue region denotes the feasible space from which training data is sampled. DiffOPT can effectively navigate towards the two feasible minimizers.
  • Figure 3: Sampling trajectory of DiffOPT in the synthetic Branin experiment with additional known constraints. Red stars denote the minimizers, the blue region denotes the feasible space from which training data is sampled and the pink region denotes the feasible space defined by the added given constraints. DiffOPT can effectively navigate towards the unique minimizer at the intersection of the two feasible spaces.
  • Figure 4: Impact of annealing strategies and $\beta_{\rm max}$ in the guided diffusion stage. $\beta_{\rm max}$ is the value of $\beta$ at the end of annealing.
  • Figure 5: Branin function.
  • ...and 4 more figures

Theorems & Definitions (8)

  • Proposition 1
  • Theorem 1
  • Proposition 2
  • proof
  • Proposition 3
  • proof
  • Proposition 4
  • proof