In Model-Based Reinforcement Learning (MBRL), agents learn a model of their environment to plan future actions. Traditionally, this involves either distribution models, which are computationally expensive in large state spaces, or sample models, which can introduce significant variance. A recent study from the University of Alberta, co-authored by RL pioneer Richard Sutton, explores a simpler alternative: Expectation Models. These models predict only the expected (average) next state and reward, offering a compact and deterministic approach that proves surprisingly robust in stochastic environments.
Theoretical Foundation: The Linearity Proof
A central contribution of this work is the theoretical justification for expectation models. The authors demonstrate that if a value function is linear with respect to its features ($v(s) \approx \phi^\top w$), the Bellman update using the expected next feature vector is mathematically equivalent to the update using the full outcome distribution. This "linearity loophole" suggests that for many practical applications, the complexity of full distribution modeling is unnecessary.
However, the authors clarify that while the value function should be linear, the expectation model itself often requires non-linear components (such as neural networks) to accurately capture complex environmental dynamics. A purely linear model might converge to an incorrect solution even in relatively simple Markov Decision Processes (MDPs). To get the right answer, the model predicting the next state usually needs to be non-linear, even if the value function it's helping to calculate is linear.
The Gradient Dyna Algorithm
To address the instability often encountered in off-policy planning—where the planning policy differs from the data-generating policy—the authors introduce Gradient Dyna. Standard planning updates like TD(0) are prone to divergence under the "deadly triad" of off-policy learning, function approximation, and bootstrapping.
Gradient Dyna mitigates this by optimizing a new objective: the Model-Based Mean Square Projected Bellman Error (MB-MSPBE). By utilizing a gradient-based approach to minimize this error, the algorithm ensures stable convergence even when planning with approximate models off-policy.
Experimental Results
The effectiveness of Gradient Dyna and expectation models was evaluated across several benchmark domains designed to test stability and accuracy: Baird’s Counterexample, Stochastic Four Rooms, and Stochastic Mountain Car.
Stability on Baird’s Counterexample
Baird’s Counterexample is a well-known environment where standard off-policy TD methods typically diverge. As shown in the results, standard TD(0) planning with both linear and non-linear models fails to converge, with error increasing rapidly. In contrast, Gradient Dyna remains perfectly stable, converging to a low-error solution.
Performance in Stochastic Environments
In the Stochastic Four Rooms and Stochastic Mountain Car domains, the authors tested the algorithm's ability to learn and plan online. Gradient Dyna converged to the same high-quality solutions as Off-policy LSTD, the computationally intensive gold standard for these tasks. Notably, the algorithm performed effectively even when the expectation model was learned simultaneously with the planning process, showing performance comparable to using a perfect sample model.
Conclusion and Future Work
This research validates the use of simple expectation models for planning in complex, stochastic worlds, provided the value function is linear. By introducing Gradient Dyna, the authors provide a stable, gradient-based framework for off-policy MBRL. While the core proof relies on linear value functions, the features themselves can be learned via non-linear representations. Future work may extend these principles from policy evaluation to full control tasks and explore methods to reduce the $O(m^2)$ computational complexity for high-dimensional feature spaces.
Summary updated