Machine Learning-Based Detection of Mobile Money Scan Messages in Ghana: A Comparative Evaluation of Naive Bayes, Support Vector Machine, and Randon Forest Classifiers
Organizations: Department of Computer Science, University of Technology and Applied Sciences, Navrongo, Ghana · Department of Computer Science, University for Development Studies, Tamale, Ghana
Abstract
Mobile money (MoMo) is Ghana's preferred retail payment channel, recording GHC518.4 billion in transactions in December 2025 and over 26.7 million active accounts (Graphic Online, 2026). This growth has coincided with increased social-engineering fraud over Short Message Service (SMS) and Unstructured Supplementary Service Data (USSD), where fraudsters impersonate network operators, agents, relatives, or regulators to obtain personal identification numbers (PINs), identity data, or funds. We present a supervised machine-learning pipeline for classifying scam and legitimate Ghanaian MoMo SMS messages using a labelled corpus of 220 messages across 18 scam and legitimate subcategories. Domain-specific normalisation of currency amounts, phone numbers, and USSD codes preceded TF-IDF vectorisation of unigrams and bigrams. Using stratified five-fold cross-validation and a 20% held-out test set, we trained and evaluated Multinomial Naive Bayes, linear support vector machine (SVM), and Random Forest classifiers using accuracy, precision, recall, F1-score, Matthews correlation coefficient (MCC), and area under the receiver operating characteristic curve (AUC-ROC). Held-out accuracy, F1, and AUC were 1.00 for Naive Bayes and linear SVM; cross-validated accuracy averaged 96.6% (+/-3.3), 94.9% (+/-4.6), and 92.0% (+/-4.2). Discriminative n-grams reflected imperative urgency ("send," "claim," "please send") and PIN solicitation ("PIN," "pincode"); legitimate messages featured confirmatory and cautionary language ("balance," "successful," "do not share"). Findings are contextualised in Sub-Saharan African SMS fraud detection, small template-based corpus ceiling effects, and a pathway toward larger naturalistic multilingual corpora. Interpretable classical classifiers achieve high accuracy on structured MoMo scam text and suit carrier- or handset-level filtering in low-resource, on-device settings.
Figures & tables
| Category | Class | Count | Example theme |
|---|---|---|---|
| transaction_alert | legitimate | 22 | Successful withdrawal/payment / bill-pay confirmation |
| otp_notice | legitimate | 22 | One-time verification code with non-disclosure reminder |
| loan_notice | legitimate | 21 | Genuine loan approval, no upfront fee required |
| loan_scam | scam | 18 | “Pre-approved” loan requiring an activation/processing fee |
| fake_prize | scam | 18 | Lucky-customer / lottery reward requiring PIN entry |
| family_emergency | scam | 18 | Impersonated relative requesting urgent funds |
| Model Architecture | Test Accuracy | Test F1-Score | Model Size (MB) | Avg. Latency (ms) | Peak RAM (MB) | On-Device Feasibility |
|---|---|---|---|---|---|---|
| Multinomial Naïve Bayes | 100.0% | 1.000 | 0.18 MB | 0.42 ms | 12.4 MB | Optimal (Ultra-lightweight) |
| Linear SVM | 100.0% | 1.000 | 0.34 MB | 0.85 ms | 14.1 MB | Optimal (High efficiency) |
| Random Forest (300 trees) | 97.7% | 0.983 | 14.20 MB | 12.60 ms | 48.2 MB | Moderate (Noticeable overhead) |
| DistilBERT Baseline (Ref.) | 98.2% | 0.981 | 255.00 MB | 88.50 ms | 320.0 MB | Impractical without dedicated NPU/Cloud |
Financial Fraud Detection
Financial fraud detection identifies suspicious transactions, accounts, claims, and behavior to prevent losses and guide investigation.
See all 139 papers