NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Zap Q-Learning With Nonlinear Function Approximation

Shuhang Chen, Adithya M. Devraj, Fan Lu, Ana Busic, Sean P. Meyn

Reinforcement Learning (RL) has achieved massive success using deep neural networks, yet the theoretical foundations for these "Deep Q-learning" methods remain challenging. Standard Q-learning with function approximation is notorious for two main issues: instability (failing to converge even in simple linear cases) and slow convergence (taking an agonizingly long time to reach an optimal policy).

While "Zap" Q-learning was previously introduced to solve the speed issue by achieving the fastest possible asymptotic convergence rate, its stability theory was missing for the very architectures that make modern RL powerful: nonlinear function approximators like neural networks. This paper bridges that gap, extending Zap Q-learning to work with nonlinear function approximation and providing both a rigorous theoretical convergence proof and empirical evidence of its speed and robustness.

A New Framework for Stability

The authors tackle the theoretical gap by developing a new framework for analyzing stochastic approximation algorithms that do not rely on standard "linear" assumptions. They utilize the ODE (Ordinary Differential Equation) method of stochastic approximation. Instead of merely using an ODE to analyze an existing algorithm, they use a specific ODE—the Newton-Raphson flow—as a blueprint to design the algorithm itself. The core idea is that if the continuous-time flow is globally asymptotically stable, the discrete-time stochastic algorithm is much more likely to behave well.

Key components of their approach include:

  • Zap SA Algorithm: A two-time-scale recursion. One scale updates the parameters ($\theta$), while the other maintains a running estimate of a "gain" matrix ($A$), which acts as the Jacobian of the Bellman error.
  • Regularization: To handle cases where the gain matrix might not be full rank—a common issue in high-dimensional neural networks—they introduce a regularized version of the Newton-Raphson flow.
  • Generalized Subgradients: Because modern neural networks often use non-smooth components like ReLU activations, the authors cast their analysis in the theory of generalized subgradients. This proves stability even when the functions aren't perfectly differentiable.
  • Computational Efficiency: To mitigate the high computational cost of matrix inversions, they propose "Periodic Gain Updates," performing expensive matrix operations only every $N_d$ iterations.

Empirical Performance and Robustness

The algorithm was evaluated on three classic control benchmarks from the OpenAI Gym: Mountain Car, Acrobot, and Cartpole. To demonstrate the algorithm's robustness to architecture choices, the authors tested these environments using various feedforward neural network sizes, ranging from small $6 \times 3$ hidden layers up to larger $30 \times 24 \times 16$ configurations.

Performance of Zap Q-learning across Mountain Car, Acrobot, and Cartpole environments using various neural network architectures.

The results highlight several key insights:

  • Theoretical Consistency: The authors mathematically prove that Zap Q-learning is consistent (converges to the correct root) under a non-degeneracy assumption, even with nonlinear architectures.
  • Optimal Convergence by Design: By mimicking the Newton-Raphson method, the algorithm "whitens" the noise in the updates, theoretically achieving the best possible rate of convergence.
  • Fast and Stable Learning: In empirical tests, the algorithm reached near-optimal rewards rapidly. As seen in the performance plots, it achieves stable, high rewards within a few thousand episodes across all tested network sizes. Furthermore, the narrow gap between the 10th and 90th percentiles indicates low variance between different random initializations, proving the algorithm is highly reliable.
  • Robustness to Architecture: Unlike standard Q-learning, which often requires meticulous hyperparameter tuning for different network sizes, Zap Q-learning showed consistent, stable performance across a wide range of neural network depths and widths.

Limitations and Future Directions

While Zap Q-learning offers significant improvements in stability and speed, it is not without limitations. The algorithm requires inverting a $d \times d$ matrix, where $d$ is the number of parameters. Although periodic updates help, this remains a bottleneck for massive deep learning models with millions of parameters, suggesting distributed implementations as a necessary future step.

Additionally, the current theory assumes a fixed exploration policy. Extending the proof to cover adaptive strategies, such as $\epsilon$-greedy exploration, is an important next step. Finally, while the theory focuses on decreasing step-sizes ($1/n$), many practitioners prefer constant step-sizes; the theoretical guarantees for constant step-sizes in this nonlinear context require further development.

Summary updated

BibTeX
@inproceedings{chen2020zap,
  author = {Shuhang Chen and Adithya M. Devraj and Fan Lu and Ana Busic and Sean P. Meyn},
  title = {{Zap Q-Learning With Nonlinear Function Approximation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
  url = {https://openreview.net/forum?id=1mKw4SPoZym},
}
Figure