How Ensembles of Distilled Policies Improve Generalisation in Reinforcement Learning
Max Weltevrede, Moritz A. Zanger, Matthijs T. J. Spaan, Wendelin Böhmer
TL;DR
The paper addresses zero-shot generalisation in reinforcement learning by analysing policy distillation after training under a generalisation through invariance framework (GTI-ZSPT). It proves a bound showing that distilling an ensemble of policies on diverse training data reduces the gap to the optimal policy in unseen contexts, with the bound improving as ensemble size grows and as the symmetry subgroup better covers the full symmetry group. Empirically, the authors validate the theory beyond its strict assumptions, demonstrating that ensembles distilled on more diverse data can outperform the original agent in tasks like Reacher with rotational symmetry and Four Rooms. They also extend insights to behaviour cloning, underscoring the practical impact of data diversity and model ensembles for generalisation. Overall, the work provides both theoretical guidance and empirical evidence that policy distillation, particularly with ensembles and diverse datasets, is a powerful tool to enhance zero-shot RL generalisation. The results highlight practical strategies for improving robustness to unseen contexts with modest additional distillation effort.
Abstract
In the zero-shot policy transfer setting in reinforcement learning, the goal is to train an agent on a fixed set of training environments so that it can generalise to similar, but unseen, testing environments. Previous work has shown that policy distillation after training can sometimes produce a policy that outperforms the original in the testing environments. However, it is not yet entirely clear why that is, or what data should be used to distil the policy. In this paper, we prove, under certain assumptions, a generalisation bound for policy distillation after training. The theory provides two practical insights: for improved generalisation, you should 1) train an ensemble of distilled policies, and 2) distil it on as much data from the training environments as possible. We empirically verify that these insights hold in more general settings, when the assumptions required for the theory no longer hold. Finally, we demonstrate that an ensemble of policies distilled on a diverse dataset can generalise significantly better than the original agent.
