Manuscript Offprint

arXiv:2610.11480

RoboAware: Learning to Coordinate Embodied Skills from Counterfactual Outcomes

Bohan Zhou, Xingbei Chen, Emily Huang, Weilin Ruan, Haojian Huang, Yehang Zhang, Zexi Li, Wenqian Li, Qize Yu, Zetian Song, Leyi Wu, Jinghao Li, Mingxuan Song, Xinrun Xu, Zongyang Qiu, Yangkai Wei, Tianyi Zhang, Kaiwen Zhou, Yinchuan Li, James Cheng

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Bohan Zhou1∗†^{1* \dagger}, Xingbei Chen2,∗^{2,*}, Emily Huang3^{3}, Weilin Ruan1^{1}, Haojian Huang4^{4}, Yehang Zhang2^{2}, Zexi Li1^{1}, Wenqian Li3^{3}, Qize Yu5^{5}, Zetian Song5^{5}, Leyi Wu2^{2}, Jinghao Li1^{1}, Mingxuan Song5^{5}, Xinrun Xu6^{6}, Zongyang Qiu2^{2}, Yangkai Wei3^{3}, Tianyi Zhang3^{3}, Kaiwen Zhou3^{3}, Yinchuan Li3^{3}, James Cheng1^{1}

*Equal Contribution. †Project Leader.

1^{1}The Chinese University of Hong Kong 2^{2}The Hong Kong University of Science and Technology 3^{3}Knowin AI

4^{4}The University of Hong Kong 5^{5}Peking University 6^{6}University of the Chinese Academy of Sciences

CONTACT {zhoubh} © link.cuhk.edu.hk

Embodied coding agents can combine modular robot skills with frozen end-to-end policies, yet effective composition requires anticipating which policy family will succeed in the current physical state. We present RoboAware, which builds on coding agents' skill orchestration by learning only a state-conditioned responsibility coordinator from counterfactual outcomes. Inspired by the success of REPL, we propose the P5\mathrm{P}^5 schema and formulate a hierarchical MDP based on it. P5\mathrm{P}^5 organizes skills uniformly into five semantic stages, defining where responsibility can be compared. To address the lack of counterfactual branch outcomes in existing work, we introduce State-Locked Counterfactual Branching (SCB), which restores the same training state to generate and execute a code block from each admissible family, exposing outcomes that selected-branch experience leaves unobserved. Building on this, we propose Execution-Aware Learning (EAL), which combines Monte Carlo tree search with Q-learning to distill these outcomes into family-conditioned values. At deployment, the coordinator selects the policy family according to observable context, and the frozen coding agent generates the next local code block. Comprehensive single-episode evaluations on 100 tasks show that RoboAware reaches a 77.0%77.0\% overall success rate, with SOTA averages of 90.0%90.0\% on RoboSuite, 73.8%73.8\% on diverse LIBERO-Pro task clusters, and 90.0%90.0\% on challenging RoboTwin bimanual tasks, outperforming existing code-as-policy and VLA-harness baselines.

(a) P5\mathrm{P}^5 Skill Schema

Figure

(b) P5\mathrm{P}^5 MDP

P5^{5} Examples (Unified)

Perceive_object_posePropose_eef_posePlan_motion_to_eef_posePerform_gripperPlan_motion_to_eef_pose
Pick(object)(grasp)(approach)(close)(lift)
Place(object)(place)(approach)(open)(retreat)
Push(object)(push)(prepush)—(push)
Pull(object)(pull)(prepull)—(pull)
Rotate(object)(rotate)(prerotate)—(rotate)
HandoverLeft P5^{5}(object)(L grasp)(L approach)(L close)(handover)
Right P5^{5}(object)(object)(R grasp)(R approach)(R close)(R lift)

(c) Execution-Aware Learning (EAL)

Figure

Figure 1 Overview of RoboAware. (a) The P5\mathrm{P}^5 skill schema decomposes each skill into five stages—perceive, propose, pre-manipulate, perform, and post-manipulate—and unifies primitive skills (e.g., pick, place, push, pull) and compositional skills (e.g., handover) under one representation. (b) A hierarchical MDP selects a policy family ci∈{Mod,E2E}c_i \in \{\mathrm{Mod}, \mathrm{E2E}\} at each P5\mathrm{P}^5 stage decision boundary; a coding agent then generates each corresponding code block aia_i. (c) EAL learns family-conditioned coordination: SCB evaluates modular and end-to-end branches from the same restored state into DSCB\mathcal{D}_{\mathrm{SCB}}, Q-learning yields Qθ(x,c)Q_{\theta}(x, c), and at test time a frozen coordinator selects best cic_i to condition code generation and execution.

1 Introduction

Performing general-purpose embodied manipulation in diverse and unstructured environments remains challenging in the absence of low-level executor adaptation. Recent progress toward this goal has followed two major paradigms, namely end-to-end policies and coding agents, each with distinct strengths and limitations. Within the end-to-end paradigm, task-specific visuomotor controllers excel at contact-rich control but typically lack native support for open-vocabulary rebinding [1–3]. Vision-language-action (VLA) and world-action models (WAMs) support language-conditioned execution [4–7], yet become unreliable under compositional and state-distribution shifts. Coding agents, by contrast, enable Code-as-Policy [8–10] by flexibly composing program modules for long-horizon tasks. Their physical competence, however, is bounded by the exposed primitives, limiting fine-grained, closed-loop correction during contact-rich interactions. These complementary advantages inspire hybrid frameworks in which coding agents generate modular API compositions or invoke frozen end-to-end policies, most commonly VLAs, as contact-rich primitives [11–13]. Nevertheless, high-level coding agents lack inherent awareness of the divergent consequences of invoking different skill executors. They struggle to choose among an explicit modular composition, any available self-contained policy, and their possible switching patterns. For instance, modular execution can remain stable under task-distribution shift, whereas end-to-end execution excels in case of unexpected interruption. This raises a critical research question: How can we endow coding agents with outcome-aware execution responsibility over embodied skills?

We address this question with RoboAware, a framework that learns a responsibility boundary between modular composition and end-to-end execution from counterfactual outcomes. Here, a policy family c∈{Mod,E2E}c \in \{Mod, E2E\} is the sole high-level coordination action; the API library comprises typed APIs together with their bound low-level backends; responsibility denotes which family should control the next semantically meaningful skill transition. The first challenge is to define where responsibility can be compared. The space of low-level code generation is too expansive and unstructured to provide a tractable basis for responsibility assignment. Inspired by the success of REPL-style programming [14], we propose the P5P^5 Skill Schema to address this limitation. The P5P^5 schema organizes embodied skills into semantically meaningful stages from perception to execution in 3D space. We formulate a finite-horizon hierarchical MDP that selects a policy family at each P5P^5 stage. At the lower level, we curate an API library combining typed modular interfaces for composability and controllability with end-to-end policies for contact-rich local execution. Conditioned on the selected family and current context, the frozen coding agent πcode\pi_{code} generates a complete local code block through the fixed API library. Learning is confined to the responsibility coordinator, while skill implementation leverages the coding agent's existing code-generation capability.

The second challenge is to expose the missing outcome of the skills that were not selected. Many approaches execute open-loop skill sequences or code programs without attending to outcomes [8, 10, 15]. Methods that obtain outcomes typically rely on VLM-based evaluations limited to the predicted outcome of the executed trajectory, and therefore inherit selection bias [13, 16]. We introduce State-Locked Counterfactual Branching (SCB), which leverages simulator (1) save-restore mechanisms and (2) oracle outcome judgments to execute every admissible family from an identical physical state, producing a same-state set of potential outcomes at each P5P^{5} decision point. To convert these set-wise outcomes into deployable family selection, we formulate Execution-Aware Learning (EAL), in which Monte Carlo tree search (MCTS) treats restorable P5P^{5} decision states as nodes and admissible policy families as edges, while Q-learning distills the explored outcomes into a family-conditioned value function QθQ_{\theta}. The family-wise values encode a relative responsibility preference over modular composition and the end-to-end family, reflecting expected remaining skill- and task-level return under an observation. During deployment, the RoboAware coordinator assigns responsibility by maximizing ρθ\rho_{\theta} induced by QθQ_{\theta}, and a coding agent generates executable code blocks accordingly to transition from one P5P^{5} state to the next, without state restoration or privileged simulator state. See Figure 1 for an overview of the proposed framework. Our contributions are as follows:

• We formulate RoboAware as a hierarchical MDP that selects a policy family cic_i at each P5P^5 stage to produce code block aia_i. We curate its lower-level API library around two complementary families, namely composable modular components and end-to-end policies for contact-rich local skills.

• We introduce SCB to acquire paired locked-state outcomes, and EAL to learn family-conditioned QθQ_{\theta} through MCTS-guided exploration and Q-learning.

• We recover the coordinator from QθQ_{\theta} and evaluate it on 100 tasks across three benchmarks, obtaining a SOTA 77.0% overall success rate. Ablations confirm the effectiveness of our designs.

References (77)