A Framework for Few-Shot Policy Transfer through Observation Mapping and Behavior Cloning

Yash Shukla, Bharat Kesari, Shivam Goel, Robert Wright, Jivko SinapovarXiv 2023

TL;DR

This paper introduces a task-agnostic framework for few-shot policy transfer from simulation to reality (Sim2Real) using CycleGAN for observation mapping and behavior cloning. By decoupling visual translation from policy learning, the approach enables successful robot navigation transfer even when the simulation and real-world environments exhibit significant visual, semantic, and action-space discrepancies, all while requiring minimal real-world data.

What Problem Does This Paper Address?

Deep Reinforcement Learning (RL) has achieved remarkable success in virtual environments, but deploying it directly onto physical robots remains a massive challenge. Real-world training is sample-inefficient, time-consuming, and potentially dangerous to hardware.

While "Sim2Real" transfer leverages safe, fast simulations to train agents before real-world deployment, it typically suffers from the "Reality Gap"—the subtle or drastic differences in physics and visuals between simulation and reality that cause trained policies to fail catastrophically. Traditional fixes like domain randomization require precise engineering and access to simulator internals. Furthermore, existing domain adaptation methods usually assume that the task structure, goal semantics, and action spaces are identical across both domains. This paper tackles a harder, more realistic problem: how do we transfer a policy when the target domain has limited data, visual mismatches, different action step sizes, and altered goal semantics?

Methods

The authors propose a three-stage, task-agnostic framework that requires no paired data between the source (simulation) and target (real world) domains:

  1. Source Policy Training: An expert behavior policy ($\pi_{\theta_{src}^*}$) is trained in a simulated environment using an off-the-shelf RL algorithm, specifically Proximal Policy Optimization (PPO).
  2. Observation Mapping via CycleGAN: Using unpaired static image datasets collected via random exploration in both domains, the authors train a CycleGAN. This network learns a bidirectional mapping ($G: X \to Y$ and $F: Y \to X$) between simulation images ($X$) and real-world images ($Y$). The pixel-level cycle-consistency loss ensures that structural elements are preserved during translation without needing exact image pairs.
  3. Cross-Domain Behavior Cloning (BC): To adapt the policy without retraining in the real world, simulated states are passed through the generator $G$ to produce corresponding target-domain observations. The target policy ($\pi_{\theta_{tgt}}$) is then trained via behavior cloning to minimize the cross-entropy loss between its action distribution and the simulated expert's action distribution.
Fig. 1: Overview of the Few-Shot Policy Transfer approach. During training, the agent learns a mapping between the observations of the source and target domain and clones the successful source task behavior policy. During the evaluation, the agent tests the cloned policy on the target domain.

Datasets

The framework was evaluated using offline, static datasets consisting of 4,000 egocentric RGB images per domain, collected using a completely random behavior policy.

  • Sim2Sim Mismatch: Evaluated using a Turtlebot robot simulated in PyBullet, navigating to a box goal under different visual conditions.
  • Semantic/Action Shift: A simulated setup where the goal object changed from a box to a spherical ball (which looks different from every angle), and the action discretizations were made finer (smaller step sizes and rotation angles).
  • Sim2Real: A physical arena ($2.45\text{m} \times 2.45\text{m}$) featuring a physical Turtlebot 2 robot equipped with an Orbbec Astra RGB camera navigating toward a box.

Key Insights and Ideas

  • Unpaired Data is Sufficient: Traditional domain adaptation often relies on paired images (the exact same scene rendered in sim and real). This work proves that a CycleGAN can extract structural commonalities purely from random, unaligned exploration data.
  • Decoupling Perception from Policy: Instead of forcing an RL agent to learn a robust policy across varying domains simultaneously, this method translates the observation space first. This preserves the underlying logic of the navigation policy.
  • Implicit Action Alignment: Even when action step sizes differ between domains, behavior cloning effectively maps the state-action trajectories, allowing the target agent to successfully reach the goal despite finer control discretizations.

Key Results

The proposed CycleGAN + Behavior Cloning approach consistently outperformed direct policy transfer and standard GAN baselines:

  • Visual Mismatch (Sim2Sim): Achieved a 94% success rate, compared to just 2% for direct policy transfer and 68% for a standard GAN baseline without cycle-consistency.
  • Data Efficiency: The framework proved highly robust to data scarcity. Even when restricted to just 250 target domain images, it achieved a 74% success rate.
  • Semantic & Action Discrepancies: When the goal object was changed to a sphere and action step sizes were altered, the framework maintained a 78% success rate, whereas direct transfer failed completely (0%).
  • Physical Deployment (Sim2Real): On the physical Turtlebot 2, the transferred policy achieved a 90% goal-reaching success rate (succeeding in 27 out of 30 physical trials).

Limitations and Future Work

While highly effective for navigation, the authors note several limitations:

  • Task Complexity: The current framework was validated on relatively simple navigation tasks. Complex robotic manipulation tasks might require architectural changes to the CycleGAN to preserve intricate object boundaries.
  • Perception Bottlenecks: Because the model relies solely on RGB data, the physical robot occasionally confused shadows cast by walls with the actual goal box. Incorporating depth information is highlighted as a crucial next step.
  • Temporal Context: The current policy operates on single frames. Integrating an LSTM to leverage the history of the task's episode could significantly improve performance in highly partially-observable environments.

Summary updated

BibTeX
@misc{shukla2023framework,
  author = {Yash Shukla and Bharat Kesari and Shivam Goel and Robert Wright and Jivko Sinapov},
  title = {{A Framework for Few-Shot Policy Transfer through Observation Mapping and Behavior Cloning}},
  year = {2023},
  eprint = {2310.08836},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2310.08836},
}
Figure