Abstract: We propose and theoretically analyze an approach for planning with an approximate model in reinforcement learning that can reduce the adverse impact of model error. If the model is accurate enough, it accelerates the convergence to the true value function too. One of its key components is the MaxEnt Model Correction (MoCo) procedure that corrects the model's next-state distributions based on a Maximum Entropy density estimation formulation. Based on MoCo, we introduce the Model Correcting Value Iteration (MoCoVI) algorithm, and its sampled-based variant MoCoDyna. We show that MoCoVI and MoCoDyna's convergence can be much faster than the conventional model-free algorithms. Unlike traditional model-based algorithms, MoCoVI and MoCoDyna effectively utilize an approximate model and still converge to the correct value function.
Introduction
Reinforcement Learning (RL) agents typically navigate a trade-off between two paradigms: model-free learning and model-based reinforcement learning (MBRL). Model-free methods learn purely through trial and error, which ensures accuracy but suffers from extreme sample inefficiency. Conversely, MBRL utilizes a learned "world model" or simulator to plan behaviors, which is significantly faster but highly susceptible to "model exploitation." In model exploitation, even minor inaccuracies in the world model can lead an agent to learn sub-optimal or even catastrophic behaviors.
Since learning a perfect world model is often impossible in complex, high-dimensional environments, this research addresses the fundamental problem of model error. Rather than attempting to learn a perfect model from scratch, we propose taking a "cheap," potentially inaccurate model and using a limited number of real-world queries to correct it just enough for effective planning.
The MaxEnt Model Correction (MoCo) Framework
The core of this approach is the MaxEnt Model Correction (MoCo) procedure. MoCo is grounded in the Maximum Entropy principle: given an approximate model (acting as a "prior") and new constraints derived from real-world observations, MoCo identifies a new distribution. This distribution is as close as possible to the approximate model (minimizing KL-divergence) while strictly satisfying the real-world constraints.
These constraints are defined by the expectations of specific basis functions ($\phi$). By querying the real environment, the agent determines the average value of these functions in the next state. This allows the agent to "fix" the model's predictions along the dimensions that matter most for the current task.
Algorithms: MoCoVI and MoCoDyna
Building on the MoCo procedure, we introduce two primary algorithms:
- MoCoVI (Model Correcting Value Iteration): This planning algorithm integrates MoCo at each step of the Value Iteration process. A key innovation in MoCoVI is using its own previous value functions as the basis functions for the next correction. Since the value function captures the essential dynamics of the task, making the model consistent with the value function's expectations is highly effective for planning.
- MoCoDyna: A sample-based variant designed for practical RL settings where transition dynamics are not known upfront. It utilizes stochastic approximation to estimate the necessary expectations from environment interactions. To handle noisy real-world data, MoCoDyna incorporates $\ell_2$ regularization into the dual optimization problem, preventing the correction from over-fitting to noisy queries.
Experimental Evaluation
The framework was evaluated using a 6x6 Gridworld environment featuring "cliffs"—states associated with high negative rewards. To test robustness, we intentionally introduced three levels of model error (Low, Medium, and High) by smoothing the true dynamics with uniform noise. MoCo was benchmarked against standard Value Iteration (VI), pure Model-Based RL, Q-Learning, Dyna, and OS-VI.
Key Results
- Robustness to Error: MoCoVI successfully converged to the true optimal value function even under "High" error scenarios where the initial model was essentially uniform noise.
- Superior Performance: In RL settings, MoCoDyna significantly outperformed Q-Learning and standard Dyna. While standard Dyna failed completely under high model error, MoCoDyna remained stable.
- Sample Efficiency: MoCo algorithms reached near-optimal performance with significantly fewer environment samples than their model-free counterparts.
- MLE Improvement: Theoretically and empirically, the MoCo procedure reduces the Maximum Likelihood Estimation (MLE) loss of the model, effectively improving the model's quality as a byproduct of the planning process.
Discussion and Insights
One of the most significant theoretical findings is that MoCoVI can break the standard convergence limit. In traditional Value Iteration, speed is limited by the discount factor $\gamma$. However, MoCoVI can converge faster because the approximate model provides a "head start" that the correction process refines.
Furthermore, the principle of "lazy correction" suggests that an agent does not need to fix the entire world model. It only needs the model to be accurate regarding the features (basis functions) that are relevant to the current value function. Because MoCo uses the Maximum Entropy principle, it makes the fewest possible assumptions when adjusting the model, preserving the model's original knowledge while incorporating new corrections.
Conclusion
Maximum Entropy Model Correction provides a robust framework for utilizing imperfect models in RL. While the current experiments focused on discrete environments, the underlying theory supports continuous spaces. Future work will focus on scaling these methods to Deep RL by managing the computational costs of dual optimization and exploring automated feature engineering for basis functions in high-dimensional tasks.
Summary updated