DiRecT: Safe Diffusion-Based Planning via Receding-Horizon Denoising
DiRecT employs receding-horizon denoising in diffusion models, enforcing constraints only at the final trajectory, significantly improving safety and performance.
Key Findings
Methodology
This paper introduces DiRecT, a training-free constrained sampling algorithm based on diffusion models. It formulates inference-time safety as a terminally constrained stochastic optimal control problem, avoiding overconstraining intermediate noisy samples. Inspired by model predictive control, the method predicts the final clean trajectory at each step, solves a constrained optimization in this predicted space, and updates the noisy sample accordingly. It leverages Tweedie’s formula for terminal state prediction and supports various optimizers and soft rewards, enabling flexible, high-quality safe trajectory generation while preserving the learned diffusion dynamics.
Key Results
- Extensive experiments on Maze2D, D3IL, multi-robot planning, and contact-rich manipulation show DiRecT achieves safety rates above 97%, collision violations below 1, task success rates over 95%, and average inference times under 0.7 seconds, outperforming baselines like Projected Diffusion and SafeDiffuser-RoS.
- In Maze2D narrow environments, DiRecT attains a safety rate of 0.94 with only 0.23 violations on average, demonstrating robustness in complex scenarios. Multi-robot tests with up to 20 agents show safety exceeding 98%, with 100% task success, indicating excellent scalability.
- In robotic manipulation, DiRecT effectively avoids obstacles and maintains high task success, with real-time inference, confirming its practical applicability in safety-critical tasks.
Significance
This work addresses the core challenge of enforcing safety constraints in diffusion-based planning, overcoming the limitations of intermediate sample restrictions. By focusing constraints solely on the final trajectory, DiRecT maintains high sample quality and safety guarantees. Its training-free, flexible design broadens the applicability to autonomous navigation, robotic control, and multi-agent systems, marking a significant advance in safe generative control. The approach reduces deployment barriers and enhances robustness in real-world scenarios, promising widespread impact in safety-critical AI applications.
Technical Contribution
The paper introduces a novel framework combining stochastic optimal control with diffusion models, employing a receding-horizon strategy to handle terminal constraints efficiently. It decouples denoising from constraint satisfaction, enabling scalable optimization in high-dimensional spaces. The method supports multiple optimizers and soft rewards, providing a versatile tool for safe planning. Theoretical guarantees ensure the feasibility of the final sample, and extensive experiments validate its effectiveness across diverse tasks, setting a new standard for safe diffusion-based control.
Novelty
This is the first approach to formulate diffusion model inference as a terminally constrained stochastic optimal control problem, leveraging a receding-horizon surrogate to avoid the restrictive constraints on intermediate noisy samples. Unlike prior soft guidance or per-step projection methods, DiRecT guarantees constraint satisfaction only at the end, preserving sample diversity and quality. Its training-free, flexible design and theoretical guarantees represent a significant innovation, filling a critical gap in safe generative modeling.
Limitations
- The algorithm's computational cost increases with environment complexity and high-dimensional state spaces, potentially limiting real-time deployment in very large-scale problems.
- Dependence on environment priors and model accuracy can affect constraint satisfaction if the environment model is inaccurate or incomplete.
- In highly nonlinear or non-convex scenarios, the constrained optimization may struggle to converge, requiring more advanced solvers or approximations.
Future Work
Future directions include integrating learning-based environment models for adaptive planning, accelerating optimization via learned heuristics, and extending the framework to multi-agent cooperative scenarios. Additionally, exploring end-to-end training strategies to further improve efficiency and robustness in real-world applications remains a promising avenue.
AI Executive Summary
Diffusion models have revolutionized generative tasks, but their application in safety-critical planning faces hurdles due to the inherent stochasticity and the challenge of enforcing hard constraints. Traditional approaches often impose constraints at every denoising step, which can overconstrain the process and degrade sample quality. To address this, the authors propose DiRecT, a novel algorithm that enforces safety constraints only on the final trajectory, inspired by model predictive control principles.
DiRecT formulates the inference-time constrained sampling as a terminally constrained stochastic optimal control problem. It predicts the final clean trajectory at each denoising step using Tweedie’s formula, then solves a constrained optimization problem to refine this prediction. The resulting update guides the noisy sample toward a feasible, safe final trajectory without distorting the learned diffusion dynamics. This decoupling of denoising and constraint satisfaction allows for flexible integration of various optimizers and soft rewards, making the method highly adaptable.
Experimental results across multiple robotic and planning benchmarks demonstrate DiRecT’s superior safety and task success rates. In maze navigation, it achieves safety rates above 97%, with collision violations near zero, outperforming existing baselines. In multi-robot scenarios with up to 20 agents, it maintains safety above 98% and 100% task success, showcasing excellent scalability. Robotic manipulation tasks confirm its ability to avoid obstacles while ensuring task completion in real-time.
This work significantly advances the deployment of diffusion models in safety-critical applications. By focusing constraints on the final outcome, it preserves sample quality and provides strong safety guarantees. Its training-free, flexible design broadens the scope of diffusion-based planning, promising impactful applications in autonomous systems, robotics, and beyond. Future research will explore environment model integration, faster optimization, and multi-agent extensions, further pushing the boundaries of safe generative control.
Deep Analysis
Background
扩散模型近年来在图像生成、路径规划等领域取得显著成功,代表算法如DDPM、Score-based Models等在高质量样本生成中表现优异。然而,应用到安全规划时,面临如何确保生成轨迹满足硬性约束的挑战。传统方法如逐步投影或软引导,在每个去噪步骤强制满足约束,导致样本质量下降,难以在复杂环境中实现可靠控制。近年来,学界开始尝试结合随机最优控制思想,将路径规划问题转化为终点受约束的优化问题,但多在低维或简化环境中验证,缺乏高维复杂场景的实用方案。本文基于此背景,提出只在终点施加硬约束的扩散采样新框架,旨在突破现有限制,提升安全性和样本质量。
Core Problem
在扩散模型路径规划中,核心难题是如何在保证轨迹安全的同时,避免中间噪声样本的过度限制。传统方法在每个去噪步骤强制满足约束,导致样本多样性和生成质量下降,且难以应对复杂多目标环境。受噪声随机性影响,难以确保最终轨迹的安全性。现有硬约束方法缺乏灵活性,不能兼顾多目标软奖励,限制了其在实际场景中的应用。如何设计一种只在终点施加硬约束、同时保持高质量生成的策略,成为亟待解决的关键问题。
Innovation
本文创新点在于提出一种只在终点施加硬约束的扩散采样框架,利用模型预测控制思想,将复杂的全局受约束问题分解为递归的子优化问题。每步预测终点状态,优化调整噪声样本,使最终轨迹满足约束,同时保持扩散模型的生成特性。该方法通过引入Tweedie公式,支持多种优化器和软奖励,极大增强了算法的灵活性和实用性。理论上,证明了最终样本的可行性,实验证明其在复杂环境中的优越表现,填补了安全差分规划的研究空白。
Methodology
- �� 使用连续时间扩散模型,定义正向噪声过程和反向生成过程。
- �� 利用Score网络近似反向SDE中的梯度信息,生成样本。
- �� 将受约束采样问题转化为终点受约束的随机最优控制问题,只在终点施加硬约束。
- �� 引入模型预测控制思想,逐步预测终点状态,并在每一步优化预测轨迹。
- �� 通过Tweedie公式预测终点状态,优化调整噪声样本,确保轨迹满足约束。
- �� 将复杂高维问题分解为一系列可解的子优化问题,支持多种优化器和软奖励。
- �� 在每一步中,利用优化结果引导噪声样本逐步逼近安全轨迹,保持生成多样性和高质量。
Experiments
设计了Maze2D、D3IL、多机器人路径规划和接触操控等多个任务,评估算法在安全性、任务成功率和计算效率上的表现。采用真实模拟环境,比较了DiRecT与Projected Diffusion、SafeDiffuser-RoS等基线方法。指标包括碰撞违规次数、成功率、平均推理时间和软约束满足情况。调优超参数如采样步数、优化器类型和软奖励权重,确保公平性。多场景测试验证了算法的鲁棒性和扩展性,展示其在复杂环境中的优越性能。
Results
在Maze2D狭窄环境中,DiRecT实现了97%以上的安全率,碰撞违规率低于1%,任务成功率超过95%,明显优于Projected Diffusion(安全率约78%)和SafeDiffuser-RoS(安全率约66%)。多机器人路径规划中,随着机器人数量增加至20,安全率仍保持在98%以上,任务成功率达100%。在操控任务中,DiRecT能在实时条件下避障并完成任务,平均推理时间控制在0.7秒以内,验证其实用性。整体结果显示,该方法在复杂、多目标、多约束环境中具有强大优势。
Applications
该方法适用于自主导航、工业机器人路径规划、无人机飞行控制等安全关键场景。只需预训练扩散模型,结合环境先验和软奖励,即可实现高可靠性路径生成。其无训练特性降低部署门槛,支持多目标、多约束任务,极大拓展了生成模型在实际控制中的应用空间。未来可结合环境感知和学习,推动自主系统的安全自主决策,提升工业自动化和无人系统的安全性。
Limitations & Outlook
当前算法在极端复杂或高维环境中,计算成本较高,优化过程可能收敛缓慢。对环境模型的依赖较强,模型误差可能影响最终约束满足。非线性或非凸场景下,优化难度增加,需改进算法的收敛性和效率。未来需结合学习优化策略,提升算法的实用性和鲁棒性,扩展到更复杂的多智能体系统和动态环境。
Plain Language Accessible to non-experts
想象你在玩一个超级复杂的迷宫游戏,你的目标是安全到达出口。以前的方法就像每走一步都要检查是否撞到墙,太麻烦,也容易迷路。而这个新方法像是你提前用地图规划好路线,只在快到终点时再确认路线是否安全。你可以自由走动,不用每步都担心,只在最后确认一次。它用一种聪明的策略,预测到终点,然后每一步逐步调整,确保最后安全到达。这样既快又稳,就像你用一个神奇的导航系统,帮你避开所有障碍,顺利到家。这让游戏变得更简单,也更有趣。
ELI14 Explained like you're 14
想象你在玩一个超级难的游戏,你要穿越一个迷宫,不能碰到任何障碍。以前的方法就像每走一步都要不停检查,怕撞到墙,太烦了。而这个新方法像是你提前用地图规划好路线,只在快到出口时检查一次,确保安全。你可以随意走,享受游戏的过程,只在最后确认路线没问题。这就像你有个神奇的助手,帮你预测终点,然后一步步调整路线,确保安全到达。这样你既不用担心每一步,又能顺利完成任务。是不是很酷?
Abstract
Diffusion models have emerged as powerful tools for planning and control by learning multimodal distributions over actions and trajectories. Yet reliable inference-time safety enforcement remains a key barrier to their deployment in safety-critical tasks. Existing approaches typically project each denoising iterate onto the feasible set, even though constraints are defined only on the final clean trajectory. Enforcing feasibility on noisy intermediate samples can therefore overconstrain the sampling dynamics, substantially degrading sample quality. To address this limitation, we introduce DiRecT (Diffusion-based planning via Receding-horizon denoising with Terminal constraints), a training-free algorithm for constrained sampling from diffusion models via stochastic optimal control (SOC). DiRecT enforces constraints only on the final clean sample, avoiding unnecessary restrictions on the intermediate denoising dynamics. Inspired by model predictive control, we derive a principled receding-horizon surrogate for the otherwise intractable constrained SOC formulation, yielding an efficient algorithm that cleanly separates stochastic denoising from constraint satisfaction, progressively steering samples toward feasible final trajectories without distorting the learned diffusion dynamics. Furthermore, DiRecT is highly flexible: it can leverage off-the-shelf or domain-specific optimizers, incorporate priors over environment dynamics, and optimize additional soft rewards. Extensive experiments on safe planning benchmarks demonstrate that DiRecT substantially improves deployment safety and task performance over existing diffusion-based planning baselines.