Cross-domain adaptive transfer reinforcement learning based on state-action correspondence

Heng You, Tianpei Yang, Yan Zheng, Jianye Hao, Matthew E. TaylorUAI 2022

Abstract

Despite the impressive success achieved in various domains, deep reinforcement learning (DRL) is still faced with the sample inefficiency problem. Transfer learning (TL), which leverages prior knowledge from different but related tasks to accelerate the target task learning, has emerged as a promising direction to improve RL efficiency. The majority of prior work considers TL across tasks with the same state-action spaces, while transferring across domains with different state-action spaces is relatively unexplored. Furthermore, such existing cross-domain transfer approaches only enable transfer from a single source policy, leaving open the important question of how to best transfer from multiple source policies. This paper proposes a novel framework called Cross-domain Adaptive Transfer (CAT) to accelerate DRL. CAT learns the state-action correspondence from each source task to the target task and adaptively transfers knowledge from multiple source task policies to the target policy. CAT can be easily combined with existing DRL algorithms and experimental results show that CAT significantly accelerates learning and outperforms other cross-domain transfer methods on multiple continuous action control tasks.

Introduction

Deep Reinforcement Learning (DRL) has demonstrated remarkable capabilities in complex decision-making tasks. However, its practical application is often hindered by extreme sample inefficiency. Transfer Learning (TL) offers a solution by reusing knowledge from source tasks to accelerate learning in a target task. While traditional TL focuses on tasks sharing the same state and action spaces, real-world scenarios often require "cross-domain" transfer between agents with different physical configurations—such as transferring locomotion skills from a quadruped to a hexapod.

Existing cross-domain methods often rely on hand-crafted mappings or single-source transfer. This paper introduces the Cross-domain Adaptive Transfer (CAT) framework, designed to autonomously learn state-action correspondences and adaptively integrate knowledge from multiple source policies.

The CAT Framework

The CAT framework consists of three primary modules designed to bridge the gap between disparate domains and optimize knowledge transfer.

The CAT framework architecture, illustrating the Self-adaptation, Correction, and Agent modules.

1. Correction Module

The Correction Module acts as a translator between domains. It maps states and actions from source tasks into a common latent space using encoders. To align these spaces without requiring paired data, CAT employs:

  • Cycle-Consistency Loss: Ensures that a state mapped from source to target and back to source remains consistent.
  • Trajectory Alignment: Instead of just aligning individual states, CAT ensures that action sequences in the source domain produce similar trajectory "shapes" in the target domain, capturing the underlying semantics of movement.

2. Self-adaptation Module

To handle multiple source policies, the Self-adaptation Module evaluates the immediate performance of each source policy within the target environment. It assigns a weight ($w_i$) to each source using a softmax function. This mechanism allows the agent to prioritize helpful "experts" and ignore those that might cause "negative transfer."

3. Agent Module

The Agent Module executes the final policy by combining the target agent’s own learning (typically using PPO) with the weighted advice from source policies. A time-varying factor ($p$) manages this balance, initially relying on experts to jumpstart learning and gradually shifting toward the target agent's independent experience.

Experimental Setup

The researchers evaluated CAT using several continuous control tasks in the MuJoCo physics engine. These tasks involve robots with varying morphologies, requiring the model to bridge significant structural differences.

Various robot morphologies used in the experiments, including different configurations of Centipede, Ant, and Snake agents.

The primary testbeds included:

  • Centipede-x: Modular robots with 4, 6, or 8 segments.
  • CrippleCentipede: Agents with disabled limbs to test robustness.
  • Ant-v2 and Snake-x: Standard and modular crawlers with varying joint counts.

Key Results

CAT demonstrated significant improvements in both learning speed and final performance across all benchmarks:

  • Multi-Source Advantage: In transferring from Centipede-4 and Centipede-6 to Centipede-8, CAT achieved a reward of ~4684, significantly outperforming the best baseline (MIKT) at ~2940.
  • Learning Acceleration: On the Snake-6 task, CAT reached the solved threshold in approximately 0.75M steps, nearly twice as fast as learning from scratch (1.34M steps).
  • Mitigating Negative Transfer: When presented with a dissimilar source (e.g., an Ant policy for a Snake target), CAT's adaptive weighting successfully "muted" the irrelevant source, preventing the performance degradation seen in other multi-source methods.

Conclusion

The CAT framework provides a robust solution for cross-domain transfer in DRL. By learning latent correspondences through trajectory alignment and adaptively weighting multiple source policies, it enables agents to learn faster and more effectively from diverse experiences. Future work will explore fine-grained weighting schemes and unified embedding spaces for broader morphological generalization.

Code Availability: https://github.com/TJU-DRL-LAB/transfer-and-multi-task-reinforcement-learning

Summary updated

BibTeX
@inproceedings{you2022cross,
  author = {Heng You and Tianpei Yang and Yan Zheng and Jianye Hao and Matthew E. Taylor},
  title = {{Cross-domain adaptive transfer reinforcement learning based on state-action correspondence}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2022},
  url = {https://openreview.net/forum?id=t7WdT_2YkRf},
}
Figure