Simplifying Deep Temporal Difference Learning

ML RL Offline RL POA REG VRL Replay Methods
2024年07月05日
本文探讨了如何加速和简化TD算法的训练过程,同时保持其稳定性,尤其是在使用离线数据的TD算法(如Q-learning)或非线性函数逼近(如深度神经网络)时需要解决的问题。研究发现,通过使用类似LayerNorm的正则化技术,可以在不需要目标网络的情况下,实现收敛的TD算法,即使使用离线数据。在经验上,作者发现,使用向量化环境进行在线并行采样可以稳定训练,而不需要回放缓冲区。基于这些发现,作者提出了PQN算法,这是一种简化的深度在线Q-learning算法,与Rainbow在Atari、R2D2在Hanabi、QMix在Smax和PPO-RNN在Craftax等更复杂的方法相比,PQN表现出了竞争力,并且可以比传统的DQN快50倍,同时不会牺牲样本效率。在PPO已成为RL算法的首选时代,PQN重新确立了Q-learning作为一种可行的替代方案。作者已经将代码发布在https://github.com/mttga/purejaxql上。
Q-learning played a foundational role in the field reinforcement learning (RL). However, TD algorithms with off-policy data, such as Q-learning, or nonlinear function approximation like deep neural networks require several additional tricks to stabilise training, primarily a replay buffer and target networks. Unfortunately, the delayed updating of frozen network parameters in the target network harms the sample efficiency and, similarly, the replay buffer introduces memory and implementation overheads. In this paper, we investigate whether it is possible to accelerate and simplify TD training while maintaining its stability. Our key theoretical result demonstrates for the first time that regularisation techniques such as LayerNorm can yield provably convergent TD algorithms without the need for a target network, even with off-policy data. Empirically, we find that online, parallelised sampling enabled by vectorised environments stabilises training without the need of a replay buffer. Motivated by these findings, we propose PQN, our simplified deep online Q-Learning algorithm. Surprisingly, this simple algorithm is competitive with more complex methods like: Rainbow in Atari, R2D2 in Hanabi, QMix in Smax, PPO-RNN in Craftax, and can be up to 50x faster than traditional DQN without sacrificing sample efficiency. In an era where PPO has become the go-to RL algorithm, PQN reestablishes Q-learning as a viable alternative. We make our code available at: https://github.com/mttga/purejaxql.
许愿