Experimentation Platforms Meet Reinforcement Learning: Bayesian Sequential Decision-Making for Continuous Monitoring

Runzhe Wan, Yu Liu, James McQueen, Doug Hains, Rui SongKDD 2023

Introduction

In the fast-paced world of online services, A/B testing is the engine of innovation. However, running these tests incurs significant costs, including hardware resources, human hours, and the "opportunity cost" of delaying a winning feature or exposing customers to a losing one. This research from Amazon proposes a paradigm shift in continuous monitoring (early stopping) by moving away from pure statistical significance toward maximizing total customer utility using Reinforcement Learning (RL). By balancing launch benefits against opportunity costs, the RL-based approach significantly improves customer experience and innovation speed compared to classic statistical methods.

The Problem with Fixed-Horizon Testing

Traditional A/B testing often relies on fixed-horizon hypothesis testing (FFHT), where an experiment runs for a predetermined duration to reach a specific statistical power. This approach is inherently inefficient. If a new feature is a clear "home run," waiting weeks to hit a p-value threshold delays its benefits. Conversely, if a feature is actively hurting the user experience, every extra day it runs represents a tangible loss.

Existing "early stopping" methods, such as alpha-spending or sequential Bayes factors, were largely developed for high-stakes clinical trials. In an industrial context, these methods are often too conservative, focusing almost exclusively on controlling Type-I and Type-II error rates while ignoring the economic and customer-impact realities of the experimentation platform itself.

A Bayesian Sequential Decision-Making Framework

The authors frame the problem as a Bayesian Sequential Decision-Making (SDM) task. Instead of relying solely on p-values, they define a unified utility function that incorporates the weekly cost of running the experiment, the one-time hurdle cost of launching a feature, the experiment's impact on customers during the test, and the projected long-term benefit of an early launch.

The sequential decision-making process for A/B testing, where at each step the agent chooses to launch, continue, or terminate without launching.

To solve this SDM task, the researchers employ a Deep Q-Network (DQN) to learn an optimal policy. At each time step, the agent decides whether to "Keep Running," "Stop and Launch," or "Stop and No Launch." To ensure scalability across tens of thousands of diverse experiments, they utilize Contextual RL, feeding experiment metadata into the neural network to allow a single global policy to provide tailored recommendations.

Experimental Evaluation and Results

The RL approach was evaluated using a meta-analysis of historical Amazon experiments, real-data calibrated simulations, and synthetic trajectories. The framework's ability to monitor experiments continuously allows it to react to the evolving strength of the signal.

Evolution of Z-statistics over four weeks for three sample experiments, illustrating the potential for early termination based on observed evidence.

Key findings include:

  • Higher Utility: The RL policy achieved an Average Cumulative Reward of 4.64, nearly triple that of the standard Frequentist approach (1.68) and significantly higher than the best Bayesian baseline (3.91).
  • Faster Termination: The RL agent terminated approximately 88.5% of experiments early, with an average run time of 2.31 weeks compared to the 4-week fixed horizon.
  • Optimized Balance: Unlike classic methods that were either too conservative or too aggressive, the RL approach found a "sweet spot" that maximized the actual impact on the customer base.

Conclusion and Future Work

The core insight of this work is that in an industrial setting, maximizing total customer utility is often more valuable than strictly adhering to traditional significance thresholds. The RL agent naturally learns the implicit value of information, keeping an experiment running only when the expected gain from more data outweighs the cost of waiting.

Future work aims to address the current model's assumption of stationary treatment effects by incorporating Bayesian time-series models to account for "novelty effects." Additionally, the authors suggest a multi-objective optimization approach to provide statistical guardrails for users who still require valid p-values alongside utility maximization.

Summary updated

BibTeX
@inproceedings{wan2023experimentation,
  author = {Runzhe Wan and Yu Liu and James McQueen and Doug Hains and Rui Song},
  title = {{Experimentation Platforms Meet Reinforcement Learning: Bayesian Sequential Decision-Making for Continuous Monitoring}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2023},
}
Figure