Certify, Then Select: Viability-Aware Runtime Steering of Frozen Diffusion Policies
Diffusion policies, which generate short action sequences by denoising random noise, are a leading way to learn robot skills from demonstrations. Once deployed, they meet constraints the demonstrations never contained, and retraining for each is impractical.
From the abstract. Our summary is in progress.
Full paper
Certify, Then Select: Viability-Aware Runtime Steering of Frozen Diffusion Policies
Published under CC BY 4.0. Reproduced with attribution; original at arXiv:2611.19047 (PDF).
Abstract
Diffusion policies, which generate short action sequences by denoising random noise, are a leading way to learn robot skills from demonstrations. Once deployed, they meet constraints the demonstrations never contained, and retraining for each is impractical. A safety filter edits the policy’s action to satisfy them, but the edit ignores the task, and a large edit can leave the policy where it cannot continue. We propose CAST (Certified Action Selection at Test time): draw a few action chunks from the frozen policy, certify each with a barrier condition, and execute the certified chunk that a learned value ensemble ranks highest. We prove that a certified step is safe whatever the critic does; that, whenever a certified sample exists, the executed chunk stays within \log N nats of the policy conditioned on feasibility, while a safety-filter projection can be singular to it; and that an exact closed-loop identity splits the gain of ranking into availability, spread and the critic’s target. Certifying the next chunk is not enough: a generative controller can have safe actions available now and none later. We characterise the safe control authority of a frozen policy under finite sampling, and cast-V preserves it through a policy-conditioned viability, estimated with a model under a finite-sample guarantee or learned from the controller’s own logs (cast-VL). On robomimic manipulation, a planar quadrotor, a MuJoCo humanoid and a unicycle, with frozen policies, cast raises joint task-and-constraint success above the output filter in nearly every setting; certifying before ranking is decisive where a filter’s edit is large, and viability removes most dead ends that one-step certification cannot see. Project page: https://clmoro.github.io/cast.
1 Introduction
Diffusion policies learn dexterous manipulation from demonstrations (Chi et al., 2023). Once deployed, a policy meets constraints its demonstrations never contained: a person reaches across the table, a shelf is mounted above the workspace, the commanded effort must stay within a budget. Retraining for each is impractical. We want to enforce a constraint that arrives at run time, a request, on a policy that stays frozen.
The classical tool is a safety filter: take the action the policy proposes and edit it as little as needed for a certificate, such as a control barrier function, to hold (Ames et al., 2017; Wabersich and Zeilinger, 2021; Hsu et al., 2024). Variants for diffusion policies apply the same edit inside the denoising loop (Xiao et al., 2025; Römer et al., 2025). An edit answers the question “is this action safe?”. It does not ask whether the task can still be completed. A small edit leaves the policy as good or as bad as it was. A large one, as under an effort budget or when a zone blocks the policy’s route, leaves the robot where the policy has no data, and it stalls (Figure 1a). Neither helps the task: in our experiments no method that keeps the policy and has no critic reliably beats the plain output filter in joint task-and-request success (Table 1).
A diffusion policy offers a resource that a deterministic controller lacks: for one observation it can propose many different, equally plausible actions. cast (Certified Action Selection at Test time, Algorithm 3) uses this resource twice. It draws a few action chunks from the frozen policy, certifies each against the request, and executes the certified chunk that a value ensemble ranks highest. Only if no sample is certified does it fall back to the filter. The certificate provides safety, the critic provides task success, and whenever a certified sample exists the executed action is one the policy itself produced. But certification looks one step ahead, and a generative controller can have safe actions available today but lack safe behaviours tomorrow. Runtime constraint steering should preserve the learned policy’s future control authority, not merely certify its next action: cast-V prefers chunks after which certified samples remain likely (Figure 1b).
h\geq 0 (shading: the barrier), but its rollouts on the blocked route stall at the zone: the policy never learned to continue from there (40 rollouts, with counts). (b) Viability v of the policy’s certified chunks, by simulation: the probability that it keeps sampling certified chunks over the next 8 decisions. Certified chunks exist in the red region too, but lead to a dead end; of the N=8 drawn at one decision four head into it, and cast-V executes a viable one. (c) The same map from a network trained on the controller’s logs, without model rollouts (cast-VL): its boundary v=0.5 (black) follows the simulated one (white) where the rollouts pass. (d) Joint success on 500 unseen zones per policy; cast, cast-V and cast-VL use the task critic, MPPI the model, map and goal.Contributions.
- Method. cast enforces a runtime request on a frozen diffusion policy by certifying sampled chunks and then ranking the certified ones (Section 3). It needs no retraining and one batched sampling pass per decision (15 ms on Can). Select-then-filter, which uses the same samples and critic but reverses the order, isolates the benefit of certifying before ranking.
- Theory (Section 4; proofs in Appendix A). Four results say what each ingredient provides; the first three specialise known tools to sampling, certifying and selecting, and the fourth is the new object. Safety: a certified step is safe whatever the critic does, and one conformal calibration bounds the forecast risk for every controller (Theorem 1). Faithfulness: when a certified sample exists, selection stays within
\log Nnats of the policy conditioned on feasibility, whereas a projection can leave its support (Theorem 2). Performance: an exact closed-loop identity says when ranking improves the task, through availability, spread and the critic’s target (Theorem 3). Authority: the best any selection rule can do withNsamples to keep certified actions available grows withNonly up to what the policy samples with positive probability (Proposition 4); cast-V and cast-VL estimate it. - Evidence (Section 5). On robomimic, a quadrotor, a humanoid and a unicycle, with frozen policies and eight samples, cast beats the output filter in nine of ten settings (Figure 5a; the tenth, a crossing pedestrian, is a tie). The critic supplies most of this gain; certifying before ranking adds to it where the edit is large (Can,
b=0.15: 0.53 against 0.16 for select-then-filter). Where a zone blocks a learned route, cast-V restores availability (unicycle 0.99, against 0.81 for cast), and cast-VL does so from logs, without simulating continuations (quadrotor 0.98; MPPI 0.61).
Related work. Safety filters correct a nominal input (Ames et al., 2017; Wabersich and Zeilinger, 2021; Hsu et al., 2024; Nakamura et al., 2025; Nakamura et al., 2026; Hu et al., 2026); shielding and sampling-based filters reject unsafe actions without a task model (Alshiekh et al., 2018; Park et al., 2026). Constrained diffusion edits the denoising iterates (Xiao et al., 2025; Römer et al., 2025; Gadginmath et al., 2026; Römer et al., 2026) or the input noise (Chen et al., 2026). Safety critics, recovery regions and viability can be learned from data (Srinivasan et al., 2020; Thananjeyan et al., 2021; Zheng et al., 2024; Wang and Zhang, 2026), and planning over random action sets is classical (Boutilier et al., 2018); cast-V asks whether a fixed generative controller will keep sampling certified actions under a request it never saw. Sample-and-rank methods choose among policy samples by value (Fujimoto et al., 2019; Nakamoto et al., 2024), density (Rosasco et al., 2025) or a verifier (Kwok et al., 2025), without certificates. We analyse how sampling, rejection and ranking interact in frozen generative control, including when they cannot help, with information projection (Csiszár, 1975), performance differences (Kakade and Langford, 2002) and conformal prediction (Lindemann et al., 2023; Cleaveland et al., 2024).
2 Problem
Policy. At decision k a frozen generative policy maps the observation o_{k} and a latent x\sim\mathcal{N}(0,I) to a chunk a=G(o_{k},x) of commands, whose first T are executed in open loop; the law of G(o_{k},x) is the policy \pi(\cdot\mid o_{k}), which we may sample but not change.
Requests. A request constrains a robot quantity p_{t} (the hand position, or the speed) against a hazard with state \xi_{t}: it holds at time t if h(p_{t},\xi_{t})\geq 0, where the barrier h is 1-Lipschitz in each argument, as a signed distance is. A budget asks that the average command effort stay below b: S_{k}\leq bk at every decision, with S_{k}=\sum_{i<k}c(\bar{a}_{i}) the effort of the executed chunks \bar{a}_{i}.
Certificate. A predictor \hat{p}_{k,j}(a) of the robot (known or learned (Moroncelli et al., 2026)) and a forecast \hat{\xi}_{k,j} of the hazard cover the T steps of the chunk and H further steps of a backup that holds or brakes. A chunk is certified if
\min_{1\leq j\leq T+H}\Big[h\big(\hat{p}_{k,j}(a),\hat{\xi}_{k,j}\big)-\delta-q_{k,j}-r_{k,j}\Big]\;\geq\;0.The margins \delta and q_{k,j} absorb predictor and forecast errors; with h_{k} the barrier at the start of the chunk, r_{k,j}=(1-\alpha)^{j}\max(h_{k},0) with \alpha\in(0,1] for j\leq T (zero afterwards) is the discrete-time barrier condition (Agrawal and Sreenath, 2017). For a budget, a chunk is certified if S_{k}+c(a)\leq b(k+1). We write \mathcal{F}_{k} for the set of certified chunks and \beta_{k}=\pi(\mathcal{F}_{k}\mid o_{k}) for the feasible fraction: the probability that one sample of the policy is certified. When we argue with the closed-loop state s we write \pi(\cdot\mid s), \mathcal{F}(s) and \beta(s). The goal is joint success: task completed, request kept at every step.
3 CAST: Certify, Then Select
{algorithm2e}
[t] cast, one decision. Inputs: observation o, frozen policy G, certificate, value ensemble Q_{1},\dots,Q_{J}, number of samples N. \DontPrintSemicolondraw x_{0},\dots,x_{N-1}\sim\mathcal{N}(0,I); decode a_{i}=G(o,x_{i}) in one batch \tcp*sample F\leftarrow\{i:a_{i}\text{ is certified}\} \tcp*certify \lIfF\neq\emptyset\Returna_{i^{\star}}, \;i^{\star}=\arg\max_{i\in F}\frac{1}{J}\sum_{r}Q_{r}(o,a_{i}) \tcp*[f]select \lElse\Returnthe fallback: an output filter’s correction of a sample, or the backup Algorithm 3 is cast; cast-V changes only the select line. A correction need not end certified; the backup of the last certified chunk was certified with it (Proposition 6, Table B).
Certify first. The certificate is checked before any value is consulted, so the critic never trades safety against task progress and ranks exactly the chunk that is executed. The opposite order, select-then-filter, edits the critic’s favourite and can execute a chunk the critic never scored.
A critic that needs no request. The ensemble (J=5 small networks) regresses the discounted task success of the frozen policy’s rollouts, estimating Q^{\pi}, once and before any request is known. The unanimity guard variant keeps a certified a_{0} unless every member prefers another.
A critic that knows the request. When a request changes which behaviour succeeds, as a zone blocking the preferred route does, we condition the critic on it: since the hazard ignores the robot, recorded frozen-policy rollouts can be relabelled with randomly drawn requests (success only if the request is kept from the current step on), with the request parameters as extra inputs.
Staying able to act (cast-V). A certified chunk can lead to a state from which the frozen policy rarely samples a certified continuation, for example in front of a zone that blocks the route it has started. Define the viability v(s,a) of a certified chunk a at state s as the probability that, after a, the critic-free certified controller with m samples finds a certified sample at each of the next L decisions, or reaches the goal first. cast-V estimates it online by the fraction of M model rollouts from the candidate’s end state that do so, executes the highest-value candidate with estimate at least v_{\min}, and the most viable one if there is none. No critic is retrained; the cost is up to NMmL extra samples per decision (m per continuation step; Table B). Learned viability (cast-VL) simulates nothing: its only model is the certificate’s one-chunk prediction. Each chunk in logs of the critic-free controller is labelled 1 if the next L decisions all had a certified sample and nothing failed; an ensemble fitted to these labels replaces the rollouts.
4 Theory: What the Certificate, the Samples and the Critic Each Provide
4.1 Safety comes from the certificate, not from the critic
Assumption 1 (Prediction errors).
On every executed step the robot is within \delta of its prediction and the hazard within q_{k,j} of its forecast: \|p_{kT+j}-\hat{p}_{k,j}(\bar{a}_{k})\|\leq\delta and \|\xi_{kT+j}-\hat{\xi}_{k,j}\|\leq q_{k,j} for j\leq T. The initial state is safe.
The forecast margins can be calibrated once, for a whole episode of at most K_{\max} decisions. Fix a miscoverage level \varepsilon\in(0,1) and scales \sigma_{k,j}>0 and score a recorded hazard episode by its largest normalised forecast error, \Sigma=\max_{k<K_{\max},\,j\leq T+H}\|\hat{\xi}_{k,j}-\xi_{kT+j}\|/\sigma_{k,j}. From n\geq 1/\varepsilon calibration episodes take the \lceil(n+1)(1-\varepsilon)\rceil-th smallest score s_{\varepsilon} and set q_{k,j}=s_{\varepsilon}\sigma_{k,j}.
Theorem 1 (Safety).
(a) Under Assumption 1, the request holds on every step of every certified chunk that is executed, for any number of samples, any critic and any selection rule. (b) Suppose the initial state is safe, the hazard, its tracker and its forecaster do not depend on the robot, and calibration and deployment episodes are exchangeable. With the margins above, for every controller and jointly over calibration and deployment,
\mathbb{P}\big[\,h(p_{t},\xi_{t})<0\text{ for some }t\,\big]\;\leq\;\varepsilon+\mathbb{P}[\mathcal{B}],where \mathcal{B} is the event that at some executed step \|p_{t}-\hat{p}_{k,j}\|>h(\hat{p}_{k,j},\hat{\xi}_{k,j})-q_{k,j}; for a certified chunk the threshold h(\hat{p}_{k,j},\hat{\xi}_{k,j})-q_{k,j} is at least \delta, so \mathcal{B} requires a prediction error above \delta.
In words. (a) The critic can be arbitrarily wrong without making a certified step unsafe. (b) The hazard ignores the robot, so one calibration of the forecast serves a filter and cast alike (Table B); the robot’s own prediction error, \mathbb{P}[\mathcal{B}], is not calibrated. With an exact predictor, the last certified chunk’s backup keeps a static request (Proposition 5) and, on the calibration event, a moving one through its H steps (Proposition 6).
4.2 A certified sample stays close to the policy; a projection does not
Fix one decision and its state. Write \mathcal{F} for the certified set, \beta=\pi(\mathcal{F})>0 for the feasible fraction, and \pi_{\mathcal{F}}=\pi(\cdot\mid\mathcal{F}) for the policy conditioned on being certified. A batch of N independent samples contains a certified one with probability p_{N}=1-(1-\beta)^{N}, the availability.
Theorem 2 (Distance to the policy).
(i) Among all action distributions that produce only certified chunks, \pi_{\mathcal{F}} is the unique closest to the policy in relative entropy, at distance \mathrm{KL}(\pi_{\mathcal{F}}\|\pi)=\log(1/\beta). Executing the first certified sample of a batch, when there is one, draws exactly from \pi_{\mathcal{F}}. (ii) Let \rho be the law of the chunk that cast executes, given that the batch contains a certified sample, with any critic and any rule. Then
\log\frac{1}{\beta}\;\leq\;\mathrm{KL}(\rho\,\|\,\pi)\;\leq\;\log\frac{1}{\beta}+\log\frac{N\beta}{p_{N}}\;\leq\;\log\frac{1}{\beta}+\log N.(iii) Suppose \pi has a density and a filter maps a set of actions of positive probability onto a set of zero volume, as a projection onto the boundary of the certified set does. Then, with positive probability, the filter’s output lies in a set Z with \pi(Z)=0: its law is not absolutely continuous with respect to \pi, and its relative entropy to the policy is infinite.
In words. Enforcing a request costs at least \log(1/\beta); selecting pays at most \log N more, as in best-of-N alignment (Beirami et al., 2025), and executes a chunk the policy could have produced. A projection leaves the policy’s support, however small the edit; how much that matters depends on where the chunk leads (Proposition 4, Section 5.3). Our fallbacks fall under (iii).
4.3 What ranking adds, and what limits it
Compare cast with the same controller without a critic. Let \mu_{0} be critic-free selection (execute the first certified sample) and \mu be cast; both use the same N, certificate and fallback law on an empty batch. Let V^{\mu} and V^{0} denote their expected joint success over an episode of at most K_{\max} decisions, and Q^{0}(s,a) the value of executing a in state s and following \mu_{0} afterwards; here s is the closed loop’s Markov state (robot, hazard, time, spent budget, memory, violation flag). At a state with batch a_{0},\dots,a_{N-1}, let F be the indices of the certified samples and \bar{a} the chunk cast executes, and define
\displaystyle\Omega_{N}(s) \\ \displaystyle=\mathbb{E}\big[\max_{i\in F}Q^{0}(s,a_{i})\;\big|\;F\neq\emptyset\big]-\mathbb{E}_{a\sim\pi_{\mathcal{F}}}Q^{0}(s,a) \\ \displaystyle\Lambda_{N}(s) \\ \displaystyle=\mathbb{E}\big[\max_{i\in F}Q^{0}(s,a_{i})-Q^{0}(s,\bar{a})\;\big|\;F\neq\emptyset\big]both zero where \beta(s)=0.
Theorem 3 (Closed-loop gain of ranking).
Let d_{k}^{\mu} be the distribution of the state that cast visits at decision k. Then
V^{\mu}-V^{0}=\textstyle\sum_{k<K_{\max}}\mathbb{E}_{s\sim d_{k}^{\mu}}\big[\,p_{N}(s)\,\{\Omega_{N}(s)-\Lambda_{N}(s)\}\,\big].With \sigma_{\mathcal{F}}^{2}(s) the variance of Q^{0}(s,a) under \pi_{\mathcal{F}},
0\;\leq\;p_{N}\,\Omega_{N}\;\leq\;\sigma_{\mathcal{F}}\sqrt{(N\beta-p_{N})/2}\;\leq\;\sigma_{\mathcal{F}}\sqrt{(N-1)/2}.Suppose cast executes the certified sample with the highest score \hat{Q}, and there are an offset u(s) and a set E of chunks with \pi_{\mathcal{F}}(E)\leq\eta such that |\hat{Q}(s,a)-Q_{\star}(s,a)-u(s)|\leq\epsilon_{Q} for every certified a outside E, for some target Q_{\star}. Then
\Lambda_{N}\;\leq\;2\epsilon_{Q}\;+\;\mathbb{E}\big[\operatorname{osc}_{i\in F}\,(Q^{0}-Q_{\star})(s,a_{i})\;\big|\;F\neq\emptyset\big]\;+\;1-(1-\eta)^{N},where \operatorname{osc} is the largest minus the smallest value. A critic that is exact for Q^{0} gives V^{\mu}\geq V^{0}.
In words: three levers. Ranking helps only if three things meet on the states cast visits. Availability p_{N}: a certified sample must exist. Spread \sigma_{\mathcal{F}}: certified samples must differ in value; what ranking can gain grows at most as \sqrt{N}. A reliable critic for the right target: a task critic (Q_{\star}=Q^{\pi}) suffices unless the request changes which certified samples succeed, as when a zone blocks the policy’s preferred route. The last term grows with N: keep N small for a weak critic.
Availability along the way. Certification constrains the next chunk only, so availability can be lost later: a certified chunk may lead to states where the policy rarely samples a certified continuation. Write f for the (exact, deterministic) state transition of a chunk. If from every state of a set \mathcal{K} one sample is certified and leads back into \mathcal{K} with probability at least \beta_{\min}, a controller that executes such samples keeps one available for \ell decisions except with probability \ell(1-\beta_{\min})^{N} (Proposition 7, Appendix A). Viability theory (Aubin, 1991) and reachability (Nakamura et al., 2025) compute viable sets from the dynamics alone; this one depends on the policy (Figure 8).
A controller is selection-only with N samples if at each decision it executes a certified one of N fresh samples of \pi(\cdot\mid s), and fails if none is certified. Define the safe control authority of the frozen policy by W_{0,N}\equiv 1 and W_{\ell,N}(s)=\mathbb{E}\max_{i:a_{i}\in\mathcal{F}(s)}W_{\ell-1,N}(f(s,a_{i})), the expectation over a_{0:N-1}\sim\pi(\cdot\mid s), with \max\emptyset=0 and W_{\ell,N}\equiv 1 at goal states, which are absorbing.
Proposition 4 (Finite-sampling generative control authority).
Under the regularity conditions of Appendix A: (i) W_{\ell,N}(s) is the largest probability, over selection-only controllers with N samples, that each of the first \ell batches contains a certified sample or a goal state is reached first; executing \arg\max_{i:a_{i}\in\mathcal{F}(s_{k})}W_{\ell-k-1,N}(f(s_{k},a_{i})) at decision k attains it. (ii) W_{\ell,N} is nondecreasing in N; W_{\ell,1} is the probability that the policy’s own samples are certified for \ell decisions. (iii) As N\to\infty, W_{\ell,N}\uparrow W_{\ell,\infty}\in\{0,1\}, with W_{\ell,\infty}(s)=1 if and only if \pi(\{a\in\mathcal{F}(s):W_{\ell-1,\infty}(f(s,a))=1\}\mid s)>0: viability up to \pi-null sets of chunks, and 0 wherever the certified chunks with W_{\ell-1,\infty}=1 form a \pi-null set, even if such chunks exist.
In words. Safe control authority belongs to the dynamics, the request and the frozen policy with its N samples: sampling helps up to \pi-null sets and no further, and a filter reaches beyond them only by leaving the policy’s distribution (Theorem 2). cast-V’s v(s,a) is the success probability of one selection-only controller from f(s,a), so v(s,a)\leq W_{L,m}(f(s,a)) (estimation error: Proposition 8). The Bellman-style recursion follows established planning over random action sets (Boutilier et al., 2018; Ghasemipour et al., 2021). Our contribution is its interpretation as the finite-sampling safe-control authority of a frozen generative policy.
5 Experiments
- No data
- obstacle
- obstacle
- budget
- + wall
- (%)
- Frozen policy
- 0.34
- 0.28
- 0.00
- 0.08
- 0.17
- 73.5
- Output filter (CBF-QP)
- 0.61
- 0.49
- 0.37
- 0.47
- 0.53
- 2.5
- In-denoising projection
- 0.60
- 0.51
- 0.39
- 0.45
- 0.52
- 1.0
- DPCC
- 0.58
- 0.57
- 0.51
- 0.40
- 0.53
- 1.5
- Latent noise optimisation
- 0.59
- 0.43
- 0.26
- 0.42
- 0.47
- 1.5
- Critic-free selection
- 0.60
- 0.53
- 0.39
- 0.47
- 0.49
- 1.5
- Select-then-filter
- 0.89
- 0.81
- 0.46
- 0.72
- 0.86
- 1.5
- cast
- 0.89
- 0.85
- 0.70
- 0.79
- 0.86
- 0.5
- cast + guard
- 0.90
- 0.86
- 0.70
- 0.80
- 0.89
- 0.5
Setup. Systems: robomimic (Mandlekar et al., 2021) Can with the state-based and camera-only diffusion policies released with DPPO (Ren et al., 2025), and Square with three diffusion policies trained on human demonstrations; a unicycle with known dynamics whose policies pass an obstacle above or below; a planar quadrotor and the MuJoCo humanoid, three policies each. Requests: a cylinder sweeping across the workspace; keep-out volumes; a budget on command effort. Baselines: the output filter (a CBF-QP on the chunk; scaling for a budget), projection inside the denoising loop (Xiao et al., 2025), DPCC (Römer et al., 2025), noise optimisation (Chen et al., 2026), critic-free selection, select-then-filter, a predictive safety filter (Wabersich and Zeilinger, 2021), and MPPI (Williams et al., 2017), which plans with the model, map and goal; all certified methods share the certificate, predictor and margins. Protocol: N=8; 200 episodes per manipulation cell, 500 per unicycle cell; brackets: paired bootstrap 95 % intervals.
5.1 CAST keeps the task while it enforces the request
Editing does not help the task; selecting does (Table 1; rollouts: Figures 6, 7). The frozen Can policy ignores the request and violates it in up to 73.5 % of episodes. The output filter cuts violations to at most 2.5 % and reaches 0.37–0.61 joint success. The other methods without a critic land within 0.08 of it, except under the budget: they change how the constraint is met, not how well the task is done. cast reaches 0.70–0.89 and violates in at most 0.5 % of episodes.
The gain holds on new requests and policies, fixed in advance and scored once (Figure 2). Over the filter, cast gains +0.32 on six new Can geometries, +0.09 on Square (positive for each of three policies), +0.08 under Square effort budgets, and +0.10 and +0.08 [+0.03, +0.14] for a camera-only Can policy under R1 and under budgets. Every interval excludes zero (Figure 5a).
Where the gain comes from. The critic avoids weak samples (best of eight without a request: 0.91 against 0.56), and shuffling its scores removes the gain (Can +0.32, +0.34; Square +0.16).
Certify first, or rank first? Select-then-filter has the same samples and critic. For obstacles and keep-out volumes, where its edit is a small detour, it is close to cast (0.88 against 0.88 on the six new geometries; every setting: Figure 5b); there certifying first costs nothing and keeps Theorem 2’s guarantee. Under a budget the edit is large and the order decides: on the two new budgets cast reaches 0.68 against 0.46 for select-then-filter (+0.22 [+0.16, +0.29]) and 0.42 for scaling. Square’s budgets cut its chunks less, and there ranking first does better (-0.04 [-0.07, -0.00] for cast).
5.2 When does selection help? Moving the three levers
We move each lever on Can (Figure 3). A larger obstacle (a) blocks more of the workspace. cast keeps +0.22 to +0.31 over the filter at every size, while DPCC and critic-free selection stay with the filter; select-then-filter is level for small obstacles and behind at 9 and 12 cm (+0.04 [+0.01, +0.08] for cast). A tighter budget (b) makes the edit large. As it tightens, select-then-filter falls to plain scaling, whereas cast executes a chunk that fits whenever one exists: at b=0.15, 0.53 against 0.16 and 0.26; pooled over b\leq 0.30, +0.26. More samples (c): two already give 0.87 and four 0.89, but N=32 falls back to 0.77 (-0.10 from N=8): the critic’s own errors are selected, as the last term of (6) allows. The camera-only policy (d) gains most where the edit costs most (+0.22 at 9 cm), but its certified chunks are nearly interchangeable: under the state-based critic the best of eight is worth 0.013 more than their mean (0.051 for the state policy), so even that critic, reading the true object state, picks no better (0.75). Spread, not the critic, limits the gain. When a lever is weak the gain vanishes: on robomimic Lift every certified controller reaches 0.94–0.97, and with a pillar in Square’s insertion path 55.7 % of batches are empty and random scores do as well (+0.03).
5.3 Blocked routes: a critic that knows the request, or viability
When a request blocks the route a policy has committed to, one-step certification stalls, and looking ahead at the policy’s own samples fixes it without retraining. On the unicycle, a keep-out zone blocks one of two routes. The task critic cannot know it; once committed, the only certified chunks brake, and the robot stops short of the goal in 20 % of episodes with the filter and 15 % with cast, while select-then-filter, whose edit slides along the zone, reaches 0.86 against 0.81. A predictive safety filter with a 20-step horizon stalls too (joint 0.75). Two remedies work on new zones of the family (Figure 1d). A critic that knows the request, trained once on zones drawn from a family, lifts cast to 0.98, +0.16 over a matched task critic; with it, select-then-filter does as well (0.98). Viability needs no retraining at all: cast-V, with the task critic and L=8, reaches 0.99 and stalls in 0.4 % of episodes, beating cast by +0.18 (Figure 5c) and select-then-filter with the same critic by +0.13. Viability alone does as well (0.99): future sample availability, not task value, decides. The lookahead matters (L=1,2,4: 0.82, 0.83, 0.80), M and v_{\min} little (Table B); more samples do not replace it and select the critic’s errors (cast with N=1024: 0.14; Table B). Learned from logs (cast-VL), viability reaches 0.95 (+0.14 over cast), stays within 0.03 of model-based cast-V when the actuators are 15–30 % weaker than modelled, and ranks never-executed candidates like the simulation (AUC 0.98 on the scored runs): future safe-control availability is learnable from interaction data (maps: Figure 1c, Figure 9). A success critic on the same 3000 logged episodes is slightly ahead (0.97; Table B) but needs more of them: with 100, viability keeps 0.89 and the success critic 0.76 (Figure 10a). Both remove the lookahead, which costs cast-V 10–50 times cast’s decision time (Table B). With a crossing pedestrian cast-V gains +0.09 over cast and matches MPPI; cast-VL reaches 0.95 (Figure 11).
5.4 Dynamic systems: a quadrotor and a humanoid
b=1.01 almost no chunk fits and scaling does better. (d) Humanoid effort budget, 300 scenarios per policy (shaded: added later). 95 % intervals.A quadrotor couples translation and rotation, so an edited thrust command changes the rest of the flight (Figure 4). No-fly zones. On zones unseen in training, the output filter never enters the zone but crashes the vehicle in 56 % of episodes, reaching 0.44; MPPI with model, map and goal reaches 0.61. cast with the task critic reaches 0.68; cast-V with the same critic and L=16 reaches 0.93 (+0.25 over cast), and the request-conditioned critic 1.00. cast-VL, with no model rollouts, beats model-based cast-V (0.98). Energy budget. The filter scales the thrust down and the vehicle sinks. Pooled over the four budgets 1.015–1.03, cast beats select-then-filter by +0.09 and the filter by +0.36; cast-V adds +0.02. Humanoid. Under an effort budget the filter scales the torques and the humanoid falls in 74 % of episodes. cast gains +0.53 over the filter over four budgets. Select-then-filter does as well: a small scaling keeps the gait. cast-V beats both (+0.09 over cast).
Safety. With exact models no violation began in a certified chunk; with a learned predictor violations came with the fallback: every violating Square episode of cast executed a fallback chunk that failed the certificate, and the 554 whose chunks were all certified had none (Figure 10b). A certified backup aligns the controller with the theorem. With the pedestrian, executing the last certified chunk’s braking backup instead of an uncertified correction, and calibrating the forecast over whole episodes as Theorem 1(b) assumes, no contact occurred during a certified step. Contacts did not fall, but all 50 came after the robot had stopped, which is passive safety (Bouraine et al., 2012); see Proposition 6. Failures more than halved: cast rose from 0.60 to 0.81 (Table B).
6 Conclusion
A frozen diffusion policy can respect a runtime constraint by sampling a few chunks, certifying them, and letting a critic choose: the certificate gives safety, the critic task success. Certifying first matters when a filter’s edit is large; viability matters because the physical capacity to act safely and a frozen policy’s capacity to sample safe actions differ, and finite sampling makes the difference decisive. Limitations. Selection cannot create behaviour the policy never samples or help a policy that already succeeds; where an edit is benign, ranking first does as well or better; cast-V costs progress where cast’s choice is already viable. Safety is passive, for hazards that ignore the robot: it covers certified chunks and their backup, not a hazard reaching a robot at rest; tests are simulated.
Generative AI use. Claude (Anthropic) assisted with code, experiments, writing, and literature search; the authors are responsible for the manuscript.
References
Appendix A Proofs
Theorem 1(a). For j\leq T, by the Lipschitz property of h, Assumption 1 and (1),
h(p_{kT+j},\xi_{kT+j})\;\geq\;h(\hat{p}_{k,j},\hat{\xi}_{k,j})-\delta-q_{k,j}\;\geq\;r_{k,j}\;\geq\;0.Every control step after t=0 belongs to one executed chunk, and nothing in the argument involves how the executed chunk \bar{a}_{k} was chosen. For the budget, induction on S_{k+1}=S_{k}+c(\bar{a}_{k})\leq b(k+1) keeps the budget; the cap b(k+1)-S_{k} is at least b>0, and for an effort c that is continuous and zero at the zero command, as ours is, a sufficiently scaled chunk satisfies it. \square
Theorem 1(b). Write Z=(\xi_{t},\nu_{t})_{t\geq 0} for the hazard trajectory and the tracker noise. By assumption the law of Z is the same under every controller, and the forecasts are fixed functions of Z. The score \Sigma(Z) therefore has the same law under every controller. The calibration episodes and the deployment episode are exchangeable, and n\geq 1/\varepsilon makes the index \lceil(n+1)(1-\varepsilon)\rceil at most n, so \mathbb{P}[\Sigma(Z)\leq s_{\varepsilon}]\geq 1-\varepsilon (Vovk et al., 2005), jointly over calibration and deployment. On \{\Sigma\leq s_{\varepsilon}\}, for every executed step t=kT+j,
h(p_{t},\xi_{t})\;\geq\;h(\hat{p}_{k,j},\hat{\xi}_{k,j})-\|p_{t}-\hat{p}_{k,j}\|-\|\xi_{t}-\hat{\xi}_{k,j}\|\;\geq\;h(\hat{p}_{k,j},\hat{\xi}_{k,j})-q_{k,j}-\|p_{t}-\hat{p}_{k,j}\|,which is non-negative unless \mathcal{B} occurs; the initial state is safe. Hence \mathbb{P}[\text{unsafe}]\leq\mathbb{P}[\Sigma>s_{\varepsilon}]+\mathbb{P}[\mathcal{B}]. If the executed chunk is certified, h(\hat{p}_{k,j},\hat{\xi}_{k,j})-q_{k,j}\geq\delta+r_{k,j}, so \mathcal{B} needs a prediction error above \delta. For a chunk that is not certified the slack can be negative and the bound is void. \square
Proposition 5 (Recursive feasibility).
Let the request be static and the predictor exact (\delta=q=0), and let the backup be a fixed feedback law that reaches rest within H steps and is safe from the initial state. If the controller executes certified chunks, and the backup when there is none, the request holds at every step and the backup stays safe at every decision.
Proposition 5. Induction hypothesis at decision k: the backup path from s_{kT} keeps h\geq 0 (true at k=0 by assumption). Case (i): a certified chunk is executed. The predictor is exact, so its T steps and the H backup steps after it keep h\geq 0, and the backup is at rest at the end, where a static h no longer changes. Case (ii): no chunk is certified and the backup is executed; its path is safe by the hypothesis. In both cases the backup path from s_{(k+1)T} is the remainder of a safe path that ends at rest, so the hypothesis holds at k+1. The statement does not cover a controller that executes an uncertified correction instead of the backup. \square
Proposition 6 (Backup against a moving hazard).
Under the assumptions and margins of Theorem 1(b), let the robot predictor be exact (\delta=0), the robot start at rest in a safe state, and the backup an open-loop law that every certificate (1) checks for the H steps after its chunk and that brings the robot to rest within H steps. Suppose the controller executes a certified chunk whenever there is one and otherwise the next T steps of the backup that followed the last certified chunk. Then, on the calibration event \{\Sigma\leq s_{\varepsilon}\} of probability at least 1-\varepsilon, the request holds at every step of every certified chunk and at each backup step executed within H steps after it: a violation can occur only before the first certified chunk or after H consecutive backup steps, with the robot at rest in both cases (passive motion safety in the sense of Bouraine et al. (2012)).
Proposition 6. Fix a decision k at which a certified chunk is executed. On the event, \|\xi_{kT+j}-\hat{\xi}_{k,j}\|\leq q_{k,j} for every j\leq T+H, because \Sigma is a maximum over all k<K_{\max} and j\leq T+H. The certificate gives h(\hat{p}_{k,j},\hat{\xi}_{k,j})-q_{k,j}\geq r_{k,j}\geq 0 for j\leq T+H, where \hat{p}_{k,j} for j>T is the predicted backup. If the following decisions have no certified chunk (sample or correction), the controller executes the continuation of that same backup, so with an exact predictor the executed positions are p_{kT+j}=\hat{p}_{k,j} for j\leq T+H, and by the Lipschitz property h(p_{kT+j},\xi_{kT+j})\geq h(\hat{p}_{k,j},\hat{\xi}_{k,j})-q_{k,j}\geq 0. A new certified chunk restarts the argument at its own decision. Every step is therefore covered until H backup steps have been executed in a row, after which the robot is at rest and no certificate makes a claim about a hazard that then reaches it. \square
Theorem 2. (i) For \rho\ll\pi with \rho(\mathcal{F})=1, d\pi_{\mathcal{F}}/d\pi=\mathbf{1}_{\mathcal{F}}/\beta, so
\mathrm{KL}(\rho\|\pi)=\int\log\frac{d\rho}{d\pi_{\mathcal{F}}}\,d\rho+\int\log\frac{d\pi_{\mathcal{F}}}{d\pi}\,d\rho=\mathrm{KL}(\rho\|\pi_{\mathcal{F}})+\log\frac{1}{\beta},which is minimised uniquely at \rho=\pi_{\mathcal{F}}; if \rho\not\ll\pi the divergence is infinite. The samples are independent draws from \pi at the fixed state, so the first certified sample in draw order has law \pi_{\mathcal{F}}. (ii) The lower bound is (i), since \rho(\mathcal{F})=1. For the upper bound, the executed chunk is one of the certified samples, so for every measurable E,
\rho(E)=\frac{\mathbb{P}[\bar{a}\in E,\;F\neq\emptyset]}{p_{N}}\;\leq\;\frac{\mathbb{P}\big[\bigcup_{i}\{a_{i}\in E\cap\mathcal{F}\}\big]}{p_{N}}\;\leq\;\frac{N\,\pi(E\cap\mathcal{F})}{p_{N}}=\frac{N\beta}{p_{N}}\,\pi_{\mathcal{F}}(E).Hence d\rho/d\pi_{\mathcal{F}}\leq N\beta/p_{N} and \mathrm{KL}(\rho\|\pi_{\mathcal{F}})\leq\log(N\beta/p_{N}); insert this in (7). Finally p_{N}=1-(1-\beta)^{N}\geq\beta gives N\beta/p_{N}\leq N. (iii) Let Z be the zero-volume image set. \pi(Z)=0 because \pi has a density, while the filter’s output lies in Z with positive probability; a law that charges a \pi-null set has infinite relative entropy to \pi. \square
Theorem 3. Identity. All values use the same reward (joint success) and the same Markov state; terminal states are absorbing and the horizon is K_{\max}. Telescoping V^{0}(s_{k+1})-V^{0}(s_{k}) along the trajectories of \mu gives the performance-difference identity (Kakade and Langford, 2002)
V^{\mu}(s_{0})-V^{0}(s_{0})=\textstyle\sum_{k}\mathbb{E}_{s\sim d_{k}^{\mu}}\big[\mathbb{E}_{a\sim\mu(\cdot\mid s)}Q^{0}(s,a)-V^{0}(s)\big].At one state, couple \mu_{0} and \mu on the same batch and the same fallback randomness; only their action marginals enter the identity, so the coupling costs nothing. On an empty batch both execute the shared fallback and the difference vanishes. On a non-empty batch let Q^{\max}=\max_{i\in F}Q^{0}(s,a_{i}). The critic-free action is the first certified draw, with conditional law \pi_{\mathcal{F}}. Therefore
\mathbb{E}_{a\sim\mu}Q^{0}(s,a)-V^{0}(s)=p_{N}\Big\{\underbrace{\mathbb{E}[Q^{\max}\mid F\neq\emptyset]-\mathbb{E}_{\pi_{\mathcal{F}}}Q^{0}}_{\Omega_{N}}-\underbrace{\mathbb{E}[Q^{\max}-Q^{0}(s,\bar{a})\mid F\neq\emptyset]}_{\Lambda_{N}}\Big\},and \Omega_{N}\geq 0 because the first certified sample has law \pi_{\mathcal{F}}.
Ceiling. Conditional on the number n\geq 1 of certified samples, their chunks are independent draws from \pi_{\mathcal{F}}. Let \phi be the quantile function of Q^{0}(s,a) under \pi_{\mathcal{F}}, with mean \bar{Q} and variance \sigma_{\mathcal{F}}^{2}. The maximum of n independent uniforms has density nu^{n-1}, so by Cauchy–Schwarz
\displaystyle\mathbb{E}\max_{i\leq n}Q^{0}(s,a_{i})-\bar{Q} \\ \displaystyle=\int_{0}^{1}(\phi(u)-\bar{Q})(nu^{n-1}-1)\,du\;\leq\;\sigma_{\mathcal{F}}\Big(\int_{0}^{1}(nu^{n-1}-1)^{2}du\Big)^{1/2} \\ \displaystyle=\sigma_{\mathcal{F}}\frac{n-1}{\sqrt{2n-1}}\;\leq\;\sigma_{\mathcal{F}}\sqrt{\tfrac{n-1}{2}},the classical bound on the expected maximum (Hartley and David, 1954; Gumbel, 1954). Averaging over K\sim\mathrm{Binomial}(N,\beta) with Jensen’s inequality,
p_{N}\Omega_{N}\;\leq\;\sigma_{\mathcal{F}}\,\mathbb{E}\sqrt{(K-1)_{+}/2}\;\leq\;\sigma_{\mathcal{F}}\sqrt{\mathbb{E}(K-1)_{+}/2}\;=\;\sigma_{\mathcal{F}}\sqrt{(N\beta-p_{N})/2}.The last expression increases with \beta and equals \sigma_{\mathcal{F}}\sqrt{(N-1)/2} at \beta=1.
Ranking loss. Let \mathcal{G} be the event that no certified sample of the batch lies in the exceptional set E; given K=n\geq 1 certified samples, which are independent draws from \pi_{\mathcal{F}}, \mathbb{P}[\mathcal{G}\mid K=n]=(1-\eta)^{n}\geq(1-\eta)^{N}. On \mathcal{G}, let i_{0} maximise Q^{0} and let i^{\star} maximise \hat{Q} among the certified samples. Then
Q^{0}(s,a_{i_{0}})-Q^{0}(s,a_{i^{\star}})=\underbrace{Q_{\star}(s,a_{i_{0}})-Q_{\star}(s,a_{i^{\star}})}_{\leq 2\epsilon_{Q}}+\underbrace{(Q^{0}-Q_{\star})(s,a_{i_{0}})-(Q^{0}-Q_{\star})(s,a_{i^{\star}})}_{\leq\operatorname{osc}_{i\in F}(Q^{0}-Q_{\star})(s,a_{i})},where the first bound uses \hat{Q}(s,a_{i^{\star}})\geq\hat{Q}(s,a_{i_{0}}) and |\hat{Q}-Q_{\star}-u(s)|\leq\epsilon_{Q} (the offset cancels). Off \mathcal{G} the loss is at most one, because values are success probabilities. Taking the conditional expectation gives (6). With Q_{\star}=Q^{0} the oscillation vanishes, and with \Omega_{N}\geq 0 the identity (4) gives V^{\mu}-V^{0}\geq-\sum_{k}\mathbb{E}\big[p_{N}\{2\epsilon_{Q}+1-(1-\eta)^{N}\}\big]. The bound is for the maximiser of one score; it does not cover the unanimity guard. \square
Proposition 7 (Generative viability).
Let \beta_{\mathcal{K}}(s)=\pi\big(\{a\in\mathcal{F}(s):f(s,a)\in\mathcal{K}\}\mid s\big) for a set \mathcal{K} of states, with f exact and deterministic and batches drawn afresh at each decision. Suppose s_{0}\in\mathcal{K} and \beta_{\mathcal{K}}(s)\geq\beta_{\min}>0 for every s\in\mathcal{K}. If a controller executes, whenever its batch contains one, a certified sample that leads into \mathcal{K}, then the probability that some batch among the first \ell decisions contains no such sample is at most \ell(1-\beta_{\min})^{N}; on the complementary event every executed chunk is certified and the state stays in \mathcal{K}.
Proposition 7. Let A_{k} be the event that the batch at decision k contains no certified sample leading into \mathcal{K}. On \bigcap_{i<k}A_{i}^{c} every executed chunk was certified and led into \mathcal{K}, so s_{k}\in\mathcal{K}. Given s_{k}\in\mathcal{K}, the N samples are independent draws from \pi(\cdot\mid s_{k}), each certified and leading into \mathcal{K} with probability \beta_{\mathcal{K}}(s_{k})\geq\beta_{\min}, so \mathbb{P}[A_{k}\mid s_{k}]\leq(1-\beta_{\min})^{N}. Hence \mathbb{P}[\bigcup_{k<\ell}A_{k}]\leq\sum_{k<\ell}\mathbb{P}[A_{k}\cap\bigcap_{i<k}A_{i}^{c}]\leq\ell(1-\beta_{\min})^{N}. \square
Proposition 4. Hypotheses: standard Borel state and action spaces, \pi a stochastic kernel, f deterministic and measurable, \mathcal{F}(s) measurable in (s,a); batches are drawn afresh at each decision, independently of the past given the current state; goal states are absorbing. With a stochastic exogenous hazard, (i) and (ii) hold with W_{\ell-1,N}(f(s,a_{i})) replaced by its expectation over the hazard’s transition; (iii) needs the deterministic f. A selection-only controller may use the whole history and its own randomisation, independent of future batches given the current state. (i) By induction on \ell; \ell=0 is trivial. Fix any selection-only controller and condition on the history and on the first batch a_{0:N-1}. If no sample is certified the controller has failed. Otherwise it executes some certified a_{j}, possibly at random, and from s^{\prime}=f(s,a_{j}) it continues as a selection-only controller whose history is extra randomisation independent of the future batches; by the induction hypothesis it keeps a certified sample in each of the next \ell-1 batches, or reaches a goal state first, with probability at most W_{\ell-1,N}(s^{\prime})\leq\max_{i:a_{i}\in\mathcal{F}(s)}W_{\ell-1,N}(f(s,a_{i})). Taking expectations over the batch gives at most W_{\ell,N}(s). The greedy rule, over certified samples with ties to the smallest index, attains each inequality, so it attains W_{\ell,N}(s) (the \arg\max over finitely many samples is measurable). (ii) By induction, W_{\ell-1,N+1}\geq W_{\ell-1,N}, and a maximum over N+1 samples dominates the maximum over the first N, which are N independent samples; so W_{\ell,N+1}\geq W_{\ell,N}. With N=1 the only choice is the single sample, executed if certified. (iii) Write g_{\ell,N}(a)=\mathbf{1}\{a\in\mathcal{F}(s)\}W_{\ell-1,N}(f(s,a)) and g_{\ell} for the same with W_{\ell-1,\infty}. For a bounded measurable g\geq 0, \max_{i\leq N}g(a_{i})\uparrow\operatorname{ess\,sup}_{\pi}g almost surely, hence in expectation. Assume, inductively, W_{\ell-1,N}\uparrow W_{\ell-1,\infty} pointwise. Upper bound: W_{\ell,N}(s)\leq\operatorname{ess\,sup}_{\pi}g_{\ell,N}\leq\operatorname{ess\,sup}_{\pi}g_{\ell}. Lower bound: for N\geq N_{0}, W_{\ell,N}(s)\geq\mathbb{E}[\max_{i\leq N}g_{\ell,N_{0}}(a_{i})]\to\operatorname{ess\,sup}_{\pi}g_{\ell,N_{0}}, and \operatorname{ess\,sup}_{\pi}g_{\ell,N_{0}}\uparrow\operatorname{ess\,sup}_{\pi}g_{\ell} because g_{\ell,N_{0}}\uparrow g_{\ell} pointwise (for \theta>0 the set \{g_{\ell}>\operatorname{ess\,sup}g_{\ell}-\theta\} has positive mass, and by continuity of measure so does \{g_{\ell,N_{0}}>\operatorname{ess\,sup}g_{\ell}-2\theta\} for large N_{0}). So W_{\ell,\infty}(s)=\operatorname{ess\,sup}_{\pi}g_{\ell}, which is \{0,1\}-valued by induction and equals 1 exactly when \pi(\{a\in\mathcal{F}(s):W_{\ell-1,\infty}(f(s,a))=1\}\mid s)>0. The classical indicator V_{\ell}(s)=1 if and only if some admissible a\in\mathcal{F}(s) has V_{\ell-1}(f(s,a))=1; a set of positive \pi-mass is nonempty, so by induction W_{\ell,\infty}\leq V_{\ell}, with strict inequality exactly where V_{\ell}(s)=1 but the certified chunks with W_{\ell-1,\infty}=1 form a \pi-null set. The same induction shows that a controller whose action law is absolutely continuous with respect to \pi(\cdot\mid s) at every state survives \ell decisions with probability 0 from any s with W_{\ell,\infty}(s)=0. Finally, cast-V’s critic-free controller is selection-only with m samples, so (i) gives v(s,a)\leq W_{L,m}(f(s,a)). \square
Estimated viability. With f exact and deterministic, let v(s,a) be the probability that the critic-free certified controller (m samples per decision, same certificate) from f(s,a) finds a certified sample at each of the next L decisions, or reaches the goal first, without task failure, and \gamma(s)=\pi(\{a\in\mathcal{F}(s):v(s,a)\geq v_{\rm hi}\}\mid s).
Proposition 8 (Estimated viability).
With M continuations on fresh latents and threshold v_{\min}\in(v_{\rm lo},v_{\rm hi}], cast-V executes a certified chunk with v\geq v_{\rm lo} except with probability at most (1-\gamma(s))^{N}+\varepsilon_{M}, with \varepsilon_{M} (two binomial tails, below) \leq Ne^{-2M(v_{\min}-v_{\rm lo})^{2}}+e^{-2M(v_{\rm hi}-v_{\min})^{2}}, after which its next batch is empty with probability at most (1-v_{\rm lo})^{N/m}. If \gamma(s_{k})\geq\gamma_{\min} at every decision before the first failure, an empty batch or a chunk with v<v_{\rm lo} occurs within \ell decisions with probability at most \ell[(1-\gamma_{\min})^{N}+\varepsilon_{M}+(1-v_{\rm lo})^{N/m}].
In words. Policy, estimate and lookahead width each add a term. Our M=4 leaves \varepsilon_{M} loose (0.42 for v_{\rm lo},v_{\rm hi}=0.1,0.9), but cast-V executed a chunk of viability below 0.1 when one above 0.9 existed at 0.07 % of decisions (below). The episode bound is vacuous at our N/m=2 ((1-v_{\rm lo})^{N/m}=0.81); it shows how the risk falls with N/m and M.
Proposition 8. Hypotheses: f is exact and deterministic, each continuation draws fresh latents, and continuations use the same certificate. Exactly, \varepsilon_{M}=N\,\mathbb{P}[\mathrm{Bin}(M,v_{\rm lo})\geq\kappa]+\mathbb{P}[\mathrm{Bin}(M,v_{\rm hi})<\kappa] with \kappa=\lceil v_{\min}M\rceil. Fix the batch a_{0},\dots,a_{N-1} at s. With an exact model, the M continuations of a candidate a use fresh latents, so its estimate \hat{v}(a) is the mean of M independent Bernoulli(v(s,a)) variables given the batch; cast-V accepts a if \hat{v}(a)\geq v_{\min}, i.e. if at least \kappa continuations are viable, and executes the highest-ranked accepted certified candidate (lazy evaluation in critic order stops at exactly this candidate), or the most viable one if none is accepted. Selection. Let B be the event that no batch member is certified with v\geq v_{\rm hi}; \mathbb{P}[B]=(1-\gamma(s))^{N}. On B^{c} pick such a member g. Its estimate falls below v_{\min} with probability \mathbb{P}[\mathrm{Bin}(M,v(s,g))<\kappa]\leq\mathbb{P}[\mathrm{Bin}(M,v_{\rm hi})<\kappa], since the binomial upper tail increases with the success probability. Otherwise the accepted set is non-empty and the executed chunk is accepted; it has v<v_{\rm lo} only if some candidate with v<v_{\rm lo} is accepted, which by a union bound over at most N candidates has probability at most N\,\mathbb{P}[\mathrm{Bin}(M,v_{\rm lo})\geq\kappa]. Hoeffding’s inequality bounds both tails by the exponentials. Transfer. Let s^{\prime}=f(s,a) and \beta(s^{\prime})=\pi(\mathcal{F}(s^{\prime})\mid s^{\prime}). If s^{\prime} ends the task there is no next batch. Otherwise a continuation is viable only if its first batch of m samples contains a certified one, so v(s,a)\leq 1-(1-\beta(s^{\prime}))^{m}. cast-V’s next batch consists of N independent draws at s^{\prime}, so it is empty with probability (1-\beta(s^{\prime}))^{N}=\big((1-\beta(s^{\prime}))^{m}\big)^{N/m}\leq(1-v(s,a))^{N/m}\leq(1-v_{\rm lo})^{N/m}. Horizon. At decision k let D_{k} be the event that the batch has no certified member with v\geq v_{\rm hi}, or the executed chunk has v<v_{\rm lo}, or the next batch is empty after a chunk with v\geq v_{\rm lo}. Conditionally on the past and s_{k}, \mathbb{P}[D_{k}\mid s_{k}]\leq(1-\gamma(s_{k}))^{N}+\varepsilon_{M}+(1-v_{\rm lo})^{N/m}; the first batch is empty only on D_{0}’s first part, and every later empty batch or low-viability chunk lies in some D_{k}. A union bound over k<\ell with \gamma(s_{k})\geq\gamma_{\min} gives the claim. Nothing is assumed about the critic. \square
Measured (unicycle, three policies \times 500 scored scenarios, cast-V with M=4; reference viability of every certified candidate from 64 further continuations, not used to act; its decisions are identical to the scored cells). Decisions with a certified candidate of reference viability \geq 0.9: 16 901; the executed chunk had reference viability below 0.1 in 0.07 % of them (bound \varepsilon_{4}=0.42). For (v_{\rm lo},v_{\rm hi})=(0.25,0.75): 0.26 % of 17 057 (bound vacuous, 2.14). Only 4.96 % of 140 200 certified candidates have reference viability between 0.1 and 0.9: viability is nearly always close to 0 or 1, where M=4 suffices.
An exact critic with the wrong target can fail. Consider two certified chunks that commit to different routes; the policy samples route A with probability p\in(0,1) and route B otherwise. On route A the continuation completes the task safely with probability 1-\zeta. On route B the frozen policy completes the task with probability one, but only by crossing a keep-out zone later; no certified continuation completes route B. The task values are Q^{\pi}(A)=1-\zeta and Q^{\pi}(B)=1, whereas the values under the request are Q^{0}(A)=1-\zeta and Q^{0}(B)=0. An exact task critic selects B whenever a B sample appears, so V^{\mu}=p^{N}(1-\zeta), below the critic-free value V^{0}=p(1-\zeta) for every N>1. Both first chunks pass the certificate; the failure is in their continuation. On a batch that contains both routes the oscillation term of (6) equals one, and the identity (4) returns exactly V^{\mu}-V^{0}=(p^{N}-p)(1-\zeta). A critic trained on success under the request ranks A first and attains V^{\mu}=(1-(1-p)^{N})(1-\zeta)\geq V^{0}.
Appendix B Experimental details
b=0.55, an illustration scenario): MuJoCo frames; scaling the torques to the cap makes it fall, cast-V keeps walking within the budget. Arrows: \nabla h, coloured by the barrier value h (red: at the boundary; blue: far).+2 cm; red wireframe): the filter’s corrections keep the hand out of the pillar but it never transports the can; cast carries it around. Can, effort budget b=0.20: the filter caps every chunk and the hand stalls with the can; cast executes certified low-effort chunks and delivers it. Square, moving obstacle (policy s0, -2 cm): the filter’s fallback holds the nut near the obstacle until the time limit; cast inserts it. Hand paths projected into the camera. Bottom, dynamic systems, drawn to scale from the recorded states: 40 rollouts per panel as mean \pm sd per route and outcome (numbers: rollouts in the group; groups of one are not drawn; crosses: a group that stalls or crashes), one flight with the vehicle drawn. Unicycle and quadrotor no-fly zone: the zones of Figures 1 and 4a fixed, cast-V with the task critic. Quadrotor energy budget b=1.015: the first 40 scored scenarios of policy s0, re-simulated for drawing (outcomes differ slightly from the scored run), cast with the task critic; scaling the thrust to the cap costs altitude.h\geq 0 that a filter protects, with \nabla h; (b) the feasible fraction \beta(s), the share of 64 frozen-policy chunks the certificate accepts; (c) cast-V’s viability estimate at the state, v(s): the fraction of 16 critic-free certified continuations started at s that find a certified sample at each of the next L=8 decisions (a chunk’s viability is v at the state it leads to), its region v\geq 0.5 (dashed) and 40 rollouts per controller with this zone fixed, as mean \pm sd per route and outcome (filter: grey; cast-V: dark blue; crosses: a group that stalls or crashes). States inside the safe set and with certified samples available can still be dead ends for this policy; the filter’s rollouts end there, cast-V’s avoid them. Humanoid (effort budget 0.55; 16 scenarios): the certified region of the budget, torso height with the fall threshold, and distance walked; the filter rides the cap and falls in 15 of 16, cast-V in 1. Illustration data, not scored.h=0 (red) is what a filter protects; the viability boundary v=0.5 lies far outside it and moves with the zone. Top: by simulation, as cast-V estimates it. Bottom: from the network trained on logs of the critic-free controller (cast-VL), with both boundaries. The two agree on 72–90 % of about 42 000 certified chunks per zone (AUC 0.85–0.97); the learned map is softer inside the dead-end regions, which the logs rarely visit, and matches where the rollouts pass: cast-VL reaches the goal in 37–39 of 40 rollouts. Illustration data, not scored.\times 500 scored scenarios; bands: 95 % intervals, and at 100 episodes the range of three disjoint subsets, in each of which viability is ahead. With 300 episodes the two are level (+0.01 [-0.00, +0.03]), with 1000 the success critic is slightly ahead (-0.01 [-0.03, -0.00]), and with 3000 by 0.02. Viability is the cheaper label to learn and needs no task outcome; a success critic can replace it when logs are plentiful. (b) Where violations come from. Square, new requests, learned predictor (1 200 scored episodes per controller): share of violating episodes among those that executed at least one fallback chunk failing the certificate (an uncertified correction, or the hold backup, which is accepted without margins) and among those whose chunks were all certified. Theorem 1 covers the second group; none of its episodes violated.\times 500 shared scenarios. Critics trained on 6000 frozen-policy episodes per policy (task critic held-out R^{2} 0.19–0.20; request-conditioned critic, which also sees the forecast, 0.68–0.71). cast-VL: cast-V’s rule with viability learned from 6000 logged episodes per policy of the critic-free certified controller (no crash or contact counts as viable; planned, scored once): 0.95, +0.23 [+0.19, +0.26] over the filter, +0.12 [+0.08, +0.15] over MPPI and +0.13 [+0.10, +0.16] over model-based cast-V. A success critic trained on the same kind of logs lifts cast itself to 0.98. Planned contrasts: cast (request critic) - filter +0.024 [-0.018,+0.066], so with critics trained on frozen-policy episodes cast alone does not beat the filter; cast-V (task critic) - cast (task critic) +0.093 [+0.071,+0.115]; cast-V - MPPI -0.011 [-0.051,+0.028]. Also: cast-V - filter +0.099 [+0.059,+0.139], - select-then-filter (request critic) +0.057 [+0.033,+0.082]. Pedestrian contact: 0.9–2.4 % for the certified controllers with frozen-policy critics (tracker noise), 0.1 % for cast-VL and the log-trained critic, 0 for MPPI.Robomimic Can. Policy: the diffusion policy released with DPPO (Ren et al., 2025) (MLP denoiser, 20 DDIM steps, chunks of four 7-dimensional commands at 20 Hz, at most 300 control steps). It completes the task in 0.560 of episodes without any request. Critic: five MLPs on (state, chunk) regressing Monte Carlo task success with discount 0.99 on 2000 rollouts of the frozen policy. Hand predictor: linear in the chunk’s cumulative commands and the previous chunk, fitted by least squares on 2000 episodes; \delta=2 cm. Requests of Table 1: R1, a vertical cylinder of radius 6 cm that sweeps the transport corridor sinusoidally (amplitude 0.15 m, period 100 steps, random phase); R2, the same cylinder faster than the hand can move (amplitude 0.18 m, period 50); R3, a budget b=0.25 on the mean squared position command; R4, a ceiling and a workspace wall; R5, a non-convex keep-out pillar. The obstacle is observed at the current and previous step and extrapolated at constant velocity; no controller sees its future. For R1, the new obstacle requests and the sweeps the certificate uses \alpha=1 and H=0: it checks the predicted clearance of the four steps of the chunk, with no rate term and no backup steps. R2 uses \alpha=0.3, H=4 and conformal forecast margins. When no sample is certified, the obstacle and keep-out controllers apply the output filter (at most four relinearised projections, which need not end certified) to a sample; the budget controllers scale the sample of least effort to the cap. New requests of Figure 2: obstacle amplitudes \{0.10,0.20\} m with periods \{75,125\}, the pillar shifted by \pm 2 cm, and budgets 0.20 and 0.30. The camera-only policy is DPPO’s image policy; its critic reads the policy’s own 137-dimensional embedding.
Robomimic Square. Three diffusion policies (seeds of one recipe) trained on the proficient-human demonstrations: 1-D convolutional U-Net, 16 DDIM steps, chunks of sixteen commands of which eight are executed. Each policy has its own critic and hand predictor, fitted on 2000 of its rollouts; \delta=3 cm, the 95th percentile of the predictor’s error. Request: a cylinder of radius 6 cm moving across the path to the peg (amplitude 0.15 m, period 100), forecast with constant acceleration, at its original position and shifted by \pm 2 cm.
Unicycle. State (x,y,\theta,v), time step 0.1 s, bounded acceleration and turn rate, known exactly to every controller. The robot crosses a corridor (|y|\leq 1.5) around a disc obstacle (centre (2,0), radius 0.4) to a goal region within 120 steps. The diffusion policy (MLP, 10 DDIM steps, chunks of four controls) is trained on 3000 demonstrations that pass above or below the obstacle and succeeds in 0.98 of episodes without a request. Request: a keep-out disc of radius 0.3 on one side. In the family study its centre is drawn per episode from x\sim U[2.3,3.0], |y|\sim U[0.55,0.95]. The request-conditioned critic has the architecture of the task critic plus five inputs (zone position relative to the robot, side, current barrier value, time). For each of three policies it is trained on 20 000 frozen-policy rollouts labelled with zones drawn from the family; the matched task-target critic uses the same rollouts, inputs, initialisation and optimiser, and only the label differs. Evaluation zones are drawn independently. Certified controllers share an 8-step braking backup and \alpha=0.5. MPPI (256 samples, horizon 20 steps of the 120) and its hard-constrained variant (same horizon; candidates must pass the certificate) know the dynamics, the map, the goal and the zone, and do not use the policy; they are short-horizon references, not upper bounds. The extra latents of a batch are drawn from a separately seeded generator, so every batch holds N independent samples, as the theory assumes.
Planar quadrotor. State (x,z,\theta,\dot{x},\dot{z},\dot{\theta}) at 50 Hz with collective thrust F=mg(1+0.8u_{0}) and torque 0.25u_{1}; known exactly to every controller. Task: from the left to a goal box within 8 s, without touching floor, ceiling or a central disc obstacle. Three diffusion policies (MLP, 10 DDIM steps, chunks of eight controls) are trained on 3000 expert demonstrations each, half above and half below the obstacle; task critics (held-out R^{2} 0.51–0.63) and request-conditioned critics (held-out AUC 0.99) use 4000 frozen-policy rollouts, each labelled with four zones from the family. Certificate: the chunk and a 25-step brake-to-hover backup, rolled out with the exact model, \alpha=0.5; budget: exact prefix inequality on c=\overline{(F/mg)^{2}}. The output filter is the minimal-norm correction (finite-difference linearisation, three relinearisations; for the budget, thrust scaling), shared as the fallback. MPPI: 512 samples, horizon 2 s, soft request penalties, and the shared certificate on what it executes; without a request it succeeds in 0.69 of development episodes. The budget levels and the planner horizon were chosen on development scenarios disjoint from the scored ones.
Humanoid. Gymnasium Humanoid-v5 (MuJoCo, 17 actuators, 15 ms control step). Three diffusion policies (MLP 3\times512, 10 DDIM steps, single-action chunks, full 348-dimensional observation) are trained on 2M pairs from Farama Minari’s humanoid expert-v0 and medium-v0 demonstrations (SAC rollouts), 80k steps on one GPU (75 s per policy). Success: no fall (the environment’s healthy-height termination) within 300 steps and at least 1 m forward. Critics: five MLPs on (observation, action), discounted success (0.995 per step) from 1500 frozen-policy rollouts per policy (held-out R^{2} 0.70–0.76). Budget: c=\|a\|^{2}/17 per step on actions normalised to [-1,1], prefix average at most b; the filter scales the policy’s own action to the cap, the selectors’ fallback scales the least-effort sample.
CAST-V. Viability is estimated with M=4 continuations of the critic-free certified controller from each certified candidate’s end state (m=4 policy samples per step, exact model, the request’s certificate); a continuation is viable if it finds a certified sample at each of the next L decisions without a task failure, or reaches the goal. v_{\min}=0.5; unicycle L=8 (3.2 s), quadrotor L=16 (2.6 s), humanoid L=20 steps (0.3 s; a fall in a continuation is not viable). Candidates are evaluated lazily in critic order (the first with \hat{v}\geq v_{\min} is executed; same choice as evaluating all). Robomimic. The model is a shadow copy of the simulator restored to the current state (MuJoCo state, clock, controller goals and gripper ramp), which a real robot would not have; L=8 decisions on Can and L=4 on Square (32 steps each); a moving obstacle is forecast at constant velocity from its positions at the real decision, so the exact-model hypothesis of Proposition 8 does not hold there. Fidelity of the shadow after one chunk (normalised hand and can position): median 0.003–0.005, maximum 0.04–0.06. With v_{\min}=0 the controller reproduced cast’s saved episodes exactly on one 50-episode block of each request and on Square. cast-V overrode cast’s choice at 2–5 % of decisions on obstacles and Square and 14–20 % on pillars and budgets; it cost about 35 s per Can episode and 20 s per Square episode on one CPU thread (cast: about 2 s).
Baselines. Output filter: minimal-norm correction of the policy’s chunk onto the linearised certificate, solved as an exact dual QP with relinearisation (a CBF-QP on the chunk). For budgets there are two scaling filters: one caps the effort of every chunk at b (Table 1, R3; “chunk cap” in Table B), a stricter rule than the average budget; the other scales the policy’s chunk only as far as the average budget requires, which is cast with N=1 and the like-for-like baseline of Figures 2 and 3b. In-denoising projection: the same projection applied to the denoised estimate at every DDIM step, in the manner of SafeDiffuser (Xiao et al., 2025). DPCC (Römer et al., 2025): our port projects every reverse iterate onto the tightened constraint for N chains started from the latents cast draws and executes the chain with the smallest cumulative projection. Noise optimisation, in the manner of INSPO (Chen et al., 2026): Adam steps on the latent against the predicted violation, through the differentiable sampler. Critic-free selection: cast without the critic. Select-then-filter: the sample with the highest value, then the output filter. All arms of a comparison use the same predictor and margins and, where they sample, the same latents; the sampling controllers also share the fallback.
Protocol. Unless stated, N=8; 200 episodes per manipulation cell and 500 per unicycle cell; all arms of a comparison run on the same scenarios, with paired bootstrap 95 % intervals. The policy, critic and predictor are fixed before the evaluation scenarios are drawn. For four studies the design, scenario seeds and planned comparisons were fixed before any scored episode was run: the new requests (Figure 2), the ranking intervention, the Can sweeps (Figure 3) and the zone family (Figure 1d). The later studies also had their plans fixed before scoring, except the M/v_{\min} ablation, the humanoid’s two tightest budgets, the cells that complete Table B and the violation breakdown of Figure 10b. On the new Can and Square requests the planned primary arm was cast with the guard; plain cast, reported in the text, was secondary. Not every planned threshold was met: the budget gains on Square and with the camera-only policy were +0.08 against a planned +0.10, and cast-V did not improve on cast in manipulation (Figure 5c). Simulations ran in Docker on one workstation (crossing pedestrian and cast-V ablation: a laptop CPU); a decision of cast with the guard takes 15 ms on two CPU threads.
Additional tables. Tables B–B give the cells of Figure 2, the compute, the cast-V ablation and the fallback study; Tables B–B give the quadrotor, humanoid, unicycle, Can-sweep and cast-VL cells; Table B gives the calibration check.
\tau: scale of the policy’s initial denoising noise, \tau=1 elsewhere) (joint success; 200 shared scenarios per cell; – not run). Frozen: the policy’s own sample, ignoring the request. For budgets, “Filter” scales the policy’s own chunk to the cap (cast with N=1; the per-chunk cap filter: Table B) and select-then-filter selects, then scales.N+NMmL samples, certificate rollouts of every sample and NML simulated chunks; lazy search and early stops use fewer); ms: measured, one CPU thread, 500 episodes batched. cast with N=256 and N=1024 gives the plain selector about as many samples as cast-V’s unicycle worst case; cast-VL adds one network call to cast.\times 500 shared scenarios): lookahead L, continuations M, threshold v_{\min}, viability alone, cast-VL and a success critic trained on the same logs (network cost on top of cast). Viability is nearly always close to 0 or 1, so even M=1 separates the candidates; L must cover the time to commit to a route.\times 500 shared scenarios, the controllers of Figure 11). “Edit”: the output filter’s correction, executed even if it does not end certified. “Backup”: instead, the rest of the braking backup certified with the last certified chunk (Proposition 6). Left: the per-step forecast margins of Figure 11; right: margins calibrated over whole episodes (\varepsilon=0.05), as Theorem 1(b) assumes. No contact began in a certified chunk in any of the 30 000 episodes. With edits, every contact began in an uncertified correction (76 of 76, per-step margins). With the backup and episode margins, no contact occurred during a certified step; all 50 came after the backup had brought the robot to rest. With per-step margins, which give no episode-level guarantee, 48 contacts fell inside the backup’s certified steps. Joint success with the backup minus with edits, episode margins: filter +0.15 [+0.11, +0.18], cast +0.21 [+0.18, +0.24], cast-V +0.02 [+0.01, +0.03].N=1. The guard column of the sample sweep, the scaling column and the last row were added after the planned run (best of eight without a request: 0.905 on the scenarios of the ranking intervention).\times 500 shared scenarios). Model: simulated continuations. Logs: an ensemble trained on 3000 logged episodes per policy of the critic-free certified controller, labels in hindsight (held-out AUC \geq 0.975). Gain g: execution scales the commands, predictions keep the nominal model. Logs minus model under mismatch: -0.01 [-0.02, +0.00] (pooled over both gains); violations at g=0.7 (worst policy; cast, cast-V, cast-VL): 38 %, 6.4 %, 1.6 %. Proposition 8 does not cover the learned estimate.Calibrated forecast margins on Can. Table B checks Theorem 1(b) on Can with a slow obstacle seen through a tracker with 5 mm noise. Miscoverage is the share of episodes in which a forecast left its margin; \hat{\mathbb{P}}[\mathcal{B}] is the share in which a hand-prediction error exceeded the certificate’s slack. With margins calibrated over whole episodes, the closed-loop miscoverage stays at or below its target \varepsilon up to sampling error (largest excess: 0.055 against 0.05) for the filter and for cast alike, as the theorem states, and collisions stay at or below 0.5 %. Per-step margins give no episode-level guarantee: a forecast leaves them in more than half of the episodes.
s_{\varepsilon}: margin factor over the per-step 0.99 margins. †The per-step margins that apply after the first decision, the reference for s_{\varepsilon}.