Introduction
Deep Reinforcement Learning (DRL) algorithms, such as the Deep Q-Network (DQN), have revolutionized the field by learning complex feature representations directly from raw inputs like pixels. However, DRL relies heavily on Stochastic Gradient Descent (SGD), which typically uses small batches of data and can suffer from instability, hyperparameter sensitivity, and sample inefficiency.
Conversely, "Shallow" Reinforcement Learning (SRL) methods—like Least Squares Temporal Difference (LSTD)—are celebrated for their stability and data efficiency. They utilize batch least-squares to find optimal solutions for linear models, but they require high-quality, hand-engineered features to function well.
This paper asks a fundamental question: Can we combine the feature-learning power of DRL with the stability of classical SRL? The authors introduce LS-DQN, a hybrid algorithm that uses a deep network to learn features and stable, batch-based shallow methods to optimize the final linear layer of that network.
Methodology: The LS-DQN Algorithm
The core idea behind the Least Squares Deep Q-Network (LS-DQN) is to treat the penultimate layer of a deep neural network as a feature extractor and the final layer as a linear regressor. The training process is divided into two alternating phases:
- Standard DRL Phase: The network is trained conventionally using DQN (or Double-DQN) for a set number of steps (e.g., 500,000).
- LS-UPDATE Phase: Periodically, the training "pauses" to refine the last layer. A massive batch of data (up to 1 million samples) is pulled from the Experience Replay buffer. The algorithm performs a forward pass to generate features for these samples using the current, frozen deep layers. The weights of the final layer are then recalculated using a Bayesian Least Squares update.
A critical innovation in this process is Bayesian Regularization. Naive least-squares updates can easily overfit to the current batch or "forget" older knowledge. By using the weights learned during the DRL phase as a "prior" in the least-squares calculation, the update stays grounded in the agent's accumulated experience while fully benefiting from large-batch optimization.
Key Insights and Architecture Advantages
Several architectural realities make this hybrid approach highly effective:
- The Last Layer is Linear: In most DRL architectures, the final layer is a simple fully connected linear layer. This makes it a perfect candidate for classical linear methods like Fitted Q-Iteration (FQI) or LSTD.
- Sparsity Requires Regularization: Because deep networks often use ReLU activations, the features they produce are highly sparse (for instance, in Breakout, 96% of features were found to be zero). This sparsity makes the matrices in least-squares "ill-conditioned." The Bayesian prior acts as a necessary stabilizer to prevent the underlying math from breaking down.
- The "Large Batch" Advantage: Through ablative analysis, the authors discovered that the performance boost wasn't solely due to the least-squares math itself. Rather, it was the ability of least-squares to efficiently process massive batches of data at once—something SGD struggles to do without becoming unstable.
Experimental Results
The algorithm was rigorously evaluated using the Arcade Learning Environment (ALE) across five Atari 2600 games: Asterix, Space Invaders, Breakout, Q-Bert, and Bowling. These environments represent a diverse set of challenges ranging from high-speed reaction times to complex movement patterns.
Overall, LS-DQN and LS-DDQN consistently outperformed vanilla DQN and Double-DQN across the tested games. For example, in Space Invaders, LS-DDQN reached a score of ~4400 compared to ~3154 for vanilla DDQN. Furthermore, the hybrid approach achieved these superior results using the same amount of data as the baseline models, proving its enhanced sample efficiency.
One of the most notable results was the algorithm's stability in Asterix. Vanilla DQN is notoriously known to "crash" in Asterix, where performance suddenly drops to zero mid-training. While LS-DQN didn't perfectly eliminate all variance, it was significantly more resilient, avoiding the catastrophic crashes seen in the baseline and maintaining much higher average scores over tens of millions of steps.
Limitations and Future Work
While highly effective, the LS-DQN approach does come with computational trade-offs. Performing a forward pass on 1 million samples to generate features during the periodic LS-UPDATE is computationally expensive, though the authors note this process is easily parallelizable.
Additionally, the method assumes the features learned by the deep layers are "good enough" for the linear update. If the features are still experiencing rapid "drift" (changing significantly), the least-squares update might be less effective. Exploring how to synchronize feature learning with the LS update more tightly remains an open area of research.
Finally, while this paper focuses on value-based methods (Q-learning), the authors suggest that this "shallow update" logic could be naturally extended to Actor-Critic methods, where both the policy (actor) and value function (critic) could benefit from periodic least-squares refinement.
Summary updated