Behaviour Distillation

Andrei Lupu, Chris Lu, Jarek Luca Liesen, Robert Tjarko Lange, Jakob Nicolaus Foerster

Dataset distillation compresses massive datasets into a handful of synthetic examples, but it has historically been limited to supervised learning. This paper introduces behaviour distillation, a novel framework that condenses the optimal behavior of a Reinforcement Learning (RL) environment into a tiny synthetic dataset of state-action pairs—without needing an expert policy or prior data. Using a method called HaDES, the authors compress complex continuous control tasks into as few as 4 to 64 state-action pairs, which can then be used to train new policies from scratch in seconds.

The Challenge of Distillation in RL

In supervised learning, "dataset distillation" creates a small set of synthetic data points (e.g., 10 synthetic images) that can train a model to the same accuracy as the full original dataset (e.g., 60,000 real images).

However, this paradigm hasn't easily translated to Reinforcement Learning. Standard distillation methods require a fixed "ground truth" dataset or an expert policy to match gradients or trajectories against. In RL, the data distribution is non-stationary and policy-dependent. Furthermore, assuming you already have an expert policy defeats the purpose of learning. The authors tackle this gap by asking: Can we discover and distill the information required to train an expert RL policy into a tiny, static dataset, without ever having access to expert data in the first place?

Introducing HaDES

To solve this, the authors formalize behaviour distillation and introduce HaDES (Hallucinating Datasets with Evolution Strategies). HaDES uses a bi-level optimization loop:

  1. Inner Loop (Supervised Learning): A neural network policy is initialized and trained on a small, synthetic dataset of state-action pairs using standard supervised learning (Behavioral Cloning).
  2. Outer Loop (Evolution Strategies): The newly trained policy is evaluated in the actual RL environment to determine its expected return. This return acts as a fitness score. An Evolution Strategy (ES) algorithm then updates the synthetic dataset to maximize this fitness score.

The authors introduce two variants:

  • HaDES-F (Fixed Initialization): The inner-loop policy always starts with the exact same random weights. This acts as a highly memory-efficient indirect encoding for neuroevolution.
  • HaDES-R (Randomized Initialization): The inner-loop policy starts with different random weights every time. This forces the synthetic dataset to capture universal, generalizable task features rather than overfitting to a specific network's starting state.

Key Insights and Results

HaDES was evaluated on Brax (continuous control tasks like Hopper, HalfCheetah) and MinAtar (discrete Atari-like tasks), as well as standard supervised benchmarks like MNIST.

  • Bypassing the Exploration Problem: A distilled behavior dataset essentially "pre-solves" the environment. It reduces the massive RL challenges of exploration and non-stationary data collection into a trivial, stationary supervised learning problem.
  • Extreme Compression & High Performance: HaDES-F matched or outperformed standard ES neuroevolution on all 8 Brax environments and 3 out of 4 MinAtar environments. The authors successfully trained competitive policies using datasets of just 64 state-action pairs for complex Brax tasks, and as few as 16 pairs for MinAtar.
  • Generalization via Randomization: By using HaDES-R, the resulting synthetic datasets become incredibly robust. They can train completely unseen neural network architectures using different learning rates and epoch counts.
  • Zero-Shot Multi-Tasking: By concatenating a 64-pair dataset for Humanoid and a 64-pair dataset for HumanoidStandup, the authors trained a single multi-task agent that achieved ~100% normalized performance on both environments without any actual environment interaction during training.
Interpretable Distilled Datasets
  • Interpretability: Because the distilled datasets are just state-action pairs, they are human-interpretable. For example, a 2-state distilled dataset for Cartpole literally shows the optimal rules: "if the pole leans left, apply force left; if it leans right, apply force right."

Limitations and Future Work

While groundbreaking, the approach has limitations:

  • Computational Cost: The outer loop relies on Evolution Strategies, which requires evaluating a large population of datasets, making it computationally expensive.
  • Scaling to High Dimensions: The number of parameters to evolve grows linearly with the dataset size and the observation dimensions. This makes scaling to pixel-based RL environments currently intractable.
  • Hyperparameter Sensitivity: The method requires tuning both the inner-loop supervised learning parameters and the outer-loop ES parameters.

Future work may explore "factorized distillation" (e.g., using a generative neural network to output the dataset rather than evolving the raw data points directly) to reduce the parameter count, and applying these datasets to continual or life-long learning research.

Summary updated

BibTeX
@inproceedings{lupu2024behaviour,
  author = {Andrei Lupu and Chris Lu and Jarek Luca Liesen and Robert Tjarko Lange and Jakob Nicolaus Foerster},
  title = {{Behaviour Distillation}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
}
Figure