Conference on Robot Learning (CoRL) 2026

CS-Pi: Constraint-Satisfying Flow Policy Sampling

Rejection sampling that knows where to look

Soumojit Bhattacharya, Oliver Kroemer, Shubham Tulsiani

Robotics Institute, Carnegie Mellon University

Steer a flow policy around obstacles it never saw: safe actions the policy would still choose, with no retraining and no constraint gradients.

CS-Pi loop flow ODE · draw sample iter 1 δ = 0.000 n = —
draw / project feasible · goal obstacle (unseen at training) draw → project → renoise to n = k/(k+δ) → re-run · click to restart
55%
safe-success on a real Franka
vs 40% for projection
81.3%
safe-success on the shelf
vs 55.3% for projection
0
constraint gradients needed

01Hardware

Zero-shot on a Franka with π₀.₅

Pick up the apple and place it on the blue plate, around obstacles the policy never saw.

CS-Pi (ours) safe picks the apple and places it on the plate
Unconstrained π₀.₅ fail collides with the bottle and knocks it over · 1× speed
Trust Sampling fail fails the task · 4× speed
Gradient Guidance fail fails the task · 4× speed
Projection fail fails the task · 4× speed

02Overview

Safe isn't enough: the action must also be plausible

1Safe and plausible. Avoid the obstacle, but move like the demonstrations.
2Projection and guidance fail. One bends sharply, the other overshoots.
3Rejection is plausible, but slow. 47 of 48 draws are wasted.
4CS-Pi knows where to look. Each projection guides the next draw.

03Four methods

Four ways to enforce a constraint

Click a method to see how it samples.

Gradient guidance
Gradient guidance panel of the concept figure

Steers each denoising step with a cost gradient evaluated at a proxy and can still violate the constraint.

Projection
Projection panel of the concept figure

Moves the draw to the safe set, yielding an action the policy would rarely sample.

Rejection sampling
Rejection sampling panel of the concept figure

Redraws from pure noise until a draw is safe.

CS-Pi (ours)
CS-Pi (ours) panel of the concept figure

Projects the draw, renoises the projection to time n = k/(k + δ) set by the projection residual δ (larger δ renoises more), and re-runs the policy until a draw is safe and plausible.

04Method

Our intuition

We start from rejection sampling: it gives exactly the distribution we want, safe and on-policy.

Our idea: at every sample, the projection tells us roughly how far we are from the safe set. We use it to bias the next sample.

Why the projection helps

The projected sample tells us where to look. The distance δ between the policy’s sample and its projection estimates our uncertainty.

Moved a lot (large δ)

The projection is less likely to be near an on-policy safe sample: add more noise and search more widely.

Moved a little (small δ)

The projection is more likely to be near an on-policy safe sample: add less noise and refine it.

CS-Pi iterations: a large residual renoises deeper (n = 0.6), a smaller residual shallower (n = 0.8)
Large δ₁ renoises deeper (n₁ = 0.6); small δ₂ shallower (n₂ = 0.8).

This intuition gives the algorithm:

Algorithm 1  Constraint-Satisfying Flow Policy Sampling 1  a₀ ~ 𝒩(0, I);  â⁽⁰⁾ ← πθ(a₀; 0)                ▷ initial policy draw
2  for i = 0, …, Kmax−1:
3      ac⁽ⁱ⁾ ← 𝒫(â⁽ⁱ⁾);  δ⁽ⁱ⁾ ← ‖â⁽ⁱ⁾ − ac⁽ⁱ⁾‖
4      if δ⁽ⁱ⁾ ≤ τ:  return â⁽ⁱ⁾
5      n⁽ⁱ⁾ ← k / (k + δ⁽ⁱ⁾);  ε⁽ⁱ⁾ ~ 𝒩(0, I)
6      an⁽ⁱ⁾ ← n⁽ⁱ⁾ ac⁽ⁱ⁾ + (1 − n⁽ⁱ⁾) ε⁽ⁱ⁾
7      â⁽ⁱ⁺¹⁾ ← πθ(an⁽ⁱ⁾; n⁽ⁱ⁾)              ▷ re-denoise from time n
8  return 𝒫(â⁽ᴷᵐᵃˣ⁾)                            ▷ optional terminal projection
We also generalize to arbitrary cost functions

For a continuous cost, the projection becomes a proximal step toward lower cost; nothing else changes. Below, the preference is a gripper orientation: reach the blue goal with the gripper (bold axes) matching the target (pale axes).

The goal and the preference agree

Unconstrained reaches the goal orientation not held 2.8 cm from the goal · orientation error 2.62
CS-Pi (ours) reaches the goal orientation held 8.3 cm from the goal · orientation error ≈ 0

They conflict: CS-Pi can prioritize either

Task aligned: no projection step at the end of the loop. Cost aligned: a projection step at the end of the loop.

Unconstrained reaches the goal orientation not held 5.4 cm from the goal · orientation error 2.32
CS-Pi, task aligned reaches the goal orientation not held 5.7 cm from the goal · orientation error 1.22
CS-Pi, cost aligned goal not reached orientation held 75.8 cm from the goal · orientation error 0.10

A hard constraint and a soft preference together

Hard obstacle constraint plus soft height preference: gradient guidance at three weights, Trust Sampling, and CS-Pi
Obstacle (hard) plus a height preference y = 0.7 (soft): no guidance weight satisfies both; CS-Pi applies them in order of priority.

05Head to head

Same scenario, same policy: CS-Pi vs a baseline

Shelf pick-and-place with a deployment-time obstacle. Left is CS-Pi; right is the strongest baseline that fails this scenario. Currently showing: Clutter combo.

CS-Pi (ours)safe
Gradient Guidancefail

06Interactive explorer

Pick a task, a scenario, and a method

Real world

CS-Pi (ours) safe picks the apple and places it on the blue plate without touching the obstacle

Simulation

Pick a cube from a shelf and place it on the table, past obstacles added at deployment.

Scenario

Method

CS-Pi · ourssafe
Safe and successful: collision-free, the gripper picks the cube and places it.

07Results

Safe success on four benchmarks

08Cite

BibTeX

@inproceedings{cspi2026,
title = {CS-Pi: Constraint-Satisfying Flow Policy Sampling},
author = {Soumojit Bhattacharya and Oliver Kroemer and Shubham Tulsiani},
booktitle = {Conference on Robot Learning (CoRL)},
year = {2026}
}