TL;DR
This paper breathes new life into the classic Dyna architecture by showing that learned models offer significantly more flexibility and performance than standard Experience Replay (ER). The authors introduce Reweighted Experience Models (REMs), a semi-parametric approach that enables efficient planning and backward search in continuous, stochastic environments, outperforming both ER and deep neural network-based models.
What Problem Does This Paper Address?
In modern reinforcement learning (RL), Experience Replay (ER) is the gold standard for improving data efficiency. It works by storing past transitions in a buffer and "replaying" them to update the agent's value function. However, ER is essentially a rigid model of the world—it can only show the agent exactly what it has seen before, in the order it saw it.
The authors revisit Dyna, an alternative paradigm where the agent learns an explicit model of the environment and uses it to simulate new, hypothetical experiences. While Dyna is theoretically more flexible, it has mostly been confined to simple "tabular" worlds. Scaling Dyna to continuous and stochastic domains is hard because learned models (like neural networks) can be data-hungry, prone to "forgetting" old information, or biased. This paper asks: Is the added complexity of a learned model actually worth it, and can we build one that works reliably in the real world?
Methods
The authors propose REM-Dyna, which centers on a novel model type called Reweighted Experience Models (REMs).
- Semi-parametric Modeling: Instead of a giant neural network, REMs use a subset of "prototype" transitions experienced by the agent.
- Reweighting: It estimates the probability of a transition by calculating similarities between the current state-action pair and these prototypes using kernels. It learns weights ($c_i$) for these prototypes to accurately reflect the environment's dynamics.
- Search Control: Because REM is a generative model, it allows for "search control"—deciding which states are most useful to plan from. Specifically, it can easily sample predecessor states (working backward from high-reward areas) and perform on-policy sampling (focusing on what the agent is likely to do now).
- Standard vs. New: While standard ER is a "sample model" (drawing directly from a buffer), REM is a "conditional model" that can generalize across similar states, making it more robust in continuous domains.
Datasets
The researchers evaluated their approach across several challenging benchmarks:
- Tabular Gridworlds: Used to compare ER and Dyna directly across varying sizes and levels of stochasticity (randomness).
- Continuous Gridworld: A 2D environment with continuous coordinates, obstacles, and noisy transitions.
- Continuous River Swim: A notoriously difficult exploration task where an agent must swim "upstream" against a current to reach a high-reward state. The authors adapted the classic tabular version into a continuous state space.
Key Insights and Ideas
- ER is just a limited model: The paper argues that Experience Replay is actually a form of model-based RL where the transition buffer is the model. The key difference is that Dyna allows for "search control," which ER cannot do.
- The Power of Predecessors: One of the biggest "aha" moments is the effectiveness of backward search. By using the model to find states that lead into high-value areas, the agent can propagate information through the environment much faster than by just replaying random past events.
- Neural Networks aren't always the answer: The authors found that standard neural network models for Dyna often perform poorly because they aren't data-efficient enough in the early stages of learning. REMs, being semi-parametric, provide a "sweet spot" of complexity and data efficiency.
- Stochasticity widens the gap: As environments become more random and larger, the advantage of Dyna-style planning over simple ER grows significantly.
Key Results
The experiments showed that REM-Dyna consistently outperformed ER and other model-based baselines.
- Tabular Performance: In stochastic gridworlds, Dyna with predecessors significantly outperformed all ER variants. As seen in Figure 2, the performance gap increases as the state space grows. Learning curves for gridworlds
- Continuous Domains: In the Continuous Gridworld, REM-Dyna with predecessors accumulated significantly more reward than ER, Linear-Dyna, or NN-Dyna.
- River Swim Success: This task is a graveyard for many RL agents. As shown in the table from Figure 6, REM-Dyna with predecessors was the only method capable of reaching 90% of the optimal policy's reward within 20,000 steps, whereas ER variants failed to even reach the 85% threshold. River Swim Results Table
Limitations and Future Work
The primary limitation acknowledged is scaling to high-dimensional inputs, such as raw pixels from images. While Gaussian kernels work well for low-dimensional physical systems (like robotics), they struggle with the "curse of dimensionality."
The authors suggest that a promising future direction is combining the probabilistic structure of REMs with learned embeddings or "data-driven similarities" from neural networks. This would allow the model to handle complex visual inputs while retaining the data efficiency and planning flexibility demonstrated in this paper.
Summary updated