Training and Evaluation of Deep Policies Using Reinforcement Learning and Generative Models

Ali Ghadirzadeh, Petra Poklukar, Karol Arndt, Chelsea Finn, Ville Kyrki, Danica Kragic, Mårten Björkman

Introduction

Deep Reinforcement Learning (RL) has demonstrated significant potential in robotics, yet it faces two primary obstacles: extreme data inefficiency and the risks associated with unsafe exploration. In many real-world scenarios, robots must learn from sparse terminal rewards—feedback received only at the end of a task. This creates a difficult temporal credit assignment problem, where the agent struggles to identify which specific actions in a long sequence led to success. Furthermore, the random exploration inherent in standard RL can lead to erratic movements that damage hardware.

To address these challenges, this paper introduces GenRL, a framework that integrates reinforcement learning with latent variable generative models. By leveraging human demonstrations to learn a manifold of valid motor trajectories, GenRL constrains the RL agent's search space to safe, realistic movements, effectively transforming complex sequential tasks into simpler bandit problems.

The GenRL Framework

The GenRL approach decomposes policy training into two distinct phases: unsupervised generative modeling and policy optimization.

1. Unsupervised Generative Modeling

Initially, a generative model—such as a $\beta$-VAE or InfoGAN—is trained on a dataset of valid motor trajectories. This model learns a mapping from a low-dimensional "latent action" variable ($\alpha$) to a high-dimensional, multi-step sequence of motor commands ($\tau$). By training on human demonstrations (augmented with noise), the model captures the underlying structure of purposeful movement.

2. Expectation-Maximization (EM) Policy Training

In the second phase, the RL policy is trained to output a single latent variable $\alpha$ based on the initial state. The generative model then "unfolds" this variable into a complete trajectory. This architecture reduces the effective horizon of the Markov Decision Process (MDP) to $T=1$. By treating the trajectory generation as a single decision, the framework bypasses the temporal credit assignment problem. The policy is optimized using an Expectation-Maximization (EM) algorithm with a Trust Region Policy Optimization (TRPO) objective to ensure stable and efficient updates.

Evaluating Latent Representations: DwPR

A critical contribution of this work is the introduction of Disentanglement with Precision and Recall (DwPR), a novel metric for evaluating generative models. Unlike previous metrics that require ground-truth labels or manual visual inspection, DwPR is fully unsupervised. It measures disentanglement by intervening on individual latent dimensions and calculating the precision and recall of the resulting trajectories. This allows researchers to predict the utility of a generative model for RL tasks before conducting expensive and potentially risky robot training.

Experimental Setup

The authors evaluated GenRL using the MuJoCo physics engine on two robotic tasks:

  • Hockey: A robotic arm must hit a puck to reach randomized target coordinates.
  • Basketball: A robotic arm must throw a ball into a basket at varying distances and angles.

The generative models were trained on 40,000 episodes of 7-dimensional motor actions, derived from human kinesthetic demonstrations. These tasks are characterized by sparse rewards, where the agent only receives feedback upon task completion.

Results and Discussion

The experimental results highlight the advantages of the GenRL framework over standard RL baselines:

  • Performance and Efficiency: GenRL successfully learned goal-conditioned policies for both tasks. In contrast, state-of-the-art algorithms like PPO and SAC failed to learn the tasks entirely, even when provided with the same demonstration data for pre-training.
  • Safety: GenRL demonstrated superior safety characteristics. In the hockey task, the agent recorded zero unsafe collisions with the table. Baselines, however, frequently caused the robotic arm to crash into the environment, illustrating the dangers of unconstrained exploration.
  • Predictive Metrics: The study confirmed that the DwPR metric ($\delta_1$) and Recall are strong predictors of final RL performance, with Pearson correlation coefficients of $R=0.538$ and $R=0.650$, respectively. Notably, the authors found that Recall (coverage of the data distribution) is more critical for RL success than Precision (the realism of individual samples).

Conclusion

GenRL offers a robust path forward for robotic RL by combining the representational power of generative models with the optimization capabilities of RL. By constraining exploration to a learned latent space, the framework achieves high data efficiency and ensures hardware safety. While the current work is focused on simulation, the predictive power of the DwPR metric and the framework's inherent safety make it a promising candidate for real-world robotic deployment and complex visuomotor control tasks.

Summary updated

BibTeX
@article{ghadirzadeh2022training,
  author = {Ali Ghadirzadeh and Petra Poklukar and Karol Arndt and Chelsea Finn and Ville Kyrki and Danica Kragic and Mårten Björkman},
  title = {{Training and Evaluation of Deep Policies Using Reinforcement Learning and Generative Models}},
  journal = {J. Mach. Learn. Res.},
  year = {2022},
  url = {https://openreview.net/forum?id=7608sxmX8i},
}
Figure