Sharing Knowledge in Multi-Task Deep Reinforcement Learning

Carlo D'Eramo, Davide Tateo, Andrea Bonarini, Marcello Restelli, Jan Peters

Introduction

This paper provides the first theoretical guarantees for Multi-Task Reinforcement Learning (MTRL) using non-linear function approximators like deep neural networks. The authors prove that sharing a common representation across $T$ tasks reduces the error in learning features by a factor of $O(1/\sqrt{T})$, leading to significantly better sample efficiency and performance in complex environments.

The Challenge of Sample Inefficiency

Reinforcement Learning (RL) is notoriously sample-inefficient, often requiring millions of interactions to solve a single task. While Deep Learning has revolutionized feature extraction, training a massive neural network for every individual task is computationally expensive. It also ignores the reality that many tasks—such as different types of walking or balancing—share underlying structural similarities.

Multi-Task Learning (MTL) aims to solve multiple problems simultaneously to learn a "generalized" representation. However, while this works well in supervised learning, the theoretical foundations for doing this in RL—specifically within the Approximate Value-Iteration (AVI) and Approximate Policy-Iteration (API) frameworks—were largely missing. The authors tackle the challenge of proving why and when sharing representations is beneficial in the sequential decision-making context of RL.

Methodology: Shared Representations

The paper bridges the gap between theory and practice through a three-pronged approach:

  1. Theoretical Extension: They extend the finite-time error bounds of AVI/API to the multi-task setting. By leveraging previous work on MTL bounds, they prove that the "cost" of learning a shared representation is distributed across tasks. Specifically, as the number of tasks $T$ increases, the approximation error associated with the shared features decreases.
  2. Novel Architecture: They propose a specific neural network structure designed for MTRL.
  3. Algorithmic Variants: They introduce multi-task versions of three standard algorithms: MFQI (Multi Fitted Q-Iteration), MDQN (Multi Deep Q-Network), and MDDPG (Multi Deep Deterministic Policy Gradient).
Shared network architecture and the effect of increasing the number of tasks on approximation error.

The proposed architecture consists of task-specific input blocks ($w_t$) to handle potential differences in input dimensionality, a shared representation block ($h$) that acts as the core feature extractor, and task-specific output blocks ($f_t$) to specialize the learned features for specific rewards and dynamics.

Key Insights

  • The $1/\sqrt{T}$ Benefit: The most significant insight is the theoretical proof that the more tasks you train on, the more accurate your shared feature extractor becomes. This justifies the intuition that a "jack of all trades" might actually be a better "master of one" because it understands the underlying domain better.
  • Regularization via Sharing: Sharing a representation acts as a powerful regularizer. Instead of a network overfitting to the noise or specific quirks of one task, it is forced to find features that are robust across multiple scenarios.
  • Transfer Learning "Head Start": A representation learned via MTRL is a superior starting point for Transfer Learning. Initializing a new task with the shared block $h$ provides a massive boost in initial performance compared to learning from scratch.

Key Results

The authors evaluated their approach on a variety of standard and complex RL benchmarks, including Classic Control (e.g., Cart-Pole, Acrobot), Continuous Control via MuJoCo (e.g., Inverted-Double-Pendulum), and Locomotion via the DeepMind Control Suite (e.g., Hopper, Walker).

Performance of multi-task learning and transfer learning on complex continuous control environments (pendulums and walkers).
  • Superior Convergence & Stability: In environments like Car-On-Hill, Acrobot, and Mountain-Car, multi-task variants (MFQI and MDQN) showed higher final rewards, much more stable learning curves, and lower $L_1$ error relative to the optimal Q-function compared to their single-task counterparts.
  • Complex Locomotion: In MuJoCo tasks like Hopper and Walker, MDDPG significantly outperformed single-task DDPG, particularly in terms of sample efficiency, reaching high performance in fewer epochs.
  • Transfer Efficiency: When moving to a new task (e.g., transferring from several pendulums to a double pendulum), using the multi-task pre-trained weights led to nearly instant high performance, whereas uninitialized agents struggled to learn at all in the same timeframe.

Limitations and Future Work

While promising, the theoretical bounds assume that tasks share a common structure. If tasks are completely unrelated, "negative transfer" could occur, where learning one task actively harms another. The paper doesn't explicitly provide a mechanism to automatically detect or mitigate this. Additionally, the theoretical proofs rely on the assumption that samples are independent and identically distributed (i.i.d.), which is often violated in online RL. Future work could explore adaptive task weighting to focus more on "harder" tasks and further optimize the shared representation.

Summary updated

BibTeX
@inproceedings{deramo2020sharing,
  author = {Carlo D'Eramo and Davide Tateo and Andrea Bonarini and Marcello Restelli and Jan Peters},
  title = {{Sharing Knowledge in Multi-Task Deep Reinforcement Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2020},
  url = {https://openreview.net/forum?id=rM-De0sM7kq},
}
Figure