StaQ: a Finite Memory Approach to Discrete Action Policy Mirror Descent

Alena Shilova, Alex Davey, Brahim Driss, Riad Akrour · Submission to ICLR 2026 · Rejected

TL;DR

Policy Mirror Descent (PMD) helps stabilize reinforcement learning by averaging out policy evaluation errors, but running it exactly requires keeping track of every past Q-function—an intractable feat. The authors introduce StaQ, a practical discrete-action algorithm that maintains a finite "stack" of only the last $M$ learned Q-networks on GPU. By eliminating the need for an approximate parametric actor update, StaQ matches exact PMD both theoretically and empirically while outperforming standard actor-critic and DQN baselines.

What Problem Does This Paper Address?

In deep reinforcement learning, neural networks inevitably introduce approximation errors during policy evaluation (critic learning). Standard unregularized updates greedily pick actions based on noisy Q-estimates, which often leads to severe policy instability and performance collapse.

Policy Mirror Descent (PMD) addresses this by penalizing the Kullback-Leibler ($D_{\mathrm{KL}}$) divergence between consecutive policies. This regularization turns the policy logits into a weighted sum of all past Q-functions, smoothing out zero-mean evaluation noise. However, exact PMD is virtually impossible to use with deep networks because you cannot keep an infinite sum of non-linear models.

Standard practice relies on approximations such as Natural Policy Gradient (NPG), TRPO, or PPO to take gradient steps toward the regularized objective. Unfortunately, theory shows that inexact policy updates introduce an irreducible error floor that caps performance regardless of how accurate the critic is.

Methods

The authors propose StaQ (Stacked Q-functions), a finite-memory PMD algorithm tailored to discrete action spaces:

  • Finite-Memory Logit Truncation: Instead of maintaining an infinite sum of past Q-values, StaQ forms a policy using a weighted sum of at most the last $M$ Q-function estimates: $$\pi_k \propto \exp \left( \frac{\alpha}{1 - \beta^M} \sum_{i=0}^{M-1} \beta^i q_{k-i} \right)$$ The factor $\frac{1}{1 - \beta^M}$ corrects the weights so they sum to 1, ensuring convergence to the true optimal regularized policy.

  • Optimization-Free Policy Updates: Instead of training a separate actor network with policy gradients, StaQ periodically freezes the current Q-network and pushes its weights onto a FIFO stack of size $M$. When the stack exceeds $M$, the oldest network is dropped. Policy updates are thus exact, closed-form, and instantaneous.

  • Efficient Batched GPU Execution: Thanks to vectorized batching on modern GPUs, querying an ensemble of $M$ frozen networks simultaneously introduces almost no wall-clock overhead compared to querying a single network. To accelerate critic updates, the policy logits for replay buffer samples are pre-computed at the start of each iteration.

Datasets

The authors evaluated StaQ across 14 discrete-action environments:

  • Gymnasium Classic Control: CartPole-v1, Acrobot-v1, MountainCar-v0, and LunarLander-v2.
  • MinAtar: All 5 Atari-inspired pixel benchmarks (Asterix, Breakout, Freeway, Seaquest, SpaceInvaders).
  • MuJoCo (Discrete): 5 continuous robotic control tasks (Hopper-v4, Walker2d-v4, HalfCheetah-v4, Ant-v4, Humanoid-v4) adapted to discrete spaces via "bang-bang" extreme actions ($\{-1, 0, 1\}$ per dimension) and multi-atom independent discretizations.

Key Insights and Ideas

  • Exponential Error Decay: The authors prove that the additional policy improvement error introduced by truncating the memory to $M$ steps vanishes exponentially fast as $M$ increases. For sufficiently large $M$, the algorithm achieves the same linear convergence rate as exact PMD.
  • Sidestepping the Actor-Critic Trap: Traditional actor-critic methods spend substantial computation fitting a parameterized actor to the mirror descent target. StaQ shows that explicitly storing historical critic checkpoints sidesteps actor approximation errors entirely, resulting in higher final returns and drastically lower inter-seed variance.
  • Diminishing Returns of History: Empirically, performance scales monotonically with $M$ up to a threshold ($M \approx 100$ for MuJoCo, $M \approx 300$ for MinAtar), beyond which performance is indistinguishable from exact PMD ($M = 1000$).

Key Results

  • Matches Exact PMD: Across all benchmarks, StaQ with $M=300$ matches the performance of exact PMD without unbounded memory consumption.
  • Outperforms Standard Baselines: StaQ achieves substantial gains over DQN, Munchausen-DQN (M-DQN), PPO, and TRPO. For example, on Humanoid-v4, StaQ ($M=300$) reaches an average score of 5273, compared to 2580 for M-DQN, 2887 for DQN, 588 for PPO, and 700 for TRPO. On Walker2d-v4, StaQ reaches 3550 compared to TRPO's 3010 and DQN's 1424.
  • Faster than Parametric Actor Updates: On MinAtar SpaceInvaders, StaQ ($M=300$) takes 10.5 hours on an NVIDIA V100 GPU, whereas approximate actor-critic PMD baselines (e.g., MDPO/ECPO adaptations) require 13.1–13.9 hours because of dual actor-critic gradient steps.
  • High Stability: Per-seed stability plots reveal that StaQ exhibits far fewer intra-run oscillations than approximate value iteration algorithms.

Limitations and Future Work

  • Discrete Actions Only: StaQ relies on computing Boltzmann policy probabilities directly across all actions. Applying this directly to continuous action spaces requires either distillation into a parametric distribution, discretization tricks, or hierarchical gating architectures (which reintroduce approximations).
  • Memory Scaling for Large Vision Models: While keeping 300 small MLPs or lightweight ConvNets in GPU memory is trivial, storing hundreds of multi-million-parameter vision transformers or large ResNets would become memory-prohibitive.
  • Exploration in Sparse-Reward Tasks: The authors observed that entropy regularization does not inherently solve exploration; on MountainCar-v0, StaQ initially collapsed to a uniform policy because uniform exploration never hit a reward. The authors had to employ a heuristic "sticky action" behavior policy to overcome this issue.

Summary updated

BibTeX
@inproceedings{shilova2025staq,
  author = {Alena Shilova and Alex Davey and Brahim Driss and Riad Akrour},
  title = {{StaQ: a Finite Memory Approach to Discrete Action Policy Mirror Descent}},
  booktitle = {EWRL},
  year = {2025},
  url = {https://openreview.net/forum?id=F6o6riuBCH},
}
Figure