BayesFP: Posterior Estimation for Flow-Based Policies via Feynman-Kac Sampling
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: Robotics Radio. Generated commentary on the latest robotics and control papers.
Rosa: Today's paper: "BayesFP: Posterior Estimation for Flow-Based Policies via Feynman-Kac Sampling".
Dev: The gist The proposed method formulates constrained trajectory generation for pretrained diffusion and flow-matching policies as Bayesian posterior sampling,
Rosa: First, who's behind it and why it matters.
Paper summary: Rosa: So, we've talked about how this BayesFP method uses Bayesian posterior sampling combined with Feynman-Kac sampling to create a unified sampler for both diffusion and flow policies. We saw that this approach leverages the learned demonstration distribution as a prior and tilts it using a cost function derived from our constraints.
Dev: It seems like the main implication is removing that dependency on external safety filters or planners when we need to inject task-specific requirements during robot operation. It’s about steering the model's output directly toward feasibility and optimality in real time.
Taro: For autonomy research, this means we can deploy these powerful generative models in scenarios with strict, dynamic constraints that weren't explicitly trained into the policy itself. That makes a big difference for deployment outside of perfectly controlled lab settings.
Rosa: The authors are pointing to the fact that this unified sampler handles non-convex obstacles uniformly and they provide a concentration guarantee showing that the samples land near the constrained optimum when we use sufficiently high penalty weights and inverse temperature.
Dev: So, for the engineers on our side, it suggests a way to get high-quality, constrained paths from these policies without adding significant computational overhead or requiring complex re-planning loops during operation.
Taro: It's not that the AI is suddenly perfect, but it gives us a much more principled way to constrain what we know when we deploy these models in the physical world.
Rosa: That's it for BayesFP: Posterior Estimation for Flow-Based Policies via Feynman-Kac Sampling. This framework offers a way to sample trajectories that are faithful to learned behavior while strictly adhering to inference-time constraints and objectives.
Conclusion: Rosa: So, we're wrapping up our look at BayesFP by talking about what this paper actually is and who came up with it, Dev?
Dev: It’s titled "BayesFP: Posterior Estimation for Flow-Based Policies via Feynman-Kac Sampling," and the authors are focusing on making constrained path generation work for diffusion models and flow matching.
Rosa: It seems like the core idea is taking those pre-trained policies—the ones we already have—and treating them like a prior distribution, then using cost functions to tilt that distribution toward what we need at inference time.
Dev: Exactly. The method uses Bayesian posterior sampling, where the learned demonstration data is your starting point, and the cost function handles the safety and task goals you’re imposing on it while you’re running it live.
Rosa: So, if I'm driving a robot in a warehouse and suddenly I need to avoid an unexpected obstacle, this method lets me ask for a path that respects that avoidance without having to re-train the entire policy first.
Dev: That’s the point. The Feynman-Kac framework helps them sample from that tilted distribution using a weighted process, which they adapted for these flow policies by just changing how they look at the mathematical structure of the flow equations.
Rosa: It sounds like a way to bridge the gap between what an AI learned in training and what it needs to actually *do* when it’s faced with new, real-time constraints.
Dev: It gives us a unified sampler that works for both diffusion and flow models, which is pretty neat because they’re different types of generative models.
Rosa: And the results they showed on things like GR00T-N1 point six suggest this isn't just theory; it actually holds up when you test it on real manipulation tasks, including those tricky non-convex obstacles <ref:2606.21014#pg1>.
Dev: The paper shows that with enough penalty weight and temperature, the samples really do concentrate around the feasible and optimal solutions they were aiming for.
Rosa: It’s a significant step because it provides a principled way to constrain these powerful policies without having to manually design complex safety layers on top of them later.
Dev: It moves the problem from something you try to fix after training, to something you bake into the sampling process itself.
Rosa: So this paper gives us a clear path for how we can deploy generative models in environments where strict, dynamic rules are necessary for physical interaction.
School of Computer Science, The University of Sydney · Australian Centre for Robotics, The University of Sydney · NVIDIA
cs.RO
Submitted: 2026-06-19
Updated: 2026-10-13
Code: https://github.com/TheRobotStudio/SO-ARM100
License: http://creativecommons.org/licenses/by/4.0/
Importance score: 85/100
The gist: The gist The proposed method formulates constrained trajectory generation for pretrained diffusion and flow-matching policies as Bayesian posterior sampling, leveraging Feynman–Kac sampling to
Key concepts
- Bayesian Posterior Sampling
- This approach frames trajectory generation as finding the most likely path given prior knowledge. The learned expert behavior acts as the starting distribution (prior), and a cost function derived from the task constraints modifies this distribution to favor safe and optimal paths during inference.
- Feynman–Kac Corrector Framework
- Originally used for diffusion models, this framework is adapted here to sample from the posterior. It allows for sampling trajectories by solving a related stochastic differential equation (SDE), effectively using the cost function as a weighting mechanism to guide the trajectory towards desired outcomes.
- Cost-Tilted Likelihood
- This component modifies the probability distribution of potential trajectories. Instead of relying solely on what the model learned, this likelihood term incorporates a cost derived from task objectives. This tilts the sampling process away from infeasible or suboptimal paths and towards those that minimize the defined cost.
- Unified Sampler
- The core innovation is creating a single sampling mechanism applicable to both diffusion policies and flow-matching policies. This is achieved by recasting the deterministic flow ODE into an equivalent stochastic process, allowing one method to serve both policy types without requiring separate training or inference procedures.
Terminology
Summary
The gist The proposed method formulates constrained trajectory generation for pretrained diffusion and flow-matching policies as Bayesian posterior sampling, leveraging Feynman–Kac sampling to sample from a cost-tilted posterior without retraining the base policy.
How it works
-
The core idea is to sample from the posterior distribution p(x O = 1) proportional to pdata(x) exp(β J (x)), where pdata(x) is the learned demonstration distribution and exp(β J (x)) acts as a likelihood tilting it toward feasible, optimal trajectories.
-
This posterior is sampled via a Feynman–Kac weighted SDE, which is extended to deterministic flow-matching policies by recasting the flow ODE as an equivalent stochastic process with identical marginal densities.
-
The resulting weighted SDE for the reverse-time generative SDE is derived by combining the base drift and a cost-aware drift correction, where the free design parameter 'a' is set to βtσ2t / 2 to obtain a maximally compact weight update.
Key Theoretical Frameworks
**- The method treats constrained trajectory generation as posterior sampling, where the demonstration distribution serves as the prior and the cost function encodes the inference-time constrained optimization problem. This provides a principled alternative to heuristic guidance and post-hoc projection. 3) The theoretical guarantee is that with sufficiently large penalty weights and inverse temperature, the resulting posterior concentrates on trajectories that are arbitrarily close to feasible and arbitrarily close to optimal. 4) The concentration result shows that for sufficiently large penalty weights and inverse temperature, the Gibbs-tilted posterior satisfies Ppβ,c(h1(x) ≤ δ, h2(x) ≤ δ, L(x) ≤ L⋆ + δ ≥ 1 − η. 5) The proof demonstrates that the posterior targeted by the sampler concentrates around feasible, near-optimal solutions of the constrained problem. 7) The analysis shows that population-level reweighting lets our method handle convex and non-convex obstacles uniformly (Fig. 1, V-shape in Table 1). 8) The overlap assumption presumes that pdata and exp(βJ) overlap, which is crucial for the reweighting term to carry signal. 9) The methodology extends uniformly to both diffusion and flow-matching policies via the marginal-preserving SDE recast of Sec. C. 10) The final result is a unified inference-time sampler for both model classes. 9) The concentration on the constrained optimum by Gibbs tilting shows that p(β,c)(Gδ) = 1 − p(β,c)(Aδ) ≥ 1 − η. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes. 9) The final result is a unified inference-time sampler for both model classes.
Improvements for AI systems
-
textbfbold posterior sampling for constrained generation in diffusion/flow policies: The BayesFP framework allows sampling from a principled posterior distribution using
the learned demonstration distribution as a prior and a cost-derived likelihood tilting it toward feasible, optimal trajectories.
This enables robots togenerate trajectories that remain faithful to learned expert behavior while satisfying safety constraints and task-specific objectives specified only at inference time.
-
textbfbold handling of non-convex obstacles: The method can plan around complex geometries because the
population-level reweighting lets our method handle convex and non-convex obstacles uniformly (Fig. 1, V-shape in Table 1),
whereas baselinesstruggle
with such geometry. -
textbfbold zero-shot constraint satisfaction: The system achieves a
theoretical guarantee that, with sufficiently large penalty weights and inverse temperature, the resulting posterior concentrates on trajectories that are arbitrarily close to feasible and arbitrarily close to optimal,
removing the need for an external safety filter or backup planner. -
textbfbold unified sampling across model types: The framework is
unified
for both diffusion and flow-matching policies by recasting the flow ODE as amarginal-preserving SDE [16] with the score imputed in closed form from the learned velocity field,
yielding aunified inference-time sampler for both model classes.
-
textbfbold principled constraint enforcement via posterior inference: Instead of heuristic modifications like
classifier-based guidance
orprojection,
BayesFP targets the posterior p(x O = 1) whereO is a binary optimality indicator,
ensuring the resulting trajectories are theunique distribution consistent with the Bayesian interpretation of constraint-aware imitation.
-
textbfbold online scene constraint handling for visual policies: For models like π0.5, it can use an
online signed distance function sˆ(p) of the scene built from depth (nvblox),
allowing it to treat every non-target object as a collidable obstacle when geometry is not known during training. -
textbfbold robust performance under high constraint pressure: The concentration proof demonstrates that
the posterior targeted by our sampler concentrates around feasible, near-optimal solutions of the constrained problem,
ensuring that even withsufficiently large penalty weights and inverse temperature,
the probability of violation decays exponentially as predicted by Eq. (14).
Abstract
Robots must generate trajectories that remain faithful to learned expert behavior while satisfying safety constraints and task-specific objectives specified only at inference time. We formulate constrained trajectory generation for pretrained diffusion and flow-matching policies as Bayesian posterior sampling, with the learned demonstration distribution as a prior and an inference-time, cost-derived likelihood tilting it toward feasible, optimal trajectories. To sample from this posterior without any retraining of the base policy, we leverage the Feynman--Kac corrector framework, originally formulated for diffusion models, and extend it to deterministic flow-matching policies. The result is a unified, inference-time, retraining-free sampler for diffusion and flow policies. We validate the approach on pretrained Diffusion Policy, GR00T-N1.6, and π 0.5 checkpoints across simulated and real-world manipulation tasks, including planning around non-convex obstacles introduced at inference time, and show improvements over the base π 0.5 on zero-shot tasks.
Sources
- Stochastic Sampling from Deterministic Flow Models
- Riemannian Flow Matching Policy for Robot Motion Learning
- Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flow
- Stein Variational Model Predictive Control
- Reinforcement Learning and Control as Probabilistic Inference: Tutorial and Review
- GR00T N1: An Open Foundation Model for Generalist Humanoid Robots
- $\pi_{0.5}$: a Vision-Language-Action Model with Open-World Generalization
- OmniGuide: Universal Guidance Fields for Enhancing Generalist Robot Policies
- Inference-Time Policy Steering through Human Interactions
- nvblox: GPU-Accelerated Incremental Signed Distance Field Mapping
- LIBERO: Benchmarking Knowledge Transfer for Lifelong Robot Learning
- DROID: A Large-Scale In-The-Wild Robot Manipulation Dataset
- RoboLab: A High-Fidelity Simulation Benchmark for Analysis of Task Generalist Policies
- Understanding Reinforcement Learning-Based Fine-Tuning of Diffusion Models: A Tutorial and Review
- A General Framework for Inference-time Scaling and Steering of Diffusion Models
Related papers
- FMT x: An Efficient and Asymptotically Optimal Extension of the Fast Marching Tree for Dynamic Replanning
- MPCFormer: A physics-informed data-driven approach for explainable socially-aware autonomous driving
- RoboLab: A High-Fidelity Simulation Benchmark for Analysis of Task Generalist Policies
- ARC: A Reasoning Recipe for Robot Foundation Models
- HRDexDB: A 4D Dexterous Grasping Dataset Across Human and Multiple Robot Embodiments
- APT: Action Expert Pretraining Improves Instruction Generalization of Vision-Language-Action Policies