Abstract
Evaluating new policies using data from adaptive "greedy" algorithms, such as contextual bandits, is challenging due to shifting data-collection probabilities and exploding variance. We present an adaptive weighting technique that stabilizes the Doubly Robust (DR) estimator by downweighting high-variance observations. This approach significantly reduces Root Mean Squared Error (RMSE) and, crucially, enables the construction of mathematically valid confidence intervals for non-i.i.d. bandit data.
Introduction
In domains like personalized medicine and digital advertising, contextual bandit algorithms are frequently used to optimize actions over time. These algorithms are inherently adaptive, reducing exploration of sub-optimal actions to maximize rewards. However, using this historical data for Off-Policy Evaluation (OPE) is difficult. Standard estimators like Inverse Propensity Weighting (IPW) and Doubly Robust (DR) methods rely on importance weights that can explode when the logging policy's probability of selecting an action approaches zero.
As shown in Figure 1, the Direct Method (DM) often suffers from heavy bias because the bandit algorithm's tendency to avoid "bad" arms prevents the model from correcting early errors. Conversely, the standard DR estimator, while unbiased, suffers from extreme variance and heavy tails, making it unreliable for statistical inference.
Methods: Adaptive Weighting
To address these issues, we propose a family of estimators based on adaptive weighting. Instead of a simple average of doubly robust scores, we employ a weighted average where each observation is assigned a weight $h_t$ based on its predicted variance.
Figure 2 illustrates how variance proxies grow over time ($t$) in adaptive settings. Without intervention, these "exploding" variances dominate the estimator. We introduce two primary weighting schemes:
- MinVar: Weights are set to $1/Variance$ to minimize the Mean Squared Error (MSE).
- StableVar: Weights are set to $1/\sqrt{Variance}$ to standardize terms, facilitating asymptotic normality.
Furthermore, we introduce contextual weighting, which adjusts weights locally based on specific "context-treatment" pairs. This recognizes that an algorithm might stop exploring a treatment for one type of patient while continuing for another.
Key Results
The proposed methods were evaluated on synthetic data and a benchmark of 86 OpenML datasets.
RMSE Reduction and Accuracy
Adaptive weighting schemes reduced the RMSE by nearly 50% compared to standard DR estimators across the benchmark suite. The contextual version of the estimator consistently outperformed global stabilization, proving that local variance adjustment is more effective.
Statistical Inference
A major contribution of this work is the proof of asymptotic normality for the StableVar estimator. This allows researchers to construct 95% confidence intervals that achieve near-nominal coverage, even with non-i.i.d. bandit data. In contrast, standard DR often fails to provide reliable intervals due to its heavy-tailed distribution.
Discussion and Future Work
While adaptive weighting significantly improves OPE, some limitations remain. The current theoretical proof for contextual weighting assumes a discrete context space; extending this to high-dimensional or continuous spaces is a priority for future research. Additionally, the stability of these estimators depends on the underlying bandit algorithm maintaining some level of exploration. Future work will explore using these stabilized weights for direct policy learning from logged bandit data.
Summary updated