Variance-Optimal Augmentation Logging for Counterfactual Evaluation in Contextual Bandits

Aaron David Tucker, Thorsten JoachimsarXiv 2022

TL;DR

This paper introduces Minimum Variance Augmentation Logging (MVAL), a method for strategically collecting a small amount of new data to "fix" existing log datasets. By optimizing the sampling policy to minimize the variance of downstream estimators, MVAL makes offline policy evaluation and counterfactual learning significantly more accurate and data-efficient.

What Problem Does This Paper Address?

In search and recommendation systems, we often want to know: "If we changed our algorithm to Policy B, how much revenue/clicks would we get?" Ideally, we’d use Offline Policy Evaluation (OPE) to answer this using old logs from Policy A, avoiding the risk of a bad live A/B test.

However, OPE has a "support" problem. If Policy A never showed a certain movie to a certain user, we have zero data on how that user would react. Standard tools like Inverse Propensity Scoring (IPS) try to correct for this, but if Policy A and Policy B are very different, the resulting estimates become incredibly noisy (high variance) or biased.

The authors ask: If we have the budget to collect a little bit more data, what is the most "informative" way to sample it to make our offline estimates as precise as possible?

Methods

The core contribution is Minimum Variance Augmentation Logging (MVAL). Instead of just sampling from the target policy we want to evaluate, MVAL treats data collection as an optimization problem.

  1. The Balanced Estimator: Rather than using standard IPS, the authors build on the "balanced estimator." This estimator treats the old log data and the new "augmentation" data as a single combined pool.
  2. Variance Optimization: MVAL solves a convex optimization problem for every context (e.g., every user request). It finds a sampling distribution ($\pi_{aug}$) that specifically targets actions where the existing logs are "weak" relative to what the target policy needs.
  3. Pre-computation: Since solving an optimization problem for every single user request might be too slow for production, the authors propose a way to "pre-learn" a general MVAL policy using a neural network.
  4. Multi-Policy Extension: They extend the math to handle cases where you aren't just evaluating one new policy, but a whole class of potential policies (useful for training a model from scratch).

Datasets

The researchers evaluated MVAL using the Yahoo! Front Page Dataset, a standard benchmark for contextual bandits containing 45 million user visits. Each visit includes a 5-dimensional user feature vector and a pool of articles (actions) with their own features. The dataset was originally collected using a random policy, which allows researchers to unbiasedly simulate any other policy via rejection sampling.

Key Insights and Ideas

  • Compensatory Sampling: MVAL doesn't just blindly follow the target policy. If the old logs already have plenty of data for Action X, MVAL will ignore Action X and spend its "budget" exploring Action Y, even if Action Y is slightly less likely under the target policy. It "fills the gaps" of the historical data.
  • Automatic Unbiasedness: The authors prove that MVAL always produces an unbiased estimator, even if the reward model used to guide the optimization is wrong. A bad reward model might lead to higher variance, but it won't introduce bias.
  • Handling New Actions: MVAL naturally handles the "cold start" problem. If a new movie is added to the system that wasn't in the old logs, MVAL recognizes the infinite variance contribution of that action and forces the system to sample it.

Key Results

Massive Variance Reduction

In single-policy evaluation, MVAL outperformed both uniform sampling and "just sampling the target policy" by orders of magnitude. As shown in the log-scale variance plots, the gap between MVAL and naive methods grows even larger as the target policy becomes more "certain" or deterministic (increasing $\eta$).

Variance reduction across policy determinism levels.

Better Learning

When used in a loop to train a new model (Policy Learning), MVAL reached higher cumulative rewards faster than standard logging approaches. It effectively "curates" the training set to be as informative as possible for the learning algorithm, leading to superior performance over time.

Policy learning performance comparison.

Limitations and Future Work

  • Combinatorial Actions: The current math works well for picking one item from a list. Extending MVAL to handle "slates" (a whole page of results) is a noted challenge due to the exponential complexity of the action space.
  • Reward Modeling: While MVAL is unbiased even with a bad reward model, its efficiency gains depend on having a decent estimate of $E[r^2]$. Future work could explore more complex reward modeling to further improve performance.
  • Latency: While the "Pre-computed MVAL" addresses speed, there is still a trade-off between the optimality of the on-the-fly solver and the speed of the neural network approximation.

Summary updated

BibTeX
@misc{tucker2022variance,
  author = {Aaron David Tucker and Thorsten Joachims},
  title = {{Variance-Optimal Augmentation Logging for Counterfactual Evaluation in Contextual Bandits}},
  year = {2022},
  eprint = {2202.01721},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2202.01721},
}
Figure