Integration Matters: Rollout-Based Training for Constrained Diffusion Models

Xiaoxuan Liang, Saeid Naderiparizi, Berend Zwartsenberg, Frank WoodarXiv 2026

TL;DR

Enforcing physical or safety constraints in diffusion models usually requires a painful trade-off: you either get realistic samples that violate constraints, or safe samples with highly distorted, jittery dynamics. This paper introduces IMCD (Integration Matters for Constrained Diffusion), a fine-tuning framework that trains diffusion models by backpropagating through an online simulation of the actual sampling process. By aligning training with inference, IMCD eliminates constraint violations while preserving smooth, realistic data distributions.

What Problem Does This Paper Address?

Diffusion models excel at generating high-quality data, from images to robotic trajectories. However, many real-world applications require adherence to strict feasibility constraints—such as avoiding obstacles in robotics or staying on the road in autonomous driving. Standard diffusion models are blind to these rules because they are trained solely to reverse a random noising process.

To fix this, existing methods generally fall into two camps:

  1. Training-time optimization: Fine-tuning the model using constraint losses evaluated on forward-noised states.
  2. Sampling-time correction: Modifying the trajectory at inference time by nudging intermediate steps toward valid regions using constraint gradients.

The authors identify a fundamental flaw in both approaches. Training on forward-noised states creates a misalignment because these states stay close to the clean data manifold and rarely experience the severe constraint violations that accumulate during actual sampling. Conversely, forcing corrections only at inference time introduces a massive distribution shift, pushing the model into unfamiliar territory and causing unnatural artifacts (like jerky, erratic movements in generated trajectories).

Methods

The core idea behind IMCD is simple yet powerful: train the model exactly how it samples.

Instead of evaluating constraints on artificial forward-noised data, IMCD runs an online reverse rollout (sampling from pure Gaussian noise) during each training step.

[Pure Noise] ---> (Denoising Rollout Trajectory) ---> [Terminal Sample] ---> Evaluate Constraint Loss
       ^                                                                               |
       |_______________________ Backpropagate through full trajectory _________________|

Key technical components include:

  • Differentiable Rollouts: The framework treats the entire numerical integration of the denoising process as a chain of differentiable maps. It evaluates the constraint loss $\ell^\Omega$ on the terminal generated sample ($x_0$) and backpropagates the gradients all the way through the sampling trajectory to update the model.
  • Learnable Scaling Network: Rather than relying on a hand-tuned, fixed schedule for constraint guidance, IMCD learns a dynamic scaling function $\gamma_\phi(x_t, t)$ that automatically adapts the correction strength based on both the current state $x_t$ and the noise level $t$.
  • Parameter-Efficient Fine-Tuning: To ensure the model doesn't forget its underlying data distribution, the pretrained diffusion backbone is frozen. The constraint-awareness is injected via lightweight LoRA adapters and gradient embeddings.
  • Symmetric Gradient Projection: When dealing with multiple conflicting constraints (e.g., avoiding a wall vs. avoiding another agent), IMCD uses a projection technique inspired by PCGrad to eliminate destructive interference between constraint gradients.

Datasets

The authors validated IMCD on two challenging environments:

  1. Bouncing Balls: A synthetic physics simulation containing 100,000 scenarios of 10 balls moving inside a box. The model must learn the distribution of trajectories while satisfying two hard constraints: boundary constraints (staying inside the box) and overlap constraints (not passing through each other).
  2. INTERACTION Dataset: A real-world dataset containing complex multi-agent vehicle trajectories from various traffic scenarios (roundabouts, intersections, merging lanes). The model predicts a 3-second future horizon given 1 second of history, subject to offroad avoidance and collision avoidance constraints.

Key Insights and Ideas

  • The Forward-Backward Discrepancy: The authors demonstrate empirically that forward-noised states drastically underestimate the constraint violations encountered during actual sampling. As shown in Figure 1, the infraction loss on reverse sampling states remains high until the very end, whereas forward states drop to near-zero quickly. Training on forward states leaves the model completely unprepared for inference.
Figure 1: Infraction loss of the one-step lookahead prediction as a function of intermediate state xt and noise level t, comparing forward process samples and reverse-time sampling states. Shaded regions denote ±0.2 standard deviations.
  • Avoiding the "Jitter" Tax: Test-time correction methods (like MPGD) can successfully enforce constraints, but they do so by aggressively jerking the samples back into valid regions at the last second. This ruins the physical plausibility of the motion. By training through the rollout, IMCD learns to generate trajectories that are inherently smooth and naturally avoid violations from the start.

Key Results

Bouncing Balls Experiment

IMCD achieved near-perfection in constraint satisfaction without sacrificing physical realism:

  • Constraint Violations: Reduced boundary and overlap violation rates to 0.01%, matching or beating test-time correction methods.
  • Physical Plausibility: Metrics measuring temporal consistency (F2F) and kinetic energy conservation (MED) remained close to the ground truth. In contrast, test-time correction baselines exhibited massive energy deviations (MED of 29.7 vs. IMCD's 0.6), indicating highly unrealistic, jittery motion.
Figure 2: Generated versus ground-truth bouncing ball trajectories.

Traffic Scene Prediction

On the highly complex DR_DEU_Merging_MT scenario from the INTERACTION dataset:

  • IMCD eliminated collisions entirely (0.00% rate) and slashed offroad violations to 0.30% (down from 9.03% in the unconstrained baseline).
  • Competitors like MBM++ still suffered from a 3.73% offroad violation rate, while reinforcement learning-based fine-tuning (DPOK) severely degraded trajectory prediction accuracy.

Limitations and Future Work

While IMCD marks a major step forward, it has a couple of notable limitations:

  • Computational Overhead: Backpropagating through the entire denoising trajectory during training requires gradient checkpointing to manage memory, and calculating constraint gradients during inference still adds modest computational overhead.
  • Future Directions: The authors suggest exploring distillation techniques, where a standalone denoiser network learns to internalize the constraint-aware updates directly, eliminating the need to compute constraint gradients at test time altogether. They also plan to scale this rollout-based fine-tuning to higher-dimensional visual domains.

Summary updated

BibTeX
@misc{liang2026integration,
  author = {Xiaoxuan Liang and Saeid Naderiparizi and Berend Zwartsenberg and Frank Wood},
  title = {{Integration Matters: Rollout-Based Training for Constrained Diffusion Models}},
  year = {2026},
  eprint = {2607.14398},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.14398},
}
Figure