4
$\begingroup$

I wonder if there is useful metrics or methodologies for avoiding/monitoring overfitting in reinforcement learning.

For example, in a typical supervised learning, we have the observation that as we adopt more features, the training error goes down while the validation error goes down the up, and we consider the model with lowest validation error as an optimal model with good generalization performance. On the other hand, I have never seen such studies for reinforcement learning, as people usually train and test on the same environment. However, for a stochastic environment the algorithm can still overfit to the noisy observed states and rewards. How should I avoid such overfitting in reinforcement learning?

$\endgroup$

1 Answer 1

3
$\begingroup$

Overfitting, and generalization, are quite different in reinforcement learning than in supervised learning. There's perhaps a joke to be made that statisticians fit to the training set, machine learning people fit to the test set and reinforcement learning people overfit to the test set. However, this is not quite fair.

In RL, you are trying to approximate the solution to a Markov Decision Process (MDP). When you are doing this with a simulator, you have as much interaction with it as you would like - you can always collect more data. Then, how do you delineate between a "training" and "testing" phase? Furthermore, why would you at all? I would argue that with a simulator, you shouldn't care about the difference between "training" and "testing" because you can evaluate your model through policy evaluation - a central topic in RL.

The story is slightly different in two situations: when you want to learn over a class of MDPs or when you are using RL "in the real world" (read: without a simulator). In the first case, this is an instance of transfer learning. You want to take a policy in one MDP and have it generalize to another MDP. There is current work on this (https://arxiv.org/pdf/1812.02868.pdf, https://arxiv.org/pdf/1810.12282.pdf, https://arxiv.org/pdf/1812.02341.pdf and many others). In the second case, you can do policy evaluation on a hold out set of data similar to supervised learning (see work done by Emma Brunskill on this).

One last note on the subtleties of testing in supervised vs reinforcement learning. It's not quite fair to fix an RL agent and evaluate it. This gives an advantage to supervised learning approaches, since they are optimized to succeed in this fix-and-evaluate regmine. RL places fundamental importance on online learning, and so an RL agent should be evaluated in an online learning regime.

$\endgroup$
2
  • $\begingroup$ Thanks for the nice answer and the references! From your answer, my understanding is one way to do this for limited data is to use a hold out set of data to evaluate it the average reward the agent collects from it. $\endgroup$
    – DiveIntoML
    Commented Feb 27, 2020 at 21:30
  • $\begingroup$ Yes, that is what you would do at a high level. If you have limited data but no simulator, then you need to do policy evaluation on a hold-out set. However, this is now an off-policy problem since the policy that you are evaluating did not generate your data. In the literature, this is known as off-policy policy-evaluation or off-policy prediction. See, for example: proceedings.mlr.press/v48/thomasa16.pdf $\endgroup$
    – Alex L
    Commented Feb 28, 2020 at 2:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.