Machine learning project · neuefische Data Science

Finding meter fraud at STEG

A fraud priority list for Tunisia's electricity and gas company, built on real billing data from 2005 to 2019.

Tim Pfeiffer · Irem Baykal · Dhanya Rajendran

The problem

Tampered meters cost STEG about 200 million dinars

200 M

Tunisian dinars lost because consumers tamper with their meters.

Few

STEG can only inspect a limited number of homes. Every wasted visit costs money.

The question: whom should STEG visit first?

Our task

Give every client a fraud risk score

1Billing history

of every client

→
2Computer model

learns what fraud looks like

→
3Priority list

highest risk first

The list tells STEG where to send its limited inspections.

The data we looked at

135,493 clients and 4.5 million bills

135,493

clients with a known fraud result (training data)

4.5 M

bills, about 30 per client

22

facts: 6 per client (region, client category, start date, …) and 16 per bill (date, price plan, meter, consumption, …)

58,069

more clients (1.9 M bills) without fraud result, for the final test

The model needs one row per client, so the bills are summarised per client.

First finding

Fraud is rare: 5.6% of clients

1 in 18

clients is fraud (5.6%).

94%

right if we said "no fraud" for everyone. And we would find nobody.

So we do not ask "how often are we right?", but "how well do we rank the clients?"

First look at the data

A few signals stand out

Share of clients with fraud, by signal

Each bar: share of fraud among clients with this striking trait. Dashed line: average of all clients (5.6%). Links in the data, not proof of cause. Hover or tap a bar for details.

Three signals up close

What these signals look like

Number of meters

Like a car whose odometer was swapped several times. Something may be going on.

Gas: ups and downs in use

One household heats steadily all winter, another one's gas use jumps up and down.

Meter reading goes backward

An odometer that runs backward. Rare: only 1,816 clients.

Share of clients with fraud. Dashed line: average of 5.6%.

Gas and electricity

Gas and electricity behave differently

7.2%

of gas clients are fraud, against 5.6% of all clients.

Same

result on both meters for region and client category.

9.2%

of electricity clients whose readings do not add up to the billed consumption are fraud (5.5% for the others). On gas: 7.9% vs 7.1%.

Some signals are mainly an electricity signal. Many gas groups are small, so we read them with care.

Our approach

From raw bills to a priority list

  1. 1Clean and explore

    same rules for training and test data

  2. 2One row per client

    summarise about 30 bills each

  3. 3Baseline

    a simple model as the score to beat

  4. 4Compare models

    four models, same fair test

  5. 5Tune

    search for better settings

  6. 6Learn from mistakes

    which fraud cases do we miss, and why?

  7. 7Test new signals

    keep only what really helps

  8. 8Final model

    trained on all labelled clients, one submission

An early split and fair tests keep the result honest.

Result: ranking quality

From 0.757 to 0.881

Ranking quality (ROC-AUC) on held-out clients. 0.5 = coin flip, 1.0 = perfect.

Pick one fraud client and one honest client at random: the better the score, the more often the model puts the fraud client higher on the list. Bars start at 0.5 (coin flip). Hover or tap for details.

Key lesson

Better signals beat better settings

Gain in ranking quality (ROC-AUC) per step

+0.106

from new signals (+0.084 and +0.022)

+0.008

from tuning the settings (+0.007 and +0.001)

The biggest gains came from learning from the model's mistakes.

What it means for STEG

Visit the top 10%, find 57% of the fraud

Random checks (flip a coin)
Our model
10%

of all fraud cases found, about 150 of 1,513

5.7x
57%

of all fraud cases found: 864 of 1,513

1 in 18

visits is a hit (5.6%)

5.7x
1 in 3

visits is a hit (32%)

0.5

ranking quality (ROC-AUC): a coin flip

0.881

ranking quality (ROC-AUC); Zindi test: 0.874

Same 2,710 visits (top 10% of 27,099 held-out clients, 1,513 fraud). Random checks: expected values from the 5.6% fraud rate, not a measured test.

Honest limits

Zindi score 0.874, and what to be careful about

Ranking quality, public leaderboard

Our own check (0.876) was close to the leaderboard (0.874), so the validation was honest. Comparison is approximate: different competition rounds use different parts of the test set.

Be careful with two strong signals

Number of meters and time since the last bill may partly show what STEG did after it found fraud: replace a meter, stop visiting closed accounts.

Our data has no date of detection. Next step: ask STEG how these columns come about.

Thank you for your attention.
Questions?

Tim Pfeiffer · Irem Baykal · Dhanya Rajendran