Problem statement
Fake parcel fees, prize claims and "your account will be blocked" texts reach people who have never been told what to look for, often older relatives or first-time smartphone users. Most checkers need an account, an app install or sending the message to a server.
Solution overview
scamscan is a small machine-learning model that scores a pasted SMS and lists the words that pushed the score up or down. The same model runs from a Python command line and inside a static web page, so nothing the user types leaves the device.
Key features
- Paste a message, get "reads like a scam" or "reads like an ordinary message" with a score.
- The five words or word pairs that moved the score most, in plain language ("a link", "a money sign").
- A "before you rely on it" section with the measured error rates and the model's limits.
- CLI:
scamscan check,eval,train,probe; JSON output for scripts.
Target users
People who receive suspicious texts and their family members who help them; community groups running digital-safety sessions.
How it was built / AI tools used
Python, scikit-learn (TF-IDF + logistic regression), NumPy, plain JavaScript, HTML, CSS, GitHub Pages, pytest, Node.js (parity test). Data: UCI SMS Spam Collection (CC BY 4.0).
This project was built with AI-assisted coding. All code, numbers and tests are in the public repository, and every metric is reproduced by scamscan eval. Libraries: scikit-learn, NumPy (credited in the README).
Results (real, from scamscan eval)
- Held-out 20% (1,115 messages): F1 0.966, precision 0.986, recall 0.946, ROC AUC 0.996. 2 of 966 ordinary messages wrongly flagged, 8 of 149 spam missed.
- 5-fold CV F1: 0.966 ± 0.010.
- 14 newer-style messages written for the project: 9 correct. Misses: "lost my phone, send money", job scam, courier impersonation; false alarms on an OTP and a bank debit alert.
Challenges
The public dataset is from around 2012. Modern impersonation and job scams have no links or prize words, and real bank alerts look like spam. I report this instead of hiding it.
What's next
Recent labelled data, Hindi and Hinglish messages, separating real bank alerts and OTPs, a one-tap Android share target.
Team
Solo — Prafull Joshi