Streaming Flow Policy: Simplifying diffusion/flow-matching policies by treating action trajectories as flow trajectories

Sunshine Jiang, Xiaolin Fang, Nicholas Roy, Tomás Lozano-Pérez, Leslie Pack Kaelbling, Siddharth Ancha

TL;DR

Streaming Flow Policy (SFP) redefines robotic imitation learning by treating action trajectories directly as flow trajectories rather than generating a computationally heavy "trajectory of trajectories" via standard diffusion. This mathematical simplification allows the policy to stream actions to a robot on-the-fly with minimal latency while fully preserving the ability to model complex, multi-modal behaviors.

What Problem Does This Paper Address?

Diffusion and flow-matching policies have become highly popular in robotic imitation learning because they excel at capturing multi-modal distributions—situations where a robot has multiple valid ways to complete a task (e.g., bypassing an obstacle from either the left or the right).

However, these methods are computationally expensive. Standard diffusion policies operate in the space of entire action sequences ($A^T$). They start from pure Gaussian noise and iteratively denoise a whole "chunk" of future actions. This creates a redundant "trajectory of trajectories" (as illustrated in Figure 1a). Because the robot must wait for the entire multi-step denoising process to finish before executing even the first action, this approach introduces significant latency, preventing tight, reactive sensorimotor control loops.

Figure 1: (a) Diffusion policy [1] and flow-matching policy [2] input a history of observations (not shown) to predict a “chunk” of future robot actions. The x-axis represents the action space, and the +y-axis represents increasing diffusion/flow timesteps. Conventional diffusion/flow policies sample a “trajectory of trajectories” — a diffusion/flow trajectory of action trajectories. They discard intermediate trajectories, and must wait for the diffusion/flow process to complete before the first actions can be executed on the robot. (b) We simplify diffusion/flow policies by treating action trajectories as flow trajectories. Our flow-matching algorithm operates in action space. Starting from a noised version of the last executed action, it incrementally generates a sequence of actions that constitutes a single trajectory. This aligns the “time” of the flow sampling process with the “execution time” of the action trajectory. Importantly, actions can be streamed to the robot’s controller on the fly during the flow sampling process, while retaining the ability to model multi-modal trajectory distributions.

Methods

The authors introduce Streaming Flow Policy (SFP), which shifts the generative process from the trajectory space ($A^T$) directly into the action space ($A$).

Key components of the method include:

  • Aligning Flow Time with Execution Time: In SFP, the progress of the flow sampling process ($t$) directly corresponds to the actual execution time of the trajectory (Figure 1b).
  • Warm Initialization: Instead of starting from pure noise, SFP samples its initial action from a narrow Gaussian distribution centered around the robot's last executed action (or its current proprioceptive state).
  • Velocity Field Integration: SFP learns a history-conditioned velocity field $v_\theta(a, t | h)$ via flow matching. Because standard ordinary differential equation (ODE) solvers integrate this field auto-regressively, the next action depends only on past actions. This allows actions to be streamed to the robot's controller immediately as they are computed.
  • Stabilizing Flows: To prevent compounding integration errors (distribution shift), the authors analytically inject a negative proportional error feedback term (a stabilization term) into the target velocity field during training. This guides the learned flow back toward the demonstration trajectories if it drifts.
Figure 2: (a) To illustrate our method, we consider a toy example of 1-D robot actions with two demonstration trajectories shown in blue and red. (b) Given a demonstration trajectory sampled from the training set (e.g. the blue one), we first analytically construct a conditional flow i.e. an initial action distribution and a velocity field. The constructed flow samples trajectories from a thin Gaussian tube around the demonstration trajectory. Using the constructed velocity field as targets, we learn a marginal velocity field via flow matching [3], shown in (c). The learned velocity field has the property that its induced marginal distribution over actions at each horizontal time slice matches the training distribution. (d) The initial action at t = 0 is sampled from a narrow Gaussian centered at the most recently executed action. Then, we iteratively integrate the learned velocity field to generate an action trajectory. Sampled trajectories (shown in red) cover both behavior modes in the training data. (b) We find that constructing conditional flows that stabilize around demonstration trajectories reduces distribution shift and improves imitation learning performance. The main takeaway is that our method is able to both represent multi-modal distributions over action trajectories like diffusion/flow policies, while also iteratively generating actions that can be streamed during the flow sampling process, enabling fast and reactive policy execution.

Datasets

The authors evaluated SFP across both simulated benchmarks and real-world tasks:

  • Push-T Benchmark: A 2D planar pushing task requiring the manipulation of a T-shaped block, evaluated using both low-dimensional state inputs and raw image observations.
  • RoboMimic: Three manipulation environments ("Lift", "Can", and "Square") requiring the prediction of 6-DOF end-effector poses from state inputs.
  • Real-World Evaluation: Implemented on a 7-DOF Franka Research 3 robot arm for two tasks: reaching/picking an apple, and reorienting a block to a vertical goal position.

Key Insights and Ideas

  • Collapsing the Dimensions: By equating flow time with execution time, SFP completely bypasses the need to generate intermediate, discarded trajectories. This drastically slashes computation time.
  • The Power of Local Stabilization: Simply predicting a raw velocity field causes the robot to drift over time. Incorporating a low-level stabilizing controller framework directly into the flow-matching objective dramatically improves robustness against distribution shift.
  • Compositionality Over Global Constraints: SFP matches the per-timestep marginal distribution of actions rather than the full joint distribution. While this means it doesn't strictly enforce global trajectory constraints, it naturally enables compositionality—the robot can seamlessly combine segments of different training demonstrations to solve novel situations.

Key Results

SFP achieves massive latency reductions while matching or exceeding the success rates of standard diffusion policies:

  • Latency Cut by up to 93%: On the Push-T environment with image inputs, SFP dropped latency to 8.8 ms, compared to 127.2 ms for standard Diffusion Policy (100 DDPM steps). On state-based Push-T, SFP achieved a latency of just 3.5 ms.
  • High Success Rates: SFP achieved a 95.1% average score on Push-T (state imitation), outperforming standard Diffusion Policy (92.9%). On the challenging RoboMimic "Can" task, SFP achieved a 98.4% success rate compared to Diffusion Policy's 94.0%.
  • Crucial Stabilization: Ablation studies showed that removing the stabilization term ("SFP without stabilization") caused success rates on Push-T state imitation to drop significantly from 95.1% to 84.0%.
Performance comparison on the Push-T benchmark

Limitations and Future Work

  • Loss of Joint Distribution Fidelity: Because SFP focuses on marginal distributions, it can struggle with global constraints that require matching the exact joint distribution across the entire trajectory. For instance, in complex intersecting paths, the basic SFP might generate unintended path shapes (though the authors show that a latent-variable variant detailed in the appendix can help mitigate this).
  • Continuous Action Spaces Only: SFP relies on computing time-derivatives, meaning it requires continuous and differentiable action spaces. It cannot natively handle discrete actions, such as binary gripper open/close commands, without first mapping them to continuous fractions.

Summary updated

BibTeX
@misc{jiang2025streaming,
  author = {Sunshine Jiang and Xiaolin Fang and Nicholas Roy and Tomás Lozano-Pérez and Leslie Pack Kaelbling and Siddharth Ancha},
  title = {{Streaming Flow Policy: Simplifying diffusion/flow-matching policies by treating action trajectories as flow trajectories}},
  year = {2025},
  eprint = {2505.21851},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.21851},
}
Figure