{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/arxiv-2606-15359","title":"DiRecT: Safe Diffusion-Based Planning via Receding-Horizon Denoising","arxiv_id":"2606.15359","date":"2026-06-13","proceeding":null,"authors":["Paolo Giaretta","Zeyang Li","Navid Azizan"],"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.","url_abs":"https://arxiv.org/abs/2606.15359","url_pdf":"https://arxiv.org/pdf/2606.15359","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2606.15359","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2606.15359"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/azizanlab/DiRecT","reach":null}],"summary":{"ran_draft_wrong":1,"ran":8,"unverified":3},"by_repo_kind":{"found_in_text":{"samples":12,"ran":9,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"b3d593fb33f79ac5","entry":"apply_conditioning","repo":"azizanlab/DiRecT","repo_kind":"found_in_text","path":"d3il/model.py","file_url":"https://github.com/azizanlab/DiRecT/blob/HEAD/d3il/model.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b3d593fb33f79ac5"}},{"code_sha256_prefix":"67e0bf797f8c5a5e","entry":"apply_overrides","repo":"azizanlab/DiRecT","repo_kind":"found_in_text","path":"maze2d/config.py","file_url":"https://github.com/azizanlab/DiRecT/blob/HEAD/maze2d/config.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"67e0bf797f8c5a5e"}},{"code_sha256_prefix":"74155c61aeefe6d1","entry":"check_violation","repo":"azizanlab/DiRecT","repo_kind":"found_in_text","path":"d3il/obstacles.py","file_url":"https://github.com/azizanlab/DiRecT/blob/HEAD/d3il/obstacles.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"74155c61aeefe6d1"}},{"code_sha256_prefix":"7011797bad785f0e","entry":"cosine_beta_schedule","repo":"azizanlab/DiRecT","repo_kind":"found_in_text","path":"maze2d/unet.py","file_url":"https://github.com/azizanlab/DiRecT/blob/HEAD/maze2d/unet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7011797bad785f0e"}},{"code_sha256_prefix":"9ed6876e93030387","entry":"count_constraints","repo":"azizanlab/DiRecT","repo_kind":"found_in_text","path":"d3il/obstacles.py","file_url":"https://github.com/azizanlab/DiRecT/blob/HEAD/d3il/obstacles.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9ed6876e93030387"}},{"code_sha256_prefix":"884297d5659039e2","entry":"pad_t_like_x","repo":"azizanlab/DiRecT","repo_kind":"found_in_text","path":"maze2d/diffusion.py","file_url":"https://github.com/azizanlab/DiRecT/blob/HEAD/maze2d/diffusion.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"884297d5659039e2"}},{"code_sha256_prefix":"be2c8012ad7ef8bc","entry":"parse_args","repo":"azizanlab/DiRecT","repo_kind":"found_in_text","path":"maze2d/config.py","file_url":"https://github.com/azizanlab/DiRecT/blob/HEAD/maze2d/config.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"be2c8012ad7ef8bc"}},{"code_sha256_prefix":"ea95f69594dd2e9c","entry":"parse_maze","repo":"azizanlab/DiRecT","repo_kind":"found_in_text","path":"maze2d/d4rl/maze_model.py","file_url":"https://github.com/azizanlab/DiRecT/blob/HEAD/maze2d/d4rl/maze_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ea95f69594dd2e9c"}},{"code_sha256_prefix":"d5f32b4735abfc33","entry":"to_np","repo":"azizanlab/DiRecT","repo_kind":"found_in_text","path":"maze2d/unet.py","file_url":"https://github.com/azizanlab/DiRecT/blob/HEAD/maze2d/unet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d5f32b4735abfc33"}},{"code_sha256_prefix":"7646c45e520c6b9b","entry":"extract","repo":"azizanlab/DiRecT","repo_kind":"found_in_text","path":"maze2d/unet.py","file_url":"https://github.com/azizanlab/DiRecT/blob/HEAD/maze2d/unet.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7646c45e520c6b9b"}},{"code_sha256_prefix":"54232f8ef1f294f5","entry":"load_config","repo":"azizanlab/DiRecT","repo_kind":"found_in_text","path":"maze2d/config.py","file_url":"https://github.com/azizanlab/DiRecT/blob/HEAD/maze2d/config.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"54232f8ef1f294f5"}},{"code_sha256_prefix":"833ce25fac15ba58","entry":"point_maze","repo":"azizanlab/DiRecT","repo_kind":"found_in_text","path":"maze2d/d4rl/maze_model.py","file_url":"https://github.com/azizanlab/DiRecT/blob/HEAD/maze2d/d4rl/maze_model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"833ce25fac15ba58"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}