A dissenting view: predicting fraud without data science

Alexander Salkov5 Oct 2022

Problem

Sportmaster is a group of companies with more than 500 stores. Fraud there means suspicious transactions, atypical employee and customer behavior, and violations of the technological process. The data sits in store databases, a central data center, Oracle, MS SQL under 1C and Kafka. An Excel pilot took about 90 minutes per store, so a pass over 500 stores needed about 750 hours. Pulling data straight from operational systems also put analytical (OLAP) queries on databases built for transactions (OLTP).

Example from the article: a cashier returns a receipt at 14:20:19 and rings the same receipt up again at 14:25:36 at a lower price, keeping the difference.

Solution in brief

A business expert writes fraud hypotheses as heuristics, and the data team runs them as SQL over a layered data lake: raw data, a pre-aggregate layer of blocks shared by many hypotheses, then the hypotheses. Data comes from relational sources through Kafka with controlled parallelism, and Airflow sensors start each layer when its inputs arrive. Flagged operations go to the expert in a BI report.

Questions this case answers
  • How to detect internal fraud in a distributed operation from expert-written heuristics when there are no labels and the source systems cannot take an analytical load
  • How to build a layered data platform where reusable pre-aggregates make each new rule cheap to compute and add
  • How to catch cashier, loyalty-card and employee fraud across hundreds of stores without a trained model?
  • How to turn fraud hypotheses from business experts into scheduled SQL checks on a data lake?

Tools and methods

  • Rule-based heuristics — expert hypotheses as fraud flags on rows
  • Pre-aggregate layer — shared aggregates computed once before the hypotheses
  • Incremental loading — own increments for sources that give none
  • Apache Kafka — buffer between relational sources and the lake
  • Apache Hadoop — storage and compute for all layers
  • Apache Airflow — orchestration with data-arrival sensors
Continue reading — it's free

Google or a one-time email code. No password.