[论文解读] Preventing Learning Stagnation in PPO by Scaling to 1 Million Parallel Environments
本文将 PPO 模型化为外循环的随机优化,并展示学习停滞来自相对于更新噪声的较大外部步长;它证明通过适当的协同缩放超参数的配方,在增加并行环境的情况下,学习可以单调提升,达到超过万亿次的变换。
Plateaus, where an agent's performance stagnates at a suboptimal level, are a common problem in deep on-policy RL. Focusing on PPO due to its widespread adoption, we show that plateaus in certain regimes arise not because of known exploration, capacity, or optimization challenges, but because sample-based estimates of the loss eventually become poor proxies for the true objective over the course of training. As a recap, PPO switches between sampling rollouts from several parallel environments online using the current policy (which we call the outer loop) and performing repeated minibatch SGD steps against this offline dataset (the inner loop). In our work we consider only the outer loop, and conceptually model it as stochastic optimization. The step size is then controlled by the regularization strength towards the previous policy and the gradient noise by the number of samples collected between policy update steps. This model predicts that performance will plateau at a suboptimal level if the outer step size is too large relative to the noise. Recasting PPO in this light makes it clear that there are two ways to address this particular type of learning stagnation: either reduce the step size or increase the number of samples collected between updates. We first validate the predictions of our model and investigate how hyperparameter choices influence the step size and update noise, concluding that increasing the number of parallel environments is a simple and robust way to reduce both factors. Next, we propose a recipe for how to co-scale the other hyperparameters when increasing parallelization, and show that incorrectly doing so can lead to severe performance degradation. Finally, we vastly outperform prior baselines in a complex open-ended domain by scaling PPO to more than 1M parallel environments, thereby enabling monotonic performance improvement up to one trillion transitions.
研究动机与目标
- 在使用大规模并行环境时,动机并诊断 PPO 的学习停滞。
- 将 PPO 的外循环建模为随机优化,以理解步长和更新噪声的影响。
- 识别影响外循环动力学的超参数(正则化、批量大小和轮数)。
- 提出一个可靠的缩放配方,在不降低性能的前提下安全地扩大并行化。
- 通过在具有挑战性的领域实现单调改进来证明可扩展性,达到并超过 1T 次变换。
提出的方法
- 从概念上将 PPO 的外循环建模为标准的带有对前一策略正则化控制步长、通过每次更新的数据量来控制更新噪声的随机优化。
- 使用 PPO-EWMA 将正则化与数据采集解耦,并研究 COM 和裁剪 epsilon 的作用。
- 在经验上将外循环动力学与 SGD 进行对比,显示当外步长过大时会停滞,减小时能够恢复。
- 评估正则化、优化轮数和 rollout 批量大小如何影响机器人和开放领域中的停滞。
- 提供一个缩放配方:在保持小批量大小不变的情况下增加并行环境数量,并根据需要调整小批量的数量(或按学习率缩放小批量)。
- 展示跨越性结果:机器人任务、Kinetix 开放域,以及与 SAPG 等基线的比较。
实验结果
研究问题
- RQ1在使用高度并行化环境时,哪些机制导致 PPO 的学习停滞?
- RQ2外部循环步长如何与更新噪声相互作用,决定 PPO 的停滞?
- RQ3哪些超参数会调节外循环动力学,在增加并行化时应如何协同缩放?
- RQ4将 PPO 扩展到超过 100 万并行环境是否能实现单调改进,经验在哪些方面?
- RQ5在增加并行度时,哪种实际缩放配方最能保持稳定性和速度?
主要发现
- 当外循环步长相对于更新噪声较大时,PPO 可能出现停滞,类似于 SGD 的 stagnation。
- 增加并行环境数量会同时降低外步长和更新噪声,从而使学习得以继续。
- 改变内循环的超参数(如学习率)并不能完全弥补糟糕的外步长;外循环动力学与内循环不同。
- 一个以稳定性为导向的缩放配方——在保持学习率和小批量大小不变的前提下增加小批量数据量——提高对并行化的鲁棒性。
- 实证地,在 Kinetix 域中扩展到超过 100 万并行环境可以实现单调的性能提升,达到万亿次变换;机器人任务结果显示该配方的可扩展性提升。
- 使用 PPO-EWMA 并固定 COM,可以在大量并行环境中维持一致的正则化效果。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。