Off-Policy Risk Assessment in Contextual Bandits

Audrey Huang, Liu Leqi, Zachary C. Lipton, Kamyar Azizzadenesheli

Introduction

Evaluating a new decision-making policy using historical data—a process known as Off-Policy Evaluation (OPE)—is a cornerstone of modern machine learning. However, the vast majority of OPE research focuses exclusively on the expected reward. In high-stakes domains such as healthcare or finance, the average outcome is often insufficient for decision-making. Stakeholders are frequently more concerned with risk metrics, such as the probability of catastrophic failure, the volatility of returns, or tail-end performance.

This paper introduces OPRA (Off-Policy Risk Assessment), a unified framework designed to evaluate a broad class of risk measures off-policy with strong theoretical guarantees. By moving beyond mean-reward estimation, the authors provide a robust methodology for assessing the safety and reliability of policies before they are deployed in the real world.

The Problem: Beyond Expected Rewards

In a contextual bandit setting, an agent observes a context (e.g., a patient's medical history) and selects an action (e.g., a specific treatment). While we may have access to "logged data" generated by an older behavior policy, we often need to estimate how a new "target" policy would perform.

The standard approach estimates the expected reward, but this fails to capture the full risk profile. For instance, a treatment might have a high average success rate but a 5% chance of being fatal. To capture these nuances, we require risk functionals—parameters of the reward distribution such as Variance, Value-at-Risk (VaR), or Conditional Value-at-Risk (CVaR). The primary challenge lies in the fact that risk functionals depend on the entire shape of the reward distribution, which is statistically difficult to estimate when the behavior policy rarely explores the actions preferred by the target policy.

The OPRA Framework

The authors propose a two-step "distribution-centric" approach to solve this problem:

1. CDF Estimation

Instead of estimating a specific risk measure directly, OPRA first estimates the target policy’s Cumulative Distribution Function (CDF) of rewards. The framework utilizes two primary estimators:

  • Importance Sampling (IS): This reweights observed rewards based on the likelihood ratio between the target and behavior policies.
  • Doubly Robust (DR): This combines IS with a learned model of the reward distribution. This approach remains unbiased while significantly reducing variance, provided the underlying model is even moderately accurate.

2. Plugin Risk Estimation

The framework defines a broad class of Lipschitz risk functionals. These are risk measures that are stable; if the estimate of the CDF is slightly inaccurate, the resulting risk estimate will not fluctuate drastically. This class is highly inclusive, covering CVaR, variance, mean-variance, and Cumulative Prospect Theory (CPT) risks.

By focusing on the CDF, OPRA allows for an "estimate once, evaluate many" workflow. Once the distribution is estimated, any number of risk measures can be plugged in without re-processing the raw data.

Theoretical and Empirical Results

The core theoretical contribution of this work is the provision of the first uniform concentration inequalities for CDF estimators in contextual bandits. These bounds prove that the error for any Lipschitz risk functional converges at a robust rate of $O(1/\sqrt{n})$.

Experimental Validation

The researchers evaluated OPRA using nine UCI classification datasets (including PageBlocks, OptDigits, and PenDigits), transformed into contextual bandit problems. Key findings include:

  • Convergence: Empirical results confirmed the theoretical $O(1/\sqrt{n})$ convergence rate for risk estimates.
  • Efficiency: On the PageBlocks dataset, the Doubly Robust estimator achieved the same error level as standard Importance Sampling while requiring an order of magnitude less data.
  • Robustness: In scenarios with high distribution shift (where the target and behavior policies differ significantly), the DR estimator outperformed IS and Weighted IS, providing more stable estimates of mean, variance, and CVaR.

Limitations and Future Directions

While OPRA represents a significant step forward, several areas remain for future exploration:

  • Tighter Bounds: The current theoretical bounds for the DR estimator do not yet explicitly account for the accuracy of the reward model, suggesting room for tighter analysis.
  • Non-Lipschitz Risks: Some risks, such as the inverse quantile function, do not meet the Lipschitz stability requirements of this framework. Extending guarantees to these "unstable" risks is an open question.
  • Sequential Decision Making: The current work is limited to the one-shot bandit setting. Extending this distribution-centric risk assessment to full Markov Decision Processes (MDPs) is a logical next step for the research.

Conclusion

OPRA provides a principled and efficient framework for assessing risk in off-policy settings. By shifting the focus from mean rewards to the full reward distribution, it enables safer and more informed policy deployment in critical real-world applications.

Summary updated

BibTeX
@inproceedings{huang2021off,
  author = {Audrey Huang and Liu Leqi and Zachary C. Lipton and Kamyar Azizzadenesheli},
  title = {{Off-Policy Risk Assessment in Contextual Bandits}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=1hTZTcUHrN4},
}
Figure