TL;DR
This paper introduces a two-stage learning framework that combines offline diffusion modeling with online preference alignment to create more robust quadrupedal locomotion policies. By leveraging a limited expert dataset and a novel weak preference labeling method, the approach significantly improves stability and velocity tracking, enabling successful sim-to-real transfer to a Unitree robot.
What Problem Does This Paper Address?
Quadrupedal robots need to navigate complex and dynamic environments, which requires sophisticated locomotion control. While diffusion models have shown promise in capturing complex action distributions for this task, their performance heavily relies on large, diverse datasets. Collecting such datasets is challenging, and purely offline learning from limited data can lead to policies that are brittle and fail when encountering novel situations (out-of-distribution states) in the real world. Existing methods often require extensive online interaction or meticulously designed reward functions, which are difficult to obtain. This paper addresses the challenge of learning robust locomotion policies from limited offline datasets by proposing a method that enhances data diversity and policy robustness through online interaction and preference alignment, without relying on explicit reward signals.
Methods
The proposed framework operates in two stages:
- Offline Diffusion Planner (Behavior Cloning): Initially, a diffusion model is trained using behavior cloning on a pre-collected, limited offline dataset. This dataset is generated from a single expert policy and does not use reward labels. The diffusion model learns to predict a sequence of future states and actions conditioned on the current observation. This stage aims to capture the general distribution of expert locomotion behaviors.
- Preference Alignment (Online Fine-tuning): To improve robustness and diversity, the offline planner is then fine-tuned using an online interaction phase combined with a novel weak preference labeling method.
- Weak Preference Labeling: Instead of relying on ground-truth rewards, this method constructs preference pairs by comparing trajectories. It identifies "optimal" expert trajectories and then, for any given state-action pair in the offline dataset, finds the nearest expert trajectory. A "preference score" is calculated based on the Euclidean distance to this nearest expert. Trajectories with higher cumulative scores are deemed "winning" segments.
- Preference Alignment Loss: The fine-tuning uses a loss function inspired by Direct Preference Optimization (DPO). This loss encourages the diffusion policy to generate trajectories that align with the learned preferences. Crucially, a regularization term is included to prevent the policy from deviating too drastically from the original offline-trained policy, ensuring stability during fine-tuning.
The inference process involves generating action sequences from the refined diffusion model and executing them on the robot. For efficiency, the diffusion sampling steps are reduced during inference.
Datasets
- Training Data: The initial offline dataset was collected using the "Walk These Ways" framework with a Proximal Policy Optimization (PPO) expert policy. This dataset covers pacing, trotting, and bounding gaits.
- Evaluation Data: The performance was evaluated in simulation and on a real-world Unitree Gol robot. The evaluation tasks involved velocity tracking across different gaits and speeds.
Key Insights and Ideas
- Weak Preference Labels are Sufficient: The paper demonstrates that a preference signal can be effectively derived from expert trajectories without needing explicit reward functions, significantly simplifying the data requirements for preference learning.
- Online Interaction Augments Offline Data: Combining offline learning with a limited online interaction phase is crucial for enhancing data distribution diversity and improving robustness against out-of-distribution states.
- Regularization is Key for Stability: The inclusion of a regularization term in the preference alignment loss is vital for preventing catastrophic forgetting or drastic policy shifts, leading to more stable and conservative improvements.
- Diffusion Models for High-Dimensional Control: The work showcases the potential of diffusion models for complex, high-dimensional control tasks like quadrupedal locomotion, which have traditionally been challenging.
Key Results
- Superior Stability and Velocity Tracking: The proposed preference-aligned diffusion planner significantly outperformed baseline methods (CQL, DDPM-Unet, DDPM-Transformer) in both stability and average x-axis velocity tracking across various gaits and speeds. For instance, in the 1.0 m/s bounding task, the proposed method achieved 84.3% stability, compared to 32.4% for DDPM-Unet and 46.6% for DDPM-Transformer.
- Effective Sim-to-Real Transfer: The framework demonstrated successful zero-shot transfer to a real-world Unitree Gol robot, performing robustly on different surfaces.
- Ablation Studies:
- Increasing the preference dataset size generally improved performance, though the sensitivity varied by task difficulty.
- Weak preference labels achieved performance comparable to strong (reward-based) preference labels, validating the proposed labeling method.
- The regularization term was critical; without it, the preference alignment consistently led to failures.
Limitations and Future Work
- Limited Dataset Sensitivity: While the framework improves robustness with limited data, the paper acknowledges that the sensitivity to dataset size varies with task difficulty. Insufficient preference data can still lead to deviations from expected task performance.
- Future Work: The authors suggest incorporating extra modalities, such as vision and language, into the learning framework to further enhance its capabilities.
Summary updated