NelworksNelworks

ML & AI / Season 2 / EP03

A/B Testing Network Effects and SUTVA Violations

Shez

We have ignition! The 'Double-Coin Referral' feature is a success!

Kurumi

Define 'Success.'

Shez

A 20% Lift! Group B (Treatment) is inviting friends like crazy. Group A (Control) is just chilling.

Kurumi

Wait. Why did the Control Group's activity spike by 5% too?

Shez

Oh, that? That's just... magic. The excitement should be what to talk about!

Kurumi

It's not magic, Shez. It's **Contamination**.

Kurumi

Your petri dishes are touching.

Shez

Contamination? But I used 'user_id % 2'. Even IDs in Control group. Odd IDs in Treatment group.

Shez

They are mathematically separated! It's perfect randomness!

Kurumi

Meet Alice (Odd ID, Treatment). Meet Bob (Even ID, Control).

Kurumi

Alice gets the 'Double-Coin' offer. She wants coins. What does she do?

Shez

She invites her friends?

Kurumi

Exactly. She invites Bob.

Kurumi

Bob is supposed to be in the 'No Feature' universe.

Kurumi

But suddenly, he gets a notification: 'Alice sent you Coins!'

Kurumi

Now Bob is reacting to the Treatment.

Kurumi

He clicks the link. He engages. Maybe he even gets the coins if your backend is lazy.

Shez

But... if Bob engages... my Control baseline goes up.

Kurumi

Correct. And if the Control goes up, your 'Lift' (Treatment minus Control) gets smaller.

Kurumi

You are actually **Underestimating** your success because you broke the silence.

Shez

Wait. If I'm underestimating... then the feature is even *better* than I thought?

Kurumi

In this current case? Maybe.

Kurumi

But what if it's a **Competition**?

Shez

Competition?

Kurumi

Imagine we are Uber. We give Driver A a bonus. Driver A drives faster and takes all the customers.

Kurumi

Driver B didn't just stay neutral. Driver B actively **lost** money because Driver A existed.

Kurumi

This is **Negative Spillover**.

Kurumi

You calculate: Treatment (High) - Control (Super Low).

Kurumi

You think the bonus is a miracle. But really, you just cannibalized your own fleet.

Shez

So my 'Science' is a lie?

Kurumi

Your math assumes **Independence**. Your users are a **Network**.

Kurumi

You violated **SUTVA**.

Shez

SUTVA?

Kurumi

Stable Unit Treatment Value Assumption. You must have skipped that class. Think of it as the 'Food Coloring in Water' rule.

Kurumi

Standard A/B testing assumes everyone gets their own glass of clear water.

Kurumi

But a Social Network is like a giant punch bowl. If you add food coloring to one part (Treatment), it spreads—everyone's drink changes color.

Shez

Okay. How do I separate the drinks? I can't stop Alice from mixing with Bob.

Kurumi

No. But you can pour Alice and Bob's drinks into the same cup.

Shez

Clusters? Like... peanut clusters?

Kurumi

Instead of randomizing *Users*, you randomize *Communities*.

Kurumi

New York City = Treatment.

Kurumi

Chicago = Control.

Kurumi

Alice in New York talks to Bob... who is usually also in New York.

Kurumi

The spillover stays inside the bucket. The contamination is more likely to be contained.

Shez

But New York is different from Chicago! New Yorkers walk fast and eat pizza! Chicagoans... eat casserole they call pizza.

Shez

The variance will be huge!

Kurumi

Correct. You lose **Statistical Power**.

Kurumi

Since you only have N=2 (Two cities), your error bars are massive. You need lots of clusters (many cities) to make this work.

Shez

We don't have enough cities. We're a startup. We only operate in San Francisco.

Kurumi

Then you use the Fourth Dimension.

Shez

Time travel?

Kurumi

**Switchback Testing**.

Kurumi

You toggle the feature on and off for the *entire* city at once.

Kurumi

9 AM: Everyone gets the Bonus.

Kurumi

10 AM: Nobody gets the Bonus.

Kurumi

You compare the *aggregate* performance of the Red hours vs. the Blue hours.

Shez

But what if someone orders at 9:59 (Treatment) and the driver picks them up at 10:01 (Control)?

Kurumi

That's **Carryover Effect**.

Kurumi

The solution is you delete the data from 9:55 to 10:05. You let the system 'wash out' between cycles.

Shez

...like rinsing a brush between paint colors.

Shez

So my 'User Split' A/B test is basically useless for viral features?

Kurumi

It's worse than useless. It gives you false confidence.

Kurumi

You think you have a 20% lift, so you roll it out globally.

Kurumi

Then, when everyone has it, the 'novelty' wears off, the competition settles, and your actual revenue stays flat.

Kurumi

And you blame the Engineering team for 'implementation issues.'

Shez

Abort! Abort! We are contaminated!

Kurumi

If you have a social graph, run a clustering algo (like Louvain). Group tightly connected friends together.

Kurumi

Treat the *Cluster* as the Unit.

Shez

My sample size dropped from 1,000,000 Users to 50,000 Clusters.

Kurumi

But your **Truth** went from 0% to 100%.

Shez

(Checking) Wait... I'm in the Control group now. Why did I get this?

Kurumi

Because you're in the same 'Office Cluster' as me.

Kurumi

And I'm in the Treatment group.

Shez

You... you invited me?

Kurumi

I wanted the coins.

Shez

So you *do* care about the product!

Kurumi

Hurry up and accept the invitation so I can get the coins.