
Medicare fraud usually doesn’t look like one obviously fake bill. It looks like a provider who bills a little more than they should, a little more often, for a long time. This project was part of DataGood at Berkeley, and our question was: using only claims data, can we tell which providers are worth a closer look?
I was one of four researchers working under two leads. Each week we built a new way of scoring providers in Python, and I wrote up what each one was actually telling us. A lot of the work was figuring out which numbers meant something, and which just looked dramatic.
What I Worked On
We worked with a public Medicare claims dataset where each provider is labeled as potential fraud or not. I focused on inpatient claims. From each one I built a few simple features: length of stay, how many diagnosis and procedure codes were filled in, and the diagnosis group (keeping the 20 most common and lumping the rest into “Other”). Then I dropped negative payouts and stays over 30 days.
40,007
inpatient claims after cleaning
2,021
providers in our 30,000-claim sample, each labeled fraud or not
57.6%
accuracy of a first logistic model on just two dollar amounts
Our first try was a logistic regression that guessed the fraud label from just the reimbursement and deductible on each claim. It landed at 57.6% accuracy, barely better than guessing. That made sense: a big bill isn’t suspicious on its own. A long hospital stay with lots of procedures should cost a lot. What we needed was a sense of what each claim should have cost, and then to measure how far a provider strays from that.
We built up three signals, each one catching something the one before it could miss.
01
I fit a regression that predicts a claim’s payout from its length of stay, code counts, and diagnosis group, then put a 95% prediction interval around each prediction. Anything above the top of that range got flagged, and the amount over it counted as “excess dollars.”
Adding context nearly doubled how much the model explained (R² from 0.09 with length of stay alone to 0.17). Procedure codes mattered most: each extra one added about $3,692 to the expected payout. About 4.4% of claims ended up flagged.

Each dot is a claim. Dots above the dashed blue line cost more than the model’s 95% range allows.
02
Next we rolled claims up into a profile for each provider: claim count, share flagged, number flagged, total excess, and biggest single excess. After scaling them so no one feature dominated, a kNN score measured how far each provider sits from its 10 closest neighbors.
All 10 of the most isolated providers were labeled fraud, and the average score for fraud-labeled providers was almost double (0.094 vs. 0.054).

Non-fraud providers cluster near zero. The long tail to the right is almost all fraud-labeled.
03
An overall profile can hide a provider who’s fine most of the year and then has one really bad week. So I bucketed every claim by week and tracked each provider’s weekly excess and flag rate. Then I looked at their worst week, their average week, and how often they had any flagged claim at all.
9 / 10
providers with the biggest one-week spike were fraud-labeled
$53.5K
the single worst week of excess billing we found
Every signal pointed the same way. All 10 providers with the most excess dollars were fraud-labeled. The top one, PRV52019, billed about $483K above what the model expected across 511 claims. Only 6.3% of its claims were flagged, but at that volume the dollars still pile up.
The gap between the two groups is clearest at the median. A typical clean provider never goes over the expected range at all. A typical fraud-labeled one does, and keeps billing week after week.
Takeaway
Raw dollar amounts can’t tell fraud apart (57.6%). Comparing each claim to what it should have cost can. Then each provider can be judged against its peers and against its own weekly history. The three signals catch different patterns: steady overbilling, a few huge claims, and short bursts.
Caveats & Next Steps
Part of DataGood at Berkeley, Spring 2026. Led by Zen and Kristen.