Improved Constrained Generation by Bridging Pretrained Generative Models

Xiaoxuan Liang, Saeid Naderiparizi, Yunpeng Liu, Berend Zwartsenberg, Frank Wood · 2026

Read Improved Constrained Generation by Bridging Pretrained Generative Models by Xiaoxuan Liang, Saeid Naderiparizi, Yunpeng Liu, Berend Zwartsenberg, Frank Wood (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2603-06742.txt.

Introduction

Liang and colleagues tackle constrained generation, where samples must land inside feasible regions like road maps while still looking realistic. Such regions rarely reduce to simple linear inequalities, so they tune a ready-made generator so its outputs stay inside the region and still look real. Experiments show their method differs from both tuned and tune-free constrained rivals, revealing a fresh trade-off between meeting constraints and keeping sample quality high.

Catalog record

CREATORXiaoxuan Liang, Saeid Naderiparizi, Yunpeng Liu, Berend Zwartsenberg, Frank Wood
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE63795
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2603.06742

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Improved Constrained Generation by Bridging Pretrained Generative Models Xiaoxuan Liang, Saeid Naderiparizi, Yunpeng Liu, Berend Zwartsenberg, Frank Wood Abstract Constrained generative modeling is fundamental to applications such as robotic control and autonomous driving, where models must respect physical laws and safety-critical constraints. In real-world settings, these constraints rarely take the form of simple linear inequalities, but instead complex feasible regions that resemble road maps or other structured spatial domains. We propose a constrained generation framework that generates samples directly within such feasible regions while preserving realism. Our method fine-tunes a pretrained generative model to enforce constraints while maintaining generative fidelity. Experimentally, our method exhibits characteristics distinct from existing fine-tuning and training-free constrained baselines, revealing a new compromise between constraint satisfaction and sampling quality. 1 Introduction Diffusion models ( Song & Ermon 2019 ; Ho et al. 2020 ; Song et al. 2021 ; Karras et al. 2022 ) and flow matching ( Liu et al. 2022 ; Albergo & Vanden-Eijnden 2022 ; Lipman et al. 2022 ) have emerged as powerful generative frameworks, achieving strong performance across a wide range of high-dimensional generation tasks ( Rombach et al. 2022 ) . Their success arises from learning a data-driven generative process that accurately captures complex distributions through denoising or velocity field prediction. However, when deployed in safety-critical or physics-constrained domains, such as robotic control ( Schulman et al. 2014 ; Carvalho et al. 2023 ) and autonomous driving ( Niedoba et al. 2024 ; Yang et al. 2024 ; Zheng et al. 2025 ) , samples produced by pretrained models often violate task-specific constraints, including collision avoidance and drivable area compliance. Addressing these violations is essential for deploying generative models in real-world systems. A key challenge in constrained generation is how to incorporate constraint information into the generative process without disrupting the learned data distribution. Many constraints encountered in practical domains are highly nonlinear and state-dependent, and are often specified implicitly via loss functions rather than explicit, closed-form feasible sets. In contrast, some recent constrained generation settings assume simple linear or explicitly parameterized constraints. For example, some works assume linear watermarking constraints ( Liu et al. 2023 ) or analytically defined feasibility regions in multi-agent planning ( Liang et al. 2025 ) , which admit direct projection or closed-form enforcement. Such assumptions, however, rarely hold in realistic scenarios where feasibility depends on complex geometry, interactions, or learned environment representations. Bridging this gap requires constraint signals that are defined in data space, expressive enough to capture complex feasibility criteria and simultaneously compatible with the dynamics of diffusion and flow-matching models. Motivated by these challenges, we propose a principled framework for constrained generative modeling that integrates implicit, loss-based constraints directly into the training dynamics of pretrained diffusion and flow-matching models. Rather than enforcing feasibility through explicit projection, our approach instead adapts the generative process to better align generated samples with constraint satisfaction. Our contributions are as follows: 1. We propose MBM++, a fine-tuning framework for constrained generative modeling. The method evaluates constraint losses on the one-step denoised estimate and uses the resulting guided vector to guide sampling. The guided vector is optimized jointly with the original denoising score matching or flow matching objective. Constraint information is injected via a lightweight MLP-based embedding, while the pretrained backbone remains fixed. The design enables stable constraint enforcement without explicit manifold projection. The framework applies to both diffusion and flow-matching models. We refer to this module as a bridge embedding. 2. We empirically show that MBM++ exhibits behavior distinct from both training-free guidance and fine-tuning baselines, revealing a different compromise between constraint satisfaction and sampling quality. (a) Standard Diffusion (b) Training-free Guidance (c) MBM++ (Ours) Figure 1: Qualitative comparison of constrained trajectory generation. We visualize samples from the same traffic intersection scene and timestep, where gray dot trajectories indicate ground-truth agent motion and orange trajectories denote model predictions. Panel 1(a) shows an unconstrained diffusion baseline, which exhibits both offroad and collision violations while executing a left turn. Panel 1(b) shows a training-free guided method, MPGD without projection ( He et al. 2024 ) that reduces violations but introduces noticeable trajectory distortion, including persistent offroad behavior and an abrupt acceleration during a right-turn maneuver toward the northeast, leading to a near-collision. Panel 1(c) shows our MBM++, which exhibits no offroad or collision violations while preserving realistic and coherent motion. All samples are generated from the same initial conditions. 2 Background Problem Setup A constrained generation problem is defined by an ambient sample space , a constraint set , and a target distribution supported on constraint set . Let {\mathcal{X}} denote the ambient sample space, and \Omega\subseteq{\mathcal{X}} denote the constraint set. A sample {\mathbf{x}}\in{\mathcal{X}} is “valid” only if {\mathbf{x}}\in\Omega , meaning it satisfies the problem constraints. Let p_{0}({\mathbf{x}}) denote an unknown data generating distribution supported on {\mathcal{X}} , from which we observe a collection of i.i.d. samples as a training dataset. In particular, p_{0} satisfies \int_{{\mathbf{x}}\in\Omega}p_{0}({\mathbf{x}})\,d{\mathbf{x}}=1 . Our goal is to learn a generative model p_{\theta} defined over the ambient sample space {\mathcal{X}} , such that its induced distribution concentrates on \Omega and matches the data distribution within the constraint set. We assume that \Omega is implicitly specified through a non-negative differentiable loss function \ell^{\Omega}:{\mathcal{X}}\rightarrow\mathbb{R}^{\geq 0} such that \ell^{\Omega}({\mathbf{x}})=0 if and only if {\mathbf{x}}\in\Omega . 2.1 Diffusion Models Diffusion models (DMs) ( Sohl-Dickstein et al. 2015 ; Ho et al. 2020 ; Song et al. 2021 ) are a class of generative models that learn to reverse a stochastic process to generate samples from a complex data distribution. They gradually transform data to pure noise through a forward process defined by a Stochastic Differential Equation (SDE) {\mathbb{P}}:d{\mathbf{x}}_{t}=f({\mathbf{x}}_{t};t)dt+\sigma(t)d{\mathbf{w}},\quad{\mathbf{x}}_{0}\sim p_{0}, (1) where {\mathbf{w}} is a standard Wiener process, and f and \sigma are predefined drift and diffusion functions. The process is constructed so that, for a sufficiently large T , the marginal distribution p_{T} approaches a simple prior \pi , typically a standard Gaussian. The time-reversed process of Equation 1 follows another SDE known as the reverse-time process ( Anderson 1982 ) , d{\mathbf{x}}_{t}=[f({\mathbf{x}}_{t};t)-\sigma^{2}(t)\nabla\log p_{t}({\mathbf{x}}_{t})]\,dt+\sigma(t)\,d\bar{{\mathbf{w}}}, (2) where {\mathbf{x}}_{T}\sim\pi and \bar{{\mathbf{w}}} is a reverse-time Wiener process. Since the score function \nabla_{{\mathbf{x}}_{t}}\log p_{t}({\mathbf{x}}_{t}) is generally intractable, diffusion models approximate it using a neural network s_{\theta}({\mathbf{x}}_{t},t) , trained via minimizing the denoising score matching (DSM) objective ( Vincent 2011 ) {\mathcal{L}}(\theta)=\mathbb{E}_{t,{\mathbf{x}}_{0},{\mathbf{x}}_{t}}\left[\lambda(t)\lVert s_{\theta}({\mathbf{x}}_{t},t)-\nabla_{{\mathbf{x}}_{t}}\log p_{t}({\mathbf{x}}_{t}\mid{\mathbf{x}}_{0})\rVert^{2}\right], (3) which is an expectation over t\sim U(t_{\mathrm{min}},T) for some positive t_{\mathrm{min}}\approx 0 , {\mathbf{x}}_{0} is drawn from the data distribution, and {\mathbf{x}}_{t}\sim p({\mathbf{x}}_{t}\mid{\mathbf{x}}_{0}) . Sampling is performed by numerically simulating the learned reverse-time SDE starting from {\mathbf{x}}_{T}\sim\pi(\cdot) : d{\mathbf{x}}_{t}=[f({\mathbf{x}}_{t};t)-\sigma^{2}(t)s_{\theta}({\mathbf{x}}_{t};t)]\,dt+\sigma(t)\,d\bar{{\mathbf{w}}}. (4) Moreover, diffusion models can be viewed as learning time-dependent dynamics that map a simple prior \pi to the data distribution. For Gaussian perturbations, the marginal score satisfies \displaystyle\nabla_{{\mathbf{x}}_{t}}\log p_{t}({\mathbf{x}}_{t})=\frac{\mathbb{E}\left[{\mathbf{x}}_{0}\mid{\mathbf{x}}_{t}\right]-{\mathbf{x}}_{t}}{\sigma^{2}(t)}, (5) where the posterior mean is defined as \mathbb{E}\left[{\mathbf{x}}_{0}\mid{\mathbf{x}}_{t}\right]=\int{\mathbf{x}}_{0}p({\mathbf{x}}_{0}\mid{\mathbf{x}}_{t})\,d{\mathbf{x}}_{0} . A derivation is provided in Appendix Section A.1 . This identity motivates a parameterization: rather than directly learning the score, we train a neural network parameterized by \theta to predict \mathbb{E}\left[{\mathbf{x}}_{0}\mid{\mathbf{x}}_{t}\right] , equivalently, a denoised estimate of the clean sample D_{\theta}({\mathbf{x}}_{t};t) . The score is then obtained by \displaystyle s_{\theta}({\mathbf{x}}_{t};t):=\frac{D_{\theta}({\mathbf{x}}_{t};t)-{\mathbf{x}}_{t}}{\sigma^{2}(t)}. (6) This conditional posterior mean parameterization will later allow us to draw connections to deterministic generative models. A detailed discussion of

Read the complete text