Abstract
Training robots with reinforcement learning (RL) typically involves heavy interactions with the environment, and the acquired skills are often sensitive to changes in task environments and robot kinematics. Transfer RL aims to leverage previous knowledge to accelerate learning of new tasks or new body configurations. However, existing methods struggle to generalize to novel robot-task combinations and scale to realistic tasks due to complex architecture design or strong regularization that limits the capacity of the learned policy. We propose Policy Stitching, a novel framework that facilitates robot transfer learning for novel combinations of robots and tasks. Our key idea is to apply modular policy design and align the latent representations between the modular interfaces. Our method allows direct stitching of the robot and task modules trained separately to form a new policy for fast adaptation. Our simulated and real-world experiments on various 3D manipulation tasks demonstrate the superior zero-shot and few-shot transfer learning performances of our method.
Introduction
A significant challenge in reinforcement learning for robotics is the lack of generalizability. Typically, a policy is trained for a specific task using a specific robot configuration. Any modification to the task or the robot's physical structure often necessitates retraining from scratch. While modular architectures—splitting policies into task-specific and robot-specific components—offer a potential solution, they are hindered by representation misalignment. Even with identical architectures, different training runs produce disparate internal latent representations, making it impossible to simply "stitch" modules together.
Methodology: Policy Stitching
Policy Stitching (PS) addresses this misalignment by decoupling task logic from robot kinematics and aligning their internal communication.
Modular Policy Design
The framework explicitly separates the policy into two components:
- Task Module: Processes environmental states and goals.
- Robot Module: Manages joint angles and specific robot kinematics.
Latent Representation Alignment
To bridge the gap between modules, PS utilizes Relative Representations. Instead of passing raw latent vectors, the modules communicate via a vector of similarities to a set of "anchor states." These anchors are identified through unsupervised k-means clustering of robot trajectories. By using cosine similarity, which is invariant to rotation and scaling, the system creates a universal "coordinate system" that allows modules from different training seeds to interact seamlessly.
Key Insights
The Isometric Phenomenon
A core discovery of this research is that latent representations across different RL training seeds are often isometric transformations of one another. They share the same geometric structure but are oriented differently in high-dimensional space.
Touching Rate as a Metric
In zero-shot transfer scenarios where success rates are initially low, the authors emphasize the "touching rate." This metric indicates whether the robot is attempting the correct interaction. A high touching rate provides a significantly better foundation for rapid few-shot adaptation compared to random exploration.
Experimental Results
The framework was validated in both simulation (using panda-gym) and real-world settings with a UR5 robot arm.
- Zero-Shot Performance: In simulated transfer tasks, PS achieved a 26.9% success rate, more than doubling the performance of standard modular baselines (11.7%).
- Functional Alignment: In complex tasks with 0% success for all methods, PS maintained a 95.4% touching rate, demonstrating that the modules remained functionally aligned despite the task difficulty.
- Real-World Adaptation: On a physical UR5 arm, PS achieved a 40% zero-shot success rate and a 100% touching rate. Furthermore, it reached a 90% success rate after only 5 hours of fine-tuning, significantly outperforming baselines which plateaued around 45-55%.
Conclusion and Future Work
Policy Stitching provides a robust method for creating "plug-and-play" robot policies. While currently reliant on low-dimensional state representations, future work will focus on extending this framework to high-dimensional inputs like raw pixels and exploring more diverse robot morphologies, such as legged systems.
Summary updated