Shallow Updates for Deep Reinforcement Learning

Nir Levine, Tom Zahavy, Daniel J. Mankowitz, Aviv Tamar, Shie Mannor

Abstract

Deep reinforcement learning (DRL) methods such as the Deep Q-Network (DQN) have achieved state-of-the-art results in a variety of challenging, high-dimensional domains. This success is mainly attributed to the power of deep neural networks to learn rich domain representations for approximating the value function or policy. Batch reinforcement learning methods with linear representations, on the other hand, are more stable and require less hyper parameter tuning. Yet, substantial feature engineering is necessary to achieve good results. In this work we propose a hybrid approach -- the Least Squares Deep Q-Network (LS-DQN), which combines rich feature representations learned by a DRL algorithm with the stability of a linear least squares method. We do this by periodically re-training the last hidden layer of a DRL network with a batch least squares update. Key to our approach is a Bayesian regularization term for the least squares update, which prevents over-fitting to the more recent data. We tested LS-DQN on five Atari games and demonstrate significant improvement over vanilla DQN and Double-DQN. We also investigated the reasons for the superior performance of our method. Interestingly, we found that the performance improvement can be attributed to the large batch size used by the LS method when optimizing the last layer.

Introduction

Deep Reinforcement Learning (DRL) has revolutionized the field by enabling agents to learn complex representations directly from high-dimensional inputs, such as raw pixels. However, DRL methods often suffer from instability and sensitivity to hyperparameters, largely due to their reliance on Stochastic Gradient Descent (SGD). In contrast, "Shallow" Reinforcement Learning (SRL) methods—linear models utilizing least-squares updates—offer mathematical stability and data efficiency but require labor-intensive feature engineering. This research introduces the Least Squares Deep Q-Network (LS-DQN), a hybrid approach that leverages deep networks for feature extraction while employing stable linear methods to optimize the final decision-making layer.

The LS-DQN Framework

The LS-DQN architecture treats the penultimate layer of a deep network as a feature extractor and the final layer as a linear regressor. The training process alternates between standard DRL updates and periodic "shallow" updates. During a shallow update, the algorithm freezes the feature layers and passes a large batch of data (up to 1 million samples) from the Experience Replay through the network. The weights of the final layer are then recalculated using a batch least-squares method, such as Fitted Q-Iteration (FQI).

To ensure stability, the authors introduce Bayesian Regularization. By using the current DRL weights as a prior, the model avoids overfitting to recent data and manages the extreme sparsity inherent in ReLU-activated features. Additionally, state-dependent features are augmented into state-action features via zero-padding into a one-hot vector corresponding to the selected action.

Experimental Results

LS-DQN was evaluated on the Arcade Learning Environment (ALE) across five Atari 2600 games: Asterix, Space Invaders, Breakout, Qbert, and Bowling. The hybrid method consistently outperformed vanilla DQN and Double-DQN (DDQN). For instance, in Asterix, LS-DQN achieved a maximum score of 13,704, more than double the vanilla DQN score of 6,011.

Performance comparison on Asterix, Space Invaders, and Breakout over 50 million steps. LS-DQN variants (blue/red) show superior stability compared to the DQN baseline (green).

A critical observation was the mitigation of performance "crashes." In games like Asterix, standard DQN performance often collapses late in training. LS-DQN maintained high, steady scores, suggesting that periodic batch updates serve as a vital stability mechanism.

Analysis of Performance Drivers

Ablation studies revealed that the primary driver of LS-DQN's success is the ability to optimize over massive batch sizes. While standard SGD is limited to small mini-batches (e.g., 32), the least-squares update can process 1,000,000 samples simultaneously.

Impact of mini-batch (MB) size on performance improvement relative to baseline. Larger batch sizes (MB=4096) correlate with more consistent positive gains.

As shown in the analysis of batch sizes, increasing the volume of data processed during the shallow update significantly enhances performance stability and score delta relative to the baseline. Regularization remains mandatory in this context to handle feature sparsity and prevent ill-conditioned matrices.

Conclusion

LS-DQN successfully bridges the gap between the representational power of deep learning and the stability of classical batch methods. By optimizing the final layer with large-scale batch updates and Bayesian regularization, the method achieves state-of-the-art performance on Atari benchmarks without requiring additional data collection. Future work may explore extending this hybrid approach to Actor-Critic architectures and addressing the drift between evolving deep features and static shallow updates.

Summary updated

BibTeX
@inproceedings{levine2017shallow,
  author = {Nir Levine and Tom Zahavy and Daniel J. Mankowitz and Aviv Tamar and Shie Mannor},
  title = {{Shallow Updates for Deep Reinforcement Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2017},
  url = {https://openreview.net/forum?id=HJfc3D-dWB},
}
Figure