How Google Conducts more/better/faster experiments
Google initially published a paper around 2010 on setting up the experimentation infrastructure to support running faster, better and more experiments. Here’s the link. The following is a cursory attempt at understanding Google’s approach.
Overview: Google conducts experiments to modify user interfaces and change ML algorithms that affect ranking or content selection. To support this goal, Google needs:
- Sufficient Infrastructure to support
- A wide range of tools to support the usage of the infrastructure
- Great educational processes to help users make better use of these assets
Defining an experiment:
- Representative segment of the population
- A change that’s interested to be tested (e.g. visible changes such as UI or non visible changes such as changes to the underlying ML algorithm in ranking output)
- A split on the representative segment of the population (test set and the control set)
- Response to the change that’s of interest. This is the objective. (e.g. Click through rate, conversion rate, sales or other types of business metrics etc.)
At Google, experiments are run to:
- Test out new product features
- Explore the space around existing features
Current Challenges (As of 2010 at Google?)
Keeping up with the rate of innovation is difficult. Testing as many ideas as possible is necessary but not supported.
Challenges related to experiment infrastructure:
- Single layer of experiment structure: Every query is in at most one experiment. This is easy to use and flexible but insufficintly scalable.
- Multi-factorial experiment structure: Every parameter (factor) can be experimented on independently. Each experimental value for a parameter overlaps with every other experiment value for all of the other parameters. Each experiment query will be in N experiments simultaneously and N is the number of parameters (factors). Even this structure is impractical since at Google, there are thousands of parameters to be experimented on and not every factorial combo should be tested (pink text on pink background for example).
Goal of a better experiment infrastructure:
- More: scalability to run more experiments simultaneously and flexibility to run different configurations/sizes while maintaining the statistical significance
- Better: Invalid experiments shouldn’t be run at all. Valid but bad experiment should be caught quickly and disabled. Standardized metrics should be made available
- Faster: Quick and easy to set up an experiment
- Partition the parameters into subsets. Every subset contains parameters that cannot be varied independently of each other.
- Every subset is associated with a layer that contains experiments. Each experiment query would be in N experiments and N is the number of layers.
- Each experiment can only modify parameters associated with its layer and the same parameter cannot be associated with multiple layers.
Context around Experimentation Literature:
There are three areas of experiments:
- Single and multi-factorial experiments in the traditional statistical literature.
- Running Web experiments. Kohavi has done a paper on this area in a relatively comprehensive way.
- Interleaved experiments. This is the specific type of experiment focused on evaluating ranking changes.
Structures and key concepts that support this proposed experimentation system
- Domain: This is a segmentation of traffic
- Layer: This is a subset of the system parameters
- Experiment: This is a segmentation of traffic where Zero or more system parameters can be given alternate values that change how the incoming request is processed
- Launch layers: They are different from experiment layers in that they are contained within default domain. They are separate partitioning of parameters. They are used to gradually roll out changes to all users without interfering with existing experiments and to keep track of these roll outs in a standardized way.
- Diversion Types: How domain is diverted. This can be done either randomly or through using Cookie Mods to generate traffic diversions.
- Canary new code: These are methods used to test new code on a small amount of traffic and make sure that the new code isn’t buggy. The code would work when there’s more traffic.
- Binaries: A collection of code/scripts with functionalities. In this context, it is some type of an executable.
Given the infrastructure, the process of evaluating and launching a typical feature follows the following:
- Implement new feature in the right binary (code review, binary push, default values etc.)
- Create a canary experiment with small traffic to ensure that the feature is working. If not working, then more code needs to be written/revised.
- Create experiment or a set of experiments to evaluate the feature. Experimentation component includes specification of diversion type, parameters, conditions and affected system parameters
- Evaluate the metrics from experiment. Depending on the results, additional iterations may occur. Additional iterations occur by modifying or creating new experiments.
- If feature in question is launchable, then launch process is initated:
- Launch layer and launch experiment is then created. This is to gradually ramp up the launch layer experiment, and then finally delete the launch layer and change the default values of the relevant parameters
Tools and Processes to support overlapping infrastructure
Tools: Data File Checks Utilities
Automated data checks on input files to prevent useless/broken experiments from taking place. Checks include the following:
Consistency and constraint errors
- Uniqueness of id’s
- Whether experiment is in the right layer
- Whether layer has enough traffic to support
- Is the experiment asking for traffic claimed by other experiments
- Basic experiment design checks (does experiment have a control…)
- Is the domain diverted in the same way as the others?
Tooling: Real-time Monitoring & Experiment analyses
These are tools that capture and track basic metrics as quickly as possible in order to determine if there’s anything unexpected happening. Tool utilities include:
- Choose metrics to track
- Setting expected range for individual metrics and guardrail on these metrics
- Guardrail communications: how and where communications are delivered
- Experiment shut down
- Configuring and adjusting experiment parameters
While the above is used to enable simultaneous experiments and expediting the experiment process, experiment analysis tool is the other side of the coin.
The experiment analysis tool is used to provide accurate values for the suite of metrics that experimenters examine to evaluate the experiment. Multiple metrics can be combined into a single objective function but the experimenters can also examine a suite of metrics.
Key design goals of an experiment analysis tool include:
- Correctly computed and displayed confidence intervals
- Good UI for ease of use and understanding
- Support for slicing: aggregate numbers should be drilled down
- Extensibility: custom metrics should be added
Experiment Design, Sizing, Pre-post periods
Effective Size of an experiment:
N = (1/control query +1/experiment query)^-1
In this iteration, the estimates of standard error can be a challenge.
Pre period is a period of time prior to starting the experiment where the same traffic is diverted into the experiment but with no changes made. This is to ensure that traffic diverted is really similar to the control population traffic.
Post period is the same but after the conclusion of the experiment. This is useful for determining the if there are any learned effects from running the experiment.
Experiment infrastructure adoption education
Tools and infrastructure discussed above are technical considerations required for enabling more, better, faster experimentation. On the people side, experiments should be:
- Well designed
- Result of an experiment are understood and disseminated
This is a council of engineers that review a light weight checklist that experimenters fill out prior to running the experiments. These questions address:
- Basic experiment characterization (what does the experiment test, what are the hypotheses)
- Experiment set up (which experiment parameters are varied, what each experiment or set of experiments tests…)
- Experiment diversion and triggering (what diversion type and which conditions to use for diversion, what proportion of diverted traffic triggers the experiment)
- Experiment analysis (which metrics are of interest, how big of a change the experimenter would like to detect)
- Experiment sizing and duration (given the affected traffic, the experiment has sufficient statistical power to detect the desired metric changes)
- Experiment design (whether pre and post period is warranted)
The benefit of this is that it is a useful way for disseminating updated best practices with regards to experimentation. Checklist is a hosted web application.
Interpreting the data
The other process put in place is a forum where experimenters bring the results to discuss with experts. The goal of this forum is to:
- Ensure that the experiment results are valid
- Given valid results, make sure that the metrics being looked are a complete set with regards to understanding what’s happening.
- Given a full set of results, discuss and agree on whether overall the experiment is a positive or negative user experience, so that decision makers can use the data to determine whether to launch the change.