Key Moments

Stanford AA203 Optimal and Learning-Based Control | Spring 2026 | Lecture 19: Model-Based RL

Stanford OnlineStanford Online
Education4 min read82 min video
Aug 13, 2026|519 views|10
Save to Pod

Want to know something specific about what's covered?

We've already dissected every moment. Ask and we will deliver (with timestamps).

TL;DR

Model-based RL, while promising for sample efficiency, struggles with complex dynamics and model uncertainty. New methods use uncertainty quantification and ensembles to mitigate these issues, but model-free approaches like PPO remain more mature for continuous control.

Key Insights

1

Model-based RL requires learning a dynamics model, which can be challenging for complex, non-linear systems and high-capacity models like neural networks, leading to extrapolation errors.

2

Trust Region Policy Optimization (TRPO) introduced a constrained optimization problem using KL divergence to keep policy updates within a 'trust region', but its implementation with conjugate gradient methods was complex.

3

Proximal Policy Optimization (PPO) simplifies TRPO by using a clipped surrogate objective function to empirically approximate the behavior of the constraint, making it more practical and popular.

4

Uncertainty quantification in model-based RL aims to estimate how certain a learned model is about its predictions, allowing for better planning by reasoning about expected rewards under model uncertainty.

5

Gaussian Processes offer data-efficient uncertainty estimation by providing a distribution over functions, but their scalability to high-dimensional data is a challenge.

6

Bootstrap ensembles train multiple models independently to capture uncertainty, with agreement indicating certainty and disagreement signaling uncertainty, providing an empirical approximation of the posterior distribution over model parameters.

The challenge of learning dynamics models

Model-based reinforcement learning (MBRL) fundamentally relies on learning a model of the environment's dynamics, which predicts the next state given the current state and action. This learned model can then be used with optimal control techniques. However, fitting accurate models for complex, non-linear dynamics, especially with high-capacity models like neural networks, is difficult. A key issue is extrapolation – when the learned model is used for planning, it may encounter states outside the distribution of the training data, leading to poor generalization and potentially exploiting errors in the model's predictions in favorable directions.

From TRPO to PPO: refining policy optimization

The lecture first revisits model-free RL, introducing Trust Region Policy Optimization (TRPO) and Proximal Policy Optimization (PPO). TRPO aimed to solve reinforcement learning as a numerical optimization problem by defining a surrogate objective and adding a constraint on the KL divergence between old and new policies to ensure updates stayed within a 'trust region'. While successful, TRPO's reliance on second-order optimization methods like conjugate gradient made it complex to implement and less effective with deep neural networks. PPO emerged as a simplification, aiming to achieve similar stability without the complex optimization. It introduces a clipped surrogate objective function that constrains the policy update ratio, effectively limiting how much the policy can change in a single step and providing a more practical and widely adopted approach for policy optimization in reinforcement learning.

The role of uncertainty quantification in model-based RL

A central theme in MBRL is dealing with the uncertainty inherent in learned models. When a model is used for planning, uncertainty quantification helps in understanding the model's confidence in its predictions. Instead of a single point estimate for the next state, a model that outputs a distribution allows planners to reason about expected outcomes and potential risks. For example, when planning trajectories near a cliff, a model with high uncertainty about its terminal state might correctly identify a safer path than one that is confidently, but incorrectly, predicting a safe landing.

Modeling uncertainty: Gaussian processes and ensembles

Two primary approaches for modeling uncertainty are Gaussian Processes (GPs) and bootstrap ensembles. GPs provide a distribution over functions, offering data efficiency and analytical posterior expressions, making them strong for low-data regimes. However, they can be computationally intensive for high-dimensional data. Ensembles, on the other hand, train multiple models independently. Disagreement among ensemble members signals uncertainty, while agreement suggests confidence. By averaging predictions from these models, ensembles offer an empirical way to approximate the uncertainty in predictions, particularly effective at capturing multiple modes in the posterior distribution of model parameters.

Integrating learned models with planning

To leverage learned models with uncertainty estimates, strategies like sampling model parameters from the posterior distribution are used. For a given action sequence, the model can be propagated multiple times using different sampled parameter sets, generating various predicted futures and their associated rewards. Averaging these rewards provides an estimate of the expected reward under model uncertainty. This approach is exemplified by algorithms like PETS (Probabilistic Ensembles with Trajectory Sampling), which uses an ensemble of neural networks for the dynamics model and a model predictive control (MPC) framework with a cross-entropy method to plan actions in a receding-horizon fashion. This often leads to greater sample efficiency compared to model-free methods.

Model-based vs. model-free: a pragmatic view

While model-based RL shows promise, particularly in sample efficiency, model-free methods like PPO and Soft Actor-Critic are currently more mature and widely adopted, especially for continuous control tasks. The choice often depends on the specific application and the complexity of the dynamics. Model-free algorithms are generally more robust and easier to implement, whereas model-based methods require careful handling of model learning and uncertainty.

Hierarchical decision-making in autonomy

Autonomous systems often employ a hierarchical decision-making structure. This typically starts with a high-level goal (e.g., changing lanes), often handled by dynamic programming-like methods to account for stochasticity. This goal is then translated into a fine-grained trajectory using open-loop planning, which may use lower-fidelity models. Model Predictive Control (MPC) is used for tracking this trajectory, incorporating more detailed system dynamics and safety constraints. Finally, low-level controllers (like PID) actuate the system. Learning-based and end-to-end approaches are increasingly being integrated into this hierarchy, often carving out space between open-loop planning and trajectory tracking.

Common Questions

Model-free RL learns policies or value functions directly from experience without explicitly modeling the environment's dynamics. Model-based RL first learns a model of the environment's dynamics and then uses this model for planning or control.

Topics

Mentioned in this video

More from Stanford Online

View all 135 summaries

Ask anything from this episode.

Save it, chat with it, and connect it to Claude or ChatGPT. Get cited answers from the actual content — and build your own knowledge base of every podcast and video you care about.

Get Started Free