betaFeedback

WorksComputer Science

MA-SafeDiffuser: Safe Multi-Agent Planning with Diffusion Probabilistic Models

Abstract

We propose MA-SafeDiffuser, a multi-agent extension of SafeDiffuser that equips diffusion-based trajectory planners with finite-time diffusion invariance guarantees for joint-agent safety specifications. Building on the single-agent construction that embeds control barrier function (CBF) constraints into reverse-diffusion updates, we: (i) formalize joint safe sets as intersections of per-agent and pairwise barrier sets; (ii) derive centralized and decentralized (communication-aware) constrained denoising procedures with provable invariance under mild assumptions; (iii) address local-trap and deadlock phenomena via time-varying specifications and liveness CBFs; and (iv) develop a lightweight benchmarking suite including a multi-agent Maze2D domain. Empirically, MA-SafeDiffuser reduces violation counts relative to unconstrained diffusion baselines, while retaining planning quality. We provide algorithms, proofs, and reference implementations.

Introduction

Diffusion probabilistic models (DDPMs) [10] were recently proposed as a powerful class of generative models whose iterative denoising dynamics can be repurposed for trajectory synthesis and planning. Recent exciting work such as Diffuser [11] and subsequent follow-ups on classifier/energy guidance [5] demonstrate that diffusion models can indeed produce long-horizon behaviors that emulates task-level structure and can also leverage heterogeneous offline experience. When applied casually, however, unconstrained denoising provides no formal safety guarantees: for instance, an optimized sample may graze or penetrate obstacles, violate actuation limits, or collide with other agents.

Extension from diffusion to safe diffusion. The SafeDiffuser framework [20] addresses this issue in the single-agent setting by embedding Control Barrier Function (CBF) inequalities [1] into each reverse step of the diffusion process. Conceptually, the unconstrained denoiser proposes an update and a safety projector modifies it to satisfy linearized CBF rows; an execution-time filter then mirrors the same CBF constraints in receding horizon. This yields finite-time diffusion invariance for the safe set while retaining the modeling flexibility of diffusion planning. Extensions of CBFs, e.g., exponential CBFs for higher relative degree [16] and nonsmooth barrier sets [9] further enlarge the class of safety specifications that can be handled.

Motivation for Multi-agent. Many real systems such as robot swarms, UAV traffic management, multi-arm manipulation, automated warehouses are inherently multi-agent. Safety must hold (i) for each agent with respect to walls, bounds, and actuation limits; (ii) pairwise to prevent inter-agent collisions; and sometimes (iii) globally for task-level constraints. Classical reactive methods such as artificial potential fields [12], velocity obstacles and RVO/ORCA [8, 19], and model-predictive control with hand-crafted penalties provide strong baselines in practice, but do not yield end-to-end invariance guarantees when coupled with learned generative planners and can deadlock under symmetric interactions. On the learning side, multi-agent RL (e.g., MADDPG [14], MAPPO [21]) excels at flexible coordination but typically lacks hard safety certificates and may require extensive online exploration; recent surveys on SafeRL and SafeMARL further highlight these limitations and open challenges in constrained multi-agent settings [13].

Our Contributions. We develop MA-SafeDiffuser, a multi-agent extension of SafeDiffuser that equips diffusion planning with centralized and decentralized safety enforcement and theoretical guarantees. The key idea is to formalize the joint safe set at each waypoint as the intersection of per-agent, pairwise, and (optional) task barriers, and to enforce the corresponding linearized CBF rows during denoising. A two-time formulation (reverse step jj over planning waypoints kk) enables receding-horizon enforcement at k=0k = 0 together with temporal regularization and short multi-kk seeding to distribute margin across all kk.

Key Contributions.

  • Joint safety with diffusion. A centralized projector that enforces the conjunction of per-agent and pairwise CBF rows throughout reverse denoising, with optional task constraints. A receding–horizon execution-time filter mirrors these rows to certify the applied control.

  • Finite-time diffusion invariance. Under standard C1,1C^{1,1} regularity, step-size bounds, and feasibility assumptions, we prove that the denoising process is finite-time diffusion invariant for the joint safe set, and we provide a discrete-time CBF comparison lemma for reverse-Euler updates.

  • Decentralized enforcement with neighbor messaging. A communication–aware variant in which each agent enforces local self/task rows and robust pairwise rows using predicted neighbor states, responsibility shares, and a computable robustness margin that compensates for bounded prediction errors; invariance carries over under clear Lipschitz and step-bound conditions.

  • Practical deadlock mitigations. Time-varying specifications (TVS) that relax early reverse steps, small symmetry-breaking biases in pairwise shares, and progress/liveness barriers toward corridor waypoints to avoid local traps; these mechanisms are orthogonal to the safety proof and improve success rates in practice.

  • Evaluation and differentiable enforcement. A light Maze2D benchmark with door-aware geometry and per-step action clamps for fair Safe/Unsafe comparisons; enforcement can be implemented via differentiable QP layers (OptNet, CVXPY-Layers) [2, 6] or via parameter-free Dykstra projections onto half-spaces [3, 7], and solves in milliseconds in our experiments.

Our approach complements the growing literature on diffusion for decision making and control [5, 10, 11], including goal/skill-conditioned and score-guided variants, by hardening the generative sampler with CBF certificates. Relative to multi-agent navigation baselines (potential fields, VO/ORCA) [8, 12, 19] and MARL [14, 21], MA SafeDiffuser provides a model-agnostic safety layer that can be used with hand-crafted (score) denoisers or learned score networks and yields invariance guarantees at both denoising and execution time.

Organization of this paper. Section 2 formalizes the two-time indexing, barrier classes, and joint safe sets. Section 3 presents centralized and decentralized projectors and TVS/liveness devices. Section 5 establishes diffusion invariance and decentralized robustness. Section 6 reports Maze2D results and ablative analyses. Section 8 concludes the paper by summarizing limitations and future directions (larger agent counts, richer tasks, tighter learned scores).

Problem Formulation and Notation

States, trajectories, indices. We use the two-time notation of [20]: diffusion time j∈{0,…,N}j \in\{0,\ldots,N\} indexes the reverse steps of the denoiser, the planning time k∈{0,…,H}k \in\{0,\ldots,H\} indexes the H+1H+1 waypoints of a trajectory. For MM agents, we define agent aa has state space Xa⊆Rna\mathcal{X}_a \subseteq\mathbb{R}^{n_a} and we have state xa,kj∈Xax_{a,k}^{j} \in\mathcal{X}_a at (j,k)(j,k). We stack joint states as

xkj=(x1,kj,…,xM,kj)∈X:=X1×⋯×XM,n=∑a=1Mna.x_k^j = (x_{1,k}^j,\ldots,x_{M,k}^j) \in\mathcal{X} := \mathcal{X}_1 \times\cdots\times\mathcal{X}_M,\qquad n = \sum_{a=1}^{M} n_a.

We define a joint trajectory at diffusion step jj to be τj=(x0j,…,xHj)∈XH+1\tau^j=(x_0^j,\ldots,x_H^j)\in\mathcal{X}^{H+1}. We use the notation T:=XH+1\mathcal{T}:=\mathcal{X}^{H+1} for the trajectory space and use bold symbols for joint quantities.

Reverse-time update. Let uj∈Rn(H+1)u^j\in\mathbb{R}^{n(H+1)} denote the stacked reverse-time update at step jj (arranged by waypoints and agents). The unconstrained reverse dynamics are formalized via the Euler limit as follows

τ˙j=lim⁡Δτ→0τj−τj+1Δτ=uj,equivalently,τj=τj+1+Δτ uj,(1)\dot{\tau}^{j}=\lim_{\Delta\tau\to0}\frac{\tau^j-\tau^{j+1}}{\Delta\tau}=u^j,\quad\text{equivalently,}\quad\tau^j=\tau^{j+1}+\Delta\tau\,u^j, \tag*{(1)}

where uju^j is produced by the denoiser’s drift (reference interpolation + temporal smoothing) and this is subsequently projected to enforce safety constraints [11, 20].

Safety specifications. At each waypoint kk, we have three classes of (Clarke-regular) barrier functions as follows:

  • Per-agent barriers ba,kself:Xa→Rb_{a,k}^{\mathrm{self}}:\mathcal{X}_a\to\mathbb{R} with safe super-level sets {xa,k:ba,kself(xa,k)≥0}\{x_{a,k}:b_{a,k}^{\mathrm{self}}(x_{a,k})\ge0\},

  • Pairwise barriers bab,kpair:Xa×Xb→Rb_{ab,k}^{\mathrm{pair}}:\mathcal{X}_a\times\mathcal{X}_b\to\mathbb{R} (a<b)(a<b) with safe sets {(xa,k,xb,k):bab,kpair(xa,k,xb,k)≥0}\{(x_{a,k},x_{b,k}):b_{ab,k}^{\mathrm{pair}}(x_{a,k},x_{b,k})\ge0\},

  • (optional) Task or global barriers bktask:X→Rb_k^{\mathrm{task}}:\mathcal{X}\to\mathbb{R} with safe set defined as {xk:bktask(xk)≥0}\{x_k:b_k^{\mathrm{task}}(x_k)\ge0\}.

The joint waypoint-wise safe set can now be defined as follows

Ck:=⋂a=1M{xa,k:ba,kself(xa,k)≥0}C_k := \bigcap_{a=1}^{M}\{x_{a,k}:b_{a,k}^{\mathrm{self}}(x_{a,k})\ge0\}
∩⋂a<b{(xa,k,xb,k):bab,kpair(xa,k,xb,k)≥0}\qquad\cap\bigcap_{a<b}\{(x_{a,k},x_{b,k}):b_{ab,k}^{\mathrm{pair}}(x_{a,k},x_{b,k})\ge0\}
∩{xk:bktask(xk)≥0}.(2)\qquad\cap\{x_k:b_k^{\mathrm{task}}(x_k)\ge0\}. \tag*{(2)}

We can now extend this safe waypoint notion to safe trajectories: a trajectory τ=(x0,…,xH)∈T\tau=(x_0,\ldots,x_H)\in\mathcal{T} is safe iff xk∈Ckx_k\in C_k for all kk. The trajectory-level safe set is then written as follows

C:={τ∈T:xk∈Ck for all k=0,…,H}.C := \{\tau\in\mathcal{T}:x_k\in C_k\text{ for all }k=0,\ldots,H\}.

Definition 1 (Multi-agent finite-time diffusion invariance). The reverse-time denoising process is finite-time diffusion invariant for CC if there exists an index i∈{0,…,N}i\in\{0,\ldots,N\} such that, for every j≤ij\le i, the denoised trajectory τj\tau^j is safe: τj∈C\tau^j\in C, i.e., xkj∈Ckx_k^j\in C_k for all kk.

Remark 2 (Enforcement index and receding horizon). When it comes to implementing CBFs, we usually apply the linearized constraints at the very first point in time, or k=0k=0, which is referred to as the receding horizon, and then rely on temporal regularization of the reverse model and a very short period of multi-kk enforcement to get a safety net that covers the rest of the planning horizon. See §3 and §5.

Method: MA-SafeDiffuser

In our multi-agent extension, we enforce safety by projecting the unconstrained reverse-diffusion drift onto linearized CBF half-spaces at a designated enforcement index. By default we choose k=0k=0, as

Algorithm 1 MA-SafeDiffuser: Centralized projector

Figure 1. Algorithm 1 MA-SafeDiffuser: Centralized projector (with one reverse step at jj). Here γ:[0,N]→R≥0\gamma: [0,N] \to\mathbb{R}_{\geq0} is the TVS relaxation schedule—a nonincreasing function of the reverse index jj (with γ(0)=0\gamma(0)=0) that temporarily offsets the barrier and whose (discrete) diffusion-time derivative is denoted γ˙(j)\dot{\gamma}(j).

Require: Previous trajectory τj+1=(x0j+1,…,xHj+1)\tau^{j+1}=(x_0^{j+1},\ldots,x_H^{j+1}); unconstrained reverse drift u0ju_0^j (from (1)); barrier rows {bℓ}\{b_\ell\} at enforcement index k=0k=0; variant ∈{RoS,ReS,TVS}\in\{\mathrm{RoS},\mathrm{ReS},\mathrm{TVS}\}; step Δτ\Delta\tau; step bound umax⁡u_{\max}; weights (λ,ωj)(\lambda,\omega^j)

Ensure: Projected update uju^j and next trajectory τj\tau^j

  1. Linearize barriers at k=0k=0: for each active row bℓb_\ell (self/pair/task) form gradient ∇bℓ(x0j)\nabla b_\ell(x_0^j) and right-hand side hℓjh_\ell^j: RoS/ReS: hℓj←αℓ(bℓ(x0j))h_\ell^j\leftarrow\alpha_\ell(b_\ell(x_0^j));

  2. TVS: hℓj←αℓ(bℓ(x0j)−γ(j))−γ˙(j)h_\ell^j\leftarrow\alpha_\ell(b_\ell(x_0^j)-\gamma(j))-\dot{\gamma}(j).

  3. Build convex program in decision variables (uj,rj)(u^j,r^j) as follows

min⁡∥uj−u0j∥22+λ∥rj∥22\min\left\|u^j-u_0^j\right\|_2^2+\lambda\left\|r^j\right\|_2^2

subject to

∇bℓ(x0j)Tuj≥−ωℓjrℓj+hℓj,∥uaj∥2≤umax⁡∀a.\nabla b_\ell(x_0^j)^\mathsf{T}u^j\geq-\omega_\ell^j r_\ell^j+h_\ell^j,\quad\left\|u_a^j\right\|_2\leq u_{\max}\quad\forall a.
  1. Solve (QP or Dykstra on half-spaces) to obtain (uj,rj)(u^j,r^j); set rj=0r^j=0 in RoS.

  2. Update reverse step: τj←τj+1+Δτ uj\tau^j\leftarrow\tau^{j+1}+\Delta\tau\,u^j.

  3. (Optional all-kk enforcement) If required (cf. §5), repeat 1–5 with rows at all kk for a fixed number of reverse steps.

  4. return τj\tau^j.

receding horizon at every reverse step jj. The same filter is applied at execution time to the instantaneous control. In our proposal we have the following: (i) a central projector that is responsible for enforcing all per-agent, pairwise, and task rows jointly (see §4.1); (ii) a decentralized variant with neighbor messaging and robust margins (see §4.2); and (iii) a set of time-varying specifications and liveness mechanisms that avoids deadlock (see §4.4). The regularization of the reverse model and/or a brief period of enforcing the model at different values of kk send the margin to all values of kk, when the constraints are only applied at k=0k=0 (see cf. §5).

Algorithms

Centralized joint enforcement

For the reverse step jj we let u0j∈Rn(H+1)u_0^j\in\mathbb{R}^{n(H+1)} denote the stacked unconstrained drift (cf. (1)). We solve a minimum-deviation objective at index k=0k=0, by linearizing the active barriers as follows.

min⁡uj,rj∥uj−u0j∥22+λ∥rj∥22s.t.(self)∇ba,0self(xa,0j)Tuaj+α(ba,0self(xa,0j))≥−ωajraj,∀a∈{1,…,M},(3)\begin{aligned} \min_{u^j,r^j}\quad&\left\|u^j-u_0^j\right\|_2^2+\lambda\left\|r^j\right\|_2^2\qquad\text{s.t.}\\ \text{(self)}\quad&\nabla b_{a,0}^{\mathrm{self}}(x_{a,0}^j)^\mathsf{T}u_a^j+\alpha(b_{a,0}^{\mathrm{self}}(x_{a,0}^j))\geq-\omega_a^j r_a^j,\\ &\forall a\in\{1,\ldots,M\}, \tag*{(3)} \end{aligned}
(pair)∇xabab,0pair(xa,0j,xb,0j)Tuaj+∇xbbab,0pair(xa,0j,xb,0j)Tubj+α(bab,0pair(⋅))≥−ωabjrabj,∀a<b,(4)\begin{aligned} \text{(pair)}\quad&\nabla_{x_a}b_{ab,0}^{\mathrm{pair}}(x_{a,0}^j,x_{b,0}^j)^\mathsf{T}u_a^j+\nabla_{x_b}b_{ab,0}^{\mathrm{pair}}(x_{a,0}^j,x_{b,0}^j)^\mathsf{T}u_b^j\\ &\qquad+\alpha(b_{ab,0}^{\mathrm{pair}}(\cdot))\geq-\omega_{ab}^j r_{ab}^j,\qquad\forall a<b, \tag*{(4)} \end{aligned}
(task)∇b0task(x0j)Tuj+α(b0task(x0j))≥−ω0jr0j(5)\text{(task)}\quad\nabla b_0^{\mathrm{task}}(x_0^j)^\mathsf{T}u^j+\alpha(b_0^{\mathrm{task}}(x_0^j))\geq-\omega_0^j r_0^j \tag*{(5)}

Here uj=(u1j,…,uMj)u^j=(u_1^j,\ldots,u_M^j), α\alpha is an extended class-K\mathcal{K} function, and rjr^j collects relaxation variables. The variants are:

  • RoS (robust-safe): here we consider hard enforcement with rj≡0r^j\equiv0 and all ωj≡0\omega^j\equiv0.

  • ReS (relaxed-safe): here we allow rj≠0r^j\ne0 with diffusion-time weights ωj↓0\omega^j\downarrow0 to recover feasibility; feasibility gaps vanish as jj decreases.

  • TVS (time-varying-safe): here we replace each bb by b−γ(j)b-\gamma(j) and augment the RHS by −γ˙(j)-\dot{\gamma}(j) (the linearization is applied to b−γb-\gamma).

During numerical simulations, imposing step bounds (e.g., ∥ua∥2≤umax⁡\left\|u_a\right\|_2\leq u_{\max} for each agent block) is useful for controlling truncation errors and ensuring numerical stability. The resulting QP can be solved using any sparse convex QP solver (e.g., OSQP or CVXPY-Layers [6]). When all constraints are linearized half-spaces, one may alternatively employ Dykstra-type projection methods [3, 7] (see §4.3).

All-kk enforcement (optional). In case, the denoiser lacks a temporal contraction, we may enforce (3)–(5) for all k∈{0,…,H}k\in\{0,\ldots,H\} during the first JJ reverse steps; this will ensure a safety margin at every waypoint that persists under the subsequent k=0k=0-only enforcement (cf. 7), however, at the expense of more possibly more compute.

Decentralized enforcement with neighbor messaging

In an environment with multiple agents and limited long range communication, we may consider a decentralized variant of our method. To this end, each agent aa solves a local projector using predicted neighbor states denoted by x^b,0j\hat{x}_{b,0}^j. These predicted neighbor states are obtained from the previous communication round, for example. In the decentralized setting, we need to localize the barriers. For pairwise barriers, we linearize locally at (xa,0j,x^b,0j)(x_{a,0}^j,\hat{x}_{b,0}^j) and we enforce a robust inequality with responsibility sharing ρab,ρba∈(0,1)\rho_{ab},\rho_{ba}\in(0,1), ρab+ρba=1\rho_{ab}+\rho_{ba}=1:

∇xabab,0pair(xa,0j,x^b,0j)Tuaj+ρabα(bab,0pair(xa,0j,x^b,0j))≥mrob,\nabla_{x_a}b_{ab,0}^{\mathrm{pair}}(x_{a,0}^j,\hat{x}_{b,0}^j)^\mathsf{T}u_a^j+\rho_{ab}\alpha\left(b_{ab,0}^{\mathrm{pair}}(x_{a,0}^j,\hat{x}_{b,0}^j)\right)\geq m_{\mathrm{rob}},

(and similarly for agent bb). With two free Jacobi and ADMM-style rounds [4] per diffusion step, messages are updated and the local projections are recomputed. Under prediction error ∥x^b,0j−xb,0j∥≤ϵ\left\|\hat{x}_{b,0}^j-x_{b,0}^j\right\|\leq\epsilon, Lipschitz constants LbL_b (barrier value), L∇L_{\nabla} (barrier gradients), LαL_\alpha (class-K\mathcal{K}), and per-step bounds ∥uaj∥≤umax⁡\left\|u_a^j\right\|\leq u_{\max}, it suffices (see Theorem 8) to pick

mrob≥12(2L∇umax⁡+LαLb)ϵ,(6)m_{\mathrm{rob}}\geq\frac{1}{2}\left(2L_{\nabla}u_{\max}+L_\alpha L_b\right)\epsilon, \tag*{(6)}

to guarantee that the true centralized pairwise inequalities (with (xa,0j,xb,0j)(x_{a,0}^j,x_{b,0}^j)) are satisfied (see Theorem 8 for a detailed proof). We note that self and task barriers do not depend on predictions and they can be enforced locally similar to the centralized case.

Execution-time safety filter

On completion of the reverse steps at index jj, we get a first waypoint proposal, namely, x0j↦x1jx_0^j\mapsto x_1^j. Before execution at task time tt, we solve the instantaneous CBF projection for $u_t=x_{t+1}-x_t with the same rows (now evaluated at xtx_t) and alongwith explicit step bounds, e.g., ∥ut∥2≤umax⁡\lVert u_t\rVert_2 \le u_{\max} (or for example, ∥ut∥∞≤umax⁡\lVert u_t\rVert_\infty\le u_{\max}). As mentioned before, this receding-horizon filter prevents rare large steps from creating violations and mirrors SafeDiffuser’s deployment [20]. When constraints are linearized half-spaces, Dykstra’s algorithm provides a parameter-free projection onto the intersection of half-spaces [3, 7]; otherwise, we may prefer to solve a small convex QP problem. The execution-time filter is essential to preserve invariance for the applied control (cf. 7).

Avoiding traps and deadlock

Despite the safety constraints using control barriers, we may encounter deadlocks, and local traps. To this end, we propose to employ three practical devices to reduce deadlock and local traps without sacrificing (safety) invariance:

  1. Time-varying specifications (TVS). Use b−γ(j)b-\gamma(j) with γ\gamma nonincreasing in reverse time and γ(0)=0\gamma(0)=0; constraints are relaxed early and tightened near j=0j=0.

  2. Symmetry breaking. We add small bias offsets or priorities in pairwise shares (ρab,ρba)(\rho_{ab},\rho_{ba}) to avoid stalemates in symmetric configurations. For example, ρab>ρba\rho_{ab}>\rho_{ba} will avoid the symmetry.

  3. Liveness/progress CBFs. We include auxiliary barriers that encode progress toward intermediate subgoals for example, corridor waypoints, ensuring nonzero “driving” terms when pure safety is noninformative.

As we show later, these mechanisms are orthogonal to the core safety projector and are compatible with the invariance proofs we derive in Section 5.

Theoretical Results

We prove finite-time diffusion invariance under standard smoothness and feasibility assumptions, and we also provide a decentralized robustness guarantee.

Assumption 3 (Regularity and feasibility). All active barriers are assumed to be bℓb_\ell are C1,1C^{1,1} on an open set U⊃C\mathcal{U}\supset C, i.e., bℓb_\ell are continuously differentiable and we assume that their gradients are locally Lipschitz on U\mathcal{U}; moreover, for each barrier, there exists an extended class-K\mathcal{K} function αℓ\alpha_\ell. At every reverse step jj, the projector (3)–(5) (RoS) is feasible or admits relaxations (ReS/TVS) with ωj↓0\omega^j\downarrow0. The unconstrained drift u0ju_0^j is assumed to be locally Lipschitz in τj\tau^j and that it satisfies per-step bounds ∥uaj∥≤umax⁡\lVert u_a^j\rVert\le u_{\max}.

Lemma 4 (Barrier conjunction). Let C={z:bℓ(z)≥0}C=\{z:b_\ell(z)\ge0\} and consider z˙=u(z)\dot{z}=u(z). If for all ℓ\ell and all zz, ∇bℓ(z)⊤u(z)+αℓ(bℓ(z))≥0\nabla b_\ell(z)^\top u(z)+\alpha_\ell(b_\ell(z))\ge0, then CC is forward invariant, that is, we have z(0)∈C⇒z(t)∈Cz(0)\in C\Rightarrow z(t)\in C for all $t\ge 0.

Proof Sketch. We know that each single set Sℓ={bℓ≥0}S_\ell=\{b_\ell\ge0\} is forward invariant by the CBF condition; as we know that at boundary points {bℓ=0}\{b_\ell=0\} the field is tangent-inward [1, 9, 15]. For smooth inequality sets, the tangent cone of the intersection equals the intersection of tangent cones, so u(z)∈TC(z)u(z)\in T_C(z) for all active ℓ\ell implies u(z)∈TC(z)u(z)\in T_C(z), and invariance will follow from Nagumo’s theorem [15]. The same conclusion will hold for locally Lipschitz bℓb_\ell

Algorithm 2 MA-SafeDiffuser-DecDecentralized projector (one reverse step at jj)
Require:Neighbor graph G\mathcal{G}; last-round neighbor predictions x^b,0j\hat{x}_{b,0}^j; robust margin mrobm_{\mathrm{rob}}; shares ρab,ρba∈(0,1)\rho_{ab},\rho_{ba}\in(0,1), ρab+ρba=1\rho_{ab}+\rho_{ba}=1; per-agent bound umax⁡u_{\max}
Ensure:Local updates {uaj}a=1M\{u_a^j\}_{a=1}^M and aggregated uju^j
1:for a∈{1,…,M}a\in\{1,\ldots,M\} in parallel do
2:Self/task rows: build Va,0self(xa,0j)V_{a,0}^{\mathrm{self}}(x_{a,0}^j) and (if present) global rows as in Alg. 1.
3:Pairwise rows (robust): for each b∈N(a)b\in\mathcal{N}(a), linearize at (xa,0j,x^b,0j)(x_{a,0}^j,\hat{x}_{b,0}^j) and enforce ∇xabab,0pair(xa,0j,x^b,0j)⊤uaj+ρabα(bab,0pair(xa,0j,x^b,0j))≥mrob\nabla_{x_a}b_{ab,0}^{\mathrm{pair}}(x_{a,0}^j,\hat{x}_{b,0}^j)^\top u_a^j+\rho_{ab}\alpha(b_{ab,0}^{\mathrm{pair}}(x_{a,0}^j,\hat{x}_{b,0}^j))\ge m_{\mathrm{rob}}.
4:Local solve: minimize ∥uaj−ua,0j∥22\lVert u_a^j-u_{a,0}^j\rVert_2^2 subject to the above and ∥uaj∥2≤umax⁡\lVert u_a^j\rVert_2\le u_{\max}; broadcast updated xa,0jx_{a,0}^j to N(a)\mathcal{N}(a).
5:end for
6:Repeat the local step for R∈{1,2,3}R\in\{1,2,3\} message-passing rounds.
7:Aggregate uj←(u1j,…,uMj)u^j\leftarrow(u_1^j,\ldots,u_M^j) and update τj←τj+1+Δτ uj\tau^j\leftarrow\tau^{j+1}+\Delta\tau\,u^j.
8:return τj\tau^j.

Table 2.

when using Clarke generalized gradients. More detail can be found in supplementary.

A discrete-time CBF lemma (reverse time). We use the following Euler-discretized comparison, which basically follows from C1,1C^{1,1} regularity.

Lemma 5 (Discrete-time CBF monotonicity). Let b∈C1,1b\in C^{1,1} in a neighborhood of CC with locally Lipschitz gradient constant L∇bL_{\nabla b} and let α\alpha be an extended class-K\mathcal{K}. Suppose uu satisfies ∇b(xj)⊤u+α(b(xj))≥0\nabla b(x^j)^\top u+\alpha(b(x^j))\ge0 and consider the reverse-time Euler step xj=xj+1+Δτ ujx^j=x^{j+1}+\Delta\tau\,u^j with ∥uj∥≤umax⁡\lVert u^j\rVert\le u_{\max}. Then for Δτ≤Δˉ:=min⁡{1,α′(0)/(2L∇bumax⁡)}\Delta\tau\le\bar{\Delta}:=\min\{1,\alpha'(0)/(2L_{\nabla b}u_{\max})\} there exists c>0c>0 such that

b(xj)≥b(xj+1)−Δτ α(b(xj))−cΔτ2b(x^j)\ge b(x^{j+1})-\Delta\tau\,\alpha(b(x^j))-c\Delta\tau^2

In particular, we have that if b(xj+1)≥0b(x^{j+1})\ge0 then b(xj)≥0b(x^j)\ge0 for all Δτ≤Δˉ\Delta\tau\le\bar{\Delta}.

Proof Sketch. By C1,1C^{1,1},

b(xj)=b(xj+1)+∇b(xj)⊤(xj−xj+1)+O(∥xj−xj+1∥2)b(x^j)=b(x^{j+1})+\nabla b(x^j)^\top(x^j-x^{j+1})+O(\lVert x^j-x^{j+1}\rVert^2)

with the remainder bounded by L∇bΔτ2∥uj∥2L_{\nabla b}\Delta\tau^2\lVert u^j\rVert^2. We substitute xj−xj+1=Δτ ujx^j-x^{j+1}=\Delta\tau\,u^j and then ∇b(xj)⊤uj≥−α(b(xj))\nabla b(x^j)^\top u^j\ge-\alpha(b(x^j)). The step-size condition ensures the implicit inequality preserves nonnegativity when b(xj+1)≥0b(x^{j+1})\ge0 (discrete comparison).

Remark 6 (Finite-time reach under RoS/TVS). If b(xN)<0b(x^N)<0 (RoS), one can choose α\alpha with finite-time property ∫−a0dsα(s)<∞\int_{-a}^{0}\frac{ds}{\alpha(s)}<\infty on [−a,0][-a,0] and Δτ\Delta\tau small so that the O(Δτ2)O(\Delta\tau^2) truncation is dominated by Δτ α(⋅)\Delta\tau\,\alpha(\cdot); then the discrete recursion crosses into b≥0b\ge0 in finitely many steps. Under TVS with b˙=b−γ(j)\dot b=b-\gamma(j), γ(0)=0\gamma(0)=0, the same argument would apply to b~\tilde b, giving b~(x0)≥0\tilde b(x^0)\ge0.

Theorem 7 (Centralized multi-agent finite-time diffusion invariance). Under Assumption 3, if at every reverse step jj the centralized projector enforces (3)–(5) (RoS or TVS) for all peer-agent, pairwise, and task barriers at the enforcement index, which by default

is k=0k = 0, then the denoising process is finite-time diffusion invariant for C\mathcal{C} with probability 1 (w.r.t. model noise). Moreover, the execution-time safety filter preserves invariance for the applied control utu_t.

Sketch of Proof. We fix any barrier bℓb_\ell at k=0k = 0. By Lemma 5, the enforced inequality implies no boundary crossing in reverse time (considering small Δτ\Delta\tau), so bℓ(xj0)≥0b_\ell(x_j^0) \ge0 for all j≤ij \le i for some i≤Ni \le N (note that finite-time reach holds by Remark 6). By Lemma 4, the conjunction over all active rows is forward invariant at k=0k = 0. If all kk are enforced, we are basically done. Otherwise, we either (i) enforce all kk for finitely many reverse steps to seed a margin everywhere, or (ii) we rely on temporal regularization of the reverse model to propagate a margin from k=0k = 0 to all kk (both are standard in the baseline SafeDiffuser [20] paper). The “probability 1” qualifier here is conditional on the event that each QP (or projection) is feasible; by Assumption 3 this event has probability 1 since the projection is a deterministic measurable map of the model noise. The execution-time CBF filter then basically satisfies ∇bℓ(xt)⊤ut+αℓ(bℓ(xt))≥0\nabla b_\ell(x_t)^\top u_t + \alpha_\ell(b_\ell(x_t)) \ge0, hence preserves invariance per a discrete-time CBF argument identical to Lemma 5. More detail can be found in appendix. □

Theorem 8 (Decentralized invariance under bounded error). Assume neighbor messages yield predictions x^b,0\hat{x}_{b,0} with bounded error ∥x^b,0−xb,0∥≤ε\lVert\hat{x}_{b,0} - x_{b,0} \rVert\le\varepsilon. Suppose each agent enforces its local pairwise CBF with a robust margin mrob>0m_{\mathrm{rob}} > 0 and responsibility shares ρab,ρba∈(0,1)\rho_{ab}, \rho_{ba} \in(0, 1), ρab+ρba=1\rho_{ab} + \rho_{ba} = 1. Let LbL_b and L∇L_\nabla be local Lipschitz constants for babb_{ab} and its gradients, LαL_\alpha for α\alpha, and assume per-step bounds ∥uai∥≤umax⁡\lVert u_a^i \rVert\le u_{\max}. If we have

mrob≥12(2L∇umax⁡+LαLb)ε(7)m_{\mathrm{rob}} \ge\frac{1}{2}\left(2L_\nabla u_{\max} + L_\alpha L_b\right)\varepsilon \tag*{(7)}

then the decentralized projected updates satisfy the true centralized pairwise inequalities. Consequently, the conclusions of 7 hold.

Sketch of Proof. By Summing the two local inequalities (one at agent aa, one at agent bb) built with predicted neighbor states, and compare them to the centralized inequality evaluated at the true joint state. Use Lipschitz bounds on barrier values and gradients and the per-step bound to show the centralized left-hand side exceeds the predicted one minus the error term (2L∇umax⁡+LαLb)ε(2L_\nabla u_{\max}+L_\alpha L_b)\varepsilon. Choosing mrobm_{\mathrm{rob}} as in (7) makes the sum nonnegative, hence the true centralized pairwise inequality holds. Taking the finite conjunction over all pairs and combining with self/task rows (which do not require predictions) gives the desired centralized feasibility, …

Remark 9 (Complexity and solvers). The centralized QP has dimension (H+1)n(H+1)n and O(M2)O(M^2) sparse rows from pairwise constraints. First-order operator-splitting solvers (e.g., OSQP [17]) and differentiable layers (OptNet [2], CVXPY-Layers [6]) are suitable; when constraints are linearized half-spaces, Dykstra-type projections offer a parameter-free alternative [3, 7].

Numerical Experiments

We evaluate MA-SafeDiffuser in Maze2D domain to validate multi-agent safety and study the effect of reward shaping and fairness clamps. All experiments were done on RTX 4090 GPUs using python and standard pytorch libraries like pytorch and numpy in double precision arithmetic.

Maze2D (Multi-Agent) setup

Environment. The Maze2D domain is a continuous planar environment bounded within the axis-aligned box B={x∈R2:(−1.5,−1.5)≤x≤(1.5,1.5)}\mathcal{B} = \{x \in\mathbb{R}^2 : (-1.5, -1.5) \le x \le(1.5, 1.5)\}. The interior of B\mathcal{B} is partitioned into a 6×66 \times6 grid of square rooms, each separated by solid wall segments except for small open passages (doors) centered on the walls. Each wall is represented as a line segment wℓ=[aℓ,bℓ]w_\ell= [a_\ell, b_\ell], while each door is modeled as a short open gap (p0,p1)(p_0, p_1) on the same line. Walls are impassable obstacles, whereas doors define narrow traversable corridors through which agents can pass. In the Figures 1, 2, walls are shown in black, door openings in green, and goal regions as orange boxes. Agents are depicted as colored points that begin near random valid start positions (blue markers) and must navigate to their respective goal boxes while avoiding wall and inter-agent collisions. We evaluate configurations with M∈{2,4,8}M \in\{2, 4, 8\} agents. The kinematic update rule follows xi,t+1=xi,t+ui,tx_{i,t+1} = x_{i,t} + u_{i,t} with bounded control ∥ui,t∥2≤umax⁡\lVert u_{i,t}\rVert_2 \le u_{\max}, and all motion takes place continuously in R2\mathbb{R}^2.

Safety constraints. (i) Box invariance: xi,t∈Bx_{i,t} \in\mathcal{B}; (ii) Wall clearance: d(xi,t,wℓ)≥ρagent+ρwalld(x_{i,t}, w_\ell) \ge\rho_{\mathrm{agent}}+\rho_{\mathrm{wall}} with (ρagent,ρwall)=(0.05,0.06)(\rho_{\mathrm{agent}}, \rho_{\mathrm{wall}}) = (0.05, 0.06); (iii) No wall crossing: [xi,t,xi,t+1]∩wℓ=∅[x_{i,t}, x_{i,t+1}] \cap w_\ell= \varnothing; (iv) Pairwise separation: ∥xi,t−xj,t∥2≥ρpair=0.25\lVert x_{i,t} - x_{j,t}\rVert_2 \ge\rho_{\mathrm{pair}} = 0.25 for i≠ji \ne j. The joint waypoint-wise safe set Ck\mathcal{C}_k is given by (2).

Planner. At each reverse step, MA-SafeDiffuser performs a score-guided denoising update followed by a projection onto the linearized safety set via Dykstra iterations. Both centralized and decentralized projection modes are supported: the centralized variant enforces all inter-agent constraints jointly, while the decentralized variant performs per-agent local projections using neighbor information within a communication radius of 0.90.9. The reference trajectory is generated via door-aware interpolation between start and goal waypoints.

Reward shaping and metrics. We measure three metrics per episode: (i) total violation count V=∑tNtviolV = \sum_t N_t^{\mathrm{viol}} (primary safety metric); (ii) total return R=∑trtR = \sum_t r_t based in goal progress, success bonus (+15) and step penalty (-0.002); (iii) success rate SS fraction of agents that reach goals before horizon T=700T=700. To equalize control effort across planners, both Safe and Unsafe variants use identical action clamp ∥ut∥2≤umax⁡=0.085\lVert u_t\rVert_2 \le u_{\max} = 0.085.

We use two shaping variants:

  • Progress-dominant shaping rewards forward motion toward the goal and completion bonuses with mild step costs.

  • Safety shaping augments with small penalties for wall proximity and intersection events, enabling finer differentiation between near-miss and hard violation.

Baselines and fairness. Unsafe = unconstrained denoising (no safety filter). Safe = MA–SafeDiffuser diffusion planner with CBF-style projection. Centralized vs. Decentralized = comparison between full-state projection and limited-neighbor projection under identical seeds and random noise. All runs use shared random seeds to ensure fair comparison under equivalent stochasticity.

Protocol and hyperparameters. Each configuration is run for three random seeds, across diffusion horizon H∈{20,28,36}H \in\{20, 28, 36\}, N∈{10,16,24}N \in\{10, 16, 24\}. Planner hyperparameters are fixed as β=0.70\beta= 0.70, smoothing λsmooth=0.35\lambda_{\mathrm{smooth}} = 0.35, αk=3.0\alpha_k = 3.0, projection iterations = 80, Δτ=0.06\Delta\tau= 0.06. We evaluate both Safe and Unsafe planners over a 700-step horizon, resulting in 54 configurations across 3 seeds in total.

Violation counting. We follow a strict safety accounting scheme in all Maze2D experiments. At each timestep, the environment monitors three types of safety infractions: (i) soft proximity violations when an agent enters the near-wall buffer region d(xi,wℓ)<ρagent+ρwall−0.02d(x_i,w_\ell) < \rho_{\mathrm{agent}} + \rho_{\mathrm{wall}} - 0.02, (ii) hard wall-cross violations when the straight-line segment [xi,t,xi,t+1][x_{i,t}, x_{i,t+1}] intersects any wall segment wℓw_\ell, and (iii) boundary violations when an agent exits the box domain B=[−1.5,1.5]2B = [-1.5, 1.5]^2. Even visually collision-free trajectories (e.g., 2-agent Safe case in Figure. Figure 2) may register a small number of soft violations when agents pass within a few centimeters of a wall or corner. This conservative counting ensures that the safety metric VV penalizes both hard collisions and near-wall grazing events, encouraging overcautious rather than risky planning behavior.

Qualitative results for centralized (decentralized=False) MA-SafeDiffuser

Figure 2. Qualitative results for centralized (decentralized=False) MA-SafeDiffuser. Each panel compares safe and unsafe trajectories across randomized initializations for M=2M=2, 4, 8 agents. For M=2M=2, Vsafe=8V_{\mathrm{safe}}=8 and Vunsafe=25V_{\mathrm{unsafe}}=25; for M=4M=4, Vsafe=10V_{\mathrm{safe}}=10 and Vunsafe=21V_{\mathrm{unsafe}}=21; and for M=8M=8, Vsafe=29V_{\mathrm{safe}}=29 and Vunsafe=96V_{\mathrm{unsafe}}=96. SafeDiffuser agents maintain clearance through doors and corners, whereas unsafe diffusion plans exhibit oscillatory behavior and occasional wall penetration. Start positions (blue dots) and goals (orange boxes) are placed asymmetrically and randomized across runs to emulate a warehouse-like navigation scenario. While safe agents may incur occasional violations due to proximity constraints, their violation rates remain substantially lower than those of unsafe agents.

Results and discussion

Quantitative Results. Across all settings, total returns scale approximately linearly with the number of agents MM, as each agent receives an independent goal-progress reward and success bonus. The Safe variant consistently achieves comparable total reward to the Unsafe baseline while reducing violation counts by 40-60%. This demonstrates that enforcing control-barrier projections in the reverse denoising steps preserves planning performance without sacrificing efficiency.

Remark 10 (Ablations and fairness). Without a uniform step bound, Unsafe can “jump” aggressively and avoid repeated proximity ticks, while Safe moves conservatively and may accumulate soft proximity penalties when sliding along walls. Enforcing the same instantaneous clamp for both methods, counting proximity only when approaching the wall, and using a short refractory period for proximity events restores a fair comparison and highlights the safety advantage of MA–SafeDiffuser. Increasing HH or NN yields smoother trajectories and fewer boundary contacts, confirming that longer reverse horizons enhance constraint satisfaction. However, very high values of HH, NN incur diminishing returns and longer runtime. Table 1 illustrates mean violations for Safe vs. Unsafe across all MM, revealing clear safety gains that scale with the number of agents. Across all settings, total returns scale approximately linearly with the number of agents MM, as each agent receives an independent goal-progress reward and success bonus.

SettingAgents (M)RSafeR_{\mathrm{Safe}}RUnsafeR_{\mathrm{Unsafe}}VSafeV_{\mathrm{Safe}}VUnsafeV_{\mathrm{Unsafe}}Success
Centralized233.7633.98923.66True
466.6266.7311.3342.66True
8133.04133.164087.33True
Decentralized233.7433.801622.66True
466.7066.714573.66True
8135.29135.3570.6688.66True

Table 1. Representative three-seed outcomes (Maze2D). Reported rewards are total episode returns over T=700T=700 steps.

Qualitative Results. Trajectory rollouts in Figure 2 show that MA-Safe Diffuser agents maintain safe clearances when crossing doorways and avoid wall clipping even under dense interactions. Unsafe denoisers exhibit oscillations and frequent minor breaches near corners.

Learned Score Denoiser (MLP MA-SafeDiffuser)

To test generalization beyond handcrafted priors, we train a goal-augmented MLP score network that approximates the scaled denoising residual ϵ/σ\epsilon/\sigma from synthetic diffusion pairs.

Dataset. We generate 1500 training samples by adding Gaussian noise at random diffusion times to reference door-guided trajectories and record the normalized denoising targets. The input vector includes noisy trajectory, reference, goal offset, and sinusoidal time embedding.

Network: The MLP has two hidden layers of size (256, 256) with ReLU activation and is trained using Adam for 1000 epochs with learning rate 1e−31e-3, weight decay 1e−61e-6, and per-feature normalization. The final training loss stabilized around 0.40 (normalized MSE), confirming moderate convergence.

Evaluation: The trained MLP is used within the MA-Safe Diffuser planner (H=28H = 28, N=40N = 40) for both Safe and Unsafe variants. Representative results are in Table 2. The safe variant reduces violation count by ∼50%\sim50\% while maintaining identical return and success rate, confirming that the learned denoiser preserves CBF-based safety enforcement. Trajectory visualizations as shown in Figure 1 show smoother door transitions and fewer wall contacts compared to the unconstrained baseline. Our results on MLP based denoiser is preliminary, and very likely needs finetuning. For the 2DMaze experiment, our method is able to learn the trajectories well without using MLP.

Comparison with SafeRL Methods. Table 3 compares MA-Safe Diffuser with MAPPO-Lagrangian under identical door-based waypoint guidance. While MAPPO-Lagrangian enforces safety via a learned soft-penalty mechanism, this approach leads to stalling behavior in the narrow 6×66 \times6 maze, resulting in a 0% success rate even after 600 training episodes within the 700-step horizon. In contrast, MA-SafeDiffuser applies zero-shot geometric projections with corridor relaxation, achieving 100% success. These results demonstrate that explicit geometric feasibility provides greater robustness and sample efficiency than learned soft-constraint policies in constrained multi-agent environments.

MethodSuccess RateRewardViolations
MAPPO-Lag0%-0.82532.3
Centralized100%66.6211.33
Decentralized100%66.7045.00

Table 3. Comparative performance with MAPPO-Lag on the Maze2D environment (M=4M=4 agents). Results are averaged over 3 random seeds with a T=700T=700 step horizon.

Related Work

Diffusion for planning and control. The paper Diffuser [11] adapts denoising diffusion probabilistic models (DDPMs) [1] for goal-conditioned trajectory synthesis via iterative denoising. Extensions explore task-conditioned guidance using classifier or energy-based methods [5].

Safe diffusion. SafeDiffuser [20] integrates control barrier functions (CBFs) into diffusion steps for single-agent safety under robust or time-varying conditions. We extend this to multi-agent systems, supporting self, pairwise, and task-level safety with decentralized enforcement and execution-time filtering.

Qualitative rollouts of the learned-score variant of MA-SafeDiffuser with an MLP denoiser

Figure 1. Qualitative rollouts of the learned-score variant of MA-SafeDiffuser with an MLP denoiser (4 agents, planning horizon H=28H=28, diffusion steps N=40N=40, and T=2000T=2000 sampling steps; trained on 1500 trajectories for 1000 epochs). (Left) Safe planner with score-based generation combined with CLF (Control Lyapunov Function) and CBF (Control Barrier Function) projection, yielding Vsafe=62V_{\mathrm{safe}}=62. (Right) Unsafe planner without CBF enforcement, yielding Vunsafe=125V_{\mathrm{unsafe}}=125. The safe variant produces smooth, wall-aware trajectories and avoids collisions, whereas the unsafe variant exhibits frequent constraint violations and unstable motion near obstacles.

ModeReward RRViolations VVSuccess SS
Safe66.8562True
Unsafe (no CBF)67.00125True

Table 2 (PDF p. 7). Learned MLP denoiser performance on Maze2D (4 agents, H=28H=28, N=40N=40, T=2000T=2000).

Control barrier functions and invariance. CBFs offer an careful way to certify forward invariance by setting ∇b(x)⊤u+α(b(x))≥0\nabla b(x)^{\top}u+\alpha(b(x)) \ge0 [1], with extensions for higher relative degree through exponential CBF [16] and nonsmooth sets [9]. We leverage these tools for waypoint-aware safety, establishing discrete-time invariance under diffusion updates.

Multi-agent safety and MARL. Traditional reactive methods (potential fields, velocity obstacles, MPC+CBF) and MARL baselines (MADDPG [14], MAPPO [21]) lack strict safety guarantees. Our CBF-with-diffusion projector enforces hard constraints during sampling and execution.

Optimization layers and projections. Differentiable QP layers (OptNet [2], CVXPY-Layers [6]) and operator-splitting solvers (OSQP [17]) enable scalable end-to-end safety. Projection methods (Dykstra [7]; see [3]) provide a parameter-free alternative for linearized constraints.

Benchmarking frameworks. PettingZoo [18] standardizes multi-agent benchmarks (e.g., MPE). We complement this with a lightweight Maze2D testbed for geometry-constrained, safety-aware evaluation.

Our approach MA-SafeDiffuser combines the generative expressiveness of diffusion planning [10, 11] with the formal guaranteed invariance of CBFs [1, 9, 16], SafeDiffuser’s single-agent theory [20] is extended to centralized and decentralized multi-agent joint safety and allows employing the latest projection/QP layers [2, 3, 7, 17] for realistic enforcement.

Conclusion and Limitations

We introduced MA-SafeDiffuser, a multi-agent safe diffusion planner with centralized and decentralized enforcement and finite-time diffusion invariance guarantees. Empirically, on Maze2D we see staggering violations reduction over unconstrained denoising. Sublimitations are: (i) QP feasibility with dense crowds (relaxed by ReS/TVS and introduced reverse steps), (ii) decentralized margins with the need for bounded comms errors, and (iii) shaping sensitivity of absolute returns on very long horizons. We believe that future work may involve scaling our method to larger number of agents and more complex planning tasks.

Acknowledgements

This research was financially supported by the University Grants Commission (UGC), Government of India, through the award of the Junior/Senior Research Fellowship (JRF/SRF) under the National Eligibility Test (NET) (Ref. No. 221610037786 & Ref. no. 221610070470). The work was also supported by the Council of Scientific and Industrial Research (CSIR), Government of India, through a CSIR Research Fellowship (09/0917(17235)/2023-EMR-I).

References

Proof of Theorem: Centralized multi-agent finite-time diffusion invariance

Theorem 11 (Centralized multi-agent finite-time diffusion invariance). Under Assumption 3, if at every reverse step jj the centralized projector enforces 4-7 (RoS or TVS) for all per-agent, pairwise, and task barriers at the enforcement index k=0k=0, then the joint denoising process is finite-time diffusion invariant for CC with probability 1 (with respect to the model noise). Moreover, the execution-time safety filter preserves invariance at runtime for the applied control utu_t.

Proof. We consider the joint state at reverse step jj and waypoint kk as xkj∈Rn\mathbf{x}_k^j \in\mathbb{R}^n and we collect all (self/pair/task) barriers in an index set L\mathcal{L} with bℓ:Rn→Rb_\ell:\mathbb{R}^n\to\mathbb{R}. We will first establish the claim for a single barrier at k=0k=0 and subsequently apply Lemma 4 to the conjunction over ℓ∈L\ell\in\mathcal{L}.

Step 1 (discrete-time CBF inequality at k=0k=0). By our Assumption 3, each bℓb_\ell is C1,1C^{1,1} near CC, hence, the first-order Taylor expansion with a quadratic remainder holds along the Euler reverse update τj=τj+1+Δτ uj\tau^j=\tau^{j+1}+\Delta\tau\,u^j:

bℓ(x0j)=bℓ(x0j+1)+Δτ ∇bℓ(x0j)⊤u0j+Rℓj,b_\ell(\mathbf{x}_0^j)=b_\ell(\mathbf{x}_0^{j+1})+\Delta\tau\,\nabla b_\ell(\mathbf{x}_0^j)^\top u_0^j+R_\ell^j,
∣Rℓj∣≤L∇bℓΔτ2∥uj∥2.\lvert R_\ell^j\rvert\le L_{\nabla b_\ell}\Delta\tau^2\lVert u^j\rVert^2.

for some local L∇bℓ>0L_{\nabla b_\ell}>0. Since in this case, the centralized projector enforces at k=0k=0, we have that either the RoS row ∇bℓ(x0j)⊤u0j+αℓ(bℓ(x0j))≥0\nabla b_\ell(\mathbf{x}_0^j)^\top u_0^j+\alpha_\ell(b_\ell(\mathbf{x}_0^j))\ge0, or the TVS row ∇bℓ(x0j)⊤u0j−γ˙(j)+αℓ(bℓ(x0j)−γ(j))≥0\nabla b_\ell(\mathbf{x}_0^j)^\top u_0^j-\dot{\gamma}(j)+\alpha_\ell(b_\ell(\mathbf{x}_0^j)-\gamma(j))\ge0, we obtain (for sufficiently small Δτ\Delta\tau) the reverse-time discrete CBF inequalities of Lemma 5 (with assumptions in Lemma):

RoS: bℓ(x0j)≥bℓ(x0j+1)−Δτ αℓ(bℓ(x0j))−cΔτ2b_\ell(\mathbf{x}_0^j)\ge b_\ell(\mathbf{x}_0^{j+1})-\Delta\tau\,\alpha_\ell(b_\ell(\mathbf{x}_0^j))-c\Delta\tau^2, (8)

TVS: b~ℓ(x0j)≥b~ℓ(x0j+1)−Δτ αℓ(b~ℓ(x0j))−cΔτ2\tilde{b}_\ell(\mathbf{x}_0^j)\ge\tilde{b}_\ell(\mathbf{x}_0^{j+1})-\Delta\tau\,\alpha_\ell(\tilde{b}_\ell(\mathbf{x}_0^j))-c\Delta\tau^2, (9)

b~ℓ(⋅):=bℓ(⋅)−γ(j)\tilde{b}_\ell(\cdot):=b_\ell(\cdot)-\gamma(j),

with c>0c>0 independent of jj on a compact neighborhood.

Step 2 (no boundary crossing in reverse time at k=0k=0). By Lemma 5, there exists Δˉ>0\bar{\Delta}>0 (depending on local Lipschitz constants and per-step bound umax⁡u_{\max}) such that for Δτ≤Δˉ\Delta\tau\le\bar{\Delta} we have the following monotonicity implications

bℓ(x0j+1)≥0⇒bℓ(x0j)≥0(RoS),b_\ell(\mathbf{x}_0^{j+1})\ge0\Rightarrow b_\ell(\mathbf{x}_0^j)\ge0\quad\text{(RoS)},
b~ℓ(x0j+1)≥0⇒b~ℓ(x0j)≥0(TVS).\tilde{b}_\ell(\mathbf{x}_0^{j+1})\ge0\Rightarrow\tilde{b}_\ell(\mathbf{x}_0^j)\ge0\quad\text{(TVS)}.

Hence, we have that nonnegativity at step j+1j+1 does implies nonnegativity at step jj for the enforced index k=0k=0.

Step 3 (finite-time reach at k=0k=0). If bℓ(x0N)≥0b_\ell(\mathbf{x}_0^N)\ge0 (RoS), then using Step 2 we have bℓ(x0j)≥0b_\ell(\mathbf{x}_0^j)\ge0 for all j≤Nj\le N and in this case, we may take i=Ni=N. On the other hand, if bℓ(x0N)<0b_\ell(\mathbf{x}_0^N)<0, we choose an extended class-K\mathcal{K} function αℓ\alpha_\ell with the finite-time property

∫−a0dsαℓ(s)<∞\int_{-a}^{0}\frac{ds}{\alpha_\ell(s)}<\infty

on [−a,0][-a,0] (which is a standard approach in finite-time CBF design), and take Δτ\Delta\tau small so that the O(Δτ2)O(\Delta\tau^2) truncation is dominated by Δτ αℓ(⋅)\Delta\tau\,\alpha_\ell(\cdot) (cf. Remark 6). Then the recursion (10) crosses into bℓ≥0b_\ell\ge0 in finitely many reverse steps; invariance back to earlier jj then follows using Step 2. For TVS, same argument applied to b~ℓ\tilde{b}_\ell yields b~ℓ(x00)≥0\tilde{b}_\ell(\mathbf{x}_0^0)\ge0 (since γ(0)=0\gamma(0)=0), hence, we have finite-time diffusion invariance with i=0i=0.

Step 4 (from k=0k=0 to all waypoints). If rows at all k∈{0,…,H}k\in\{0,\ldots,H\} are enforced for each of the first JJ reverse steps, then Step 1–3 apply verbatim at each kk, seeding and propagating a uniform margin that persists thereafter under k=0k=0-only enforcement. Alternatively, if the reverse model includes a temporally strongly convex regularizer (reference interpolation along with discrete Laplacian smoothing), then successive waypoint differences would contract and a margin at k=0k=0 will propagate to all kk thanks to a Lipschitz bound (as shown in SafeDiffuser [20] paper); hence we conclude that either route yields that there exists i≤Ni\le N such that xkj∈Ck\mathbf{x}_k^j\in C_k for all kk and all j≤ij\le i.

Step 5 (conjunction over barriers). Because the centralized projector enforces all active rows at k=0k=0 simultaneously, from Lemma 4 we have forward invariance implication for intersection ∩ℓ{bℓ≥0}\cap_{\ell}\{b_\ell\ge0\} at k=0k=0, and by Step 4 for all kk, hence for the trajectory-level safe set CC.

Step 6 (probability-one statement and execution-time filter). The randomness due to the reverse model appears only in u0ju_0^j (and τj+1\tau^{j+1}); we do note that the projection/QP map is deterministic and measurable. By Assumption 3, we have that the RoS projector is feasible (or ReS/TVS is feasible with ωj\0\omega^j\backslash0) at every reverse step with probability 1, hence we have ample implications hold almost surely. Finally, the execution-time CBF filter satisfies the instantaneous rows ∇bℓ(xt)⊤ut+αℓ(bℓ(xt))≥0\nabla b_\ell(x_t)^\top u_t+\alpha_\ell(b_\ell(x_t))\ge0 (or the TVS variant), and by the same discrete-time argument as in Lemma 5, the applied step preserves forward invariance at runtime. Combining Steps 1–6 gives the claim. □\square

Proof of Theorem 8: Decentralized Invariance

Theorem 12 (Decentralized invariance under bounded error). Assume that neighbor messages yield predictions denoted by x^b,0j\hat{x}_{b,0}^j with bounded error ∥x^b,0j−xb,0j∥2≤ε\lVert\hat{x}_{b,0}^j-x_{b,0}^j\rVert_2\le\varepsilon. Suppose each agent enforces its local pairwise CBF row with robust margin mrob>0m_{\mathrm{rob}}>0 and responsibility shares ρab,ρba∈(0,1)\rho_{ab},\rho_{ba}\in(0,1), ρab+ρba=1\rho_{ab}+\rho_{ba}=1. Let Lb,L∇,LαL_b,L_\nabla,L_\alpha be local Lipschitz constants (on a compact K\mathcal{K} containing the visited states) for babb_{ab}, its gradients, and α\alpha, respectively, and assume per-step bounds ∥uaj∥2≤umax⁡\lVert u_a^j\rVert_2\le u_{\max}. If

mrob≥12(2L∇umax⁡+LαLb)ε,(8)m_{\mathrm{rob}}\ge\frac{1}{2}\left(2L_\nabla u_{\max}+L_\alpha L_b\right)\varepsilon, \tag*{(8)}

then we have that the decentralized projected updates satisfy the true centralized pairwise inequalities. Consequently, the conclusions of Theorem 7 hold.

Proof. We give a robustness argument for one reverse step jj, at the enforced waypoint k=0k=0, and for an unordered pair (a,b)(a,b); the result then follows by taking the finite conjunction over all pairs and all enforced barriers. Throughout we assume that we work on a compact K\mathcal{K} guaranteed by our Assumption 3 and per-step bounds. Notation and assumptions. Let bab:Rna×Rnb→Rb_{ab}:\mathbb{R}^{n_a}\times\mathbb{R}^{n_b}\to\mathbb{R} be a C1,1C^{1,1} pairwise barrier with (Clarke) gradients ∇xabab,∇xbbab\nabla_{x_a}b_{ab},\nabla_{x_b}b_{ab}. We denote the true states at k=0k=0 by xa:=xajx_a:=x_a^j, xb:=xbjx_b:=x_b^j and the communicated predictions by the following x^b:=x^b,0j\hat{x}_b:=\hat{x}_{b,0}^j, x^a:=x^a,0j\hat{x}_a:=\hat{x}_{a,0}^j with

∥x^b−xb∥2≤ε,∥x^a−xa∥2≤ε.(9)\|\hat{x}_b-x_b\|_2\le\varepsilon,\qquad\|\hat{x}_a-x_a\|_2\le\varepsilon. \tag*{(9)}

Let ua,ubu_a,u_b denote the local increments chosen by the decentralized QPs (blocks of uju^j), and assume ∥ua∥2,∥ub∥2≤umax⁡\|u_a\|_2,\|u_b\|_2\le u_{\max}. Let α\alpha be an extended class–K\mathcal{K} function. Fix responsibility shares ρab,ρba∈(0,1)\rho_{ab},\rho_{ba}\in(0,1), ρab+ρba=1\rho_{ab}+\rho_{ba}=1. Each agent enforces a local robust constraint:

Agent aa:

∇xabab(xa,x^b)Tua+ρabα(bab(xa,x^b))≥mrob,(10)\nabla_{x_a}b_{ab}(x_a,\hat{x}_b)^\mathsf{T}u_a+\rho_{ab}\alpha(b_{ab}(x_a,\hat{x}_b))\ge m_{\mathrm{rob}}, \tag*{(10)}

Agent bb:

∇xbbab(x^a,xb)Tub+ρbaα(bab(x^a,xb))≥mrob.(11)\nabla_{x_b}b_{ab}(\hat{x}_a,x_b)^\mathsf{T}u_b+\rho_{ba}\alpha(b_{ab}(\hat{x}_a,x_b))\ge m_{\mathrm{rob}}. \tag*{(11)}

As mentioned before, self and task barriers do not use predictions and are enforced locally as in the centralized projector.

Goal. We show the true centralized pairwise inequality holds at (xa,xb)(x_a,x_b):

∇xabab(xa,xb)Tua+∇xbbab(xa,xb)Tub+α(bab(xa,xb))≥0.(12)\nabla_{x_a}b_{ab}(x_a,x_b)^\mathsf{T}u_a+\nabla_{x_b}b_{ab}(x_a,x_b)^\mathsf{T}u_b+\alpha(b_{ab}(x_a,x_b))\ge0. \tag*{(12)}

Summing (14) over all pairs (and combining with self or task rows) recovers the centralized rows at k=0k=0, so Theorem 7 applies.

Collect Lipschitz bounds. On K\mathcal{K} there exist Lb,L∇,Lα>0L_b,L_{\nabla},L_{\alpha}>0 such that

∣bab(xa,xb)−bab(xa,x^b)∣≤Lb∥xb−x^b∥2≤Lbε,(13)|b_{ab}(x_a,x_b)-b_{ab}(x_a,\hat{x}_b)|\le L_b\|x_b-\hat{x}_b\|_2\le L_b\varepsilon, \tag*{(13)}
∣bab(xa,xb)−bab(x^a,xb)∣≤Lbε,(14)|b_{ab}(x_a,x_b)-b_{ab}(\hat{x}_a,x_b)|\le L_b\varepsilon, \tag*{(14)}
∥∇xabab(xa,xb)−∇xabab(xa,x^b)∥≤L∇ε,(15)\|\nabla_{x_a}b_{ab}(x_a,x_b)-\nabla_{x_a}b_{ab}(x_a,\hat{x}_b)\|\le L_{\nabla}\varepsilon, \tag*{(15)}
∥∇xbbab(xa,xb)−∇xbbab(x^a,xb)∥≤L∇ε,(16)\|\nabla_{x_b}b_{ab}(x_a,x_b)-\nabla_{x_b}b_{ab}(\hat{x}_a,x_b)\|\le L_{\nabla}\varepsilon, \tag*{(16)}
∣α(r)−α(s)∣≤Lα∣r−s∣for r,s in the image of bab on K.(17)|\alpha(r)-\alpha(s)|\le L_{\alpha}|r-s|\qquad\text{for }r,s\text{ in the image of }b_{ab}\text{ on }\mathcal{K}. \tag*{(17)}

From local to centralized. Summing (12)–(13) yields

∇xabab(xa,x^b)Tua+∇xbbab(x^a,xb)Tub⏟Gpred+ρabα(bab(xa,x^b))+ρbaα(bab(x^a,xb))⏟Apred≥2mrob.(18)\underbrace{\nabla_{x_a}b_{ab}(x_a,\hat{x}_b)^\mathsf{T}u_a+\nabla_{x_b}b_{ab}(\hat{x}_a,x_b)^\mathsf{T}u_b}_{G_{\mathrm{pred}}} +\underbrace{\rho_{ab}\alpha(b_{ab}(x_a,\hat{x}_b))+\rho_{ba}\alpha(b_{ab}(\hat{x}_a,x_b))}_{A_{\mathrm{pred}}}\ge2m_{\mathrm{rob}}. \tag*{(18)}

By (18) and ∥ua∥2,∥ub∥2≤umax⁡\|u_a\|_2,\|u_b\|_2\le u_{\max},

Gtrue:=∇xabab(xa,xb)Tua+∇xbbab(xa,xb)Tub≥Gpred−∥∇xabab(xa,xb)−∇xabab(xa,x^b)∥∥ua∥2−∥∇xbbab(xa,xb)−∇xbbab(x^a,xb)∥∥ub∥2≥Gpred−2L∇umax⁡ε.(19)\begin{aligned} G_{\mathrm{true}}&:=\nabla_{x_a}b_{ab}(x_a,x_b)^\mathsf{T}u_a+\nabla_{x_b}b_{ab}(x_a,x_b)^\mathsf{T}u_b\\ &\ge G_{\mathrm{pred}}-\|\nabla_{x_a}b_{ab}(x_a,x_b)-\nabla_{x_a}b_{ab}(x_a,\hat{x}_b)\|\|u_a\|_2\\ &\qquad-\|\nabla_{x_b}b_{ab}(x_a,x_b)-\nabla_{x_b}b_{ab}(\hat{x}_a,x_b)\|\|u_b\|_2\\ &\ge G_{\mathrm{pred}}-2L_{\nabla}u_{\max}\varepsilon. \tag*{(19)} \end{aligned}

By (16)–(19) and ρab+ρba=1\rho_{ab}+\rho_{ba}=1,

Atrue:=α(bab(xa,xb))=ρabα(bab(xa,xb))+ρbaα(bab(xa,xb))≥Apred−ρabLαLbε−ρbaLαLbε=Apred−LαLbε.(20)\begin{aligned} A_{\mathrm{true}}&:=\alpha(b_{ab}(x_a,x_b))\\ &=\rho_{ab}\alpha(b_{ab}(x_a,x_b))+\rho_{ba}\alpha(b_{ab}(x_a,x_b))\\ &\ge A_{\mathrm{pred}}-\rho_{ab}L_{\alpha}L_b\varepsilon-\rho_{ba}L_{\alpha}L_b\varepsilon\\ &=A_{\mathrm{pred}}-L_{\alpha}L_b\varepsilon. \tag*{(20)} \end{aligned}

Adding (23)–(24) to (21) gives

∇xabab(xa,xb)Tua+∇xbbab(xa,xb)Tub+α(bab(xa,xb))⏟LHS of centralized row (14)≥2mrob−(2L∇umax⁡+LαLb)⏟=:Cpairε.(21)\underbrace{\nabla_{x_a}b_{ab}(x_a,x_b)^\mathsf{T}u_a+\nabla_{x_b}b_{ab}(x_a,x_b)^\mathsf{T}u_b+\alpha(b_{ab}(x_a,x_b))}_{\text{LHS of centralized row (14)}}\ge2m_{\mathrm{rob}}-\underbrace{(2L_{\nabla}u_{\max}+L_{\alpha}L_b)}_{=:C_{\mathrm{pair}}}\varepsilon. \tag*{(21)}

Thus we have that the true centralized inequality (14) holds whenever 2mrob≥Cpairε2m_{\mathrm{rob}}\ge C_{\mathrm{pair}}\varepsilon, i.e., we have the following

mrob≥12Cpairε=12(2L∇umax⁡+LαLb)ε.(22)m_{\mathrm{rob}}\ge\frac{1}{2}C_{\mathrm{pair}}\varepsilon=\frac{1}{2}(2L_{\nabla}u_{\max}+L_{\alpha}L_b)\varepsilon. \tag*{(22)}

All pairs, self/task rows, and probability-one statement. Since the number of pairs is finite, taking the maximum of CpairC_{\mathrm{pair}} over (a,b)(a,b) yields a single bound mrob≥(max⁡a<bCpair/2)εm_{\mathrm{rob}}\ge(\max_{a<b}C_{\mathrm{pair}}/2)\varepsilon ensuring all pairwise inequalities hold. Self and task rows are enforced locally (no prediction needed). The only randomness is in the unconstrained reverse drift; the local projections are deterministic measurable maps, and by Assumption 3 the local QPs are feasible with probability 1. Hence the above implication holds almost surely.

From one step to the full denoising process. At k=0k=0, the decentralized projections imply the centralized rows, so the hypothesis of Theorem 7 is satisfied on the enforced index. If the rows are also enforced at all kk, finite-time diffusion invariance follows immediately. In the receding-horizon case (only k=0k=0), the same temporal coupling argument as in Theorem 7 (via reference interpolation + Laplacian smoothing, or a brief all-kk phase) propagates a margin to all kk, completing the proof. □\square

Remark 13 (On the shorthand mrob≥εm_{\mathrm{rob}}\ge\varepsilon). The informal shorthand “mrob≥εm_{\mathrm{rob}}\ge\varepsilon” should be interpreted after normalization by local constants on K\mathcal{K} and the step bound umax⁡u_{\max}. The rigorous sufficient condition is (27). In practice we plug conservative upper bounds for L∇,Lb,Lα,umax⁡L_{\nabla},L_b,L_{\alpha},u_{\max} to pick a uniform margin.

Proof of Lemma 4: Barrier conjunction

Lemma 14 (Barrier conjunction). Let C=⋂ℓ=1L{z∈Rn:bℓ(z)≥0}C=\bigcap_{\ell=1}^{L}\{z\in\mathbb{R}^n:b_\ell(z)\ge0\} and consider the closed-loop system

z˙=u(z),z(0)=z0,\dot{z}=u(z),\qquad z(0)=z_0,

where u:Rn→Rnu:\mathbb{R}^n\to\mathbb{R}^n is locally Lipschitz. Suppose each bℓ:Rn→Rb_\ell:\mathbb{R}^n\to\mathbb{R} is locally Lipschitz and (Clarke) differentiable a.e., and there exists an extended class-K\mathcal{K} function αℓ:R→R\alpha_\ell:\mathbb{R}\to\mathbb{R} (continuous, strictly increasing, αℓ(0)=0\alpha_\ell(0)=0) such that, for all ℓ∈{1,…,L}\ell\in\{1,\ldots,L\} and all z∈Rnz\in\mathbb{R}^n,

∇bℓ(z)Tu(z)+αℓ(bℓ(z))≥0.(23)\nabla b_\ell(z)^\mathsf{T}u(z)+\alpha_\ell(b_\ell(z))\ge0. \tag*{(23)}

Then CC is forward invariant: if z0∈Cz_0\in C, every (Carathéodory) solution z(⋅)z(\cdot) with z(0)=z0z(0)=z_0 satisfies z(t)∈Cz(t)\in C for all t≥0t\ge0.

Proof. Step 0 (preliminaries). Local Lipschitzness of uu ensures existence and uniqueness of an absolutely continuous solution z:[0,T)→Rnz:[0,T)\to\mathbb{R}^n (Carathéodory sense). By Rademacher’s theorem each bℓb_\ell is differentiable a.e., and the chain rule gives for a.e. tt,

ddtbℓ(z(t))=∇bℓ(z(t))Tz˙(t)=∇bℓ(z(t))Tu(z(t)).\frac{d}{dt}b_\ell(z(t))=\nabla b_\ell(z(t))^\mathsf{T}\dot{z}(t)=\nabla b_\ell(z(t))^\mathsf{T}u(z(t)).

Fix ℓ\ell and write y(t):=bℓ(z(t))y(t):=b_\ell(z(t)).

Step 1 (a scalar nonnegativity certificate). Define the “violation measure” h:R→R≥0h:\mathbb{R}\to\mathbb{R}_{\ge0} by

h(s):=(−s)+=max⁡{−s,0}.h(s):=(-s)_+=\max\{-s,0\}.

Thus we have h(s)=0h(s)=0 iff s≥0s\ge0 and h(s)=−sh(s)=-s if s<0s<0. The map hh is 1-Lipschitz and differentiable a.e.; in particular, along y(⋅)y(\cdot) it is absolutely continuous with upper Dini derivative defined as follows

D+(h∘y)(t)=lim sup⁡Δ↓0h(y(t+Δ))−h(y(t))ΔD^{+}(h\circ y)(t)=\limsup_{\Delta\downarrow0}\frac{h(y(t+\Delta))-h(y(t))}{\Delta}

We show D+(h∘y)(t)≤0D^{+}(h\circ y)(t)\le0 for all tt (a.e., which suffices).

Case A (y(t)>0y(t)>0). Then h(y(t))=0h(y(t))=0 and hh is locally constant near y(t)y(t), so D+(h∘y)(t)=0D^{+}(h\circ y)(t)=0.

Case B (y(t)<0y(t)<0). Here h(y)=−yh(y)=-y, hence (a.e.)

ddth(y(t))=−y˙(t)=−∇bℓ(z(t))Tu(z(t)).\frac{d}{dt}h(y(t))=-\dot{y}(t)=-\nabla b_\ell(z(t))^{\mathsf T}u(z(t)).

Using (28) evaluated at z(t)z(t) yields

ddth(y(t))≤αℓ(y(t)).\frac{d}{dt}h(y(t))\le\alpha_\ell(y(t)).

Since y(t)<0y(t)<0 and αℓ\alpha_\ell is strictly increasing with αℓ(0)=0\alpha_\ell(0)=0, we have αℓ(y(t))<0\alpha_\ell(y(t))<0. Therefore ddth(y(t))<0\frac{d}{dt}h(y(t))<0 a.e. on {t:y(t)<0}\{t:y(t)<0\} and in particular D+(h∘y)(t)≤0D^{+}(h\circ y)(t)\le0.

Case C (y(t)=0y(t)=0). Taking the upper Dini derivative and using (28) with αℓ(0)=0\alpha_\ell(0)=0 gives the following

D+(h∘y)(t)≤(−∇bℓ(z(t))Tu(z(t)))+=0D^{+}(h\circ y)(t)\le\left(-\nabla b_\ell(z(t))^{\mathsf T}u(z(t))\right)_{+}=0

because ∇bℓ(z(t))Tu(z(t))≥0\nabla b_\ell(z(t))^{\mathsf T}u(z(t))\ge0 at points with y(t)=0y(t)=0. Hence, D+(h∘y)(t)≤0D^{+}(h\circ y)(t)\le0 also on the boundary.

Combining the three cases, we conclude

D+(h∘y)(t)≤0for all t≥0 (a.e.).(24)D^{+}(h\circ y)(t)\le0\qquad\text{for all }t\ge0\text{ (a.e.).} \tag*{(24)}

By a standard result for absolutely continuous functions, (29) implies h(y(t))h(y(t)) is nonincreasing in tt.

Step 2 (single-barrier invariance). If z(0)∈{bℓ≥0}:={x∈Rn:bℓ(x)≥0}z(0)\in\{b_\ell\ge0\}:=\{x\in\mathbb{R}^{n}:b_\ell(x)\ge0\} then y(0)=bℓ(z(0))≥0y(0)=b_\ell(z(0))\ge0, hence h(y(0))=0h(y(0))=0. Since h(y(⋅))h(y(\cdot)) is nonincreasing and always nonnegative, we must have h(y(t))≡0h(y(t))\equiv0 for all t≥0t\ge0, i.e.,

bℓ(z(t))=y(t)≥0∀t≥0.b_\ell(z(t))=y(t)\ge0\qquad\forall t\ge0.

Thus the superlevel set {bℓ≥0}\{b_\ell\ge0\} is forward invariant under z˙=u(z)\dot{z}=u(z).

Step 3 (conjunction). The argument in Step 2 holds for each ℓ∈{1,…,L}\ell\in\{1,\ldots,L\} because the same closed-loop field u(⋅)u(\cdot) satisfies (28) for all ℓ\ell simultaneously. If z(0)∈Cz(0)\in C, then bℓ(z(0))≥0b_\ell(z(0))\ge0 for every ℓ\ell, and by Step 2 we obtain bℓ(z(t))≥0b_\ell(z(t))\ge0 for every ℓ\ell and every $t\ge 0. Hence

z(t)∈⋂ℓ=1L{bℓ≥0}=C∀t≥0z(t)\in\bigcap_{\ell=1}^{L}\{b_\ell\ge0\}=C\qquad\forall t\ge0

which proves forward invariance of intersection.

Remarks. (i) On boundary {bℓ=0}\{b_\ell=0\}, (28) reduces to the classical Nagumo tangency [15] condition ∇bℓTu≥0\nabla b_\ell^{\mathsf T}u\ge0, ensuring viability; for bℓ<0b_\ell<0 the term αℓ(bℓ)<0\alpha_\ell(b_\ell)<0 forces ∇bℓTu>0\nabla b_\ell^{\mathsf T}u>0, driving trajectories back toward the safe side. (ii) The proof extends verbatim to locally Lipschitz bℓb_\ell (we implicitly used that each barrier bℓb_\ell is at least C1C^1 (and in some places C1,1C^{1,1}) by replacing pointwise gradients with Clarke generalized gradients and interpreting derivatives a.e.; the Dini-derivative argument remains valid. □

Proof of Lemma: Discrete-time CBF monotonicity

Lemma 15 (Discrete-time CBF monotonicity). Let b∈C1,1b\in C^{1,1} on a neighborhood of the safe set with locally Lipschitz gradient constant L∇bL_{\nabla b}, and let α\alpha be an extended class-K\mathcal{K} function. Assume that the (reverse-time) control update uju^{j} at xjx^{j} satisfies the CBF row condition

∇b(xj)Tuj+α(b(xj))≥0(25)\nabla b(x^{j})^{\mathsf T}u^{j}+\alpha(b(x^{j}))\ge0 \tag*{(25)}

and consider the reverse-time Euler step

xj=xj+1+Δτ uj,∥uj∥≤umax⁡(26)x^{j}=x^{j+1}+\Delta\tau\,u^{j},\qquad\lVert u^{j}\rVert\le u_{\max} \tag*{(26)}

Then there exists a constant c>0c>0 (e.g., c=12L∇bumax⁡2c=\frac{1}{2}L_{\nabla b}u_{\max}^{2}) such that, for any

Δτ≤Δˉ:=min⁡{1,α′(0)2L∇bumax⁡},\Delta\tau\le\bar{\Delta}:=\min\left\{1,\frac{\alpha'(0)}{2L_{\nabla b}u_{\max}}\right\},

the following one-step inequality holds

b(xj)≥b(xj+1)−Δτ α(b(xj))−cΔτ2(27)b(x^{j})\ge b(x^{j+1})-\Delta\tau\,\alpha(b(x^{j}))-c\Delta\tau^{2} \tag*{(27)}

In particular, if b(xj+1)≥0b(x^{j+1})\ge0 then we get the following

b(xj)≥−cΔτ2(28)b(x^{j})\ge-c\Delta\tau^{2} \tag*{(28)}

i.e., nonnegativity is preserved up to a second-order discretization error. If, in addition, either bb is affine in a neighborhood of the boundary (so L∇b=0L_{\nabla b}=0 and hence c=0c=0) or a small terminal margin b(xj+1)≥cΔτ2b(x^{j+1})\ge c\Delta\tau^{2} is enforced (e.g., via TVS), then b(xj)≥0b(x^{j})\ge0.

Proof. We work with the integral mean-value representation of the increment of bb and use the C1,1C^{1,1} property of bb (Lipschitz gradient). Let h:=Δτ ujh:=\Delta\tau\,u^{j}; then xj=xj+1+hx^{j}=x^{j+1}+h. By the fundamental theorem of calculus, we have the following

b(xj)−b(xj+1)=∫01∇b(xj+1+sh)Th ds(29)b(x^{j})-b(x^{j+1})=\int_{0}^{1}\nabla b(x^{j+1}+sh)^{\mathsf T}h\,ds \tag*{(29)}

Add and subtract ∇b(xj)\nabla b(x^{j}) inside the integrand and use the Lipschitz property of ∇b\nabla b:

b(xj)−b(xj+1)=∫01(∇b(xj)+[∇b(xj+1+sh)−∇b(xj)])Th ds=∇b(xj)Th+∫01(∇b(xj+1+sh)−∇b(xj))Th ds≥∇b(xj)Th−∫01∥∇b(xj+1+sh)−∇b(xj)∥∥h∥ ds≥∇b(xj)Th−∫01L∇b∥xj+1+sh−xj∥∥h∥ ds=∇b(xj)Th−∫01L∇b(1−s)∥h∥2 ds=∇b(xj)Th−12L∇b∥h∥2.(30)\begin{aligned} b(x^{j})-b(x^{j+1}) &=\int_{0}^{1}\left(\nabla b(x^{j})+\left[\nabla b(x^{j+1}+sh)-\nabla b(x^{j})\right]\right)^{\mathsf T}h\,ds\\ &=\nabla b(x^{j})^{\mathsf T}h+\int_{0}^{1}\left(\nabla b(x^{j+1}+sh)-\nabla b(x^{j})\right)^{\mathsf T}h\,ds\\ &\ge\nabla b(x^{j})^{\mathsf T}h-\int_{0}^{1}\lVert\nabla b(x^{j+1}+sh)-\nabla b(x^{j})\rVert\lVert h\rVert\,ds\\ &\ge\nabla b(x^{j})^{\mathsf T}h-\int_{0}^{1}L_{\nabla b}\lVert x^{j+1}+sh-x^{j}\rVert\lVert h\rVert\,ds\\ &=\nabla b(x^{j})^{\mathsf T}h-\int_{0}^{1}L_{\nabla b}(1-s)\lVert h\rVert^{2}\,ds\\ &=\nabla b(x^{j})^{\mathsf T}h-\frac{1}{2}L_{\nabla b}\lVert h\rVert^{2}. \tag*{(30)} \end{aligned}

Recalling h=Δτ ujh=\Delta\tau\,u^{j} and applying the CBF inequality (30), we obtain

b(xj)≥b(xj+1)+Δτ∇b(xj)Tuj−12L∇bΔτ2∥uj∥2≥b(xj+1)−Δτ α(b(xj))−12L∇bΔτ2∥uj∥2.(31)\begin{aligned} b(x^{j})&\ge b(x^{j+1})+\Delta\tau\nabla b(x^{j})^{\mathsf T}u^{j}-\frac{1}{2}L_{\nabla b}\Delta\tau^{2}\lVert u^{j}\rVert^{2}\\ &\ge b(x^{j+1})-\Delta\tau\,\alpha(b(x^{j}))-\frac{1}{2}L_{\nabla b}\Delta\tau^{2}\lVert u^{j}\rVert^{2}. \tag*{(31)} \end{aligned}

Finally, by using ∥uj∥≤umax⁡\lVert u^{j}\rVert\le u_{\max} we can set

c:=12L∇bumax⁡2c:=\frac{1}{2}L_{\nabla b}u_{\max}^{2}

to obtain (32) exactly. This proves the first claim.

For the “in particular” statement, suppose b(xj+1)≥0b(x^{j+1}) \ge0. From (32) we get

b(xj)+Δτ α(b(xj))≥−c Δτ2(32)b(x^j) + \Delta\tau\,\alpha(b(x^j)) \ge-c\,\Delta\tau^2 \tag*{(32)}

Define ϕΔ(s):=s+Δτ α(s)\phi_{\Delta}(s) := s + \Delta\tau\,\alpha(s). Since α\alpha is strictly increasing with α(0)=0\alpha(0) = 0, ϕΔ\phi_{\Delta} is strictly increasing; thus ϕΔ(s)≥−c Δτ2\phi_{\Delta}(s) \ge-c\,\Delta\tau^2 implies s≥s⋆(Δτ)s \ge s_{\star}(\Delta\tau), where s⋆(Δτ)s_{\star}(\Delta\tau) is the unique solution of ϕΔ(s⋆)=−c Δτ2\phi_{\Delta}(s_{\star}) = -c\,\Delta\tau^2. By differentiability of α\alpha at 0 and α′(0)>0\alpha'(0) > 0, a first-order expansion gives

s⋆(Δτ)=−c Δτ21+Δτ α′(0)=−c Δτ2+O(Δτ3)(33)s_{\star}(\Delta\tau) = -\frac{c\,\Delta\tau^2}{1+\Delta\tau\,\alpha'(0)} = -c\,\Delta\tau^2 + O(\Delta\tau^3) \tag*{(33)}

so in particular s⋆(Δτ)≥−c Δτ2s_{\star}(\Delta\tau) \ge-c\,\Delta\tau^2 for all sufficiently small Δτ\Delta\tau. Therefore b(xj)≥−c Δτ2b(x^j) \ge-c\,\Delta\tau^2, which is (33). Two common ways to upgrade this “practical” nonnegativity to exact nonnegativity are:

  1. If bb is affine near the boundary, then L∇b=0L_{\nabla b} = 0 so c=0c = 0, and (32) simplifies to b(xj)≥b(xj+1)−Δτ α(b(xj))b(x^j) \ge b(x^{j+1}) - \Delta\tau\,\alpha(b(x^j)); with b(xj+1)≥0b(x^{j+1}) \ge0 and α(b(xj))≤0\alpha(b(x^j)) \le0 for b(xj)≤0b(x^j) \le0, it follows that b(xj)≥0b(x^j) \ge0.

  1. If one enforces a tiny terminal margin b(xj+1)≥c Δτ2b(x^{j+1}) \ge c\,\Delta\tau^2 (e.g., by a time-varying specification), then (32) yields b(xj)≥0b(x^j) \ge0 directly.

The bound Δτ≤Δˉ\Delta\tau\le\bar{\Delta} is not needed to derive (32); it is useful to guarantee that ϕΔ\phi_{\Delta} remains strongly increasing near the origin (slope 1+Δτ α′(0)≥1+12Δτ α′(0)>01 + \Delta\tau\,\alpha'(0) \ge1 + \frac{1}{2}\Delta\tau\,\alpha'(0) > 0) and to make the O(Δτ2)O(\Delta\tau^2) term uniformly small relative to the linear term. □

More Experiments

In Figure 3, we do an extensive scaling study of our method with 2,4,8 agents. We report the mean of various runs with safe and unsafe agents. For the safe agents the violations are much less compared to unsafe. Note that our safe criteria also includes close proximity to wall and not necessarily hitting the wall, hence, as we verify from Figure 4, there are actually, almost negligible cases of safe agents hitting the wall when compared to unsafe agents. In the end, we believe that more extensive finetuning of parameters may result in even better results.

Scaling behavior of MA-SafeDiffuser under increasing multi-agent density

Figure 3. Scaling behavior of MA-SafeDiffuser under increasing multi-agent density (M = 2, 4, 8). Each bar reports the mean performance over 3 trials. The three subplots respectively show (a) average safety violations per episode, (b) success rate (%), and (c) Total reward per episode. Safe variants (green / blue) apply CBF-based safety projection, while unsafe variants (red / orange) execute unconstrained diffusion rollouts. Centralized SafeDiffuser enforces a joint global constraint, whereas decentralized SafeDiffuser applies local per-agent safety filtering.

Qualitative results for Decentralized MA-SafeDiffuser

Figure 4. Qualitative Results for Decentralized MA-SafeDiffuser. Each panel shows Safe (solid) vs. Unsafe trajectories across random initializations for M=2M=2, 4, 8 agents. For 2 agents, Vsafe=16V_{safe}=16, Vunsafe=27V_{unsafe}=27, and for 4 agents, Vsafe=22V_{safe}=22, Vunsafe=32V_{unsafe}=32 and for 8 agents, Vsafe=56V_{safe}=56, Vunsafe=65V_{unsafe}=65. SafeDiffuser agents maintain clearances through doors and corners, while Unsafe diffusion plans exhibit oscillations and occasional wall crossings.

References

  1. [1]Aaron D. Ames, Xiangru Xu, Jessy W. Grizzle, and Paulo Tabuada. 2017. Control Barrier Function Based Quadratic Programs for Safety Critical Systems. IEEE Trans. Automat. Control 62, 8 (2017), 3861–3876.DOI
  2. [2]Brandom Amos and J. Zico Kolter. 2017. OptNet: differentiable optimization as a layer in neural networks. In Proceedings of the 34th International Conference on Machine Learning - Volume 70 (ICML’17). JMLR.org, Sydney, Australia, 136–145.
  3. [3]Heinz H. Bauschke and Patrick L. Combettes. 2017. Convex Analysis and Monotone Operator Theory in Hilbert Spaces (2nd ed.). Springer, Cham.
  4. [4]Stephen Boyd, Neal Parikh, Eric Chu, Borja Peleato, Jonathan Eckstein, et al. 2011. Distributed optimization and statistical learning via the alternating direction method of multipliers. Foundations and Trends in Machine Learning 3, 1 (2011), 1–122.
  5. [5]Prafulla Dhariwal and Alexander Nichol. 2021. Diffusion models beat GANs on image synthesis. In Proceedings of the 35th International Conference on Neural Information Processing Systems (NIPS ’21). Curran Associates Inc., Red Hook, NY, USA, Article 672, 15 pages.
  6. [6]Steven Diamond and Stephen Boyd. 2016. CVXPY: A Python-Embedded Modeling Language for Convex Optimization. Journal of Machine Learning Research 17, 83 (2016), 1–5.
  7. [7]Richard L Dykstra. 1983. An Algorithm for Restricted Least Squares Regression. J. Amer. Statist. Assoc. 78, 384 (1983), 837–842.DOI
  8. [8]Paolo Fiorini and Zvi Shiller. 1998. Motion Planning in Dynamic Environments Using Velocity Obstacles. The International Journal of Robotics Research 17, 7 (1998), 760–772.DOI
  9. [9]Paul Golfetto, Jorge Cortés, and Magnus Egerstedt. 2017. Nonsmooth Barrier Functions With Applications to Multi-Robot Systems. IEEE Control Systems Letters 1, 2 (2017), 310–315.
  10. [10]Jonathan Ho, Ajay Jain, and Pieter Abbeel. 2020. Denoising diffusion probabilistic models. In Proceedings of the 34th International Conference on Neural Information Processing Systems (Vancouver, BC, Canada). Curran Associates Inc., Red Hook, NY, USA, 6840–6851.arxiv.org/abs/2006.11239
  11. [11]Michael Janner, Yilun Du, Joshua B. Tenenbaum, and Sergey Levine. 2022. Planning with Diffusion for Flexible Behavior Synthesis. arXiv:2205.09991 [cs.LG] https://arxiv.org/abs/2205.09991
  12. [12]Oussama Khatib. 1986. Real-Time Obstacle Avoidance for Manipulators and Mobile Robots. The International Journal of Robotics Research 5, 1 (1986), 90–98.
  13. [13]Ankita Kushwaha, Kiran Ravish, Preeti Lamba, and Pawan Kumar. 2025. A Survey of Safe Reinforcement Learning and Constrained MDPs: A Technical Survey on Single-Agent and Multi-Agent Safety. arXiv:2505.17342 [cs.LG] https://arxiv.org/abs/2505.17342
  14. [14]Ryan Lowe, Yi Wu, Aviv Tamar, Jean Harb, Pieter Abbeel, and Igor Mordatch. 2017. Multi-agent actor-critic for mixed cooperative-competitive environments. In Proceedings of the 31st International Conference on Neural Information Processing Systems (Long Beach, California, USA) (NIPS’17). Curran Associates Inc., Red Hook, NY, USA, 6382–6393.arxiv.org/abs/1706.02275
  15. [15]Mitio M. 1942. Über die Lage der Integralkurven gewöhnlicher Differentialgleichungen. Proceedings of the Physico-Mathematical Society of Japan, Third Series 24 (1942), 551–559.
  16. [16]Quan Nguyen and Koushil Sreenath. 2016. Exponential Control Barrier Functions for Enforcing High Relative-Degree Safety-Critical Constraints. In Proceedings of the 2016 American Control Conference (ACC). IEEE, Boston, MA, USA, 322–328.
  17. [17]Bartolomeo Stellato, Goran Banjac, Paul Goulart, Alberto Bemporad, and Stephen Boyd. 2020. OSQP: An operator splitting solver for quadratic programs. Mathematical Programming Computation 12, 4 (2020), 637–672.
  18. [18]Justin K Terry, Benjamin Black, Mario Jakubik, Ananth Hari, Luis Santos, Clemens Dieffenbahl, Niall L Williams, Yashas Lokesh, Ryan Sullivan, Caroline Horsch, and Praveen Ravi. 2021. PettingZoo: Gym for Multi-Agent Reinforcement Learning. https://openreview.net/forum?id=YVwQYsU8aZ
  19. [19]Jur van den Berg, Stephen J. Guy, Ming Lin, and Dinesh Manocha. 2011. Reciprocal n-Body Collision Avoidance. In Robotics Research. Springer Berlin Heidelberg, Berlin, Heidelberg, 3–19.
  20. [20]Wei Xiao, Tsun-Hsuan Wang, Chuang Gan, and Daniela Rus. 2023. SafeDiffuser: Safe Planning with Diffusion Probabilistic Models. arXiv:2306.00148 [cs.LG] https://arxiv.org/abs/2306.00148
  21. [21]Chao Yu, Akash Velu, Eugene Vinitsky, Jiaxuan Gao, Yu Wang, Alexandre Bayen, and Yi Wu. 2021. The Surprising Effectiveness of PPO in Cooperative, Multi-Agent Games. arXiv:2103.01955 [cs.LG] https://arxiv.org/abs/2103.01955

Paper details

vlnc:W_5xvd9b7k
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents