ScamShield: Scam SMS Detector (Tanglish-aware, classical ML)
Stacked ensemble (LogReg, LinearSVC, NB-SVM, SGD, LightGBM) on char/word TF-IDF + handcrafted features, Platt-calibrated. Classifies an SMS as scam/spam or OK. Text only: no link checking, no transaction fraud, no voice or image scams.
- Live demo: https://scam-sms-detector-1.onrender.com (free instance, first load takes about a minute)
- Code and training notebook: https://github.com/kamaleshkumar12/scam-sms-detector
Test results (745 messages, mostly UCI SMS Spam Collection)
- Accuracy 99.2%
- Recall 98.2% (111/113)
- False positive rate 0.63% (4/632)
- ROC-AUC 0.9986
731 of 745 test messages are UCI (UK English) and only 1 is a real Indian message, so these numbers do not measure performance on Indian scam traffic.
Limitations
- Only 4 real Indian messages in the data, so Indian-specific accuracy is unmeasured
- Tanglish training data is mostly synthetic templates; unseen wording may be missed
- Romanized Tanglish supported, Tamil script not covered
- Bare-number messages can be falsely flagged
- Legit promotional or urgent-sounding messages may be flagged
- Do not use as the only filter for blocking bank or OTP messages
Usage
Download scam_detector.py and scam_model.joblib from this repo into the same folder, then:
pip install scikit-learn==1.6.1 lightgbm scipy numpy pandas joblib
import scam_detector as sd
B = sd.load("scam_model.joblib")
print(sd.predict(B, ["Update KYC now http://example.xyz"]))