UCBZero: Reward-Free Exploration in RL
- UCBZero is a task-agnostic exploration algorithm for RL that collects reward-free trajectories and uses UCB bonuses in a two-phase protocol to build near-optimal policies.
- It achieves sample complexity of O((log N + ι) H⁵SA/ε²) with a provable logarithmic dependence on the number of tasks, matching information-theoretic lower bounds.
- The algorithm decouples exploration from reward signals, enabling efficient policy optimization across diverse tasks and robust model estimation from episodic MDPs.
UCBZero is a task-agnostic exploration algorithm designed for reinforcement learning (RL) in the absence of reward supervision during exploration. It operates within a tabular, fixed-horizon, episodic Markov Decision Process (MDP) and enables efficient reuse of exploration data to generate near-optimal policies for multiple tasks with different, a priori unknown reward functions. UCBZero achieves near-optimal sample complexity in terms of the number of exploration episodes required to guarantee -optimality simultaneously across tasks, with a provably unavoidable logarithmic dependence on (Zhang et al., 2020).
1. Task-Agnostic RL: Problem Formulation
The setting is a finite, tabular, episodic MDP defined by : is the state space (), is the action space (), is the horizon, is the transition kernel at step 0, and 1 is the reward distribution, with all episodes beginning at a fixed 2.
Learning proceeds in two distinct phases:
- Exploration phase: Over 3 episodes, the agent explores the MDP without reward feedback, collecting state-action trajectories 4.
- Policy-optimization phase: Presented with 5 tasks, each with an associated unknown reward function 6, trajectories are augmented by sample rewards to form 7. The objective is to identify, for each 8, a policy 9 such that with high probability (0):
1
for all 2 tasks, by using as few exploration episodes 3 as possible.
2. UCBZero Algorithmic Principles and Workflow
UCBZero executes an exploration-first, optimization-after protocol based on optimism-driven Q-learning with upper confidence bound (UCB) bonuses.
Notation
- 4: Number of tasks
- 5: Number of exploration episodes
- 6: Confidence parameter
- 7, used in the bonus definition
- 8: Hoeffding-style UCB bonus
- 9: Learning rate
- 0: Q-value at step 1, optimistic initialization to 2
- 3: State-action visitation count
Pseudocode Outline
Exploration Phase (Zero-reward Q-learning with UCB bonuses)
- Initialize 4 and 5 for all 6
- For 7 to 8 exploration episodes:
- For 9 to 0:
- Choose 1
- Observe next state 2
- 3; update count
- 4
- Update:
5 - No rewards are used; exploration is driven by the bonus.
Policy-Optimization Phase (for each task 6)
- For 7: Input 8
- Initialize 9 and 0
- For 1 to 2:
- For 3 to 4:
- 5
- 6
- Update:
7
- Output: Uniform mixture over the sequence of greedy policies.
Explanation
In the exploration phase, the algorithm uses only the confidence bonus 8, instilling optimism. In the policy-optimization phase, sampled rewards plus a standard bonus 9 are used, recovering standard Q-learning with optimism for each task (Zhang et al., 2020).
3. Theoretical Sample Complexity and Optimality Results
UCBZero's theoretical guarantees quantify both its efficiency and the inherent difficulty of the task-agnostic RL problem.
Main Results
| Guarantee Type | Episodes Required | Dependence on 0 |
|---|---|---|
| Upper Bound | 1 | 2 |
| Lower Bound | 3 | 4 (provably necessary) |
- Upper Bound: With probability at least 5, after 6 exploration episodes, UCBZero delivers 7-optimal policies for all 8 tasks.
- Lower Bound: Any 9-correct algorithm must use at least 0 episodes. The logarithmic dependence on 1 is shown to be information-theoretically unavoidable.
Notation: 2; 3 denotes an asymptotic lower bound up to constants (Zhang et al., 2020).
4. Technical Proof Sketch: Regret Decomposition and Coverage
The sample complexity results rest on principles of optimism, Q-regret decomposition, and careful control of empirical value estimates.
- Optimism & Q-Regret Decomposition: Define a pseudo-MDP with zero rewards to compare Q-updates under pure exploration (4) and per-task learning (5). Using induction and Azuma–Hoeffding concentration:
6
where 7 is null under the zero-reward MDP.
- Aggregate Regret Control: The aggregate Q-regret across episodes,
8
is upper-bounded by 9. By the regret-difference lemma, this formally applies independently across all 0 tasks.
- Implication: Averaging over 1 episodes and solving for 2, the bound 3 emerges. This matches the lower bound up to order, apart from the 4 exponent gap (Zhang et al., 2020).
5. Reward-Free RL: The Known-Reward Variant
When the reward functions 5 for the 6 tasks are known at the planning stage (the reward-free RL framework), the sample complexity becomes independent of 7.
- Key Result: By covering the reward function space with an 8-net, the complexity reduces to:
9
for all policies. The explicit 0-dependence disappears.
- Conceptual Mechanism: If two reward functions differ by at most 1 on every transition, then a single near-optimal policy suffices for both (by the Simulation Lemma). Discretizing the reward space yields an effective task number 2, with 3. This permits absorbing 4 into 5 for description length scaling (Zhang et al., 2020).
6. Coverage, Model Estimation, and Practical Behavior
- Visitation Guarantee: UCBZero offers a uniform lower bound on (state, action, timestep) coverage; every triplet is visited at least
6
times, where 7, ensuring sufficient empirical coverage.
- Transition Model Estimation: From zero-reward trajectories, it is possible to estimate a transition model 8 such that
9
after 00 episodes, validating the use of any off-policy or batch RL method on the collected data.
- Conceptual Insights: UCBZero demonstrates that a combination of exhaustive exploration (without using reward signals) and Q-learning optimism suffices to match the best-reported sample efficiency for task-specific exploration, up to a 01 factor. This 02 is proved to be unavoidable when optimizing for 03 tasks from a single pool of exploration data.
These insights establish UCBZero as a model-free, UCB-based approach for efficient, task-agnostic exploration, enabling a single data collection effort to be leveraged across multiple downstream RL tasks without reward-guided exploration and with near-optimal sample complexity in all core problem dimensions (Zhang et al., 2020).