✗ Failed on benchmark 2026

Barrier-Guided Diffusion Sampling

Implementation & benchmark of arXiv:2607.10842 — D-SafeMPC: Diffusion-Driven Safe Model Predictive Control with Discrete-Time Control Barrier Functions

Usefulness7/10
Difficulty5/10
Novelty5/10

Source paper: D-SafeMPC: Diffusion-Driven Safe Model Predictive Control with Discrete-Time Control Barrier Functions arXiv:2607.10842 ⓘ · analyzed Aug 30, 2026

AI-generated research hypothesis, automatically tested. Not peer-reviewed.

Idea description

Insert a differentiable discrete-time control-barrier correction into the reverse diffusion process for action or trajectory generation. At each denoising step, roll out the candidate trajectory through a learned or known dynamics model, compute the minimum collision margin against all obstacles, and modify the denoising output toward trajectories satisfying one-step barrier inequalities. Unlike rejection sampling, this uses barrier gradients to repair unsafe samples before the final action is executed.

Formulas

$$\dot{\mathbf{x}}=\mathbf{f}(\mathbf{x})+\mathbf{g}(\mathbf{x})\mathbf{u},\quad \mathbf{x}\in\mathcal{X}\subseteq\mathbb{R}^{n},\quad \mathbf{u}\in\mathcal{U}\subseteq\mathbb{R}^{m}.$$
$$\bar{\mathbf{x}}_{k+1}=\bar{\mathbf{F}}(\bar{\mathbf{x}}_{k},\mathbf{u}_{k}).$$
$$h_j(\bar{\mathbf{x}})=\|\mathbf{x}-\mathbf{x}_j\|^{2}-r_j^{2},\qquad h(\bar{\mathbf{x}})=\min_{j\in\{1,\ldots,N_J\}}\left[h_j(\bar{\mathbf{x}})\right].$$
$$\tilde h_\tau(\bar{\mathbf{x}})=-\tau\log\!\sum_{j=1}^{N_J}\exp\!\left(-\frac{h_j(\bar{\mathbf{x}})}{\tau}\right),\qquad \phi_k=\left[(1-\alpha)\tilde h_\tau(\bar{\mathbf{x}}_k)-\tilde h_\tau(\bar{\mathbf{x}}_{k+1})\right]_+^2.$$

Mathematical statement

The paper models a control-affine system as $\dot{\mathbf{x}}=\mathbf{f}(\mathbf{x})+\mathbf{g}(\mathbf{x})\mathbf{u}$, where $\mathbf{x}\in\mathbb{R}^{n}$ is the state, $\mathbf{u}\in\mathbb{R}^{m}$ is the control, $\mathbf{f}$ is the drift vector field, and $\mathbf{g}$ is the actuation matrix. For moving obstacles it augments the robot state with obstacle states and represents discrete dynamics by $\bar{\mathbf{x}}_{k+1}=\bar{\mathbf{F}}(\bar{\mathbf{x}}_{k},\mathbf{u}_{k})$, where $\bar{\mathbf{x}}_{k}$ contains the robot and all obstacle states. The collision barrier for obstacle $j$ is $h_j(\bar{\mathbf{x}})=\|\mathbf{x}-\mathbf{x}_j\|^2-r_j^2$, with robot position $\mathbf{x}$, obstacle position $\mathbf{x}_j$, and obstacle radius $r_j$; safety requires $h_j\geq0$. The paper combines all constraints through the nonsmooth worst-case margin $h(\bar{\mathbf{x}})=\min_{j\in\{1,\ldots,N_J\}}h_j(\bar{\mathbf{x}})$. For differentiable neural guidance, use the soft minimum $\tilde h_\tau(z_1,\ldots,z_{N_J})=-\tau\log\sum_j\exp(-z_j/\tau)$, where $\tau>0$ controls sharpness. The adapted discrete barrier condition is $\tilde h_\tau(\bar{\mathbf{x}}_{k+1})\geq(1-\alpha)\tilde h_\tau(\bar{\mathbf{x}}_k)$, with $\alpha\in(0,1]$. Penalize violations by $\phi_k=[(1-\alpha)\tilde h_\tau(\bar{\mathbf{x}}_k)-\tilde h_\tau(\bar{\mathbf{x}}_{k+1})]_+^2$, where $[q]_+=\max(q,0)$.

Implementation notes

Integrate the method at the reverse-diffusion sampler for a model that generates a horizon of controls $U=(u_0,\ldots,u_{H-1})$ or states and controls jointly. Keep the denoiser unchanged initially. At diffusion step $s$, obtain the current noisy action sequence $U_s$, run a differentiable dynamics model from the observed state to produce $\bar x_0,\ldots,\bar x_H$, and include predicted obstacle states in $\bar x_k$ when available. For every horizon step, compute $h_{j,k}=\|x_k-x_{j,k}\|^2-r_j^2$ for each obstacle and then compute $\tilde h_{\tau,k}=-\tau\log\sum_j\exp(-h_{j,k}/\tau)$. Form $L_B=\sum_{k=0}^{H-1}[(1-\alpha)\tilde h_{\tau,k}-\tilde h_{\tau,k+1}]_+^2+\beta\sum_{k=0}^{H}[-\tilde h_{\tau,k}]_+^2$, where $\beta$ weights absolute collision avoidance. Backpropagate through the rollout and apply classifier-guidance-style correction after the ordinary reverse step: $U_s\leftarrow U_s-\eta_s\nabla_{U_s}L_B$, or modify the predicted noise with $\epsilon'_s=\epsilon_s-\gamma_s\nabla_{U_s}L_B$. Clip controls to the admissible set $\mathcal U$ and execute only $u_0$. The paper supplies the barrier geometry and augmented dynamics structure; estimate dynamics derivatives using autodiff through a differentiable simulator or learned world model, and estimate obstacle motion using tracking or a motion predictor. Begin with a 2D point-mass diffusion policy and circular obstacles. Compare vanilla diffusion, rejection sampling, and barrier guidance at equal denoising steps. Record collision rate, percentage of samples satisfying all barrier inequalities, goal error, sampling latency, and task success. The expected signal is at least a twofold reduction in collisions at matched task success, with substantially less wasted computation than rejection sampling and no large increase in goal error.

Verification

Failed on benchmark

Stage 1 · Toy mechanism gate: Passed ✓

Stage 2 · Mechanism transferred to benchmark: Not reproduced ✗

Stage 2 · Practical benchmark result: No measurable effect

Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works

Stage 1 — Mechanism check agent confidence 8/10

Built a differentiable 2D point-mass diffusion-style sampler with rollout, soft-min collision barriers, gradient guidance, clipping, and vanilla/rejection baselines. The mechanism manifested: soft-min gaps stayed below the predicted tau*log(3) bound, barrier-loss reductions matched eta*||grad||^2 to close first-order accuracy, and collision rate transitioned from 1.0 at guidance 0.24 to 0.0 at 0.40+. Guidance reduced collisions from 100% to 0.03% in the matched comparison, but increased goal error from 0.033 to 0.487 and latency from 0.086 to 1.62 ms/sample, so this is a safety win with a major task-quality tradeoff rather than an unqualified improvement.

Agent confidence
8/10
Baseline
Vanilla: collision=1.000, barrier-satisfying=0.000, goal_error=0.0331, latency=0.0856 ms/sample. Rejection: 0 accepted samples after 30 batches, acceptance=0, approximately 2.64 ms/sample bookkeeping cost.
Idea
Barrier guidance strength=0.45: collision=0.00033, barrier-satisfying=0.026, goal_error=0.4875, latency=1.62 ms/sample. Strength sweep: collision was 1.000 at 0.24, 0.577 at 0.32, and 0.000 at 0.40/0.45/0.52/0.60; barrier satisfaction reached 1.000 at strength 0.60.

Limitations: This is a tiny synthetic static-obstacle environment, not a trained diffusion policy or learned dynamics model. The sampler is diffusion-style iterative refinement rather than a calibrated DDPM reverse process; only one obstacle layout, fixed seeds, and CPU execution were tested, and rejection sampling failed to find feasible samples under the 30-batch cap.

How to run: python3 experiment.py

Stage 2 — Benchmark vs. tuned baseline (arXiv:2607.10842)

Ahead of the baseline (−1.0%) but not statistically significant (p=0.3179, wins 5 / 8 paired seeds).

Benchmark
Dynamics forecasting
Model
rnn_small
Paired seeds
8
Baseline mean
0.0066
Idea mean
0.0065
Effect (Δ)
-0.0001 (−1.0%; negative = idea better)
Wins
5 / 8 paired seeds
p-value
0.3179 (permutation test, 20 000 shuffles)
Smallest detectable effect
±2.2%
Mechanism
Not confirmed ✗
Practical effect
No effect
Baseline tuning
swept over 9 configs
Limitations:

This registered dynamics task is one-step pendulum-angle regression, not multi-step diffusion-policy generation with geometric obstacles. The virtual angular safety barrier was inactive on trained outputs, so the mechanism signature was not confirmed and collision-reduction claims were not tested.

How to run: python3 stage2_barrier_bench.py

Verdict computed by deterministic test code from paired-seed statistics — not by the language model.

Stage 2 — Benchmark latest Failed ✗

Agent confidence: 10/10

Barrier-Guided Diffusion was implemented and evaluated on the structurally matched registered dynamics track with paired seeds and a tuned baseline sweep. The idea slightly reduced test MSE, but the paired permutation test was not significant (delta=-0.00006304, p=0.31785), so the required significant-win criterion was not met. The trained-model mechanism signature was also not confirmed because the barrier loss was zero and inactive.

Baseline
Best configuration lr=0.003, barrier_weight=0.0; full 8-seed MSE mean=0.006579207838512957, std=0.0036985611984448895.
Comparison
delta_mean=-6.304326234385371e-05; p_value=0.31785; verdict=no measurable effect.
Idea
Best configuration lr=0.003, barrier_weight=0.1, alpha=0.35, beta=2.0, tau=0.08; full 8-seed MSE mean=0.006516164576169103, std=0.0036292541386811887; 5/8 paired wins.

Benchmark result

Ahead of the baseline (−1.0%) but not statistically significant (p=0.3179, wins 5 / 8 paired seeds).

Benchmark
Dynamics forecasting
Model
rnn_small
Paired seeds
8
Baseline mean
0.0066
Idea mean
0.0065
Effect (Δ)
-0.0001 (−1.0%; negative = idea better)
Wins
5 / 8 paired seeds
p-value
0.3179 (permutation test, 20 000 shuffles)
Smallest detectable effect
±2.2%
Mechanism
Not confirmed ✗
Practical effect
No effect
Baseline tuning
swept over 9 configs
Limitations:

This registered dynamics task is one-step pendulum-angle regression, not multi-step diffusion-policy generation with geometric obstacles. The virtual angular safety barrier was inactive on trained outputs, so the mechanism signature was not confirmed and collision-reduction claims were not tested.

How to run: python3 stage2_barrier_bench.py

Artifacts

Implementation overview ⬇ Download all as ZIP 6 files · code, reports and structured results