Efficient Deep Reinforcement Learning Requires Regulating Overfitting

Qiyang Li, Aviral Kumar, Ilya Kostrikov, Sergey Levine · DOI

Abstract

While off-policy reinforcement learning (RL) theoretically allows for high sample efficiency through multiple updates per data point (a high Update-to-Data ratio), increasing this ratio often leads to catastrophic performance collapse. This paper identifies overfitting—specifically a high gap between training and validation temporal-difference (TD) error—as the primary driver of this failure. We introduce AVTD (Automatic model selection using Validation TD error), a method that maintains an ensemble of agents with diverse regularization strategies and dynamically selects the best-performing one based on validation set performance. AVTD consistently matches or exceeds the performance of the best task-specific regularizers across DeepMind Control Suite and OpenAI Gym benchmarks, providing a robust framework for sample-efficient deep RL.

Introduction

Sample efficiency is a central goal in deep reinforcement learning. Off-policy algorithms like Soft Actor-Critic (SAC) are designed to reuse data, suggesting that a high Update-to-Data (UTD) ratio should accelerate learning. However, empirical results show that simply increasing the UTD ratio often results in instability. Previous research attributed this to Q-value overestimation, non-stationarity, or distribution shift. This work argues that these factors are secondary to a more fundamental issue: the Q-network overfitting the replay buffer.

Identifying the Bottleneck

To isolate the cause of failure, the authors utilized a "detective work" approach involving offline shuffled streaming. By replaying logged data in a shuffled manner, they removed non-stationarity and data collection bias as potential variables.

The results revealed that even under these idealized conditions, high UTD ratios led to a massive divergence between training TD error and validation TD error on held-out data. This confirmed that the Q-network was failing to generalize beyond its immediate training samples. The researchers concluded that high validation TD error is the primary indicator of performance collapse at high UTD ratios.

The AVTD Algorithm

The proposed solution, AVTD (Automatic model selection using Validation TD error), treats regularization selection as an online optimization problem through the following mechanism:

  1. Ensemble of Experts: Multiple RL agents are trained in parallel on a shared replay buffer. Each agent utilizes a different regularization technique, such as Weight Decay, Dropout, or LayerNorm.
  2. Shared Replay Buffer: By having all agents learn from the same data, the algorithm ensures that the "active" agent (the one currently picking actions) doesn't confound the evaluation of the others.
  3. Validation-Based Selection: A small set of transitions is held out as a validation set. At each environment step, the algorithm calculates the TD error for each agent on this validation set. It then selects the agent with the lowest validation error to perform the next action in the environment.

Experimental Evaluation

The researchers evaluated AVTD on two major benchmarks: the DeepMind Control Suite (DMC) and OpenAI Gym (MuJoCo).

Key Insights

  • Overfitting is the Real Bottleneck: Validation TD error is a much more robust indicator of agent failure than Q-value overestimation (Q-gap).
  • No "One Size Fits All" Regularizer: Different tasks require different regularization strategies. For example, Weight Decay is highly effective on DMC tasks but performs poorly on Gym tasks, while Dropout (as used in DroQ) shows the opposite trend.
  • The Training Error Trap: Selecting an agent based on the lowest training TD error is counterproductive; it typically selects the agent that has overfitted the most, leading to disastrous performance.

Results

AVTD consistently matched or outperformed the best individual regularization strategy across 13 different tasks. In a comparison of average performance rank across seven DMC tasks, AVTD achieved a rank of 1.60, significantly outperforming standard SAC and fixed regularizers. The method effectively "closes the gap" between naive RL and an "Oracle" that knows the optimal regularizer for each task in advance.

Limitations and Future Work

The primary drawback of AVTD is computational overhead, as it requires training multiple agents in parallel. While this does not increase sample complexity, it does increase hardware requirements. Additionally, the authors noted that validation TD error does not correlate perfectly with performance in every scenario (e.g., the acrobot-swingup task), suggesting that further metrics may be necessary for a complete understanding of RL stability. Future work may focus on optimizing validation TD error directly within a single agent to reduce computational costs.

Conclusion

This research demonstrates that regulating overfitting is essential for achieving high sample efficiency in deep reinforcement learning. By using validation TD error as a selection criterion, AVTD provides a practical, automated path toward more robust agents that can handle high Update-to-Data ratios across diverse environments.

Summary updated

BibTeX
@inproceedings{li2023efficient,
  author = {Qiyang Li and Aviral Kumar and Ilya Kostrikov and Sergey Levine},
  title = {{Efficient Deep Reinforcement Learning Requires Regulating Overfitting}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=14-kr46GvP-},
}
Figure