TL;DR
The paper introduces Constraint-Aware Diffusion Guidance (CoDiG), a framework that integrates lightweight barrier functions into the denoising process of diffusion models to guarantee safety at inference time. By combining this with a novel warm-start strategy, the authors achieve real-time (2.5 Hz) trajectory generation and 100% successful obstacle avoidance on a physical autonomous racing car using minimal training data.
What Problem Does This Paper Address?
Generative diffusion models have become highly popular in robotics due to their ability to model complex, multimodal data distributions. However, standard diffusion models lack inherent constraint-awareness. They are typically trained on offline datasets and struggle to guarantee safety or physical feasibility when encountering out-of-distribution scenarios or dynamic environments.
To make matters worse, training a diffusion model to inherently respect safety boundaries requires massive, expensive expert datasets. Even then, if the environment changes at test time (e.g., a new obstacle appears), the model often fails. This paper tackles the challenge of enforcing strict safety and physical constraints during inference, allowing robots to plan safe trajectories in real-time without requiring massive datasets or retraining.
Methods
The authors propose CoDiG, which modifies the standard reverse-time Stochastic Differential Equation (SDE) used in score-based diffusion models.
- Barrier Function Guidance: Instead of relying on the neural network alone to generate safe paths, CoDiG injects the gradient of a lightweight barrier function directly into the score updates during the denoising process. This acts as a differentiable potential field, continuously pushing the generated samples away from unsafe zones (like obstacles or track boundaries).
- Progressive Scheduling: Applying constraints to pure noise early in the diffusion process is counterproductive. CoDiG uses a time-varying weight ($\gamma_t$) that starts at zero and gradually increases as the sample becomes less noisy, ensuring sampling stability.
- Warm-Start Strategy: Standard diffusion models generate trajectories from scratch (pure Gaussian noise) at every control loop iteration, which is computationally prohibitive for real-time control. CoDiG's warm-start strategy takes the trajectory from the previous time step, perturbs it with a small amount of noise, and uses it as the initialization for the next iteration. This slashes the required denoising steps from 1000 down to just 50.
The architecture relies on a time-conditioned U-Net backbone to process spatial-temporal representations of the trajectory.
Datasets
To train the base diffusion model, the authors developed a highly data-efficient pipeline:
- Core Expert Data: They solved an offline, time-optimal control problem to generate just 100 expert trajectories with randomly placed obstacles. Because each optimization takes roughly 10 minutes to solve, collecting more data directly was impractical.
- Redundant Obstacle Augmentation: To scale the dataset without running the expensive optimization solver again, they randomly placed "redundant" obstacles in safe regions of the track that did not interfere with the already computed optimal path. This expanded the dataset to 10,000 trajectories.
Trajectories were transformed into a local Frenet coordinate system (lateral displacement and yaw angle relative to the track center line), intentionally discarding global track curvature to maximize the model's ability to generalize to unseen track layouts.
Key Insights and Ideas
- Separation of Concerns: Trying to bake safety directly into neural network weights makes the model rigid. By handling constraints at inference time via barrier gradients, the base model only needs to learn general driving behavior, while the barrier function handles dynamic, real-time environmental changes.
- The Frenet Frame Trade-off: Training the model in a local Frenet frame allows it to generalize to entirely new tracks and arbitrary obstacles. However, it loses global curvature awareness. The authors elegantly solve this by using the second part of their barrier function to penalize deviations from a nominal, offline-computed time-optimal path.
- Warm-Starting is Essential for Robotics: The temporal consistency gained by warm-starting doesn't just speed up computation; it also stabilizes the control loop by preventing wild variances between consecutive planned trajectories.
Key Results
- Real-Time Performance: On a computer equipped with an NVIDIA RTX 4090 GPU, the warm-start strategy accelerated the sampling frequency from an unusable 0.25 Hz to 2.5 Hz (a 10x speedup).
- Hardware Validation: CoDiG was deployed on a physical, down-scaled autonomous racing car. The planned trajectories were successfully executed by a Tracking Model Predictive Control (TMPC) loop.
- 100% Safety Record: Across 5 experimental trials consisting of 15 laps each, spanning 10 different static and dynamic obstacle configurations, CoDiG achieved a 100% success rate in obstacle avoidance while maintaining near time-optimal lap speeds.
Limitations and Future Work
While highly effective, the authors note a few trade-offs introduced by their acceleration methods:
- Coarser Trajectories: Because the warm-start method uses only 50 denoising steps, the resulting trajectory profiles can be slightly coarser than those generated by a full 500-step standard diffusion process.
- Local Minima: The warm-start mechanism naturally biases the planner toward paths close to the previous iteration's output. In highly dynamic scenarios, this conservatism can cause the planner to get stuck in a local minimum rather than finding a globally distinct, superior path.
Future Work: The authors plan to extend this framework from generating state trajectories to directly outputting high-dimensional, multimodal control inputs (actions), bypassing the need for a separate tracking controller.
Summary updated