Abstract
This paper formalises the problem of online algorithm selection in the context of Reinforcement Learning (RL). Given an episodic task and a finite number of off-policy RL algorithms, a meta-algorithm must decide which RL algorithm is in control during the next episode to maximize the expected return. We present a novel meta-algorithm, Epochal Stochastic Bandit Algorithm Selection (ESBAS), which freezes policy updates at each epoch and utilizes a rebooted stochastic bandit for selection. Theoretical analysis demonstrates its near-optimality under structural sampling budget limitations. ESBAS and its online variant, SSBAS, are evaluated on dialogue tasks, gridworlds, and Atari games, showing superior performance and efficient hyperparameter adaptation compared to individual algorithms.
Introduction
Selecting the optimal RL algorithm for a specific task is a complex challenge. Researchers typically navigate a vast space of models, state representations, and hyperparameters through costly trial-and-error. In real-world applications like robotics or dialogue systems, data collection is expensive, making separate experiments for every configuration unfeasible.
Furthermore, the "best" algorithm often changes as learning progresses; a simple model might learn quickly in the early stages, while a high-capacity model is required for mastery. This paper proposes automating this selection process online, allowing an agent to dynamically switch between algorithms in a portfolio while performing the task.
Methodology
The core innovation lies in treating algorithm selection as a Multi-Armed Bandit (MAB) problem adapted for the non-stationary nature of RL.
Portfolio of Off-Policy Learners
The system maintains a set of off-policy RL algorithms (e.g., Q-learning, DQN). Off-policy learning is critical because it allows "information sharing": every algorithm in the portfolio updates its internal policy using every trajectory collected, regardless of which specific algorithm controlled the agent during that episode. This ensures a fair comparison based on how each algorithm processes the shared data.
Meta-Algorithms: ESBAS and SSBAS
- ESBAS (Epochal Stochastic Bandit Algorithm Selection): Designed for batch settings, it divides time into epochs of exponential length. At the start of an epoch, it freezes RL policies and uses a standard bandit (like UCB1) to decide which algorithm to deploy. This freezing provides the stability required for theoretical near-optimality guarantees.
- SSBAS (Sliding Stochastic Bandit Algorithm Selection): A practical, true online version that uses a sliding window of recent performance to select algorithms, allowing policies to update after every transition.
Key Insights: Automatic Curriculum and Robustness
By leveraging the MAB framework, the meta-algorithm naturally discovers an optimal curriculum. It favors algorithms that generalize quickly in early stages and shifts toward high-capacity models later.
Additionally, this approach enhances robustness. If an algorithm in the portfolio diverges—a common issue in deep RL—the meta-algorithm identifies the performance drop and stops selecting it, mitigating the risk of a single agent getting stuck in a local optimum.
Experimental Results
The approach was evaluated across three environments:
- Negotiation Dialogue Game: ESBAS outperformed individual algorithms and was particularly effective at avoiding poor early-stage policies.
- Gridworld (Fruit Collection): SSBAS successfully adapted hyperparameters, shifting from a high learning rate (0.5) to a fine one (0.001) as the task was mastered, outperforming standard decay schedules.
- Atari (Q*bert): SSBAS managed six DQN instances of varying sizes. The meta-algorithm achieved a higher final score than any single DQN instance and surpassed human-level benchmarks.
Conclusion and Future Work
While ESBAS and SSBAS significantly improve sample efficiency and robustness, they introduce computational overhead by running multiple algorithms in parallel. Future research will focus on sharing computations between models (e.g., shared neural network layers) to reduce hardware requirements. Additionally, while ESBAS has strong theoretical foundations, further work is needed to provide similar rigorous convergence guarantees for the sliding-window SSBAS variant.
Summary updated