Zero-Shot Policy Transfer with Disentangled Task Representation of Meta-Reinforcement Learning

Zheng Wu, Yichen Xie, Wenzhao Lian, Changhao Wang, Yanjiang Guo, Jianyu Chen, Stefan Schaal, Masayoshi Tomizuka

TL;DR

This paper introduces a meta-reinforcement learning (meta-RL) framework that achieves zero-shot policy transfer by disentangling task representations into independent "degrees of variation" (DoVs). By learning to represent task attributes (like goal location and physical properties) as separate, combinable components, a robot can successfully execute a novel task—such as a specific goal in a specific environment—without any prior trial-and-error exploration in that exact setting.

What Problem Does This Paper Address?

In reinforcement learning, "policy transfer" is the ability of an agent to take what it learned in one set of tasks and apply it to a new one. While meta-RL has made strides here, most current methods are few-shot: they require the robot to interact with the new environment for a few episodes to "infer" the task before they can perform well.

However, in many real-world scenarios (like assembling fragile electronics), even a few failed trials can be costly or damaging. Humans solve this through compositionality: if we know how to "walk on ice" and how to "carry a tray," we can combine those concepts to "carry a tray on ice" the first time we try it. This paper aims to give robots that same ability by decomposing tasks into independent attributes, allowing for zero-shot transfer to unseen combinations of known attributes.

Methods

The authors build upon PEARL, a popular context-based meta-RL algorithm. Their primary innovations are:

  1. Disentangled Task Embedding: Instead of a single latent vector representing the whole task, they use $M$ separate encoders—one for each Degree of Variation (DoV). The final task representation is a concatenation of these individual embeddings (e.g., $z = [z_{goal}, z_{physics}]$).
  2. Task Disentanglement Regularization: To ensure the encoders actually learn specific attributes, the authors introduce a loss function that forces tasks sharing the same attribute (e.g., the same friction level) to have similar embeddings for that specific DoV, regardless of other variations.
  3. Exponential Moving Average (EMA) Targets: To stabilize training against noise, they maintain a "target" distribution for each attribute value using EMA. This acts as a temporal ensemble of information accumulated during training, making the embeddings more robust than those derived from a single interaction.
  4. Zero-Shot Inference: At test time, if the robot faces a new combination of previously seen attributes, it simply concatenates the corresponding EMA-stored embeddings to form the task representation, bypassing the need for exploration.

Datasets

The method was evaluated on three simulated environments and one real-world setup:

  • Cheetah-vel-comp: A Half-Cheetah robot tasked with reaching specific velocities while physical parameters (mass, damping, friction) vary.
  • Ant-goal-comp: An Ant robot reaching 2D goal positions with varying physical properties.
  • Tilted-peg-in-hole-comp: A simulated KUKA robot performing peg insertion where the hole angle and physics are randomized.
  • Real-World Robotic Insertion: A 6-DoF FANUC Mate 200iD robot performing a tilted peg-in-hole task to test sim-to-real generalization.

Key Insights and Ideas

  • Representation over Architecture: Unlike previous work that used modular neural network architectures (which are hard to scale), this work focuses on a modular latent representation. This is more computationally efficient and flexible.
  • Dynamics Matter: The authors point out that task differences aren't always visible in a single image (e.g., the weight of an object). Their method uses transitions $(s, a, s', r)$ to infer hidden physical properties, making it more powerful than observation-only methods.
  • The "Aha!" Moment on EMA: The authors found that their zero-shot method sometimes outperformed standard meta-test adaptation. They hypothesize that the EMA-based embeddings are less "biased" than the context gathered from a single test-time exploration, which can easily get trapped in local optima.

Key Results

  • Superior Zero-Shot Performance: In all simulated tasks, the proposed method significantly outperformed standard SAC (Soft Actor-Critic) and the "Prior" version of PEARL.
  • Sim-to-Real Success: The model was meta-trained in simulation and then applied to a real FANUC robot. By using just one "calibration" task to infer the real-world physics, the robot achieved a 73.3% success rate across other unseen goal configurations in the real world without further exploration.
  • Interpretability: PCA visualizations of the latent space showed that the model successfully clustered tasks by goal and physics independently, proving that the disentanglement regularization worked as intended.

Limitations and Future Work

  • Assumption of Independence: The current model assumes that task attributes (DoVs) are independent. In some complex tasks, attributes might be highly correlated or entangled, which would break the concatenation logic.
  • Known DoVs: The model currently requires the user to specify what the Degrees of Variation are during training (e.g., "this is a goal change" vs "this is a friction change").
  • Future Direction: The authors suggest moving toward unsupervised DoV discovery, where the agent learns to identify the independent factors of a task on its own without human labels.

Summary updated

BibTeX
@inproceedings{wu2023zero,
  author = {Zheng Wu and Yichen Xie and Wenzhao Lian and Changhao Wang and Yanjiang Guo and Jianyu Chen and Stefan Schaal and Masayoshi Tomizuka},
  title = {{Zero-Shot Policy Transfer with Disentangled Task Representation of Meta-Reinforcement Learning}},
  booktitle = {IEEE International Conference on Robotics and Automation},
  year = {2023},
  url = {https://openreview.net/forum?id=NDbtTgVoY2},
}
Figure