HUST and ArcheOne AI Propose Task Memory Framework for Cross-Scene Robot Manipulation

A joint team from HUST and ArcheOne AI introduces RoboScript, a framework that extracts structured task memory from a single expert demonstration. The approach enables robots to adapt manipulation parameters and transfer skills across randomized scenes and different physical embodiments without updating base model weights.

A single demonstration can show a robot how to complete a task, but if the object's position changes, is the original grasp still effective?

To help robots adapt to different object placements, a common approach is to collect multiple demonstrations and train policies using images, instructions, and actions from various scenarios, enabling the model to learn how to adjust to changes. But if only a single demonstration is available, can a robot still learn to complete the same task across different scenarios?

On November 9, a joint team from Huazhong University of Science and Technology (HUST) and Hubei Yuanyi Intelligent Robot Co., Ltd. (ArcheOne AI) published the paper World In-Context Learning for Agentic Robot Manipulation. The first author is Heng Fang from HUST. The team also includes HUST Professor Xiang Bai, as well as Dingkang Liang, co-founder of ArcheOne AI and assistant professor at HUST.

This is the paper cover for the joint research proposed by HUST and ArcheOne AI. The cover features the research theme 'World In-Context Learning for Agentic Robot Manipulation', lists authors including Heng Fang, Dingkang Liang, and Xiang Bai, along with their affiliations: Huazhong University of Science and Technology and ArcheOne AI. The sides of the cover display the logos of the institutions and 'RoboScript', relating to the World In-Context Learning (WICL) and the RoboScript framework mentioned in the text.

The team introduces World In-Context Learning (WICL), which enables agents to learn manipulation tasks using feedback from environmental interactions without updating the base model's weights.

To achieve this, the team developed RoboScript, a robot manipulation framework. First, the agent extracts object roles, operational steps, and completion conditions from an expert demonstration trajectory. It then executes these steps in a simulation by calling perception and action tools, updating its records based on the actual outcomes of grasping, placing, and other actions. After the rehearsal phase, this record is saved as structured "task memory." When faced with a new scenario, the agent replans by combining this memory with live camera feeds, rather than simply copying the original demonstration trajectory.

This figure presents the complete technical process of task memory generation and deployment proposed in the research, corresponding to the logic of the RoboScript framework. The process consists of three connected stages: 'Single Demonstration' (extracting initial information from an expert trajectory to get initial state C₀); 'Simulation Rehearsal' (iteratively revising the task record Cₖ in simulation environment W through actions and feedback); and 'Solidified Context Deployment' (freezing the final task memory C* and applying it to three test scenarios: clean, perturbed with changed textures and lighting, and real physical world, with no overlap between rehearsal and test scenarios to verify cross-scene reusability).

Figure | From a single demonstration to reusable task memory via simulation rehearsal

Across 50 bimanual tasks in RoboTwin 2.0, the team rehearsed only in standard scenarios. They then tested the agent in both standard scenarios and scenarios with randomly altered textures, lighting, table heights, and distractors. The average success rates for the two test groups were 83.6% and 83.2%, respectively, a difference of just 0.4 percentage points.

When the environment changes, the success of a manipulation still depends on whether the agent can extract reusable requirements from a specific trajectory: the role each object plays in the task, the exact actions required for each step, and the criteria for determining task completion. This information forms the task memory in RoboScript.

Encoding Manipulation into Task Memory

RoboScript first extracts object roles, operation sequences, and completion conditions for each step from an expert manipulation trajectory, encoding this information into a structured task memory. During execution, the agent reads this task description rather than re-watching the demonstration or reproducing the entire trajectory from scratch.

The expert trajectory provides records of visual frames, robotic arm movements, and gripper states. The agent parsing the demonstration uses these cues to segment continuous actions into discrete steps such as grasping, transporting, and placing, identifying the target object for each step and the state that defines its completion. The steps are described in text, while the geometric details for grasping and placing are stored separately as parameters; both components are used jointly during execution.

In a publicly released task memory example from the team, a basket first serves as a receptacle for a toy car and then becomes the object the robot must grasp by its handle to relocate. The memory decomposes this task into eight steps, detailing how to locate both the toy car and the basket, while also specifying which steps require confirming that the gripper has opened before the next step can begin. The demonstration ends with the basket still held in the gripper, a detail preserved in the memory. Merely placing the car inside the basket, or putting the basket down after moving it, does not fully match the final state demonstrated.

This figure displays the complete task memory content for the toy car into basket task, covering all core elements of the robot manipulation task. It is divided into five modules: INSTRUCTION (task demonstration requirements), OBJECTS (manipulation target information), WORKFLOW (all execution steps), PARAMETERS (grasp and place operation parameters), and LESSONS (optimization points derived from past failure experiences), plus NOTES for supplementary explanations. Text in blue highlights content added during rehearsal, clearly showing how task memory saves robot operation experience.

Figure | Task memory for placing the toy car into the basket; blue text indicates new content added during rehearsal

These two parameter types are formalized as a grasp specification (GraspSpec) and a placement specification (PlaceSpec). The former defines the target grasp region and approach direction, while the latter defines the placement target along with its relative offset and orientation. For instance, the memory stores the release position of the toy car relative to the basket's opening, rather than the absolute table coordinates visited by the gripper in the demonstration. If the basket is moved to the other side, the agent re-locates the opening to compute a new placement pose—defined as the object's position and orientation in 3D space.

This representation is constrained by a memory linter. The linter filters out absolute coordinates specific to the original scene, simulation instance IDs, and fixed left- or right-arm assignments, while preserving offsets relative to object parts. Which arm actually executes the action and where the gripper ultimately lands are determined by observations and reachability in the new scene.

Deriving actual motions from these relative specifications requires integrating object recognition with 3D localization. RGB-D cameras mounted on the robot's head and wrist simultaneously provide color and depth data. The system uses this depth information and camera calibration to compute the position, dimensions, and orientation of objects, then employs recognition tools such as vision-language models to map physical objects to the roles defined in the memory. Once the basket is identified, the system can further localize its handle within the local field of view. The motion planner then evaluates reachability based on the current geometric conditions and converts the grasp specification into an executable trajectory for the robotic arm.

Grasping, placement, reachability checks, and dual-arm coordination are handled by a shared set of motion interfaces, while coordinate frames, joint limits, and gripper specifications are supplied individually for each environment. Before formal learning begins, the system uses demonstrations to verify whether this skill set covers all required motion segments. Any actions that existing tools cannot perform are delegated to a coding agent to generate, and then tested for reuse when object positions change. A single demonstration serves as the data starting point for task learning, but actual execution still relies on the system's pre-existing perception, skill interfaces, and motion planning.

This memory separates 'task requirements' from 'how to move this time,' but the initial parameters ultimately originate from the same demonstration. Determining which settings become invalid when object placements change requires the robot to actually execute the task in simulation.

Rehearsal fills in the details not covered by the demonstration

Simulation practice is divided into imitation (S1) and rehearsal (S2). Imitation first verifies whether the task steps can be executed independently within the original demonstration scene. Rehearsal then shifts to other standard scenes, specifically testing whether the initial grasping and placement parameters can adapt to new object configurations.

During the imitation phase, the reader role drafts the initial memory, the executor role replays the actions based on this draft, and the reviewer role revises the memory based on the execution logs. The team evaluates whether the system has learned by testing its five most recent attempts without demonstration prompts, concluding the imitation phase once at least three attempts succeed. Under the GPT-6.1-Sol configuration, 49 out of 50 tasks met this criterion. For the remaining task, the best-performing version was retained and included in subsequent testing.

Whether during imitation or rehearsal, the motion interface returns an execution receipt (Action Receipt) detailing the target pose, the actual achieved pose, the gripper opening, and the object-holding status. The robotic arm might reach the designated position without the gripper actually securing the object. By logging the motion commands and actual outcomes separately, the reviewer role can determine whether a failure stems from suboptimal grasping parameters or a step failing to execute as intended.

This figure comprehensively illustrates the entire process of the robot system from training to deployment review. The green boxes at the bottom clearly mark deployable data directly obtainable by the real robot, while orange boxes mark privileged data available only in the simulator. The process is divided into four modules: skill construction, task learning, deployment, and reflection. Task learning includes demonstration, imitation learning, and cross-simulation seed rehearsal, storing objects, workflows, parameters, and experiences into task memory. Deployment relies on frozen memory for prediction, action execution, and verification in the real robot, with automatic recovery upon failure. The final reflection module summarizes failure patterns from recorded episode data for self-diagnosis and generates subsequent optimization guidance.

Figure | Training and deployment pipeline; green boxes indicate information accessible on the physical robot

During the rehearsal phase, only the first attempt of each new instance counts toward the success rate. Following a failure, the reviewer role first modifies a copy of the memory; the changes are merged into the shared version only if the subsequent retry succeeds. This ensures that a successful on-the-fly retry is not mistakenly recorded as a first-try success. As rehearsal progresses, the system gradually tightens the constraints on how many parameters can be modified per iteration and the maximum allowable adjustment magnitude. The phase terminates early if three out of the last five instances succeed on their first attempt; if the instance limit is reached, the version with the best first-try performance is retained. Under the GPT-6.1-Sol configuration, the system rehearses an average of 12.5 instances per task.

In the final version of the toy car task, the dual-arm handover is a new step added during rehearsal. The system also specifies how to retreat after releasing the car: the arm that performed the placement must exit along the planned path, adjusting the gripper orientation if necessary, rather than retreating in a straight line in world coordinates while maintaining the release posture. The original demonstration specified that the toy car must land in the basket, while the rehearsal added instructions on how the gripper should clear the vicinity of the basket after completing the placement. Both types of information are ultimately stored in the same task memory.

It is also necessary to distinguish between two types of information here: camera images, joint states, and action feedback are deployable data that can also be acquired on physical robots, whereas object ground-truth poses and failure diagnostics provided by the simulator are classified as privileged information. Imitation is performed on the original demonstration instances and can leverage privileged supervision from the simulator. However, when transitioning to new instances for rehearsal, the execution agent can only use deployable data. The review agent can access failure diagnostics but stores only the revised operational requirements in memory. During formal evaluation, the execution interface has no access to privileged information.

The team compared the demonstration and rehearsal phases separately across 10 tasks. Generating memory based solely on the demonstration without simulation trials yielded an average success rate of 69.0%. In contrast, appending simulation interactions after the same demonstration allowed the complete method to achieve a 78.5% success rate. Simply including the demonstration in the execution context or providing only the task instruction resulted in performance levels hovering near 69%. In this control group, the performance difference did not stem from whether the demonstration was compiled into a document, but rather from whether that document was subsequently refined using execution results.

This table displays the ablation results of task execution success rates under different experimental schemes, corresponding to the comparative verification of demonstration, simulation interaction, and failure recovery. It categorizes experimental variants into 'Deploy Frozen Memory', 'Detach from Real Environment', and 'Relearn', calculating success rates and average success rates in clean and randomly perturbed scenes. It visually shows the impact of simulation interaction correction and missing modules on success rates, corroborating the ablation conclusions in the text.

Figure | Ablation results for demonstration, simulation interaction, and failure recovery

The team also had the agent learn from scratch using only task instructions, while still permitting simulation trials. Compared to the complete method with demonstrations, the success rate dropped from 86.0% to 56.5%. This variant also removed the demonstration-based completion check, meaning the drop cannot be entirely attributed to the lack of a rehearsal starting point. Nevertheless, it demonstrates that relying solely on continuous trial and error cannot reliably compensate for the task information provided by a demonstration. In this context, the demonstration specifies what the task should look like when completed, while the rehearsal details how to achieve it across different object configurations.

To isolate the impact of the second stage, the team selected 11 more challenging tasks. Imitating only within the demonstration scene without rehearsing in other standard scenes yielded a 46.1% success rate. Adding the rehearsal phase increased this to 54.5%, with the performance gap in randomized scenes widening to 13.3 percentage points. This control retained the initial imitation phase to measure solely the benefits of continuing to rehearse across different scenes.

The rehearsal phase adds retry-verified operational requirements to the memory, rather than the failure scenarios themselves. Once the team freezes the memory, it is no longer modified for evaluation scenes, allowing them to test whether these learned experiences remain effective beyond the practice phase.

Success rate remains stable across new scenes

After freezing the task memory, the team evaluated its ability to adapt to novel scenes using all 50 dual-arm desktop tasks in RoboTwin 2.0. Each task began with a single demonstration from a standard scene, and all rehearsals were conducted exclusively within that standard scene.

The evaluation was split into standard and domain randomization settings. The domain randomization setup randomly altered textures, lighting, table heights, and distractors, affecting both object recognition and the operational workspace the arms needed to adapt to. Each task was tested 10 times under both settings, totaling 1,000 trials. Success was determined by the step limit and completion criteria specified in the benchmark.

The GPT-6.1-Sol variant achieved an average success rate of 83.6% in standard scenes and 83.2% in randomized scenes. Among the trained policies used for comparison, 4D-WAM recorded the highest average performance. It utilized 50 demonstrations per task from the standard scene, achieving 81.5% in the standard setting and 41.8% in the randomized setting. The two methods differed by only 2.1 percentage points under standard conditions, with the primary gap emerging when the environment changed. All these baseline policies were trained on standard scene data, and their reported scores were sourced from public leaderboards or existing literature; the number of trials was not identical to that of RoboScript.

This is the comparative data table for the related research by HUST and ArcheOne AI, showing the success rate statistics of 50 dual-arm tasks in standard and randomized scenes. The table categorizes methods by type, demonstrations per task, whether a trained agent is used, standard scene success rate, randomized scene success rate, average success rate, and experience retention rate. The data for RoboScript-related methods are significantly higher than most baseline strategies, intuitively reflecting the stability advantage of the method in cross-scene task performance.

Figure | Success rates for the 50 dual-arm tasks across standard and randomized scenes

Adapting across scenes involves more than just altering lighting and backgrounds. In 39 tasks where the objects varied with the scene, approximately 78% of the evaluation cases used object instances different from those in the original demonstrations. When compared task by task, the team observed no significant difference in success rates between these two types of cases. This indicates that the system must re-identify the target objects in the current visual input rather than selecting actions based solely on the appearance of the specific objects used in the demonstrations.

Using the same codebase and prompts, the team substituted DeepSeek-V4.1-Flash and GPT-5.6-Luna, yielding average success rates of 78.1% and 77.9% across the two scenes, respectively. While the underlying model influences performance, none of these three configurations exhibited a significant overall drop when switching to the randomized scene. The team then conducted a case-by-case analysis of GPT-6.1-Sol's 166 failures. According to the authors' classification, failures caused by inapplicable operational steps or stored parameters occurred 37 times in the standard scene and 38 times in the randomized scene, while execution-related failures increased from 23 to 29. Comparable overall performance does not imply that every individual task remained unaffected, nor does it mean the robotic arm is equally easy to control once the desktop environment changes.

Even with the task memory frozen, the agent can still perform failure recovery within a single episode. If the initially selected arm cannot reach the object, it re-evaluates reachability; if the object slips, it returns to a safe pose to re-observe and resume, rather than resetting the entire scene. A final completion check also compares the current state against the demonstration's terminal state. In a separate test involving placing a toy car into a basket, the car was already inside the basket, but the completion check detected that the basket itself had not been lifted. The agent then returned to the handle to execute the missing lift, completing the entire process without rewriting the task memory.

This capability directly impacted the success rate. In a paired ablation study across 10 tasks, terminating the entire episode upon the first action failure—without allowing recovery—caused the average success rate to drop from 78.5% to 69.0%. Consequently, performance in novel scenes depends not only on whether the memory can be reused, but also on the system's ability to leverage current observations to carry the operation forward.

This image presents the manipulation demonstrations and validation results of the robots from HUST and ArcheOne AI across different task scenarios, divided into modules a, b, and c. Module a shows the transfer of a demonstration task to another manipulator, moving a phone from the right to the left arm. Module b shows task validation based on the demonstration, checking the toy car placement into the basket and rejecting completion when the basket is not lifted. Module c shows recovery operations after instability, including re-grasping a spilled water bottle, adjusting the grip, and completing the placement. It visually demonstrates the robot's operation recovery and scene adaptation capabilities using task memory.

Figure | After task memory is frozen, the robot completes missed actions or re-grasps objects.

Recovery within a single run does not overwrite the task memory, whereas a cross-batch review generates a separate set of instructions. The team applied both the original task memory and the "original memory plus review instructions" to the same set of standard scenarios across three new rounds. Across all 50 tasks, the net failures recovered—calculated as the failures resolved by the instructions minus the new failures they introduced—were 18, 7, and 1 in the three rounds, respectively. Early, more common errors can be mitigated by appending instructions, but the gains diminish with each subsequent round. These results are also excluded from the 83.4% reported in the main evaluation.

Reading visual inputs, selecting tools, and verifying outcomes in simulation all require model involvement. The top-performing GPT-6.1-Sol variant called the model an average of 54.7 times per evaluation, with a median task execution time of 6.4 minutes, spending approximately 80% of the time waiting for model responses. RoboScript relies less on pre-recorded task demonstrations, yet rehearsal interactions and execution-time reasoning still consume time. Based on API pricing, the team estimated that the GPT-6.1-Sol variant cost USD 1,911 in API calls to learn all 50 tasks and complete 1,000 evaluations, with the majority of the cost incurred during evaluation. Frozen task memory can be reused without relearning for every execution; however, after reading the memory, the model must still observe step-by-step and decide on the next actions. This is why the number of demonstrations and the actual runtime cost cannot be summarized by a single figure.

Even when the scene changes, RoboScript can still determine object roles and manipulation goals from the same memory, and then compute actions using current observations. The next step is to change not just the tabletop conditions, but the robot arm itself that executes these instructions.

Deploying task memory on a real robot

The team transferred the task memory trained on the simulated ALOHA to a real-world dual-arm PiPER, without recording new demonstrations for the new manipulator or rehearsing the four tasks again.

Cross-Embodiment Transfer here addresses how to map the same grasping requirement to a different set of joints and grippers. An adapter remaps the coordinate conventions, robot arm kinematics, and gripper parameters between the two platforms; the task sequence, object roles, and the grasping and placement specifications relative to the objects remain unchanged.

This image shows the dual-arm robot experimental setup jointly developed by HUST and ArcheOne AI. It includes the Dual-Arm PIPER manipulator, RGB-D cameras, and a Task Objects area containing green beverage bottles, small bowls, small plates, small rod-like items, and small packaged items. This real-robot environment is used to test the actual execution effect after task memory parameter adaptation.

The PiPER uses an RGB-D camera to localize objects in the current scene and then plans the entire action sequence in advance based on the adapted task memory. The robot arm then executes the sequence in order. This set of real-robot experiments does not perform online replanning; therefore, it tests whether the task memory, after parameter adaptation, can form an executable action sequence, rather than whether the failure recovery from the simulation can be directly transferred to the real robot.

Each of the four tasks was executed 10 times. The bell-pressing task succeeded 10 times, while the dual-arm roller-grabbing and card-moving tasks each succeeded 7 times, and the bowl-stacking task succeeded 6 times. Pressing the bell requires pressing downward aligned with the center of the bell's top; grabbing the roller requires sequentially grasping the same object with both grippers; moving the cards involves picking up relatively thin objects from a tabletop; and stacking the bowls requires accommodating the varying positions and orientations of different bowls. Together, these tasks test whether different types of manipulation requirements can be transferred using the same memory format. Notably, actions requiring more precise alignment were not as stable as the bell-pressing task.

This figure shows continuous action clips of the dual-arm PiPER robot completing four real-robot manipulation tasks, corresponding to the four types of tasks mentioned in the text. From top to bottom: ringing a bell (starting, lifting arm, reaching, aligning above the bell, pressing the center); grasping a roller (starting, extending arm 1, grasping with claw 1, extending arm 2, grasping the roller with both arms); moving a playing card (starting, picking up the card, lifting, moving outward, placing it outside the table); and stacking two bowls (starting, moving the blue bowl, grasping the pink bowl, lifting, stacking it on the blue bowl). It intuitively presents the complete execution process under different operation requirements.

Figure | Successful clips of the four real-robot manipulation tasks executed by the dual-arm PiPER

Each of the four tasks has its own memory. The goals and completion conditions to be preserved for bell-pressing and bowl-stacking differ, but they use the same adaptation method when transferred to the PiPER: preserving the original workflow while recalculating the motion for each step on the new embodiment.

The team attributes the real-robot failures primarily to inaccurate gripper alignment and depth estimation errors. The manipulation requirements can still be expressed as "align with the top of the bell," "grasp the roller," or "stack one bowl on top of another," but actual success depends on whether the camera accurately locates the contact points and whether the grippers reach the correct positions. Task memory can transfer the workflow and relative positions, but the exact locations of the objects and the required trajectories for the new robotic arm still need to be recalculated based on the live scene.

When manipulation experience can be stored separately from specific action trajectories, it becomes possible to transfer this experience across different robots. When taking over the same task, a new robot may not need a new demonstration; it can instead start from the experience left behind by another robot.