Research
Instruction-Conditioned Motion Control for Robotic Arms: Language-to-Code Decomposition and Reinforcement Learning
The paper asks how a robot manipulation request can be turned into an executable program in a way that keeps failures traceable. Instead of asking a language model to write robot code in one shot, it…

- arXiv
- 2610.19617 · Preprint · not peer-reviewed
- Published
- 2026-10-14
- Authors
- Fan Huang, Dezhong Tong, Changyu Chen, Haewoon Kwak, Jisun An
In plain words
The paper asks how a robot manipulation request can be turned into an executable program in a way that keeps failures traceable. Instead of asking a language model to write robot code in one shot, it inserts a separate, trainable "instruction" stage between the task description and the code, so that a downstream error can be attributed either to a bad instruction or to a bad program.
AI summary
Overview
Research area: Language-driven robot manipulation — specifically language-to-code interfaces for robot arms, combined with reinforcement learning (GRPO) used to train an instruction-generating language model through a frozen code generator.
Technical level: Advanced. The paper assumes familiarity with reinforcement learning (policy gradients, GRPO, LoRA), large language model prompting, and simulated robot manipulation.
Scope (one sentence): The paper decomposes language-driven robot control into a trainable instruction stage and a frozen code-generation stage for a simulated UR5e arm, measures how prompting configurations and a short RL training run affect logged program rewards, audits those reward labels against the programs' own geometric logs, and proposes an independent evaluation protocol for verifying task success.
What This Paper Is About
The paper asks how a robot manipulation request can be turned into an executable program in a way that keeps failures traceable. Instead of asking a language model to write robot code in one shot, it inserts a separate, trainable "instruction" stage between the task description and the code, so that a downstream error can be attributed either to a bad instruction or to a bad program. The authors compare this decomposition against one-shot code generation, train the instruction stage with reinforcement learning, and then audit whether the reward labels used for that training actually correspond to successful task completion.
Key Contributions
-
A language-to-code decomposition over a fixed UR5e API. Task parameters, instruction generation and code synthesis are separated into three stages, with only the instruction stage trainable and the code generator frozen. Retained records link specific instructions to syntax errors, undefined names, and mismatches between reward labels and logged geometry.
-
An audit of reward consistency. The main training run's logged positive-reward rate rose from 31.6% to 35.3% (253/800 to 282/800) between the first and last five training steps, but inspection found at least 19 positive-reward logs reporting geometric failure in that run, 18 in the dense-reward run, and 5 in the run with one program per instruction. The audit traces the success labels to the generated program's own output stream.
-
A characterization of downstream reward variance. An estimator argument supports averaging M program rewards per instruction, backed by the observation that 302 of the 640 instructions in the main run received mixed rewards across their five programs.
-
An independent evaluation protocol. Task completion is checked against fixed specifications by a separate software supervisor that controls simulator state and scoring. Its CPU implementation passed ten negative controls, and a hand-authored reference controller completed all 40 predeclared scenes (20 on the two-cube I layout, 20 on the five-cube M layout) at 1 cm placement tolerance.
Main Findings
-
One-shot versus decomposed prompting (Table I). With o1 on pick-and-place, both configurations tie at 5/5. With o4-mini on pick-and-place, the decomposed pipeline records 12/20 against 7/20 for one-shot (Wilson 95% intervals [38.7, 78.1]% and [18.1, 56.7]%; Fisher exact p = 0.205). On reshaping, o1 records 3/5 for the decomposed pipeline versus 1/5 for one-shot, while o4-mini records 3/20 versus 5/20 for one-shot. The authors describe these as characterizations of their respective task protocols and model configurations, not as isolated reasoning effects.
-
Engineering changes on reshaping (Table II, o4-mini, n=20 per row). Chain-of-Code implementation: 55% code-valid, 20% task-success. Iterative correction: 15% code-valid, 5% task-success. Base decomposed pipeline: 75% code-valid, 15% task-success. With amended functions: 100% code-valid, 20% task-success. With a constrained prompt: 70% code-valid, 35% task-success. With both: 90% code-valid, 50% task-success. The authors caution that baseline and decomposed rows use different task sets and generation budgets, and that the 40 baseline runs all request the M-to-I transformation while the decomposed notebooks mix four pairs from the Easy band of the task-distance score.
-
Training curve rises modestly within one trajectory per configuration. Averaged over the first and last five steps, the logged rate is 31.6% and 35.3% for the binary run (253/800 and 282/800), 30.0% and 33.7% for the dense run (pooled counts 238/794 and 268/795), and 25.0% and 30.6% for the one-program-per-instruction run (40/160 and 49/160). The binary run goes from 45/160 at step 1 to 63/160 at step 20; the dense run's first, last and peak step rates are 46/155, 60/158 and 63/159.
-
Reward labels are not verified task success. One retained record shows all five rewards equal to 1.0 while the log reports a 0.9515 m miss against a 0.05 m tolerance, with the verdict coming from the program's own output stream. In the binary five-program run, of 1,055 positive labels, 684 have no retained record, 352 carry the checker's success line, and 19 carry a geometric-failure message. Success-line records print at most 0.009 m; failure-line records print at least 0.0874 m.
-
Program sampling genuinely varies. Of the 640 instructions sampled in the main binary run, 269 received five zero rewards, 69 received five positive rewards, and 302 (47.2%) received mixed rewards — meaning a single program would have assigned a reward different from the five-program mean for those 302 instructions.
-
Instructions are long and textually diverse, not short symbolic plans. Across the 32 instructions of the final step of the main binary run, the median code-line fraction is 79.3%; instruction outputs contain 152–345 lines, 26 first lines are distinct, and all 32 code interiors and all 32 outside-code texts hash differently.
-
Errors are traceable to specific stages. At step 20 of the main binary run, sample 000 has five zero rewards and a retained bracket-mismatch SyntaxError; sample 001 has rewards (0, 1, 1, 0, 0) with a retained geometric-success message at 0.0005 m maximum matched distance (independent verification pending); sample 002 has five zeros and a retained NameError for an undefined
pattern_B; sample 026 has five ones but a retained log reporting a 0.9515 m miss. -
The dense reward contains a heuristic penalty. It is reported as r = R − 0.3·V_bug + 0.25·r_goal + 0.25·r_comp, where V_bug averages signature, scope and literal-index heuristics. The authors state that the detector's precision and recall remain to be measured and that false positives can penalize valid programs.
-
Costs are partially recovered. Recovered code-generation ledgers total $6.88 for binary M=5, $6.95 for dense M=5 and $1.40 for M=1; the 160 A100-hour and 200 USD aggregates are described as estimates not reconciled with those ledgers.
Methodology in Plain English
The robot is a simulated UR5e arm with a parallel gripper in MuJoCo, moving red cubes between a rear table and a disposal area on a front table. The pipeline has three stages. First, task parameters are specified: robot configuration, object identifiers, target coordinates and operating context. Second, an instruction-generating language model writes a detailed natural-language instruction describing perception, fetching and placing, including state transitions. Third, a frozen code model receives that instruction plus the robot API and reference code and writes a complete Python program that drives the simulator.
Only stage two is trained. The researchers use GRPO with rank-32 LoRA adapters on a Qwen3.5-35B-A3B policy, while Qwen3-Coder-Next serves as the frozen code generator through OpenRouter. Central settings are 32 instruction samples per step, five programs per instruction, three update passes, 20 training steps, instruction and code temperatures of 0.7 and 0.1, a 4096-token generation limit, a 120-second execution timeout and a learning rate of 10⁻⁶.
Because one code sample is stochastic, the reward for each instruction is the average over five freshly sampled programs. The authors give an estimator argument showing that this average is unbiased for the instruction's success probability and reduces variance by a factor of M — at M times the sampling cost.
For evaluation, the paper separates two things that are often conflated: the reward label parsed from the program's own standard output, and independently verified geometric success. The archived runs used the former, with a placement checker appended by the runner and executed inside the program's process. The proposed protocol instead gives a separate software supervisor control of simulator state, immutable task data and result reporting; generated programs only issue control actions, and the supervisor computes success against predeclared criteria — an inventory of all ten cubes, with placement, addition, disposal and reserve roles fixed in advance, and success requiring task placement, required disposal, reserve preservation and clean execution.
The prompting comparison covers cube pick-and-place and letter reshaping (removals, additions and assignments between source and target coordinates), with five trials per o1 cell and twenty per o4-mini cell. A defined benchmark suite contains 12 targets, hence 66 unordered pairs or 132 directed transformations, and a task-distance score bands those pairs; on the 16 planning pairs the score's Spearman correlation with an assignment-derived operation proxy is 0.919 (0.975 for the coordinate-set term alone).
Why This Matters
Impact on research. The paper makes a methodological point that applies well beyond this specific system: a rising reward curve is not evidence of improved task performance when the reward is parsed from the same program whose behavior is being judged. By quantifying how many positive labels coexist with explicit geometric-failure messages (19, 18 and 5 across the three runs), and by showing that nearly half of the sampled instructions (302 of 640) receive mixed rewards across five programs, it motivates both reward averaging and independent scoring as defaults rather than optional refinements. The three-stage decomposition also makes failure attribution concrete: a syntax error, an undefined name, or an ignored instruction can each be traced to a specific artifact.
Real-world applications:
- Warehouse and order-fulfillment picking. Cube-to-layout placement with tolerance checks maps directly onto bin picking and kitting, where success must be verified geometrically rather than trusted from a controller's self-report.
- Small-batch assembly and kitting reconfiguration. The letter-reshaping task — removing, adding and reassigning objects between layouts — resembles changeover between product variants.
- Natural-language interfaces for industrial arms. Separating an inspectable instruction layer from code synthesis gives operators a human-readable artifact to review before a program runs.
- Validation tooling for learned robot policies. The independent supervisor design is a template for acceptance testing of any system that generates its own success reports.
Industry relevance. The cost figures ($6.88, $6.95 and $1.40 in recovered code-generation charges per run) and the use of an open-weight policy with a hosted frozen code model indicate a pipeline that can be run without training a code model from scratch. For teams deploying language-model-driven robot control, the audit result is a caution about self-reported success metrics in acceptance pipelines, and the separate-supervisor protocol is a practical pattern for compliance-style verification.
Future Directions
- Evaluate model-generated programs under the independent protocol. All verification so far covers the infrastructure: ten negative controls, five predeclared 120 s no-action holds under a 0.1 mm drift rule, and a hand-authored reference controller passing 40 of 40 scenes. Scoring actual model outputs is stated as the next step.
- Replicate training across seeds. Each configuration has exactly one archived training trajectory, and the Wilson ribbons assume independent Bernoulli labels; estimating uncertainty across seeds requires replicated runs.
- Run matched learning-rate and epoch comparisons. The archive lacks the matched arms a future design would need (low-LR/E=3, low-LR/E=1, high-LR/E=3, plus high-LR/E=1 for the interaction), and equal-compute comparisons of M=5 versus M=1 remain open.
- Establish provenance and re-score retained programs. The archive does not establish which scoring-source version each run used, the original trainer, chat serializer, system message, tokenizer version, or the RQ1 image bytes; re-scoring would cover only one program per instruction, since the other samples behind each averaged reward were not saved.
- Extend beyond simulation and beyond the evaluated subset. Hardware transfer would require camera and robot calibration, perception and state-estimation testing, contact and actuation robustness, latency measurement and a separate safety review; evaluation also covers only a subset of the 132 defined transformations.
Target Audience
Researchers and engineers working on language-model-driven robot control, code-as-policies systems, and reinforcement learning from execution feedback. It is most valuable to readers who care about evaluation methodology — particularly those who build pipelines where a model's output is also the source of its success signal — and to practitioners planning to deploy instruction-conditioned manipulation on real hardware, who will benefit from the failure taxonomy and the separate-supervisor protocol. Readers without a background in policy-gradient methods or simulated manipulation will find the RL sections dense, though the audit findings and the decomposition rationale are accessible.
Authors’ abstract
Instruction-Conditioned Motion Control (ICMC) separates parameter specification, instruction generation, and code synthesis for language-driven robot control, making execution outcomes traceable to instructions and programs. We compare one-shot generation with ICMC under o1 and o4-mini on cube pick-and-place and letter-reshaping tasks for a UR5e arm in MuJoCo. We then train an open-weight instruction policy by GRPO through a frozen code generator on cube placement onto two-…
The full abstract on arXivRelated papers
- MIND: Instruction-Conditioned Incremental Grounding for Robots 2026-10-13 · cs.RO · Key terms of the title in common
- LICOA: Learning Instruction-Conditioned Optical Actions for Mobile Spatial Augmented Reality 2026-10-15 · cs.RO · Key terms of the title in common
- SparseNav: Instruction-conditioned Sparse Semantic Perception for Training-Free Vision-Language Navigation 2026-09-22 · cs.RO · Key terms of the title in common
- Adaptive Vision-Language Grasping via Composable Foundation Priors and Generalizable Grasp Synthesis 2026-09-03 · cs.RO · Also by Fan Huang
- Neural Networks for Temporal Pattern Recognition and Dynamic Arm Gesture Speed Estimation for Robot Control 2026-10-08 · cs.RO · Key terms of the title in common