# CS-Pi: Constraint-Satisfying Flow Policy Sampling

CS-Pi enforces new constraints on flow policies by projecting, renoising, and re-sampling

Soumojit Bhattacharya, Oliver Kroemer, Shubham Tulsiani · arXiv · 2026-11-5

- **Problem** Constraints missing from demonstrations, like a new obstacle, need enforcing at inference time. Projection onto the safe set is fast but can produce actions the policy would rarely sample, and rejection is too slow when safe actions are rare.
- **Method** CS-Pi projects each draw onto the nearest safe action, then adds noise scaled to how far the projection moved it. The unmodified policy re-denoises that noisy anchor until a draw is safe.
- **Results** CS-Pi reaches 81% safe success on the shelf benchmark and 55% on hardware, against 55% and 40% for projection, while staying plausible.

![Figure 2: Sampling a safe action from a flow-matching policy. Gradient guidancesteers each denoising step with a cost gradient evaluated at a proxy and can sti…](https://refivu.com/papers/17a3a0d4-2f79-463a-b689-339f8435d667/figures/figure-9e6908338e92c7f36533e1e053999977.png?thumb=512)

**Figure 2** :Sampling a safe action from a flow-matching policy. Gradient guidancesteers each denoising step with a cost gradient evaluated at a proxy and can still violate the constraint.Projec- tionmoves the draw to the safe set, yielding an action the policy would rarely sample.Rejection samplingredraws from pure noise until a draw is safe.CS-Piprojects the draw, renoises the pro- jection to timen=k/(k+δ)set by the projection residualδ(largerδrenoises more), and re-runs the policy until a draw is safe and plausible.

[Original paper](https://arxiv.org/abs/2611.08654v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Soumojit Bhattacharya, Oliver Kroemer, Shubham Tulsiani · CS-Pi: Constraint-Satisfying Flow Policy Sampling · Original paper figure · Extracted the figure area from page 3 of the original PDF.

## Why gradient guidance and projection fall short

A policy trained on demonstrations can't anticipate every deployment, so a constraint like a wine glass near the drawer must be enforced at inference. The constraint defines a safe set, and the two usual corrections are projecting a sample onto that set or steering denoising with a cost. Both corrections can move the action away from what the policy would plausibly produce, and that matters because the policy captures the task and smooth motion.

A hard constraint answers only yes or no, so it offers guidance no direction for moving the arm. Guidance evaluates that cost at a proxy, the policy's running estimate of the clean action, while it acts on noisy intermediate states. When the policy is uncertain between passing left and right of the glass, the proxy averages the two modes and can pass straight through the glass.

The gradient at that averaged point may point toward neither mode, which is why the paper's appendix E analyses the proxy failure.

Rejection avoids that averaging by redrawing complete actions from the policy until one is safe, so every output stays plausible. But the wait becomes intractable when safe actions are rare, so rejection doesn't scale to tight constraints. This leaves a gap: a method needs projection's speed and rejection's plausibility together, which is the aim of CS-Pi.

## Projecting, then renoising instead of executing

The key idea is to treat the projection as an anchor for the next draw rather than as the action to execute. Because the policy can start denoising from a partially noised point, the anchor can be renoised to an intermediate level and denoised again by the same policy. The loop repeats until a draw is itself safe, so the draws approach the safe set without restarting from pure noise.

The noise level comes from the projection residual, the distance between the draw and its projection, which the authors denote δ. A small residual means the draw was nearly safe, so the next draw should concentrate near the anchor. A large residual means the anchor may sit where the policy puts little mass, so the next draw is made looser to allow another mode, such as passing right instead of left.

The coefficient k sets the scale through σ = δ/k, so a k near zero recovers rejection and a very large k recovers projection.

The idealized target is \\(q^{(i)}(a) \\propto \\pi\_\\theta(a)\\,\\mathcal{N}(a; a\_c^{(i)}, (\\sigma^{(i)})^2 I)\\), which pulls the policy toward the anchor while keeping its own shape. Sampling from that target is intractable because the policy density is defined only through its ODE, so the method renoises instead. It sets \\(n^{(i)} = k/(k+\\delta^{(i)})\\) and forms \\(a\_n^{(i)} = n^{(i)} a\_c^{(i)} + (1-n^{(i)})\\epsilon^{(i)}\\) with fresh noise \\(\\epsilon^{(i)}\\).

Because \\((1-n)/n\\) equals \\(\\delta/k\\), the noise ratio equals σ, so a larger residual adds more noise.

Algorithm 1 starts from one policy draw, projects it, and checks whether the residual is at most τ. If it is, the draw is returned; otherwise the anchor is renoised and the unmodified policy re-denoises it into the next draw. After K\_max iterations the loop stops, and the optional terminal projection can be applied to the last draw.

## Extending the loop to soft preferences

A soft preference, such as keeping the gripper near-vertical, is a cost rather than a boundary, so a projection has no direct meaning for it. For a continuous cost L, the anchor instead comes from the proximal operator, which trades reducing L against staying close to the current draw. The parameter β sets that balance, and the rest of the algorithm stays unchanged.

Only the anchor-producing step changes, so the draw-project-renoise structure carries over to preferences.

Costs and hard constraints compose by applying them in sequence to the same clean draw, so their order encodes priority. The constraint takes precedence because it is applied last, which a gradient method can't mimic without merging both terms into one objective.

The authors use this preference setting in the 3D-ORIENT experiment, which tests the loop on a continuous cost rather than a boundary. Compute is reported as NFE, the number of flow-network forward passes per rollout.

## Does the loop hold up in the 2D diagnostic

The 2D AVOIDANCE environment lets the authors plot each sampler's full action distribution, because the action space is 2D. The demonstrations reach the goal along distinct paths, so the policy is multimodal, as real manipulation data often is. Six scenarios of varying difficulty add obstacles that the policy never saw during training.

![Figure 3: 2D AVOIDANCEtrajectory distributions, one scenario per method.20rollouts overlaid on the demonstration support (shaded); the obstacles are outlined.…](https://refivu.com/papers/17a3a0d4-2f79-463a-b689-339f8435d667/figures/figure-dae433ce2c7277b7672d6b27ffa55dc9.png?thumb=512)

**Figure 3** :2D AVOIDANCEtrajectory distributions, one scenario per method.20rollouts overlaid on the demonstration support (shaded); the obstacles are outlined. Gradient guidance and Trust Sampling visibly leave the support to reach the goal or cut through the obstacle; rejection stays on-support but only a few draws survive;CS-Pikeeps every trajectory in-distribution while routing around the obstacle. The other five scenarios are in App. D.

[Original paper](https://arxiv.org/abs/2611.08654v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)

Gradient guidance keeps only 0.410 of its rollouts fully on-support, and Trust Sampling keeps 0.350.

Rejection stays on-support, but only a few of its draws survive in that scenario. The authors read projection as satisfying the constraint while leaving the support, so it fails the plausibility test. The table reports macro averages over the six scenarios, with 200 rollouts per cell.

## Shelf pick-and-place with deployment-time obstacles

The shelf benchmark asks whether a sampler can respect a deployment-time obstacle without discarding what the policy learned about the task. CS-Pi and projection share the same L-BFGS proximal step, so any gap between them comes from the iterative loop of CS-Pi.

The baselines were gradient guidance, Trust Sampling, rejection sampling, projection, the unconstrained policy, and SafeDiffuser and SafeFlowMatcher, each at its best hyperparameter. CS-Pi uses the terminal projection on every obstacle benchmark, and the shelf run is one of them. CS-Pi has a single hyperparameter, k, and the authors report it as robust across a broad range of k.

## Soft preference and hardware results

The 3D-ORIENT test asks whether a sampler can hold a top-down orientation as a soft cost without giving up the reach. Projection, rejection and the CBF samplers need a safe set, so they don't apply to this continuous cost. CS-Pi with the EE-prox step reaches 65.6% success, with 98.9% goal reaching and a 0.07m end-effector step matching the unconstrained policy.

The unconstrained policy reaches only 2.2% success with the same 98.9% goal reaching, so the reach is not the bottleneck. Gradient guidance at α=0.03 reaches 6.7% success but only 7.8% goal reaching, so it loses the reach and roughens the path. Trust Sampling keeps the reach but barely changes the orientation, reaching 1.1% success. CS-Pi's log-likelihood is 10.21, compared to 13.46 for the unconstrained policy, which the authors attribute to moving the gripper away from the policy's preferred orientations.

On the Franka FR3 with π 0.5, the hardware test asks whether the loop transfers zero-shot to a real arm with obstacles estimated from vision. The obstacle bounding boxes come from a ZED 2 RGB-D vision pipeline and are estimated once per rollout. The authors ran 10 trials per method per layout across two layouts, so these runs are small-sample evidence.

CS-Pi stays close to the unconstrained policy at −471.8 while still satisfying the constraint.

![Figure 4: Hardware rollouts; frames run left-to-right within each strip.Green-bordered strips areCS-Pi, which enforces the deployment-time obstacle constraint…](https://refivu.com/papers/17a3a0d4-2f79-463a-b689-339f8435d667/figures/figure-8fba4c4ba7eebed6a3272267d8cd0a29.png?thumb=512)

**Figure 4** :Hardware rollouts; frames run left-to-right within each strip.Green-bordered strips areCS-Pi, which enforces the deployment-time obstacle constraint and completes the pick-and- place; red-bordered strips are the sameπ 0.5 policy run unconstrained.Layout 1(first two):CS-Pi grasps the apple and places it, while the unconstrained policy clips the cup and loses the grasp. Layout 2(last two):CS-Pireaches down and lifts the apple cleanly, while the unconstrained policy collides with the obstacle.

[Original paper](https://arxiv.org/abs/2611.08654v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)

## Limits of the current evidence

The guarantees stop at a single iteration, because the authors characterize the per-iteration sampling distribution but don't prove that the loop converges. Each draw lands closer to the safe set on average, yet the paper gives this as a property of the loop rather than a proof of termination. The terminal projection is safe but often less likely under the policy, so the choice trades plausibility for safety.

CS-Pi also needs a usable projection P, or a proximal operator prox βL, to run at all. More complex constraint sets would need more complex solvers, and the paper doesn't test any such set.

On hardware, the constraint set C comes from vision, estimated once per rollout in static scenes. The hardware tests don't cover moving obstacles, so that failure mode stays untested.

CS-Pi operates on action chunks, the fixed-length sequences a policy predicts at each query, so it is myopic. The authors leave trajectory-level planning out of scope.

The hardware comparison runs 10 trials per method per layout, 20 in total, so its differences are small-sample evidence. The authors note the runs are small-sample, so the lead over projection is suggestive rather than settled.

## Paper info

- **Authors**: Soumojit Bhattacharya, Oliver Kroemer, Shubham Tulsiani
- **Venue**: arXiv · Preprint
- **First published**: 2026-11-5
- **Added**: 2026-11-9
- **Updated**: 2026-11-5
- **Version**: v1
- **arXiv**: 2611.08654
- **Category**: cs.RO
- **Original paper terms**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **What we show**: Paper info, commentary and permitted figures from the original paper

[Original paper ↗](https://arxiv.org/abs/2611.08654v1) · [PDF ↗](https://arxiv.org/pdf/2611.08654v1)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Abstract

A flow-matching policy deployed in the field must often satisfy a constraint that was absent from its demonstrations, such as avoiding an obstacle it has never seen. Retraining for every new constraint is impractical, so the constraint must be enforced at inference time. Enforcing it must not discard what the policy learned: an action the policy would rarely sample may avoid the obstacle yet fail the task. We therefore want actions that are both safe, satisfying the constraint, and plausible, remaining likely under the policy. Gradient guidance, the most common approach, steers noisy states, so it must evaluate its cost on the policy's running estimate of the clean action; when the policy is uncertain between passing left or right of an obstacle, this estimate is their average and can pass straight through it. We instead build on rejection and projection. Rejection redraws actions until one is safe: every output is plausible, but the wait is intractable when safe actions are rare. Projection moves an action to the nearest safe one: it is efficient, but the result need not be plausible. Our key insight is that flow-matching sampling lets us combine the two, keeping projection's efficiency and rejection's plausibility. CS-Pi, our draw-project-renoise sampler, projects each draw to the nearest safe action, adds noise back scaled to how far the projection moved it, and re-runs the unmodified policy until a draw is safe. Replacing only the projection step extends CS-Pi to continuous costs. Across a 2D diagnostic, a 7-DoF shelf pick-and-place, an orientation preference, and a zero-shot Franka deployment, CS-Pi reaches 81% safe success on the shelf and 55% on hardware, against 55% and 40% for projection, while staying plausible.

## Quote from the paper

Soumojit Bhattacharya, Oliver Kroemer, Shubham Tulsiani (2026). CS-Pi: Constraint-Satisfying Flow Policy Sampling. arXiv:2611.08654v1. https://arxiv.org/abs/2611.08654v1

**BibTeX**

```
@misc{bhattacharya2026constraint,
  title = {{CS-Pi: Constraint-Satisfying Flow Policy Sampling}},
  author = {Soumojit Bhattacharya and Oliver Kroemer and Shubham Tulsiani},
  year = {2026},
  eprint = {2611.08654},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.08654v1}
}
```

## Other paper commentary

- [Off-Policy Deep Reinforcement Learning without Exploration](https://refivu.com/en/papers/997f4405-73fe-49b5-a89f-243df2c90604-off-policy-deep-reinforcement-learning-without-exploration.md)
- [Deep Reinforcement Learning in a Handful of Trials using Probabilistic Dynamics Models](https://refivu.com/en/papers/7e2537c1-771a-440a-8d0f-51287b1afd57-deep-reinforcement-learning-in-a-handful-of-trials.md)
- [Rainbow: Combining Improvements in Deep Reinforcement Learning](https://refivu.com/en/papers/b98e78e1-7a51-4f55-b8c6-f920fb30d547-rainbow-combining-improvements-in-deep-reinforcement.md)
- [Deep Reinforcement Learning with Double Q-learning](https://refivu.com/en/papers/f2b03deb-df54-4587-b32e-077bd6c02e5b-deep-reinforcement-learning-with-double-q-learning.md)
- [When to Trust Your Model: Model-Based Policy Optimization](https://refivu.com/en/papers/c30bd870-19cb-4a6e-8e2b-d348ea953f92-when-to-trust-your-model-model-based-policy.md)
- [Addressing Function Approximation Error in Actor-Critic Methods](https://refivu.com/en/papers/88b36232-904a-4e73-a6d0-c363af4ff547-addressing-function-approximation-error-in-actor-critic.md)
- [Remembering Is Not Enough: Evaluating Timing and Omission in Longitudinal AI Mental Health Support](https://refivu.com/en/papers/a0d9ea74-56d1-4a18-990f-da3c303618ad-remembering-is-not-enough-evaluating-timing-and-omission.md)
- [ImageNet Classification with Deep Convolutional Neural Networks](https://refivu.com/en/papers/29bd195c-62ba-4850-a19b-8047984af37c-imagenet-classification-with-deep-convolutional-neural.md)
- [Steer, Don't Tell: Breaking Reasoning Plateaus with Reachability-Aligned Self-Distillation](https://refivu.com/en/papers/9a9bdea9-2b4f-4948-af12-9e4f09801fff-steer-don-t-tell-breaking-reasoning-plateaus-with.md)
- [Mutual Information Estimation via Triangular Transport Maps: Finite Sample Guarantees and Sample Allocation](https://refivu.com/en/papers/ecbc1c4d-e55f-44e9-a5cd-8b294d3ca9c9-mutual-information-estimation-via-triangular-transport-maps.md)
- [Do Orthogonality Constraints Help Language-Model Training Beyond Sphere Optimization?](https://refivu.com/en/papers/a8d5be60-2838-4ee7-ae07-084a4f6ef144-do-orthogonality-constraints-help-language-model-training.md)
- [TacMind: Benchmarking and Modeling Tactile Interaction States for Robotic Manipulation](https://refivu.com/en/papers/8026a46a-24cf-4064-8238-09bba4b5608f-tacmind-benchmarking-and-modeling-tactile-interaction-states.md)

## Terms in this paper

- [L-BFGS](https://refivu.com/en/terms/433a40c1d5e1-l-bfgs)
- [plausibility](https://refivu.com/en/terms/36cfdb36f960-plausibility)
- [safe set](https://refivu.com/en/terms/0c8d259849a0-safe-set)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/17a3a0d4-2f79-463a-b689-339f8435d667-cs-pi-constraint-satisfying-flow-policy-sampling)
