Quantile Reinforcement Learning

Hugo Gilbert, Paul WengarXiv 2016

Abstract

Standard reinforcement learning (RL) frameworks typically aim to maximize the expected value of cumulative rewards. However, in high-stakes or risk-sensitive environments, the average outcome often fails to capture the necessary nuances of performance and safety. This paper introduces Quantile Q-learning (QQ-learning), a novel algorithm designed to optimize for specific quantiles of the outcome distribution, such as the median or the 99th percentile. By employing a two-timescale stochastic approximation, the authors provide a robust framework for decision-making that is sensitive to risk and capable of handling ordinal feedback.

Introduction

In traditional reinforcement learning, policies are evaluated based on the expectation—the weighted average—of discounted rewards. While mathematically convenient, this approach suffers from several critical flaws in real-world applications:

  1. Risk Blindness: The average does not account for the variance or the probability of catastrophic failure. A policy with a high average reward might still carry a 10% chance of total loss.
  2. Requirement for Numerical Rewards: Expectation-based methods require precise scalar rewards. However, many human-centric interactions provide only ordinal feedback (e.g., "this outcome is better than the last"), where the magnitude of the difference is unknown.
  3. One-Shot Decisions: In scenarios where an agent cannot repeat a task many times to "average out" results, a strategy that guarantees a specific outcome with high probability is often preferable to one that maximizes a theoretical mean.

To address these issues, this research focuses on optimizing the $\tau$-quantile of the distribution of outcomes within episodic Markov Decision Processes (MDPs).

Methodology: Quantile Q-Learning (QQ-Learning)

Optimizing for quantiles presents a significant technical challenge: unlike expectations, quantiles are non-linear and non-dynamically consistent. This means that a sub-policy optimal for a later stage of an episode may not contribute to the optimality of the global quantile goal, rendering the standard Bellman Equation inapplicable in its traditional form.

To overcome this, the authors propose Quantile Q-learning (QQ-learning), which utilizes a two-timescale stochastic approximation:

  • The Faster Timescale (Q-learning): The agent estimates the value function for a fixed target value, $\theta$, using a modified Q-learning update rule.
  • The Slower Timescale ($\theta$-update): Simultaneously, the agent adjusts the target value $\theta$, which represents the quantile. If the probability of achieving an outcome better than $\theta$ exceeds the target $1-\tau$, $\theta$ is increased; otherwise, it is decreased.

By operating these processes at different speeds, the $\theta$ parameter remains relatively stable from the perspective of the Q-learning process, allowing the system to converge toward the optimal quantile policy. This "hunting" mechanism allows the agent to discover the optimal quantile value without prior knowledge.

Experimental Framework: "Who Wants to Be a Millionaire?"

The researchers validated QQ-learning using a simulation of the 2003 Spanish version of the television show Who Wants to Be a Millionaire?. This environment serves as an ideal testbed for risk-sensitive RL due to its clear episodic structure and escalating prize stakes.

  • State Space: Defined by the current question (1 to 15) and the availability of three lifelines (50:50, Phone-a-Friend, and Ask the Audience).
  • Action Space: The agent can choose to answer the question, utilize a lifeline, or "walk away" to secure current winnings.
  • Objective: Rather than maximizing the average money won, the agent's goal is to optimize a specific quantile of the prize distribution, effectively choosing how much risk to tolerate for higher rewards.

Key Insights and Results

The study yielded several critical insights into the behavior of quantile-based agents:

  • Ordinal Robustness: Because quantiles depend only on the relative ordering of outcomes, QQ-learning is highly effective for qualitative or preference-based RL where exact reward values are unavailable.
  • Resolute Choice: To manage dynamic inconsistency, the authors implement a "resolute choice" strategy. The agent commits to a policy at the start of the episode, ensuring that the global quantile objective is maintained throughout the trajectory.
  • Convergence and Stability: In the "Millionaire" simulation, for a target $\tau = 0.3$ (the upper 70th percentile), the parameter $\theta$ successfully stabilized at the correct prize index. Furthermore, the value function $V^*_\theta(s_0)$ converged to $1 - \tau = 0.7$, confirming that the agent learned a policy achieving the desired outcome with the specified probability.

Conclusion and Future Work

QQ-learning provides a theoretically grounded approach to risk-sensitive reinforcement learning. By moving beyond the average case, it opens doors for RL application in finance, safety-critical systems, and human-in-the-loop preference learning.

Future research directions include extending the framework from episodic MDPs to infinite-horizon tasks and developing automated methods for tuning the learning rates ($\alpha_n$ and $\beta_n$). Additionally, the authors suggest that the piecewise linear nature of quantile optimization problems may allow for the development of even more efficient gradient-based quantile RL algorithms.

Summary updated

BibTeX
@misc{gilbert2016quantile,
  author = {Hugo Gilbert and Paul Weng},
  title = {{Quantile Reinforcement Learning}},
  year = {2016},
  eprint = {1611.00862},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1611.00862},
}
Figure