TL;DR
PlayVirtual significantly improves the data efficiency of reinforcement learning (RL) by generating "virtual" experience. By using forward and backward dynamics models to enforce cycle consistency in a latent feature space, the agent learns robust representations from far fewer environment interactions, achieving state-of-the-art performance on the Atari-100k and DeepMind Control Suite benchmarks.
Introduction
Deep RL agents typically require millions of interactions with an environment to learn effective policies, especially when learning directly from high-dimensional pixel data. This "data inefficiency" is a major hurdle for real-world applications like robotics or healthcare, where collecting data is expensive, time-consuming, or risky.
While previous methods have tried to solve this using auxiliary tasks (like predicting the future) or image-based data augmentation (like random cropping), they often fail to enrich the agent's "experience"—the actual sequences of states and actions. Deep networks remain deficient in experiencing flexible and diverse trajectories, which limits the quality of the feature representations they can learn.
The PlayVirtual Framework
To address this, the authors introduce PlayVirtual, a framework that "hallucinates" consistent trajectories to augment the agent's experience.
- Encoder & Dynamics Model (DM): Like many modern RL agents, PlayVirtual uses an encoder to turn pixels into a latent representation ($z_t$). A forward dynamics model is trained to predict future latent states based on current states and actions.
- Backward Dynamics Model (BDM): The novel addition is a backward model that predicts the previous state given the current state and the action taken.
- Action Augmentation: Instead of only training on the actions the agent actually took, PlayVirtual samples random sequences of actions to generate "virtual" trajectories.
- Cycle Consistency Constraint: Since there is no ground-truth "next image" for these virtual actions, the model uses self-supervision. It starts at a real state $z_t$, predicts $K$ steps forward using virtual actions to reach $\hat{z}_{t+K}$, and then uses the BDM to predict $K$ steps backward using the same actions to arrive at $z'_t$. The "Cycle Consistency Loss" enforces that the starting state $z_t$ and the reconstructed state $z'_t$ should be identical.
Key Insights
- Experience vs. Appearance: Most RL augmentations focus on changing how a state looks (pixels). PlayVirtual focuses on what the agent does (trajectories). This is conceptually orthogonal and complementary to existing methods.
- Reversibility as a Regularizer: Forcing the latent space to be "reversible" (forward then backward returns you to the start) acts as a powerful regularizer. It ensures the encoder learns features that capture the underlying logic of the environment's physics rather than just memorizing pixel patterns.
- Supervision without Ground Truth: The cycle consistency trick allows the model to learn from "fictitious" data. This effectively multiplies the amount of training signal available from a very small pool of real experience.
Experimental Results
The authors evaluated PlayVirtual on two standard, high-difficulty benchmarks for data-efficient RL: Atari-100k (limited to roughly 2 hours of real-time play) and the DeepMind Control Suite (DMC) (continuous control tasks).
PlayVirtual achieved state-of-the-art results across both major benchmarks:
- Atari-100k: It achieved a median Human-Normalized Score (HNS) of 47.2%, significantly outperforming the previous SOTA, SPR (41.5%). In specific games like Battle Zone and Hero, the gains were substantial.
- DeepMind Control Suite: On the 100k-step benchmark, PlayVirtual reached a median score of 800.5, an 11.3% improvement over the SPR baseline.
Ablation studies showed that while adding a BDM alone helps slightly, the massive performance boost comes specifically from the action augmentation combined with the cycle consistency loss.
Limitations and Future Work
- Many-to-One Transitions: In some environments, different states might lead to the same next state given the same action (non-injective transitions). In these cases, a deterministic BDM might struggle to "pick" the correct previous state, though the model's capacity often allows it to learn a "mean" state that still provides a useful gradient.
- Stochasticity: The current model is designed for deterministic environments. Extending this to highly stochastic environments would likely require a more complex, probabilistic dynamics model.
- Computational Cost: Generating multiple virtual trajectories for every real transition increases the computational overhead during training, though this is a worthwhile trade-off for higher data efficiency.
Summary updated