68 points · by btilly · 14y ago · 24 comments
The reality is (as it points out in the text) the overwhelming majority of you don't A/B test. If you don't A/B test already you should stop reading about A/B testing and start A/B testing. It will be the most important thing you do today. It will probably be the most important single thing you do in quite a while.
For the overwhelming majority of people A/B testing, this is similarly not really a priority for you today. You're fine doing what you're doing. (But... test more.)
But for the sliver of a sliver of people who really need to care about moving the state of the art in conversion optimization forward, this essay is very important. If I had an A/BatSignal I would be shining it on this.
The original article mentions problems in MAB algorithms dealing with delayed feedback. Such issues are largely ameliorated by the use of algorithms related to "Thompson sampling" [3], which induces stochastic trial allocation policies rather than the deterministic policies induced by UCB's selection process. It's definitely possible to develop Thompson-like methods for the exploration-oriented MAB problem, and such methods can rapidly distinguish the best among a rather large set of options, as might be required in applications like MVT (see note below).
Note: I'm currently doing academic research in this area and, if anyone's particularly interested, I could share some of the (simulated) empirical data and algorithmic details pertinent to what I said above.
[1]: Multi-Bandit Best Arm Identification, Gabillon et. al, NIPS 2011
[2]: PAC Subset Selection in Multi-Armed Bandits, Kalyanakrishnan and Stone, ICML 2012
[3]: An Empirical Evaluation of Thompson Sampling, Chappelle and Li, NIPS 2011
It would be nice to have a MAB framework that utilizes MVT so that you could preload 100s of alternates (c2a, headline, copy, images, placement) and see let it go to town.
MVT is inherently more complex. I guarantee you that there are MAB based systems that do MVT on problems of insane complexity. I pointed at one system at Yahoo that likely is an example. And the potential win isn't small. Yahoo claims a 300% increase in clicks on their home page module since implementing it.
But I haven't noticed anything like that publicly available. (I have seen companies that do it behind the scenes - but the one that first comes to mind hides that detail and tries to be priced on a pay for performance model.) Of course a company that already does MAB could build a custom solution. Or you can try to build your own if you think there is money in it. My personal life does not currently permit me the time commitment that a startup would require. But if you or someone else wants to build it, I'd be willing to consult on how to make it work.
Picture is 1,000 words. A video is 30,000 words a second.
I dream of a MAB/MVT combo solution. I have a project coming up that I might try this out on.
In terms of the MVT style stuff you discuss, we're in very early stages of looking at it. Not sure when it'll arrive -- depends on how much interest we get.
But, to be clear, this is a heuristic in A/B testing. If you have a window of time over which you know your distributions are stationary, you should always use a logarithmic regret MAB algorithm because it is theoretically better.
I think the best way to frame this argument is that because the domain does not match the assumptions of MAB, A/B testing has been shown to be robust and easy to modify for non-stationary domains, while logarithmic regret algorithms are somewhat more fragile.
A/B testing does not need to assume that it is testing over a small window in time that has stationary conversion rates. In fact in practice tests run for a long window of time over which you have good evidence that the distribution is not stationary. For example in the middle of running a long test that eventually found a small lift, I've often run and rolled out a second test that generated a much stronger lift.
The weaker assumption that you need is that the preference between versions is stable across your fluctuations. Then because the mix of versions is time independent, that non-stationary fluctuation is not statistically different between the slice that was put into A and the slice that was put into B. And therefore the variation between different samples becomes just another unknown random factor that does not interfere with your statistical analysis of whether there is a difference.
This is an advantage between A/B testing and the current state of the art in MAB algorithms. When this came up before, Noel (at Myna) and I privately did an admittedly brief search of the literature for discussion of this point with regards to MAB algorithms. We turned up a number of things that would work in the long run, but none that directly addressed the problem.
But in discussion we did manage to come up with effective MAB algorithms, whose regret is only a constant factor worse than standard MAB algorithms, that accurately will identify stable preferences in the face of constantly fluctuating conversion rates. To the best of my knowledge nobody, including Noel, has yet implemented such algorithms in practice. But in principle it can be done.
However even if you do it, several of my other points still apply as real differences.
I am slightly confused and this may demonstrate my ignorance, but I was under the impression that A/B testing worked by allocating two different approach to the users and then scoring the response. This provides a sampling from the population of users as to how effective A or B is. You can then run some statistical test on the averages of the scores for each test to determine which one is the winner.
If what I said is true, these statistical tests almost always assume that the distribution that is being drawn from is stationary. So, the only way things work out is if you have an underlying stationary distribution. Otherwise, your statistical test might indicate the wrong thing.
I freely admit that many of your points are still valid, but I don't see how A/B is a more powerful algorithm that has less assumptions.
The necessary, reasonable, and much weaker assumption needed for A/B testing is that users are independent of each other, and arrive by some Poisson process. Meaning that at any given point in time there is some average rate that users arrive, but each user's arrival is independent of all other arrivals. (More mathematically precisely, the number of people who will arrive in any specified time period follows a Poisson distribution. Poisson processes accurately model everything from nuclear decay counts to emergency room arrivals.) If you randomly divide a group of people who arrived by a Poisson process into two subgroups in a fixed ratio (say, evenly), those subgroups will also turn out to be generated by a Poisson process.
Now we're going to take those subgroups, and feed them into our versions. Let's focus on what happens with version A. Depending on when a user arrived, that user will have some chance of converting to a success, and some chance of not doing so. If we look at a random user that arrived and ignore when they arrived, their probability of converting will be the average of their probability of converting, weighted by the rate of arrival. Furthermore our assumption that users are arriving from a Poisson process means that each user is statistically independent from all of the others. Now it is true that if we pay attention to the fact that certain users arrived close to others, there are likely correlations to be found between those specifically users. But if you sample two random users from all of the users who could have arrived, they will be independent and have an identical probability of conversion, which is that average. (This flows out of the assumption that the initial population came from a Poisson process.)
This same analysis can be done for A and for B. Now we don't know the actual conversion rates over our trial. But suppose that we did know them, and it happened to be that the conversion rate for B is better at every time than for A. Then it it is easy to show that the average conversion rate (weighted by arrival rate of course) over the whole interval for B would be better than for A.
Therefore if we assume that there is a consistent preference, statistical evidence over the sample that B converts better than A is valid statistical evidence that B is actually the better version at any given point in time. This holds even if the difference between their conversion rate is much lower than the fluctuation of the conversion rates of both over the interval we sampled from.
(Very helpfully for A/B test practitioners, this math works whether or not you happen to understand it. As long as you're not adjusting sampling rates, A/B tests are statistically valid.)
Now take a traditional MAB algorithm. The whole analysis that I just did falls apart. The fact that we send traffic to the versions at different rates at different points of time means that the average for random people in the two versions is weighted differently over the interval. This opens up the possibility that the average conversion rate of the whole sample for B can be better than for A, yet A might at every point in time have had a better conversion rate than B.
See http://en.wikipedia.org/wiki/Simpsons_paradox if that seems impossible to you. If you've read that and understand how being better in the sample that a MAB algorithm collected is not statistical evidence that you're actually better, then you may want to re-read this post to understand why an A/B test is still statistically valid.
To avoid this trap, what you need to do in the MAB algorithm is either subsample or scale data (subsampling is provably more robust but not much so, scaling is simpler and converges faster) so that the statistical decision that you're basing your MAB choices on avoids this pitfall, at least in the limit. But as I said before, a detailed discussion of how to make this work and the necessary trade-offs would get fairly involved.