Seyed Masoud Hosseini · Overview · Study log · Weekly summaries · Ideas · Search · Transcript · RSS feed
Deep Reinforcement Learning · Lecture 82 of 99 · 23:50
Lecture 20: Inverse Reinforcement Learning, Part 1
Study guide
What this lecture covers
Every reinforcement learning method covered so far has assumed a reward function is handed to the agent. This lecture asks what to do when a good reward function is hard to write by hand but demonstrations of good behavior are available, and introduces inverse reinforcement learning (IRL) as the problem of recovering a reward function from those demonstrations. It sits at the start of a two-lecture block that connects the control-as-inference framework from the previous lecture to concrete IRL algorithms.
After watching, you can state the IRL problem formally, explain why it is inherently underspecified, and describe the classic feature-matching and maximum-margin approaches along with their main limitations.
Key ideas
- Inverse RL problem: given trajectories sampled from an (assumed) optimal policy, learn a reward function
r_psithat explains them, rather than learning a policy from a known reward. - Imitation vs. intent: humans imitating others copy the perceived intent behind an action, not the exact motions, which motivates recovering a reward rather than just cloning actions.
- Reward ambiguity: for any observed behavior there are infinitely many reward functions that would make that behavior optimal, so IRL needs extra assumptions to disambiguate.
- Linear and neural reward parametrizations: classic IRL uses a reward that is a weighted combination of features (
psi^T f); modern deep IRL replaces this with a neural network mapping states and actions to a scalar reward. - Feature matching: an early disambiguation strategy that picks a reward whose optimal policy has the same expected feature values as the expert, though multiple reward vectors can still satisfy this.
- Maximum margin principle: borrowed from SVMs, it picks the reward that makes the expert's policy better than all others by the largest possible margin, weighted by how different a policy is from the expert's.
- Shortcomings of margin-based IRL: the margin criterion is a heuristic with no explicit model of expert sub-optimality, and it leads to a messy constrained optimization that does not scale well to neural network rewards.
Walkthrough
Motivation and human behavior as optimal decision-making (1:00)
The lecture opens by framing IRL as the problem of learning a reward function instead of a policy. It connects this to a long tradition in psychology and neuroscience of explaining human motion and decision-making through models of optimal or near-optimal behavior, noting that a soft (stochastic) model of optimality fits human behavior better than a strictly deterministic one.
Practical motivations: imitation learning and RL perspectives (4:02)
Two justifications are given for learning rewards. From imitation learning, copying an expert's intent rather than their exact actions produces more natural generalization, illustrated with a psychology experiment where a child infers an experimenter's goal rather than mimicking a failed attempt literally. From an RL perspective, some tasks (games with a visible score) have obvious rewards, but others, such as autonomous driving, balance many competing factors that are far easier to demonstrate than to write down as an equation.
Defining IRL and why it is ambiguous (8:13)
Using a simple grid-world example, the lecture shows that many different reward functions, from "reward for reaching one square" to "reward negative infinity for any action outside the demonstration," can all explain the same short trajectory equally well. This motivates a formal side-by-side definition of forward RL (given a reward, learn pi*) versus inverse RL (given trajectories from pi*, learn the reward), along with linear and neural reward parametrizations.
Feature matching and the maximum margin principle (13:18)
The lecture surveys pre-deep-learning IRL methods. Feature matching picks a reward so the learned policy's expected features match the expert's, but remains ambiguous. The maximum margin principle, borrowed from SVMs, resolves this by maximizing the gap between the expert's policy value and all others, weighted by a divergence measure between policies. The lecture closes by naming the formulation's core weaknesses: the margin is a heuristic without a real model of expert sub-optimality, and the resulting constrained optimization does not extend cleanly to neural network reward functions, setting up the probabilistic approach covered next.
Before you watch
- Review the control-as-inference and soft optimality material from the previous lecture, since this lecture reuses that graphical model to define IRL probabilistically.
- Be comfortable with the basic idea of a linear reward as a weighted sum of features.
Check your understanding
- Why is inverse reinforcement learning described as an underspecified problem?
- How does copying an expert's intent differ from standard behavioral cloning?
- What does the maximum margin principle add on top of simple feature matching?
- What are the two main shortcomings of margin-based IRL methods mentioned at the end of the lecture?
Vocabulary
- inverse reinforcement learning (noun)
- The problem of learning a reward function from examples of good behavior.
Inverse reinforcement learning recovers a reward from expert demonstrations. - demonstration (noun)
- An example of a task being performed well, used for learning.
The reward is learned from expert demonstrations. - underspecified (adjective)
- Not defined precisely enough to have a single correct answer.
The IRL problem is underspecified because many rewards fit the data. - imitation (noun)
- The act of copying someone else's behavior.
Imitation of an expert can copy exact motions or their intent. - intent (noun)
- The underlying goal or purpose behind an action.
Copying intent works better than copying exact motions. - ambiguity (noun)
- The state of having more than one possible meaning or solution.
Reward ambiguity means many rewards explain the same behavior. - parametrization (noun)
- A specific way of representing something using a set of adjustable numbers.
Classic IRL uses a linear reward parametrization. - feature (noun)
- A measurable property of a state or action used as input to a model.
The reward is a weighted combination of features. - feature matching (noun)
- A method that picks a reward so the resulting policy has the same average features as the expert.
Feature matching leaves some ambiguity between reward vectors. - maximum margin (noun)
- A principle that picks the solution making the correct answer as clearly better as possible.
The maximum margin principle is borrowed from SVMs. - heuristic (noun)
- A practical shortcut rule that usually works well but is not fully justified.
The margin criterion is a heuristic with no model of sub-optimality. - constrained optimization (noun)
- A search for the best solution while satisfying certain fixed conditions.
Margin-based IRL leads to a messy constrained optimization. - scale (verb)
- To keep working well as the size of the problem grows much larger.
This approach does not scale well to neural network rewards. - sub-optimality (noun)
- The degree to which behavior falls short of being the best possible.
The method has no explicit model of expert sub-optimality. - recover (verb)
- To find or reconstruct something that was not directly given.
IRL aims to recover a reward function from demonstrations. - disambiguate (verb)
- To remove confusion by identifying a single correct answer.
Extra assumptions are needed to disambiguate between reward functions. - generalization (noun)
- The ability to perform well on new, unseen situations.
Copying intent produces more natural generalization than copying motions. - mimic (verb)
- To copy someone's actions closely.
A child does not simply mimic a failed attempt. - criterion (noun)
- A standard used to judge or decide something.
The margin criterion picks a reward that best separates the expert's policy. - divergence (noun)
- A measure of how different two things are from each other.
The margin is weighted by a divergence measure between policies. - cloning (noun)
- Directly copying observed behavior without understanding its purpose.
Behavioral cloning differs from recovering the expert's underlying intent. - borrow (verb)
- To take and use an idea from another field or method.
The maximum margin principle is borrowed from SVMs. - near-optimal (adjective)
- Close to the best possible, but not necessarily perfect.
Human behavior is modeled as near-optimal decision-making. - probabilistic (adjective)
- Involving or based on probability rather than certainty.
The next lecture introduces a probabilistic approach to IRL. - justify (verb)
- To give a good reason for something.
Two practical reasons justify learning a reward instead of a policy. - cleanly (adverb)
- In a simple, tidy way without complications.
The constrained optimization does not extend cleanly to neural rewards.
Chapters
- 0:00 Introduction to IRL
- 0:26 Goals and Motivation
- 1:29 Optimal Control for Behavior
- 3:47 Imitation Learning Perspective
- 6:19 RL Perspective on Rewards
- 7:35 Defining the IRL Problem
- 10:34 Formalizing the Problem
- 13:40 Feature Matching Methods
- 15:58 Maximum Margin Principle
- 19:42 Limitations of Classic IRL
- 22:00 Probabilistic IRL Model
← Lecture 19: Control as Inference, Part 5 · Lecture 20: Inverse Reinforcement Learning, Part 2 →
