Designing and Deploying Online Field Experiments

Eytan Bakshy, Dean Eckles, Michael S. Bernstein

Abstract

Online field experiments are essential for understanding user behavior and optimizing web services. However, traditional A/B testing frameworks often struggle with complex, multi-factor designs and the management of concurrent experiments. This paper introduces PlanOut, a domain-specific language (DSL) and framework developed at Facebook that decouples experimental logic from application code. By utilizing deterministic hashing and namespaced management, PlanOut enables researchers to conduct sophisticated, iterative experiments with high statistical rigor and minimal engineering overhead.

Introduction

In the early 2010s, online experimentation was largely synonymous with simple "pick-the-winner" A/B testing. While effective for minor UI tweaks, this approach was insufficient for sophisticated research aimed at understanding causal mechanisms. The authors identify three primary challenges in scaling experimentation: the entanglement of experimental and application logic, the technical complexity of implementing factorial designs, and the difficulty of coordinating overlapping experiments in large organizations.

The PlanOut Framework

PlanOut addresses these challenges by treating every aspect of a service as a tunable parameter. Experimental designs are expressed as scripts in the PlanOut DSL, which are then interpreted by the application.

Core Mechanisms

  • Deterministic Hashing: Instead of volatile random number generators, PlanOut uses SHA1-based hashing. By combining the unit_id, experiment_id, and variable_name, the system ensures random yet consistent assignments across platforms without requiring a central state database.
  • Namespaces and Segments: To prevent interference between concurrent experiments, PlanOut divides a "namespace" (e.g., a specific product area) into thousands of segments. Experiments are allocated to specific segments, ensuring that users are only exposed to one experiment modifying a particular set of parameters at a time.
  • Decoupling: Application code remains clean by simply calling an API like exp.get('button_color'). The logic determining the value is handled entirely within the version-controlled PlanOut script.
PlanOut representations: (a) source code, (b) management UI, (c) serialized JSON, and (d) the resulting factorial design space.

Deployment and Real-World Applications

PlanOut's utility is demonstrated through its deployment at Facebook, where it has managed hundreds of concurrent experiments. It has enabled large-scale studies, such as the 2012 US Presidential Election voter turnout study and various "social cues" experiments involving millions of users. These experiments often require complex randomization logic that would be difficult to implement manually.

Example of a social cue experiment on Facebook, a type of complex field experiment enabled by PlanOut.

Key Insights

  • High Ceiling, Low Threshold: The DSL is accessible to designers for simple tests while remaining powerful enough for data scientists to implement conditional logic and within-subjects factorial designs.
  • Stateless Assignment: The use of deterministic hashing with unique "salts" for each variable ensures independence between parameters, a critical requirement for valid statistical inference.
  • Exposure Logging: By automatically logging when a parameter is accessed, PlanOut allows researchers to focus their analysis on users truly exposed to a treatment, significantly increasing statistical power.

Conclusion and Future Work

PlanOut successfully scales experimentation by centralizing logic and reducing implementation errors. While highly effective for independent units, future work is needed to address network effects (where one user's treatment affects another) and to further automate the statistical analysis of complex designs. Despite these limitations, PlanOut represents a significant step forward in making rigorous field experimentation a standard part of the software development lifecycle.

Summary updated

BibTeX
@inproceedings{bakshy2014designing,
  author = {Eytan Bakshy and Dean Eckles and Michael S. Bernstein},
  title = {{Designing and Deploying Online Field Experiments}},
  booktitle = {The Web Conference},
  year = {2014},
  doi = {10.1145/2566486.2567967},
}
Figure