Abstract
Traditional imitation learning in robotics often relies on "flat" policies that map high-level instructions directly to low-level motor commands. These models frequently struggle with long-horizon tasks, data scarcity, and non-Markovian environments. We present a hierarchical framework that utilizes a Vision-Language Model (VLM) to generate structured code "thoughts" which then guide a low-level Diffusion Policy. This approach significantly improves generalization and success rates across complex, multi-step robotic tasks.
Introduction
Imitation learning (IL) has become a cornerstone of modern robotics, yet it faces persistent challenges in generalization and handling long-horizon tasks. Most current IL models attempt to map pixels and natural language instructions directly to motor actions. This "flat" mapping is prone to failure in complex scenarios where natural language is ambiguous or where a single error early in a sequence leads to irreversible failure. Furthermore, many tasks are non-Markovian, requiring the robot to maintain a memory of past states to determine future actions.
To address these limitations, researchers from Qualcomm AI Research have developed a hierarchical framework that decouples high-level reasoning from low-level execution. By using code as an intermediate representation, the system provides a structured, unambiguous bridge between human intent and robotic action.
Methodology
The proposed framework consists of two primary layers: a high-level planner and a low-level controller.
High-Level Planning: The VLM as a Code Generator
The system employs a Vision-Language Model (VLM), based on the LLaVa framework with a Phi-3 backbone, trained to act as a code generator. Instead of outputting abstract features, the VLM generates Python-style API calls (e.g., pick(actor=red_cube)). This treats existing robotic APIs as a source of structured supervision, forcing the model to "think" in precise, modular steps.
Low-Level Control: Diffusion Policy
A Diffusion Policy (DP) takes the code generated by the VLM and translates it into motor commands. Diffusion models are particularly well-suited for this role as they can capture the multi-modal nature of human demonstrations—recognizing that there are multiple valid paths to achieve a single goal.
The Memory Bridge and Action Chunking
To handle tasks requiring memory, the framework includes a "cache info" mechanism. The VLM maintains a memory buffer of past subtasks, and the low-level policy is conditioned on a cache of relevant state information extracted from the code history. Additionally, the system utilizes "Action Chunking Regeneration." If the VLM predicts a new subtask (a "key-step"), the low-level policy immediately halts its current action sequence and generates a new chunk of actions tailored to the updated instruction.
Experimental Results
The framework was evaluated using the ClevrSkills benchmark, which focuses on compositional reasoning in robotics. Tasks were categorized into primitive behaviors (L0) and complex compositions (L1).
Performance Gains
The hierarchical VLM+DP approach demonstrated a significant performance leap over standard flat baselines:
- Overall Success: The hierarchical model achieved a 63.95% success rate, more than doubling the 28.19% achieved by the flat diffusion policy.
- Long-Horizon Tasks: In the "PushToTarget" task, the hierarchical model reached an 82.5% success rate, whereas the flat model managed only 8.6%.
- Memory-Intensive Tasks: In the "Swap" task, which requires remembering previous object placements, the flat model failed completely (0% success). In contrast, the hierarchical model with memory achieved up to 84% success.
Compositional Generalization
A key finding was the model's ability to reuse primitive skills. Learning simple L0 tasks directly improved performance on complex L1 tasks, even without increasing the number of complex demonstrations. This suggests that the hierarchical structure effectively facilitates the transfer of modular skills.
Conclusion and Future Work
By using code as an intermediate "thought" process, the hierarchical Diffusion-VLM framework overcomes many of the bottlenecks associated with flat imitation learning. While currently validated in simulated environments like ClevrSkills, future work will focus on transitioning these models to the real world, where perception noise and motor variability present new challenges. Additionally, integrating large, pre-trained foundation vision models could further enhance the system's zero-shot generalization to novel objects and environments.
Summary updated