Dynamic Learning Rate for Deep Reinforcement Learning: A Bandit Approach

Henrique Donâncio, Antoine Barrier, Leah F. South, Florence Forbes

TL;DR

Tuning the learning rate in deep reinforcement learning (RL) is notoriously difficult because the optimal rate shifts as the agent's policy and data distribution evolve. This paper introduces LRRL (Learning Rate for deep RL), a meta-learning approach that uses an adversarial multi-armed bandit to dynamically select the best learning rate on the fly based directly on environment rewards. LRRL matches or outperforms heavily tuned fixed rates and standard schedulers across Atari and MuJoCo benchmarks while remaining highly robust to poorly chosen candidate sets.

What Problem Does This Paper Address?

In deep learning, the learning rate dictates the step size taken during gradient descent. In supervised learning, the loss landscape is typically stationary. In reinforcement learning, however, the landscape is highly non-stationary: the agent learns from data generated by its own evolving policy. A learning rate that works beautifully during early exploration might cause catastrophic divergence later on.

Standard solutions like linear or exponential decay schedules assume that optimization monotonically gets easier over time, which often fails in RL due to plateaus, regressions, or sparse rewards. Meanwhile, adaptive optimizers like Adam adjust learning rates based on gradient statistics rather than actual policy performance. Finding the right schedule usually requires expensive, brute-force hyperparameter tuning. This paper tackles the question: Can we adapt the learning rate dynamically based on the agent's actual performance rather than training steps or gradient heuristics?

Methods

The authors propose LRRL (Learning Rate for deep Reinforcement Learning), which frames learning rate selection as an adversarial Multi-Armed Bandit (MAB) problem.

Here is how it works:

  1. Candidate Set: The user predefines a small set of candidate learning rates (or even candidate decay schedulers). Each candidate acts as an "arm" of the bandit.
  2. Bandit Selection: At regular intervals (an update window $\kappa$), a modified Exp3 (Exponential-weight for Exploration and Exploitation) adversarial bandit algorithm selects an arm based on a probability distribution.
  3. Performance Feedback: Instead of using raw returns or training loss (which is loosely coupled with policy quality in RL), LRRL calculates an improvement metric. It takes the average reward from the current window and subtracts the moving average of the past $j$ windows.
  4. Weight Update: The bandit updates its internal weights using a time-decay factor $\delta \in (0, 1]$, which prioritizes recent feedback and allows the algorithm to quickly adapt to the non-stationary environment.

Crucially, LRRL is entirely algorithm-agnostic. It operates at the optimizer level and can be seamlessly wrapped around standard algorithms (DQN, IQN, PPO) and optimizers (Adam, RMSProp, SGD).

Datasets

The authors evaluated LRRL across three distinct domains:

  • Atari 2600 Benchmarks: Discrete control environments (Asteroids, Beam Rider, Breakout, Qbert, Seaquest, Video Pinball) using DQN and IQN agents.
  • MuJoCo Benchmarks: Continuous control tasks (Ant-v4, HalfCheetah-v4, Hopper-v4, Humanoid-v4, Walker2D-v4) using Proximal Policy Optimization (PPO).
  • Stationary Non-Convex Loss Landscapes: Six classic mathematical optimization functions (Beale, Bohachevsky, Griewank, Rosenbrock, Zakharov, Three-Hump Camel) using SGD to isolate the learning rate adaptation mechanism from RL-specific noise.

Key Insights and Ideas

  • Emergent Decay Schedules: When analyzing which arms LRRL pulls over time, the authors observed that it naturally discovers a decay schedule. It favors higher learning rates early on to accelerate progress and shifts to conservative, smaller rates as the policy stabilizes. Crucially, this behavior is not pre-programmed; it emerges purely from environment feedback.
LRRL naturally shifts from higher to lower learning rates over the course of training based on performance feedback.
  • Robustness to "Bad" Candidates: Traditional hyperparameter tuning is risky because a single bad choice can ruin a run. LRRL proves remarkably robust: even if the candidate set includes learning rates that individually cause the agent to diverge, the bandit quickly learns to suppress them, preserving overall stability.
  • Returns over Loss: In RL, optimization loss (like TD-error) can be highly misleading—a high error might simply mean the agent has discovered a completely new, high-reward area of the environment. By using episodic returns rather than gradient norms or loss values, LRRL anchors its choices in actual task competence.

Key Results

  • Atari Performance: LRRL variants consistently achieved performance competitive with or superior to the "oracle" baseline—the single best fixed learning rate found via extensive prior tuning.
Figure 1: LRRL and standard DQN comparison: 5 variants of LRRL with different learning rate sets are tested against the DQN algorithm reaching best performance among the possible learning rates (provided in Appendix 7). The mean and one-half standard deviations over 5 runs are represented.
  • Continuous Control (MuJoCo): Paired with PPO, LRRL outperformed alternative adaptive strategies like AdamRel and Cyclical Learning Rates (CLR) on two out of five tasks, while matching them on the rest, without requiring task-specific tuning.
LRRL compared against AdamRel, CLR, and hand-tuned schedulers on MuJoCo continuous control tasks.
  • Mathematical Optimization: In the stationary SGD experiments, LRRL successfully escaped poor local minima on complex landscapes (like the Griewank function) by dynamically alternating between aggressive and conservative steps, outperforming standard fixed-rate baselines.

Limitations and Future Work

While LRRL significantly reduces the hyperparameter tuning burden, it doesn't eliminate it entirely. The user must still predefine a discrete set of candidate learning rates, and the method introduces its own bandit step-size hyperparameter ($\alpha$) which requires some tuning. Furthermore, because the optimal learning rate continuously shifts in RL, standard theoretical bandit regret guarantees do not strictly apply.

For future work, the authors suggest moving away from a fixed discrete set of candidate rates by integrating Bayesian Optimization or time-varying Gaussian Processes, allowing the bandit to select from a continuous spectrum of learning rates while maintaining adaptability to non-stationary dynamics.

Summary updated

BibTeX
@misc{donancio2024dynamic,
  author = {Henrique Donâncio and Antoine Barrier and Leah F. South and Florence Forbes},
  title = {{Dynamic Learning Rate for Deep Reinforcement Learning: A Bandit Approach}},
  year = {2024},
  eprint = {2410.12598},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.12598},
}
Figure