---
title: 'PegasusFlow: Hierarchical Diffusion Planning'
url: https://www.emergentmind.com/topics/pegasusflow
type: topic
---

# PegasusFlow: Hierarchical Diffusion Planning

PegasusFlow is a robot planning framework for diffusion-based trajectory generation that is designed to bypass the usual reliance on expert demonstrations by sampling trajectory score gradients directly from environmental interaction in parallel simulation [2509.08435]. In the formulation reported for PegasusFlow, planning is treated as a hierarchical rolling-denoising process over spline-parameterized action trajectories, with the optimizer operating in a low-dimensional basis-function space and the rollout substrate implemented as an asynchronous IsaacGym-based simulation architecture [2509.08435]. The same source also defines PegasusFlow not as a generic workflow engine, but as a planning and data-generation framework for robot diffusion planner flow matching, centered on Weighted Basis Function Optimization (WBFO), its action-value variant AVWBFO, Latin Hypercube Sampling (LHS), and Hierarchical Ramp Noise Scheduling (HRNS) [2509.08435].

## 1. Problem formulation and conceptual basis

PegasusFlow is motivated by a practical limitation in robot diffusion planning: most diffusion planners are trained by imitation learning from expert trajectories, which the paper characterizes as both practically inconvenient and conceptually indirect for specialized robots where data is scarce [2509.08435]. The stated alternative is to obtain trajectory score gradients directly from online environmental interaction rather than expert data, and to do so through parallel rollout-based denoising [2509.08435].

The planning problem is posed as a finite-horizon optimal control problem in which the robot state evolves according to
$$
x_{k+1} = f(x_k, u_k, t_k),
$$
with optimization over a control sequence on a receding horizon [2509.08435]. The paper connects this setting to sampling-based MPC and diffusion-style sampling through an MPPI-style noisy rollout update and the score interpretation
$$
u^+ = u + \Sigma \nabla \log p_1(u),
$$
where $p_0(u) \propto \exp\!\left(-\frac{J(u)}{\lambda}\right)$ and $p_1(\cdot)$ is a smoothed version of $p_0$ induced by Gaussian rollout noise [2509.08435].

Within that interpretation, “rolling” refers to the MPC receding-horizon shift and “denoising” refers to iterative refinement from noisy trajectory samples toward high-reward or low-cost trajectories [2509.08435]. The framework therefore sits at the intersection of trajectory optimization, sampling-based MPC, score-based generative modeling, and RL, with environmental reward supplying the supervision signal and an optional pre-trained RL policy supplying an initialization prior [2509.08435].

## 2. Hierarchical rolling-denoising framework

The framework is described as hierarchical in three senses: trajectory representation, temporal optimization, and simulation organization [2509.08435]. First, trajectories are parameterized at two resolutions. A dense action sequence $\boldsymbol{u} \in \mathbb{R}^{D \times T}$ is represented through $K$ spline control nodes, with $K \ll T$, via
$$
\boldsymbol{u} = \mathbf{P}\mathbf{\Phi},
$$
where $\mathbf{P} \in \mathbb{R}^{D \times K}$ is the control-node matrix and $\mathbf{\Phi} \in \mathbb{R}^{K \times T}$ is the basis weight matrix [2509.08435]. The inverse reconstruction uses the pseudoinverse,
$$
\mathbf{P} = \boldsymbol{u}\mathbf{\Phi}^{+}.
$$

At the continuous level, the same representation is written as
$$
u(t) = \sum_{k=1}^{K} P_k \phi_k(t),
$$
and the implementation uses Catmull-Rom splines, chosen because they interpolate the control nodes exactly [2509.08435]. The spline segment description is also given as
$$
\mathbf{Pos}(t) = \mathbf{P}\cdot \mathbf{M}\cdot \mathbf{T},
$$
with $\mathbf{T} = [1,t,t^2,t^3]^T$ [2509.08435].

Second, the optimization is hierarchical across time. Near-future parts of the horizon receive more focused exploration, while farther-horizon parts retain broader exploratory noise under HRNS [2509.08435]. Third, the simulator is organized into “main” environments that carry the actual receding-horizon execution state forward and many “rollout” sub-environments cloned from each main environment for parallel score sampling [2509.08435].

The resulting operational cycle is fixed in the source: initialize a trajectory prior, clone main environment states into rollout environments, add scheduled noise using LHS and HRNS, decode nodes to dense trajectories, roll out all candidates in parallel, compute reward-weighted node updates, repeat denoising for $n_{\text{denoise}}$ iterations, execute the first action, shift the trajectory forward, append terminal actions using the RL warm-start policy, and iterate [2509.08435]. The paper emphasizes that this fully specifies the planning and sample-collection pipeline, while the downstream flow-matching loss for a learned diffusion policy is not fully specified [2509.08435].

## 3. Weighted Basis Function Optimization

WBFO is presented as the main algorithmic novelty of PegasusFlow [2509.08435]. Its purpose is to improve sample efficiency relative to MPPI by optimizing in a lower-dimensional spline basis and by assigning node-specific weights according to where rewards occur in time [2509.08435]. In contrast to MPPI’s trajectory-level global weighting, WBFO projects reward information back to spline nodes through the basis functions that connect each node to each timestep [2509.08435].

The paper states the optimization problem as
$$
P_k^* = \arg\min_{P_k} \mathbb{E}_{u \sim p(u \mid \{P_k\})} \left[\sum_{t=1}^{T} r_t\right].
$$
For $N$ rollout trajectories with step-wise rewards $r_{i,t}$, the discounted accumulated rewards are defined as
$$
\mathbf{R}_{\text{acc}(i,t)} = \sum_{s=t}^{T} r_{i,s}\gamma^{\,s-t}.
$$
For pure trajectory optimization, WBFO uses $\gamma=0$, which reduces to timestep-local reward, while AVWBFO uses $\gamma>0$, and in experiments $\gamma=1.0$ [2509.08435].

The reward-to-node projection is then
$$
\mathbf{W} = \mathbf{R}_{\text{acc}}\mathbf{\Phi}^T,
$$
so that each sampled trajectory receives a reward score for each spline node [2509.08435]. The paper then applies node-level normalization,
$$
\mathbf{W}(i,j) = \frac{\mathbf{W}(i,j)-\text{mean}(\mathbf{W}(i,:))}{\text{std}(\mathbf{W}(i,:))},
$$
followed by node-specific softmax weights,
$$
w_{ij} = \frac{\exp(\mathbf{W}(i,j))}{\sum_k \exp(\mathbf{W}(i,k))}.
$$
The updated node is the weighted average
$$
P_j^+ = \sum_{i=1}^{N} w_{ij}\cdot P_{ij}.
$$

This basis-centric update is the essential WBFO denoising step [2509.08435]. The source attributes four effects to this design: local optimality, temporal coherence, lower-dimensional search, and better sample efficiency because each rollout contributes finer-grained learning signal than a single trajectory-level scalar weight [2509.08435].

A central distinction in the paper is between WBFO and AVWBFO. WBFO is described as appropriate for trajectory optimization when local step-wise reward is sufficient, whereas AVWBFO is intended for integrated dynamic control where future consequences matter [2509.08435]. The inverted pendulum result is used as the paper’s main supporting example: plain WBFO underperforms in integrated control, while AVWBFO slightly outperforms MPPI, which the authors interpret as validating discounted reward or action-value style updates in dynamic systems [2509.08435].

## 4. Noise design, rollout architecture, and warm start

PegasusFlow combines its optimizer with two structured exploration mechanisms: Latin Hypercube Sampling and Hierarchical Ramp Noise Scheduling [2509.08435]. LHS is used instead of independent Monte Carlo Gaussian samples in order to stratify each dimension into equiprobable intervals and provide more uniform coverage of the noise space with fewer rollout samples [2509.08435]. HRNS modulates noise magnitude across the planning horizon according to temporal distance from the current step, producing focused local improvement near the present and broader exploratory perturbation farther ahead [2509.08435].

The rollout substrate is an IsaacGym-based asynchronous parallel simulator with total environment count
$$
N_{\text{total}} = N_m \times (1 + N_r),
$$
where $N_m$ is the number of main environments and $N_r$ is the number of rollout environments attached to each main environment [2509.08435]. The main environments hold the true receding-horizon state, while rollout environments are repeatedly synchronized to those states before each denoising phase and then execute many noisy trajectory branches in parallel [2509.08435].

The paper identifies this architecture as a practical strength because it supports hundreds of sub-environments for rollout sampling, uses NVIDIA Warp for accelerated Signed Distance Field and raycasting queries, and provides branch-consistent exploration from identical starting states [2509.08435]. The latter property is especially important for direct score or policy-improvement estimation, since each rollout batch probes the local task-induced trajectory distribution around the same planning point [2509.08435].

RL warm start is reported as an important practical component, though not the core contribution [2509.08435]. A pre-trained RL policy initializes the horizon action sequence and provides tail actions after the receding-horizon shift [2509.08435]. The paper’s interpretation is that this stabilizes optimization and supplies a dynamically sensible prior, particularly in obstacle-rich locomotion and navigation tasks [2509.08435]. It also notes a limitation: PegasusFlow bypasses expert demonstrations for score sampling, but its best empirical results still benefit substantially from a learned RL prior [2509.08435].

## 5. Empirical results and reported task performance

The experimental program spans 2D Navigation, Inverted Pendulum, Franka arm collision avoidance planning, and several legged navigation tasks including hexapod timber piles navigation, quadruped walking with hundreds of rollout environments, hexapod confined-space navigation, and ElSpider Air barrier navigation [2509.08435]. Reported metrics include final cost after optimization, completion rate or success rate, mean steps to completion, and accumulated or mean reward [2509.08435].

For 2D Navigation, the setup uses 16 nodes, 64 dense samples, 10 optimization iterations, exponential noise decay with initial noise $3.0$ and decay $0.6$, and 5 trials [2509.08435]. The key finding is that WBFO is much more sample-efficient than MPPI, especially with $\le 20$ samples [2509.08435]. At 10 samples, WBFO achieves final cost $-0.095 \pm 1.46$, while MPPI gets $-46.53 \pm 4.60$ [2509.08435].

For Franka collision avoidance planning, the setup uses 30 Franka arms, 64 samples for all methods, a goal behind a wall gap, and a horizon limit of 150 steps [2509.08435]. The source reports AVWBFO + MC at 93.3% completion, MPPI + MC at 70%, AVWBFO + LHS at 100%, and MPPI + LHS at 90% [2509.08435]. The best method is AVWBFO + LHS with 100% completion and $63.9 \pm 15.6$ steps to completion [2509.08435].

For ElSpider Air barrier navigation, the setup includes 20 robots, a start inside a square barrier, barrier height $0.2\,\text{m}$, width $0.35\,\text{m}$, a goal outside the barrier, a 300-step budget equal to 6 s at 0.02 s per step, and 128 samples [2509.08435]. The reported methods are Vanilla RL, AVWBFO with RL, AVWBFO without RL, MPPI with RL, and MPPI without RL [2509.08435]. The corresponding success rates are 0%, 100%, 75%, 100%, and 40%; the completion speeds are $165.1 \pm 47.0$ steps, $226.1 \pm 51.9$ steps, $202.4 \pm 37.1$ steps, and $237.7 \pm 48.2$ steps for the non-vanilla methods in the order given above; and the mean rewards are 0.024, 0.014, 0.016, 0.011, and $-0.010$ for the five methods in the order reported in the source [2509.08435]. The paper highlights that AVWBFO with RL warm start is 18% faster than the next-best method, namely warm-started MPPI [2509.08435].

| Task | Best reported result | Comparative note |
|---|---|---|
| 2D Navigation | WBFO final cost $-0.095 \pm 1.46$ at 10 samples | MPPI: $-46.53 \pm 4.60$ |
| Franka collision avoidance | AVWBFO + LHS: 100% completion, $63.9 \pm 15.6$ steps | MPPI + LHS: 90% |
| ElSpider Air barrier navigation | AVWBFO w RL: 100% success, $165.1 \pm 47.0$ steps | 18% faster than MPPI w RL |

A plausible implication is that PegasusFlow’s empirical advantage depends on the joint effect of basis-function optimization, structured noise, large-scale synchronized rollouts, and a strong prior when warm start is available. The source itself frames these gains as evidence that AVWBFO, especially with an RL warm start, significantly outperforms baselines in difficult locomotion navigation tasks [2509.08435].

## 6. Limitations, scope, and naming ambiguity

The paper’s limitations are explicit. PegasusFlow is simulation-heavy and its practical advantage depends on access to GPU-accelerated simulators such as IsaacGym [2509.08435]. The paper does not provide a full downstream diffusion-training recipe, network architecture, or loss for the final diffusion policy, even though it repeatedly states that sampled trajectory score gradients can be used for flow matching training of a diffusion policy [2509.08435]. It also does not present a formal convergence theorem for WBFO, and it leaves reward design as a critical dependency because the supervision signal is environmental reward [2509.08435].

A further nuance is methodological rather than nominal. In the hardest locomotion task, warm start materially improves outcomes for both AVWBFO and MPPI, so PegasusFlow’s strongest reported results are not purely prior-free in the sense of dispensing with all learned initialization [2509.08435]. The paper’s sharper claim is narrower: it bypasses expert demonstrations for score sampling and planner improvement, not necessarily all auxiliary learned priors [2509.08435].

The term “PegasusFlow” is also ambiguous across adjacent literatures. A 2026 poster on rapid development of sensor-driven applications over Pegasus workflows does not use the term “PegasusFlow” explicitly; instead, it presents a pattern-based, AI-assisted methodology layered on top of Pegasus workflows for edge-to-core applications [2605.02844]. That work is therefore about Pegasus-based workflow engineering rather than the robot diffusion planner framework named PegasusFlow [2605.02844]. Two additional systems named “Pegasus” are also distinct: a dataplane deep-learning inference framework for programmable switches [2506.05779] and a hybrid-kinetic particle-in-cell code for astrophysical plasma dynamics [1311.4865]. This suggests that “PegasusFlow” should be reserved, in the most precise usage, for the hierarchical rolling-denoising robot planning framework defined in 2025 [2509.08435].

Within that scope, PegasusFlow is best characterized as a parallel score-sampling planner that turns receding-horizon trajectory optimization into a denoising process over spline-based action representations, with WBFO and AVWBFO supplying the optimizer and environmental interaction supplying the score signal [2509.08435].

Source: https://www.emergentmind.com/topics/pegasusflow