It is mentioned by Fu 2019 that overfitting might have a negative effect on training DQN. They showed that with either early stopping or experience replay this effect could be reduced. The first is reducing overfitting, the latter is increasing data.
It doesn't only have negative effects on the returns though, my test shows that it has a negative effect on value errors as well (diff. between predict V and ground truth V). I observed frequently with limited data that the training diverged almost 100% of the time (on small nets). Since increasing the amount of data could reduce the chance of divergence, I think this is an effect from overfitting.
Overfitting should mean low training loss, however, my observation is that there is a strong correlation between TD loss and value error. That is if I see a jump in TD loss, I could expect to see a jump in value error around that moment.
Or it is not overfitting because it is not really fit (i.e. high loss) but over-optimization that is for sure.
Now the question is why?
There are two points:
- If it is overfitting, overfitting should have a positive effect because remembering values for all training states correctly is hardly a bad thing. (In fact, my training data is a superset of my testing data, so remembering should be fine.)
- If it doesn't fit, this begs a question what over-optimization really does. It doesn't seem to fit, but it does have a negative effect. How could that be?