July 08, 2026
Imitation learning has enabled remarkable progress in robotic manipulation, especially with diffusion and flow-based policies that generate complex visuomotor behaviors directly from demonstrations. Yet, despite their strong performance, these policies often fail to generalize across tasks and environments. A key reason is that existing policies tend to imitate superficial action correlations rather than the underlying intent. Inspired by the compositional structure of human behaviors, we propose PriGo, a primitive-guided test-time adaptive framework for robust robotic manipulation. PriGo introduces PANet, a lightweight primitive prediction module that infers primitive distributions directly from observations. We further propose a differentiable primitive guidance mechanism that refines generated actions during inference, steering trajectories toward semantically consistent behaviors. Unlike prior primitive-conditioned approaches, PriGo operates entirely at test time and can be seamlessly integrated into pretrained diffusion and flow policies without retraining. Extensive experiments on LIBERO, CALVIN, SIMPLER, and real-world robotic tasks demonstrate that PriGo consistently improves robustness, long-horizon execution, and generalization ability across both diffusion and flow-based policies. Codes are available on PriGo.
Imitation learning (IL) has become a dominant paradigm for robotic manipulation, enabling policies to acquire complex visuomotor behaviors directly from expert demonstrations without manually designed reward functions. Recent diffusion and flow-based policies have further improved action generation quality by modeling multi-modal action distributions and leveraging large-scale vision-language representations. Despite these advances, existing policies often remain brittle under distribution shifts, including variations in object, lighting, distractors, and unseen task [1], [2].
A key limitation is that current policies primarily learn correlations between observations and low-level actions, rather than the underlying structural intent of manipulation behaviors. Consequently, generated actions may locally resemble expert demonstrations while failing to preserve the intended motion structure required for successful task completion. As shown in Fig. 1.a, when opening a door, the policy incorrectly pulls before rotating the key, or generates unstable grasping motions under environmental perturbations. Such failures become particularly severe in long-horizon manipulation, where small local errors accumulate across multiple subtasks. To improve robustness and generalization, an important direction is to incorporate structured action priors into policy generation. Human manipulation behaviors naturally exhibit compositional structure, where complex tasks are composed of a small number of reusable motion primitives such as grasping, pushing, pulling, and rotation. Rather than treating actions as unconstrained continuous trajectories, these primitives provide a compact structural prior that constrains policies toward semantically consistent behaviors.
Recent works [3], [4] have sought to disentangle primitives into discrete types with associated parameters, capturing both categorical abstractions and low-level action prediction. However, they limit the primitive set to basic actions, which restricts their applicability to more complex tasks. Furthermore,
primitive taxonomy consisting of eight manipulation primitives, providing a balance between structural expressiveness and cross-task generalization.
We then incorporate differentiable primitive guidance into both diffusion and flow policies. During inference, actions are refined using gradients derived from primitive consistency objectives, encouraging trajectories to align with the predicted manipulation structure. Unlike prior guided diffusion approaches that mainly rely on task rewards or language supervision, PriGo introduces structured action-level guidance tailored for robotic manipulation. Our contributions are summarized as follows:
We propose PriGo, a plug-and-play primitive-guided test-time adaptation framework for robotic manipulation policies.
We introduce a differentiable primitive guidance mechanism that constrains diffusion and flow policy generation toward structured manipulation behaviors without retraining.
We design a lightweight primitive classification framework with stable cross-task primitive representations and probabilistic multi-primitive guidance.
We conduct comprehensive experiments and provide thorough analysis, demonstrating the superiority of PriGo in both simulation and real robot tasks, outperforming state-of-the-art methods.
Diffusion policies (DPs) [5]–[18] have recently emerged as an effective framework for visuomotor policy learning by modeling action generation as iterative denoising processes. Existing approaches can be broadly divided into two categories. The first is lightweight DPs [5]–[14], which have evolved from the original 2D diffusion policy to 3D variants and, more recently, to equivariant formulations that better exploit symmetries. The second category comprises generalist DPs [15]–[20], which combine diffusion with large-scale vision–language models (VLM) to enable general-purpose robotic behaviors across diverse tasks.
Parallel to diffusion-based approaches, flow matching has also been adopted for robotic policy learning due to its stable optimization and efficient inference. Existing approaches can be broadly categorized into two groups: (1) lightweight flow-based policies, such as FlowMS [21], FMP [22], and ActionFlow [23], which focus on stable trajectory generation and spatial reasoning; and (2) VLM-integrated flow policies and VLA systems, including \(\pi_0\) [24], HiRobot [25], GraspVLA [26], and SmolVLA [27], which combine flow matching with large-scale vision-language representations to improve generalization, sim-to-real transfer, and deployment efficiency.
Despite their success, existing diffusion and flow policies remain sensitive to distribution shifts at test time. Several recent works attempt to address this issue through guided sampling or test-time adaptation. MetaDiffuser [28] employs classifier guidance, using pretrained models to steer the diffusion process, while LDuS [29] leverages large language models (LLMs) to bias sampling toward goal-consistent actions. More recently, ADPro [30] proposes task-aware initialization and constrains updates along both task and spherical manifolds, yielding a more generalizable policy. However, these approaches primarily focus on task-level objectives or reward guidance, and do not explicitly enforce structured manipulation behaviors during action generation.
Primitive-based control has long been studied for improving policy compositionality and generalization. Early approaches [31]–[34] employed compositional networks to combine primitives into complex behaviors, where the composite policy’s action distribution was a weighted sum over a set of latent feature primitives. However, their expressiveness was constrained by the simplicity of Gaussian primitives. Other researchers leverage LLMs to decompose task instructions into prompt primitives, using chain-of-thought reasoning to guide policy execution [35]–[37]. While effective in some cases, they rely heavily on the reliability of LLM-based decomposition.
Several recent works further explore extensible network primitives that expand through incrementally added policy modules, often implemented with lightweight adapters such as LoRA [18], [38], [39], enabling continual learning across diverse tasks [40], [41]. Nevertheless, it raises challenges in storage efficiency and in managing experts’ allocation as the library scales. More recent works [3], [4] sought to disentangle primitives into discrete types with associated parameters. Yet, they typically restrict the primitive set to only a handful of basic actions, limiting applicability to more complex tasks.
Different from prior works, our work focuses on test-time primitive guidance rather than primitive-conditioned policy learning. PriGo does not require retraining the policy and instead introduces differentiable primitive constraints during inference. Furthermore, our formulation naturally supports probabilistic multi-primitive guidance, enabling smooth transitions between manipulation primitives.
As illustrated in Fig. 2, PriGo introduces primitive-guided test-time adaptation for robotic manipulation policies. Our framework consists of two components: a primitive classifier PANet that predicts primitive distributions from observations, and a differentiable primitive guidance mechanism that constrains action generation during inference. PriGo can be seamlessly integrated into pretrained diffusion and flow policies without retraining.
Problem Statement. Given a set of expert demonstrations containing action-observation pairs, denoted as \(\mathcal{D} = \{(\mathbf{O}^k,\mathbf{A}^k )\}_{k=1}^N\), our objective is to fit a manipulation policy that maps the observation \(\mathbf{O}\) to the action \(\mathbf{A}\). Here, \(\mathbf{O}\) consists of RGB images and a language instruction, and action \(\mathbf{a}:= ( \mathbf{x}, \mathbf{r}, w)\) is a 7D pose, defined by translation \(\mathbf{x}=(x,y,z)\), rotation \(\mathbf{r}=(\text{roll},\text{pitch},\text{yaw})\), and the gripper width \(w\in[0,1]\). To avoid ambiguity, we use the superscript \(k\) of \(\mathbf{a}^k\) to denote the frame index, while the subscript \(t\) of noisy action \(\mathbf{a}_t\) denotes the time steps during the denoising process.
Instead of directly constraining continuous actions, PriGo introduces a compact set of manipulation primitives as structured action priors \(\mathcal{Y}=\{\)“idle”, “grasp”, “release”, “push”, “pull”, “rotation”, “push+rotation”, “pull+rotation”\(\}\). We adopt this compact primitive taxonomy to balance structural expressiveness and cross-task generalization. Empirically, overly fine-grained primitive decompositions introduce long-tail imbalance and semantic ambiguity, while the proposed primitive set yields stable primitive distributions across diverse tasks.
Definition 1. (Primitive Action Hard Classification). Given the thresholds \(\tau_{\text{trans}}, \tau_{\text{rot}}, \tau_w > 0\), the hard classification \(\Phi:\mathbf{a}^k\to y\) for an action \(\mathbf{a}:= ( \mathbf{x}, \mathbf{r}, w)\) is formulated from the translational magnitudes \(\|\mathbf{x}^k\|\), the rotational magnitudes \(\|\mathbf{r}^k\|\) and the gripper width \(w\) as: \[\label{eq:HardClassify} \Phi(\mathbf{a}^k) = \begin{cases} 0 & \text{if } \|\mathbf{x}^k\| < \tau_{\text{trans}}, \;\|\mathbf{r}^k\| < \tau_{\text{rot}}, |w^k - w^{k-1}| < \tau_w \quad (\text{idle})\\1 & \text{if } w^{k-1} - w^k \geq \tau_w \quad (\text{grasp}) \\2 & \text{if } w^{k} - w^{k-1} \geq \tau_w \quad (\text{release}) \\3 & \text{if } \|\mathbf{x}^k\| \geq \tau_{\text{trans}}, \;\|\mathbf{r}^k\| < \tau_{\text{rot}}, |w^k-w^{k-1}| < \tau_w, \mathbf{x}^k_1 > 0 \quad (\text{push}) \\4 & \text{if } \|\mathbf{x}^k\| \geq \tau_{\text{trans}}, \;\|\mathbf{r}^k\| < \tau_{\text{rot}}, |w^k-w^{k-1}| < \tau_w, \mathbf{x}^k_1 < 0 \quad (\text{pull}) \\5 & \text{if } \|\mathbf{x}^k\| < \tau_{\text{trans}}, \;\|\mathbf{r}^k\| \geq \tau_{\text{rot}}, |w^k-w^{k-1}| < \tau_w, \quad (\text{rotation})\\6 & \text{if } \|\mathbf{x}^k\| \geq \tau_{\text{trans}}, \;\|\mathbf{r}^k\| \geq \tau_{\text{rot}}, \mathbf{x}^k_1 > 0, |w^k-w^{k-1}| < \tau_w \quad (\text{push+rotation})\\7 & \text{if } \|\mathbf{x}^k\| \geq \tau_{\text{trans}}, \;\|\mathbf{r}^k\| \geq \tau_{\text{rot}}, \mathbf{x}^k_1 < 0, |w^k-w^{k-1}| < \tau_w \quad (\text{pull+rotation}) \end{cases}\tag{1}\]
Definition 1 is formulated in a robot-centric action frame to ensure simplicity and stable cross-task consistency, while being complete for 7-DOF manipulation control. Through primitive compositions, this representation supports a wide range of robotic manipulation tasks. Eq. 1 enables automatic generation of primitive labels, thus allowing us to learn a primitive classifier without manual annotation. We then train a classifier PANet: \(\hat{\mathbf{y}}^k=\text{PANet}(\mathbf{O}^k)\), which predicts primitive distributions from observations. PANet adopts DINOv2 [42] as the visual encoder and T5 [43] as the text encoder, followed by a multimodal fusion module and MLP classification head.
Importantly, PANet predicts probabilistic primitive distributions rather than hard labels. This probabilistic formulation improves robustness under ambiguous transitions between primitives and naturally supports multi-primitive guidance during long-horizon manipulation.
To enable differentiable guidance while preserving local consistency with the corresponding hard primitive assignments, we define a soft primitive distribution induced by the generated actions.
Definition 2. (Soft Classification). Given the differentiable score functions: \(\mathbf{f}^k := \big( -(\|\mathbf{x}^k\| + \|\mathbf{r}^k\| + |w^k - w^{k-1}|), \;\; w^{k-1} - w^k, \;\; w^k - w^{k-1}, \;\; \mathbf{x}^k_1, \;\; -\mathbf{x}^k_1, \;\; (\|\mathbf{r}^k\| - \|\mathbf{x}^k\|), \;\; \mathbf{x}^k_1 + \|\mathbf{r}^k\|, \;\; -\mathbf{x}^k_1 + \|\mathbf{r}^k\| \big).\) The soft classification, i.e., the probability distribution over primitive categories, is obtained using a temperature-scaled softmax, i.e., \(\mathbf{p}^k = \text{softmax}\!\left(\mathbf{f}(\mathbf{a}^k)/\tau\right)\), where \(\tau > 0\) is a temperature.
Given predicted primitive distributions \(\hat{\mathbf{y}}^k\) and generated actions \(\mathbf{a}^k\), the primitive guidance is: \[\mathcal{L}_{PG}(\mathbf{a}^k,\mathbf{O}^k)
=
-\frac{1}{B}
\sum_{k=1}^{B}
H(\hat{\mathbf{y}}^k,\mathbf{p}^k)= -\frac{1}{B} \sum_{i=1}^B H(\text{PANet}(\mathbf{O}^k),\mathbf{p}^k)\,,\] where \(H(\cdot,\cdot)\) denotes cross-entropy between predicted primitive distributions and
action-induced primitive distributions, \(B\) is the batch size. Unlike hard primitive constraints or single-label guidance, this probabilistic formulation enables smooth transitions between primitives and improves
robustness during long-horizon execution. In particular, multiple primitives may simultaneously receive non-negligible probabilities during transitional stages, such as switching from push to rotation. This soft guidance reduces
abrupt action corrections and improves trajectory consistency.
Diffusion policy formulates the manipulation process as a Markov process and leverages DDPM [44] to model the manipulation policy with multimodal observation \(\mathbf{O}^k\). Given observation \(\mathbf{O}^k\), it performs a sequence of \(T\) denoising steps starting from a random action \(\mathbf{a}_{T}^k\sim \mathcal{N}(\mathbf{0}, \mathbf{I})\) to generate an action \(\mathbf{a}_0^k\) with iteration formula \(\mathbf{a}_{t-1}^k=\alpha_t(\mathbf{a}_t^k - \gamma_t \varepsilon_\theta(\mathbf{O}^k, \mathbf{a}_t^k, t) + \epsilon)\), where \(\epsilon\sim \mathcal{N}(\mathbf{0}, \sigma_t^2\mathbf{I})\). The coefficients \(\alpha_t, \gamma_t, \sigma_t\) are pre-defined noise schedules of the denoising step \(t\).
To improve the transferability of diffusion policies, we incorporate the primitive guidance mechanism introduced in 3.2 into the denoising process. By leveraging test-time observations to refine generated actions, the proposed approach steers denoising updates toward primitive-consistent trajectories, resulting in more robust and semantically coherent action generation under distribution shifts. This yields the following guided diffusion policy: \[\label{eq:primdf} \begin{align} &\tilde{\mathbf{a}}^k_{t-1} = \alpha_t(\mathbf{a}_t^k - \gamma_t \varepsilon_\theta(\mathbf{O}^k, \mathbf{a}_t^k, t) + \epsilon) \,, \\ &\hat{\mathbf{a}}^k_{0} =(\tilde{\mathbf{a}}^k_{t-1} -\sqrt{1-\bar{\alpha}_t}\varepsilon_\theta(\mathbf{O}^k, \mathbf{a}_t^k, t))/\sqrt{\bar{\alpha}_t}\,,\\ &\mathbf{a}^k_{t-1} =\tilde{\mathbf{a}}^k_{t-1} - \eta \nabla_{\mathbf{a}} \mathcal{L}_{\text{PG}}(\hat{\mathbf{a}}_0^k, \mathbf{O}^k) \,, \end{align}\tag{2}\] Here, \(\hat{\mathbf{a}}^k_{0}\) denotes the estimated noise-free action obtained through the pre-defined inverse diffusion schedule. By incorporating the primitive guidance term \(\nabla_{\mathbf{a}}\mathcal{L}_{\text{PG}}(\cdot,\cdot)\), Eq. 2 constrains the update direction of the inverse diffusion process, ensuring consistency with the intended primitive actions.
Flow policies leverage flow matching to learn a continuous transformation from noisy to expert actions. Given an action \(\mathbf{a}\), the flow path was defined as \(\mathbf{a}_t = \alpha_t\mathbf{a}+ b_t \mathbf{z}, t \in [0,1]\), where \(\alpha_t\) and \(b_t\) are pre-defined schedules, \(\mathbf{z} \sim p(\mathbf{z})\) is an initial noise action. A commonly used schedule is \(\alpha_t=t\) and \(b_t=1-t\), then the velocity field is \(\mathbf{v}(\mathbf{a}_t, t) = \frac{\mathrm{d} \mathbf{a}_t}{\mathrm{d}t}=\mathbf{a}-\mathbf{z}\). The flow policy, parameterized by \(\theta\), predicts velocity field \(\mathbf{v}_\theta(\mathbf{a}_t,\mathbf{O}, t)\). After training, it generate \(\mathbf{a}_1\) from noise \(\mathbf{a}_0=\mathbf{z}\) by using forward Euler rule \(\mathbf{a}_{t+\delta} = \mathbf{a}_t + \delta\mathbf{v}_\theta(\mathbf{a}_t,\mathbf{O},t)\), where \(\delta\) is the integration step size.
Similarly, we integrate test-time primitive guidance in 3.2 into the inference phase of flow policies. Specifically, we leverage the primitives derived from test-time observation to constrain the continuous actions generated, thereby yielding actions that are consistent with the target primitives. From the pre-defined flow schedule, we can deduce the following guided flow policy: \[\label{eq:primfp} \begin{align} &\tilde{\mathbf{a}}^k_{t+\delta} = \mathbf{a}^k_t + \delta\mathbf{v}_\theta(\mathbf{a}^k_t,\mathbf{O}^k,t),\\ &\hat{\mathbf{a}}^k_1 = \mathbf{a}^k_t+(1-t)\mathbf{v}_\theta(\mathbf{a}^k_t,\mathbf{O}^k,t),\\ &\mathbf{a}^k_{t+\delta} = \tilde{\mathbf{a}}^k_{t+\delta}-\eta\nabla_{\mathbf{a}}\mathcal{L}_\text{PG}(\hat{\mathbf{a}}^k_1,\mathbf{O}^k). \end{align}\tag{3}\] This is equivalent to defining a guided velocity field \(\mathbf{v}_{\theta}^{\text{guided}} = \mathbf{v}_{\theta} - \frac{\eta}{\delta} \nabla_{\mathbf{a}} \mathcal{L}_{\text{PG}}(\hat{\mathbf{a}}_1, \mathbf{O})\).
Our method imposes stronger constraints during the action refinement process for both diffusion-based and flow-based policies, thereby generating actions that conform to the desired structured primitives. Compared to the original policy models, the guided policies produce actions whose deviation from the target actions is bounded, a property that we further elaborate on in the supplementary material.
We design experiments to answer the following questions: i) How accurate and robust is PANet for primitive prediction? ii) Can the proposed primitive guidance improve the manipulation performance of pretrained policies without retraining? iii) Does PriGo generalize effectively to real-world robotic manipulation tasks? iv) How does each core component contribute to the overall performance? We first evaluate the accuracy and robustness of PANet in 4.1. Next, we demonstrate the performance improvements of PriGo on simulated benchmarks in 4.2 and real-world robotic tasks in 4.3. Finally, we conduct ablation studies in 4.4.
To evaluate the reliability of PANet, we report its primitive classification accuracy and confusion matrix in the left subfigure of Fig. 3. PANet achieves 94.0% accuracy on LIBERO. Most errors occur between
semantically adjacent primitives, such as push+rotation and push or rotation, indicating that misclassifications largely remain within similar local action manifolds.
We further analyze the sensitivity of PriGo to the thresholds \(\tau_{\text{trans}}\), \(\tau_{\text{rot}}\), and \(\tau_w\). As shown in the right subfigure of Fig. 3, performance remains stable within a broad range of threshold values, demonstrating that PriGo is not overly sensitive to specific hyperparameter value choices.
| Methods | Spatial | Object | Goal | Long | Avg. | |||||
| w/o PG | w/ PG | w/o PG | w/ PG | w/o PG | w/ PG | w/o PG | w/ PG | w/o PG | w/ PG | |
| \(\pi_0\) [24] | 89.2 | 91.0 | 84.6 | 87.8 | 94.4 | 95.2 | 75.2 | 78.8 | 85.6 | 88.2 |
| SmolVLA [27] | 92.0 | 93.6 | 93.4 | 94.4 | 91.4 | 93.2 | 75.8 | 79.8 | 88.2 | 90.3 |
| DP [5] | 76.2 | 80.6 | 87.4 | 90.8 | 70.4 | 72.6 | 54.2 | 58.4 | 72.1 | 75.6 |
| CogACT [17] | 91.1 | 95.6 | 92.0 | 97.3 | 91.5 | 95.8 | 76.4 | 80.4 | 87.8 | 92.3 |
Evaluation on LIBERO. LIBERO [45] is a large-scale benchmark encompassing over 130 tasks and categorized into five distinct suites. To verify the effectiveness of the proposed primitive guidance, we integrate it into a suite of pretrained policies, including the flow policies \(\pi_0\) [24], SmolVLA [27], diffusion policies DP [5], and CogACT [17]. This integration yields two policy variants, namely PriGo-DP and PriGo-FP. For \(\pi_0\) and SmolVLA, we adopt the pre-trained models and hyperparameter configurations provided by LeRobot1. As for DP and CogAct, no official pre-trained checkpoints on LIBERO are available, we thus fine-tuned these two models on LIBERO. 1 presents the evaluation results of four pretrained policies, with and without the integration of our primitive guidance module. As shown, the proposed PriGo consistently improves performance by 3–5 points across flow-based and diffusion-based policies, regardless of whether the backbone is a large-scale model (e.g., \(\pi_0\) and CogAct) or a lightweight one (DP). This consistent improvement stems from PriGo’s direct intervention: by enforcing generated actions to conform to the primitives required by the task, PriGo produces more structured actions, which leads to higher success rates.
Evaluation on SIMPLER. SIMPLER benchmark [46] provides two evaluation settings: Visual Matching, which closely mirrors real-world scenarios by minimizing the gap between simulated and physical environments, and Variant Aggregations, which introduces variations in background, lighting, distractors, and table textures. We compare our PriGo-DP with five other VLA models, with the corresponding results summarized in 2. Notably, all baseline results presented in this table are from CogACT. As shown, PriGo-DP outperforms all existing baseline methods by a clear margin. Specifically, relative to CogACT, our approach delivers an average improvement of 5 percent under the Visual Matching setting and 7 points under the Variant Aggregation setting. These results demonstrate that PriGo can effectively enhance the test-time performance of the VLA model CogACT in a plug-and-play manner, without the need for additional retraining.
| Google Robot | Method | Pick | Move | Open/Close | Open Top Drawer | Average |
| Coke Can | Near | Drawer | and Place Apple | |||
| SIMPLER (Visual Matching) | RT-2-X [47] | 78.7 | 77.9 | 25.0 | 3.7 | 46.3 |
| Octo-Base [15] | 17.0 | 4.2 | 22.7 | 0.0 | 11.0 | |
| OpenVLA [48] | 18.0 | 56.3 | 63.0 | 0.0 | 34.3 | |
| CogACT [17] | 91.3 | 85.0 | 71.8 | 50.9 | 74.8 | |
| PriGo-DP | 93.2 | 89.3 | 77.5 | 59.7 | 79.9 | |
| RT-2-X [47] | 82.3 | 79.2 | 35.3 | 20.6 | 54.4 | |
| Octo-Base [15] | 0.6 | 3.1 | 1.1 | 0.0 | 1.2 | |
| OpenVLA [48] | 60.8 | 67.7 | 28.8 | 0.0 | 39.3 | |
| CogACT [17] | 89.6 | 80.8 | 28.3 | 46.6 | 61.3 | |
| PriGo-DP | 92.5 | 83.6 | 44.1 | 55.0 | 68.8 |
Evaluation on CALVIN. CALVIN [49] is a benchmark centered on a Franka Panda robot interacting within richly parameterized tabletop environments. It has four environments that differ in desk textures and object placements. The benchmark defines 34 tasks with sequential execution of language-conditioned instructions, where each instruction comprises five steps. We integrate the proposed primitive guidance into the pretrained diffusion policy 3D Diffuser Actor (3DDA) [11], and compare its performance with that of several SoTA methods on the CALVIN, including DTP [50], DP3 [9], 3DDA, and ADPro [30]. The results are reported in [tab:calvin].
Figure 4: Rollouts of our PriGo-DP on three table-service tasks. PriGo-DP aligns the generated actions with task primitives, thereby improving policy generalization to novel tasks.. a — Rollout for the “Prepare a set of tableware task”., b — Rollout for the “Bring back a set of tableware to the basket” task., c — Rollout for the “Prepare two sets of tableware” task.
In our real-world setup, we conduct experiments with a Franka Emika Panda robot and with two RGB sensors. We design three sequential table service in restaurant-style scenarios, including: 1) prepare a set of tableware, 2) bring back a set of tableware to the basket, 3) prepare two sets of tableware. The tableware used in the experiments included a disk, a bowl, a cup, a fork, and a spoon. The averaged success rates over 10 episodes per task are reported in 5. Even with no more than 20 demonstration samples for training, our method achieves a success rate of 81%. In comparison to the vanilla CogACT, our PriGo-DP demonstrates an average performance improvement of 26 absolute points across three tasks. This demonstrates that PriGo is highly beneficial for long sequences.
To illustrate the practical efficacy of our policy, we visualized representative test cases for each of the three tasks. The corresponding qualitative results are presented in 4, where each subplot depicts the key sequential steps of the task executed from initial state observation to final goal achievement. These visualizations demonstrate the robustness of our approach in real-world tasks.
The proposed primitive guidance, PriGo, can operate in a plug-and-play manner—an attribute that has been fully validated by the experimental results presented in [tab:LIBERO,tab:google_robot,tab:calvin,tab:realrobot].
The proposed primitive guidance can operate in a plug-and-play manner—an attribute that has been validated by the experimental results presented in [tab:LIBERO,tab:google_robot,tab:calvin,tab:realrobot]. To further dissect the efficacy of individual components of primitives, we conduct ablation studies on three distinct schemes: 1) Non-discriminated translation primitives (i.e., treating “push” and “pull” as a unified translational primitive type); 2) None hybrid primitives (excluding “push+rotation” and “pull+rotation”); 3) A full set of eight primitive actions. The experimental results are presented in 6, which demonstrate that these primitive actions contribute positively to the learning and optimization of policy models.


Figure 7: Visualization of actions and primitive labels from two episodes via UMAP and t-SNE..
As shown in 6, omitting the “push” and “pull” (PP) types results in the most significant performance degradation of the policy. Without differentiating between push and pull, the generated actions tend to deviate in direction, directly leading to task failure. The model also experiences a performance drop when hybrid primitives are removed. Notably, our observations show that integrating hybrid primitives leads to smoother action outputs from the policy.
Furthermore, to intuitively illustrate the primitive action classification results, we visualize the primitive action instances in 7 using UMAP and t-SNE. The first two subfigures are from the Object subset of LIBERO with 7281 actions, and the third and fourth are from the Spatial subset with 5796 actions. Here, distinct colors denote different categories generated via Eq. 1 . As evidenced by the results, the same primitive exhibits clear clustering after dimensionality reduction.
In this paper, we introduce PriGo, a primitive guidance approach that can work with both lightweight policies and large VLA models. PriGo effectively decouples discrete primitive planning from continuous action learning. To capture the primitive planning for a given task and its visual observations, we proposed a novel primitive classification module and an automatic primitive labeling method, enabling primitive prediction directly from current observations. To ensure that the generated actions align with the predicted primitives, we introduced a differentiable primitive guidance mechanism, which constrains action generation, leading to more robust manipulation. This guidance can be seamlessly integrated into pretrained diffusion and flow policies, offering a flexible, plug-and-play solution that enhances performance without the need for retraining. Experimental results demonstrate that our policy outperforms baseline methods in both simulation and real-world tasks.
Limitations. Although PriGo improves both flow-based and diffusion-based policies at test time, the gains remain limited. This mainly results from two factors. First, the plug-and-play design enables deployment without retraining but inherently restricts performance improvements. Future work could explore tighter integration with end-to-end training. Second, PANet’s generalization is still constrained by model size and training data scale. More suitable data and incorporating historical robot states may further improve the effectiveness of the guidance mechanism.
This document presents the error-bound proposition, along with implementation details for PANet and a primitive-action analysis. It also provides additional experimental results, including the impact of different methods for deriving discrete primitive action types, and qualitative comparisons on real-world robotic tasks.
Proposition 1 (Error Bound). Assume a pre-trained policy \(\epsilon_\theta\) yields the action \(\tilde{\mathbf{a}}_t\) at step \(t\) with error \(\tilde{\mathcal{E}}_t = \|\tilde{\mathbf{a}}_t - \mathbf{a}_{*}\|\) to action \(\mathbf{a}_{*}\). When the primitive-guided diffusion denoising or flow velocity field is applied, the resulting action \({\mathbf{a}}_t\) satisfies a strictly tighter error bound: \[\label{eq:error} {\mathcal{E}}_t \le \frac{1}{1 + C} \cdot \tilde{\mathcal{E}}_t + \mathcal{O}(\tau_t)\qquad{(1)}\] where \({\mathcal{E}}_t = \|{\mathbf{a}}_t - \mathbf{a}_{*}\|\), \(C\) is a positive coefficient related to the local curvature of the action manifold and the Lipschitz continuity of the loss function \(L\), and \(\tau_t\) is the residual term from the stochastic process.
Proof. Both primitive-guided diffusion denoising and primitive-guided flow updates can be written in a unified form as a guided correction step: \[\mathbf{a}_t = \tilde{\mathbf{a}}_t - \eta G(\tilde{\mathbf{a}}_t) + \boldsymbol{\xi}_t,\] where \(G(\cdot)\) is the primitive-induced guidance field, \(\eta>0\) is a step size, and \(\boldsymbol{\xi}_t\) is a stochastic residual term satisfying \[\mathbb{E}\|\boldsymbol{\xi}_t\| = \mathcal{O}(\tau_t).\]
We assume that the target action \(\mathbf{a}_*\) is a fixed point of the guidance field: \[G(\mathbf{a}_*) = 0,\] and that \(G\) is locally strongly monotone in a neighborhood of \(\mathbf{a}_*\): there exists a constant \(C_0>0\) such that \[\langle G(\mathbf{a}) - G(\mathbf{a}_*),\, \mathbf{a} - \mathbf{a}_* \rangle \ge C_0 \|\mathbf{a} - \mathbf{a}_*\|^2.\]
Consider the error after the guided update: \[\mathbf{a}_t - \mathbf{a}_* = (\tilde{\mathbf{a}}_t - \mathbf{a}_*) - \eta G(\tilde{\mathbf{a}}_t) + \boldsymbol{\xi}_t.\]
Taking squared norms and expectations yields: \[\mathbb{E}\|\mathbf{a}_t - \mathbf{a}_*\|^2 =\|\tilde{\mathbf{a}}_t - \mathbf{a}_*\|^2 - 2 \eta \langle G(\tilde{\mathbf{a}}_t), \tilde{\mathbf{a}}_t - \mathbf{a}_* \rangle + \eta^2 \|G(\tilde{\mathbf{a}}_t)\|^2 + \mathcal{O}(\tau_t^2).\]
Using \(G(\mathbf{a}_*)=0\), we have \[\langle G(\tilde{\mathbf{a}}_t), \tilde{\mathbf{a}}_t - \mathbf{a}_* \rangle = \langle G(\tilde{\mathbf{a}}_t) - G(\mathbf{a}_*), \tilde{\mathbf{a}}_t - \mathbf{a}_* \rangle \ge C_0 \|\tilde{\mathbf{a}}_t - \mathbf{a}_*\|^2.\]
For sufficiently small \(\eta\), the quadratic term \(\eta^2 \|G(\tilde{\mathbf{a}}_t)\|^2\) can be absorbed into the contraction coefficient, yielding \[\mathbb{E}\|\mathbf{a}_t - \mathbf{a}_*\|^2 \le (1 - 2 \eta C_0) \|\tilde{\mathbf{a}}_t - \mathbf{a}_*\|^2 + \mathcal{O}(\tau_t^2).\]
Taking square roots and choosing \(C\) such that \[\frac{1}{1 + C} = \sqrt{1 - 2 \eta C_0} ,\] we arrive at the final bound: \[\|\mathbf{a}_t - \mathbf{a}_*\| \le \frac{1}{1 + C} \|\tilde{\mathbf{a}}_t - \mathbf{a}_*\| + \mathcal{O}(\tau_t).\]
Since \(C>0\), the factor \(1 / (1 + C) < 1\), which guarantees accelerated convergence toward the target action \(\mathbf{a}_*\). ◻
This section elaborates on additional details regarding the implementation and training of PANet, the primitive classifier proposed in our work.
PANet takes the observation \(\mathbf{O}\) as inputs and outputs the primitive type of the next action, i.e., \(y^k=\text{PANet}(\mathbf{O}^k)\). For implementation, we adopt T5 [43] as the text encoder and DINOv2 [42] as the image encoder. Subsequently, we utilize the multi-modal causal Q-Former [51] to fuse features from these two modalities, which are then fed into the classification head for class probability output. The Q-Former is configured with 3 layers, an embedding dimension of 1280, a cross-attention dimension of 768, 8 attention heads, and 32 queries. The classification head employs a multi-layer perceptron (MLP) architecture consisting of three MLP layers interleaved with ReLU activation functions (i.e., MLP → ReLU → MLP → ReLU → MLP). The input and output feature dimensions of the classification head are 1280 and 8, respectively: 1280 corresponds to the concatenated dimension of text and image features, while 8 denotes the number of primitive action types. The middle MLP layer is configured with 256 input and output channels. For detailed implementation details, refer to our publicly available codebase at PriGo.
For training, PANet is optimized using cross-entropy loss, where the ground-truth labels are obtained via Eq. (2) in our manuscript. We employ the AdamW optimizer with hyperparameters \(\beta_1=0.9\), \(\beta_2=0.99\), and a learning rate of \(lr=5\times10^{-5}\). The model is trained on LIBERO using a single NVIDIA A100 GPU, with a total training time of approximately 1 day.
Statistical analysis of primitive actions. We conducted preliminary experiments to analyze the distribution of primitive types under different settings, and selected a set of eight primitive actions for all experiments based on these statistics. Specifically, we observed that certain composite primitives are extremely rare, e.g., grasp + push accounting for only 0.07% across all 10 categories. This leads to a long-tail classification problem, degrading both overall accuracy and performance on infrequent classes. Moreover, over-specifying primitives can introduce ambiguity. For instance, splitting rotation into left and right directions is often unnecessary, as both may be valid in many scenarios (e.g., grasping a handle or a cup). Enforcing a fixed label in such cases reduces policy flexibility and introduces label noise. In addition, finer-grained primitives result in greater variation in primitive distributions across tasks, which weakens cross-task generalization.
For example, when rotation is split into clockwise and counterclockwise directions, the primitive distribution for the task “pick up the salad dressing and place it in the basket” becomes: {‘0’: 14.43%, ‘1’: 5.05%, ‘2’: 4.48%, ‘3’: 8.73%, ‘4’: 12.85%, ‘5’: 10.79%, ‘6’: 2.80%, ‘7’: 14.51%, ‘8’: 6.95%, ‘9’: 12.07%, ‘10’: 7.34%}. For “pick up the cream cheese and place it in the basket”, it becomes: {‘0’: 13.27%, ‘1’: 5.14%, ‘2’: 7.72%, ‘3’: 10.86%, ‘4’: 10.86%, ‘5’: 5.79%, ‘6’: 11.60%, ‘7’: 4.23%, ‘8’: 9.10%, ‘9’: 6.64%, ‘10’: 14.79%}. Notably, the distribution of the last categories changes significantly across tasks. In contrast, using the original 8 primitives yields more stable distributions. For the first task: ‘0’: 16.04%, ‘1’: 6.34%, ‘2’: 5.16%, ‘3’: 8.47%, ‘4’: 13.58%, ‘5’: 13.94%, ‘6’: 18.98%, ‘7’: 17.49%, and for the second task: {‘0’: 13.34%, ‘1’: 7.18%, ‘2’: 7.76%, ‘3’: 10.91%, ‘4’: 10.91%, ‘5’: 16.87%, ‘6’: 14.30%, ‘7’: 18.73%}.
In this section, we further evaluate and visualize the effectiveness of the proposed primitive guidance, PriGo, on robotic manipulation tasks.
Two optional strategies are available to get discrete class output: selecting the maximum-probability index or conducting probability-based sampling. We conducted experiments on LIBERO to explore the impact of these two methods on subsequent robot manipulation, with the results presented in Table 3. While sampling yields a mere 0.2% performance improvement, this gain is negligible in practice. Given such a limited effect alongside the additional computational overhead introduced by sampling, we instead adopt the simpler and more direct maximum-probability index strategy for our implementation.
To evaluate inference overhead on real robot tasks, we perform a wall-clock time analysis comparing PriGo with the unguided baseline. On a single NVIDIA RTX A6000 GPU, the baseline (CogACT) requires approximately 181 ms per step, while PriGo increases the latency to 208 ms per step, corresponding to a 15% overhead. However, since each inference cycle generates a sequence of \(k=16\) actions, this yields an effective control frequency of 77 Hz, which exceeds the standard real-time requirement for reactive manipulation (typically around 50 Hz). Furthermore, we measure the average task completion time and observe a 10% reduction with our method (2.56 minutes) compared to the baseline (2.85 minutes). This improvement stems from the enhanced structural coherence of the generated action sequences, which enables smoother subtask execution and reduces the total number of steps required to reach the goal.
| Methods | Spatial | Object | Goal | Long | Avg. Succ. |
|---|---|---|---|---|---|
| argmax | 95.6 | 97.3 | 95.8 | 80.4 | 92.3 |
| sampling | 95.2 | 97.6 | 96.3 | 80.9 | 92.5 |
To illustrate the corrective effect of our guidance, we selected five representative frames from the policy rollouts with and without incorporating PriGo for the same task. These results are visualized in Figure 8, where the top row displays the outcomes of our PriGo-DP and the bottom row shows the baseline diffusion policy CogACT. From the results, it can be observed that our method produces action sequences that align well with the required primitive types: rotation (placing the plate), push and release (placing the bowl onto the plate), and grasping the handle followed by release (placing the cup into the bowl). In contrast, the baseline fails to generate structured action sequences. Specifically, it lacks the required rotation (resulting in an inverted plate), introduces unnecessary rotations (during bowl placement), and exhibits incorrect grasping behavior (grasping the inner wall of the cup) along with premature release in mid-air (during cup placement).


Figure 8: Comparison of our PriGo-DP (top row) and the vanilla diffusion policy (bottom row) on the ‘prepare a set of tableware’ task..
https://github.com/huggingface/lerobot↩︎