← Back to Reinforcement Learning Mind Map
🎮 Reinforcement LearningID: model-vs-model-free

Model-Based vs Model-Free

基于模型 vs 无模型 (MB vs MF)
🎯Core Definition
The two RL paradigms contrasted:
📌Overview
| Aspect | Model-Based | Model-Free | | --- | --- | --- | | Sample efficiency | High (imagined rollouts reuse data) | Low (needs vast real interaction) | | Model bias | Yes (a wrong model misleads the policy) | None (learns from real interaction) | | Policy expression | Planning is the policy; goals swap on the fly | Fixed policy; retrain for new goals | | Compute | Training + per-step planning cost | Cheap inference, low deployment cost | | Examples | Dyna, MPC, MuZero, Dreamer | DQN, PPO, SAC, GRPO |
📌Overview
Core risk — compounding error: with per-step model error ε\varepsilon (e.g. TV distance DTV(Pϕ,P∗)≤εD_{\mathrm{TV}}(P_\phi, P^*) \le \varepsilon), the cumulative error of an HH-step model rollout is O(H2ε)O(H^2 \varepsilon). Intuition: the error ε\varepsilon introduced at step kk is amplified ~H−kH-k times through the remaining value updates; summing over kk: ∑k=1Hε(H−k)=ε⋅H(H−1)2=O(H2ε)\sum_{k=1}^{H} \varepsilon (H-k) = \varepsilon \cdot \frac{H(H-1)}{2} = O(H^2 \varepsilon) — error grows quadratically with horizon.
💡Use Cases
a must-ask comparison in interviews (sample efficiency vs model bias); algorithm choice — pick MF when interaction is cheap/data is abundant (stable, simple), pick MB when interaction is expensive or the goal is reusable; offline RL often combines both (model-generated data + conservative Q constraints).
⚡Key Problems Solved
the two are complementary — MF is unbiased but sample-hungry, MB is efficient but biased; hybrid routes (Dyna-style replay, MBPO mixing model rollouts into the buffer, offline RL augmenting datasets with the model) get the best of both.
🎯Core Interview Exam Points
Fundamentals · Production Scenarios · Deep Dive
Core Def
Explain the core definition, underlying mechanism/math, and key principles of Model-Based vs Model-Free.
Use Cases
In production engineering, what are the primary use cases for Model-Based vs Model-Free and what core pain points does it solve?
🔥 High-Frequency Deep-Dive Questions
1
Core differences between model-based and model-free: sample efficiency, model bias, compute?
2
Derive the compounding error O(H²ε): give the intuition and the summation.
3
When to choose model-based vs model-free (interaction cost, goal variability, data scale)?
4
How to hybridize the two to mitigate each other's flaws (Dyna, MBPO, offline RL)?
5
How to quantify/detect model bias? How to plan robustly under model uncertainty?
Updated 2026-08-12
🎯
Verify Mastery: Practice Exam Questions for "Model-Based vs Model-Free"
Take pitfall multiple-choice questions with derivation options; mistakes are automatically logged.
🚀 Start Card Practice ➔
← Previous CardDreamer RSSM (Latent Imagination)Next Card →Embodied AI & Robotics

🔗 More Reinforcement Learning Knowledge Cards

引用出处: TalentMe 450+ 工业级 AI 架构考点知识库 (Tech Vault) · 遵循 CC-BY-4.0 知识共享协议
URL: https://talentme.airsota.com/resources/tech/roadmap/mindmap/RL/card/model-vs-model-free
中文速览与面试要点

基于模型 vs 无模型 (MB vs MF) (Model-Based vs Model-Free)

定义: 两大 RL 范式的对比: | 维度 | 基于模型 (Model-Based) | 无模型 (Model-Free) | | --- | --- | --- | | 样本效率 | 高(想象 rollout 复用数据) | 低(需海量真实交互) | | 模型偏差 | 有(学错的模型误导策略) | 无(直接从真实交互学习) | | 策略表达 | 规划即策略,可即席换目标 | 策略固定,换目标需重训 | | 计算开销 | 训练 + 每步规划开销大 | 推理便宜,上线开销小 | | 代表算法 | Dyna, MPC, MuZero, Dreamer | DQN, PPO, SAC, GRPO | 核心风险—复合误差 (compounding error): 设模型与真实转移的每步误差 (如 TV 距离 D_ TV(P_ , P^*) ),则模型 rollout H 步后的累积误差为 O(H^2 )。直觉推导:第 k 步引入的误差 会沿后续价值更新被放大 O(H-k) 倍,对 k 求和: _k=1^H (H-k) = H(H-1)2 = O(H^2 )——步数越长,误差二次方增长。 使用场景: 面试必考对比题(样本效率 vs 模型偏差);算法选型:交互免费/数据充足选 MF(稳定、简单),交互昂贵或目标可复用选 MB;离线 RL 中常把两者结合(模型生成数据 + 保守 Q 约束)。 解决的问题: 两者互补——MF 无偏但样本贵,MB 高效但有模型偏差;混合路线(Dyna 式回放、MBPO 把模型 rollout 混入 buffer、离线 RL 用模型扩充数据集)取长补短。

核心要点

  • 基于模型与无模型在样本效率、模型偏差、计算开销上的核心差异?
  • 推导复合误差 O(H²ε):给出直觉与求和过程。
  • 什么时候选基于模型,什么时候选无模型?(交互成本、目标可变性、数据规模)
  • 如何混合两者缓解各自缺点?(Dyna、MBPO、离线 RL 的具体做法)
  • 模型偏差如何量化/检测?规划时如何对模型不确定性保持鲁棒?