Skip to content

Evaluation

An honest benchmark - including where it fails

Anyone can print 99% by testing on training data. Here every number says what it was tested on, how many messages that was, and what is biased about it.

Same system, six test conditions

Why the protocol matters more than the model

F1 for the 'scam' class. A leaky split flatters the model; honest holdouts are 10 to 15 points lower.

  • Random row splitleaky - do not trustSame templates in train and test

    99.7%n=580

  • Template-held-out testML model, unseen templates

    97.3%n=604

  • Hand-written holdout (ML only)64 messages, new phrasings & scam types

    85.3%n=64

  • Blind-40 (ML only)Written after the rules were frozen

    91.9%n=40

  • Hybrid engine - hand-written holdoutoptimisticRules were authored while seeing this set

    96.9%n=64

  • Hybrid engine - blind-40Best estimate of real-world behaviour

    94.7%n=40

Model comparison

Three models, two fair test sets

Character n-grams beat word n-grams on messy transliterated text, and both crush keyword rules.

ModelF1 · template-testAUCECE ↓F1 · hand-writtenPrecisionRecall
Keyword rules (baseline)68.1%0.8670.25950.0%91.7%34.4%
Word TF-IDF + LR94.1%0.9900.10482.0%86.2%78.1%
Char n-gram TF-IDF + LR (shipped)97.3%0.9960.09885.3%89.7%81.3%

ECE = expected calibration error (lower is better). The model is over-confident (ECE ≈ 0.10): its probabilities are used as one input to a fusion layer, not shown as a standalone "confidence".

Errors that hurt: hybrid engine, blind-40

40 unseen messages · suspicious counts as flagged
pred: scampred: safereal scam

18

caught

2

missed

real safe

0

false alarm

20

cleared

Precision 100.0% · recall 90.0%. For a safety tool a missed scam (bottom-right of "real scam") is costlier than a false alarm, so the thresholds lean cautious.

Accuracy by language (template-test)

  • English

    100.0%n=128

  • Hindi

    88.5%n=148

  • Hinglish

    100.0%n=120

  • Telugu (roman)

    100.0%n=166

  • Telugu (script)

    100.0%n=42

Hindi (Devanagari) is the weakest language on held-out templates. On the 64 hand-written messages, Telugu script has only 2 examples, so that cell is anecdotal.

Deep dive: what the model learned and where it still fails

What did the model learn?

Top words - and the shortcuts hiding in them

Reading the coefficients is how I found the dataset's biases.

Pushes toward scam

urltok +5.9phonetok +3.1pending +3.1rs 0 +2.9rs +2.9kyc +2.6స +2.4fee +2.3ज +2.1loan +1.9ब +1.8case +1.8pay +1.8lucky +1.8

Pushes toward safe

nov -3.80 nov -3.8otp -2.9official -2.8dinner -2.4म -2.4xx0 -2.4gaya -2.3na -2.1email -2.1mee -2.1रह -2.0irctc -1.9क स -1.9

Spurious shortcuts spotted: nov (month names appear mostly in my legitimate templates), rs (amounts appear mostly in scams) and single Devanagari/Telugu letters (the word tokenizer splits combining marks). This is exactly why the shipped model uses character n-grams plus rules, and why real-world data collection is the next step.

Failure analysis

What it still gets wrong

  • Dear sir, we are from RBI fraud monitoring. Suspicious activity found on your account. Move your savings to the RBI protected account number we share to keep it safe.

    blind-40missed scamrisk 37

  • आपका बैंक खाता अस्थायी रूप से बंद कर दिया गया है। वेरिफिकेशन के लिए अपना ATM पिन और OTP इस नंबर पर भेजें।

    blind-40missed scamrisk 22

  • आपका गैस सिलेंडर सब्सिडी रुक गई है। अपडेट करने के लिए इस नंबर पर अपना बैंक OTP बताएं।

    hand-writtenmissed scamrisk 28

  • Your Uber ride with Ramesh (AP 31 AB 1234) is arriving. Share OTP 4521 with the driver at pickup.

    hand-writtenfalse alarmrisk 40

Known gaps

  • Hindi (Devanagari) "send me your PIN/OTP" phrasing is only partly covered by the rules.
  • Novel "move money to a protected/safe account" wording from impersonated regulators.
  • Genuine messages that legitimately say "share OTP with the delivery person" can look suspicious.
  • No image/QR analysis yet; scammers often send screenshots.