We can study the sample complexity of โ๏ธ Reinforcement Learning algorithms, specifically for a simplified setting that ignores exploration (which would introduce another layer of design and complexity): assume for every
As a representative example, we'll study model-based RL, which will build a model
- How accurate is the value estimate? With some conditions,
- How accurate is the value estimate for an optimal policy? With some conditions,
- How good is the resulting policy? With some conditions,
Concentration Inequalities
First, we need a bound on how close a learned function is to the true function, in terms of the number of samples. We'll use Hoeffding's inequality, which states that for a sequence of samples
If we want this probability to be
Note that this inequality is for counts, and for probabilities there is a similar bound
with probability
Model-Based RL
Next, we'll relate the error in
since
Simulation Lemma
With the equation above and some algebraic manipulation, we arrive at the simulation lemma, which relates the value error as
Intuitively, this is saying that the value error is itself like a Q-function (with the gamma inverse part like above) on reward
We also need another lemma that describes the impact of the above evaluation operator
This says that the largest possible value is the largest reward
Conclusion
Putting everything together, we substitute
for all 3 questions at the top. Note this assumes the largest reward is
The main takeaway is that error scales with
Model-Free RL
We can extend this analysis to model-free RL, specifically ๐ Value Iteration > Fitted Q-Iteration. The algorithm can be expressed as
where
Like above, our key question is how good our estimated Q-function can get,
as a result of error from
Sampling Error
The sampling error comes from
where the two terms come from error in the sample estimate of reward
Approximation Error
The approximation error comes from
Ignoring the sampling error for now (so using
This is a recursive relationship from
This essentially says that error
Conclusion
Putting these two errors together, we essentially see that the sampling error goes into the recursive relation of the approximation error, and thus in total grows with the quadratic horizon