Decoupled Guidance Diffusion for Adaptive Offline Safe Reinforcement Learning

Rufeng Chen, Zhaofan Zhang, Zhejiang Yang, Hechang Chen, Sihong XiearXiv 2026

TL;DR

Safe Decoupled Guidance Diffusion (SDGD) tackles the challenge of adapting to changing safety budgets in offline reinforcement learning by treating safety and reward as fundamentally asymmetric objectives. By using classifier-free guidance to enforce cost limits and gradient guidance to optimize rewards, paired with a novel reward-relabeling strategy, SDGD achieves exceptional safety compliance and high performance without requiring model retraining.

What Problem Does This Paper Address?

Offline safe reinforcement learning (RL) aims to maximize task performance using pre-collected datasets while strictly adhering to safety constraints. In real-world deployments—such as robotics or autonomous driving—safety budgets are rarely static; they fluctuate based on changing operational conditions, user preferences, or unexpected real-time hazards.

Existing methods struggle with this dynamic adaptation for two main reasons:

  1. Autoregressive models generate trajectories step-by-step, allowing small local prediction errors to compound over long horizons, frequently leading to catastrophic safety violations.
  2. Diffusion-based planners generate entire trajectory segments jointly to avoid error accumulation, but they typically rely on separate cost classifiers to balance safety and reward gradients. Empirically, cost predictions on noisy, intermediate diffusion states are highly unstable and unreliable, leading to poor constraint satisfaction.
Figure 1: Motivation for SDGD. (a) Autoregressive planning suffers from accumulated rollout errors, while classifier-guided diffusion can be misled by inaccurate safety signals. SDGD decouples safety and reward guidance using CFG for safety enforcement and ∇R for reward optimization. (b) SDGD reduces rollout error compared with autoregressive generation. (c) Cost classifiers show low and unstable correlation with true cumulative cost, indicating unreliable safety guidance.

Methods

The authors introduce Safe Decoupled Guidance Diffusion (SDGD), which reinterprets safe trajectory generation as sampling from a constrained trajectory distribution. Crucially, they recognize a structural asymmetry: the safety budget acts as a hard restriction on the distribution's support (the allowed region), while the reward merely shapes preferences within that safe region.

SDGD implements this via two decoupled mechanisms during the reverse diffusion process:

  • Cost-Conditioned Classifier-Free Guidance (CFG): Instead of using a fragile cost classifier gradient, the diffusion model is directly conditioned on the deployment-time cost limit. CFG is applied to strongly bias the generative model toward producing trajectories that naturally fall within the safe budget.
  • Reward-Gradient Guidance ($\nabla R$): A separate reward predictor provides local gradient updates to refine the generated trajectories for higher returns.

Feasible Trajectory Relabeling (FTR)

Because high rewards and high costs are often correlated in offline datasets, direct reward guidance can inadvertently steer trajectories back into high-cost zones (known as reward-induced cost drift). To counter this, the authors introduce FTR.

In receding-horizon planning, only the first few steps (the executable prefix) of a planned trajectory are actually executed before replanning. FTR applies a severe penalty to trajectories that incur any cost within this immediate prefix during training. This reshapes the learned reward-gradient field, steering the planner away from immediate, uncorrectable risks while preserving its ability to optimize long-term rewards.

Datasets

The authors evaluated SDGD on the comprehensive DSRL (Datasets and Benchmarks for Offline Safe Reinforcement Learning) benchmark. This benchmark aggregates 38 distinct tasks across three simulation suites:

  • Safety-Gymnasium: Robot navigation and manipulation tasks with obstacles.
  • Bullet-Safety-Gym: Locomotion tasks (e.g., Ant, HalfCheetah) with safety limits.
  • MetaDrive: Composing diverse, realistic autonomous driving scenarios.

To ensure a rigorous evaluation, all methods were tested under a strict absolute cost limit of 10, which is significantly more demanding than the looser thresholds often used in standard DSRL protocols.

Key Insights and Ideas

  • Asymmetry is Key: Safety and reward should not be treated as competing gradient objectives. Safety defines where you can sample; reward defines what you prefer within that space. Decoupling them respects this mathematical reality.
  • Classifiers are Unreliable on Noise: Classifiers trained to predict the cumulative cost of partially denoised trajectories exhibit very low correlation with true costs. Moving safety into the generative model's conditioning via CFG completely bypasses this limitation.
  • Focus on the Executable Prefix: Trajectories with costs late in the horizon can be corrected by future denoising cycles and replanning. Costs in the immediate prefix cannot. FTR leverages this insight to penalize only immediate execution risks, preventing overly conservative behavior.

Key Results

  • Superior Safety Compliance: SDGD achieved the strongest safety compliance among all baselines, successfully satisfying the cost constraint on 94.7% of the tasks (36 out of 38).
  • Optimal Reward-Cost Trade-off: Among the methods that successfully remained safe, SDGD achieved the highest reward on 21 tasks, placing it firmly on the Pareto front.
Aggregate reward-cost performance across all 38 DSRL tasks, showing SDGD on the Pareto front.
  • Dynamic Adaptation: A single trained SDGD model successfully adapted to time-varying cost limits within a single episode (e.g., shifting the budget from 1 to 3 to 10 mid-run) without any retraining or fine-tuning.
  • High Efficiency: SDGD achieved a decision frequency of 2.1 Hz on an NVIDIA A6000 GPU, making it roughly twice as fast as prior diffusion-based safe planners like TREBI (1.1 Hz).

Limitations and Future Work

While SDGD represents a significant speedup over previous diffusion planners, its 2.1 Hz decision frequency is still slower than pure policy-based or actor-critic methods. This computational overhead could limit its immediate deployment in ultra-high-frequency robotic control loops.

The authors note that future work will focus on integrating faster sampling paradigms—such as consistency models—to accelerate trajectory generation, alongside validating the framework on physical hardware.

Summary updated

BibTeX
@misc{chen2026decoupled,
  author = {Rufeng Chen and Zhaofan Zhang and Zhejiang Yang and Hechang Chen and Sihong Xie},
  title = {{Decoupled Guidance Diffusion for Adaptive Offline Safe Reinforcement Learning}},
  year = {2026},
  eprint = {2605.02777},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.02777},
}
Figure