StaQ it! Growing neural networks for Policy Mirror Descent

Alena Shilova, Alex Davey, Brahim Driss, Riad Akrour · DOI

Abstract

Policy Mirror Descent (PMD) offers strong theoretical convergence guarantees in reinforcement learning but is difficult to implement in deep RL due to its requirement for infinite memory of past Q-functions. We present StaQ, a practical algorithm that approximates PMD using a finite "stack" of neural networks. By employing a novel weight-correction scheme and parallel computation, StaQ achieves the stability of PMD with manageable computational overhead. Our results across MuJoCo and MinAtar benchmarks demonstrate that StaQ provides smoother learning curves and superior performance compared to state-of-the-art baselines, nearly doubling performance in complex tasks like Humanoid.

Introduction

In reinforcement learning (RL), maintaining steady policy improvement without performance collapses or wild oscillations remains a significant challenge. Policy Mirror Descent (PMD) provides a robust theoretical framework to address this by regularizing policy updates, ensuring the new policy does not deviate excessively from its predecessors. However, a perfect PMD update requires a weighted sum of every Q-function calculated since the start of training. In the context of Deep RL, where Q-functions are represented by large neural networks, storing an infinite history is computationally infeasible.

Existing methods like TRPO or PPO attempt to approximate these updates but often sacrifice theoretical convergence guarantees or introduce new instabilities. This paper introduces StaQ, which asks: Can we capture the benefits of PMD using only a small, finite window of history?

Methodology

StaQ implements a "finite-memory" version of PMD through several key innovations:

The Stacked Neural Network (SNN)

Instead of a single evolving policy network, the agent maintains a "stack" of the last $M$ frozen Q-function networks. The policy is derived directly from this ensemble. This architecture sidesteps the "moving target" problem common in RL; the policy only changes discretely when a new, fully-trained Q-function is added to the stack.

The StaQ architecture: A single neural network (NN) learns the Q-function, which is then added to a 'stack' of frozen networks (SNN) to form the policy.

Weight Correction and Optimization-Free Updates

Truncating history to $M$ steps typically introduces residual errors that prevent convergence to the optimal policy. StaQ introduces a weight-correction scheme that rescales the importance of stored networks. Mathematically, the authors prove that with this correction, the algorithm converges to the optimal policy provided $M$ is sufficiently large (e.g., $M=300$ for a discount factor of $\gamma=0.99$).

Unlike PPO or SAC, StaQ’s policy update is "instant." Once a new Q-network is trained and frozen, it is pushed onto the stack while the oldest network is removed. This eliminates the need for gradient descent during the policy update phase.

Computational Efficiency

To mitigate the overhead of evaluating $M$ networks, StaQ utilizes GPU batching to process the entire stack in parallel. This allows the algorithm to maintain training times comparable to standard methods even with hundreds of networks in the stack.

Experimental Results

The researchers evaluated StaQ across 14 environments, including MuJoCo (discrete variants), MinAtar, and Gymnasium benchmarks.

  • Superior Stability: StaQ exhibited significantly less performance oscillation compared to baselines like PQN and DQN. In environments like Hopper, StaQ demonstrated remarkable consistency across different seeds.
  • Performance Gains: StaQ outperformed or matched PPO, TRPO, and M-DQN across most tasks. Notably, in the Humanoid environment, StaQ achieved a score of 5273, nearly doubling the performance of the next best baseline (PQN at 2965).
  • Scalability: Training time remained stable regardless of stack size. For instance, in the Ant environment, training took approximately 11 hours whether $M$ was 50 or 500, confirming the effectiveness of the parallelization strategy.

Discussion and Conclusion

StaQ demonstrates that averaging over past Q-functions acts as a natural filter for approximation errors, providing a more stable signal for policy improvement. However, some limitations remain. The current closed-form update relies on a softmax over discrete actions, and extending this to continuous action spaces may require an additional "actor" network, potentially reintroducing instability. Additionally, while GPU computation is fast, the VRAM required to store hundreds of sets of weights may limit the size of individual Q-networks.

By framing policy updates as a stable "stacking" process, StaQ bridges the gap between the theoretical elegance of Mirror Descent and the practical demands of Deep Reinforcement Learning.

Summary updated

BibTeX
@inproceedings{shilova2025staq,
  author = {Alena Shilova and Alex Davey and Brahim Driss and Riad Akrour},
  title = {{StaQ it! Growing neural networks for Policy Mirror Descent}},
  booktitle = {EWRL},
  year = {2025},
  url = {https://openreview.net/forum?id=F6o6riuBCH},
}
Figure