AKSHAR
AKSHAR
An on-device SMS scam classifier for Android — no server, no data egress, no guesswork.

The Challenge
India's SMS fraud is structural. Blocklists get rotated faster than they can be maintained. Carrier-level filters miss content-based tricks — bank impersonation, OTP harvesting, lottery lures — that change wording but not intent. Cloud classifiers work, but they require sending every private message to a third-party server, which is the wrong trade-off for a privacy tool. The model also had to handle India's SMS reality: code-mixed Hindi-English, regional transliterations, and scam templates that borrow legitimacy from real bank and telecom language.
The Approach
The entire inference pipeline runs on-device. A fine-tuned DistilBERT-base-multilingual model handles the language-understanding layer; a parallel regex rule engine catches known scam templates and contributes a signal score. Classification fires only when both the ML probability (p_scam > 0.85) and at least one regex signal agree — reducing false positives without softening the classifier on clear scams. Verdicts are explainable: the UI surfaces the specific regex patterns that contributed, so users understand why a message was flagged. The app holds zero network permissions; there is no HTTP client, no telemetry, and no analytics — by construction, not by configuration.
What was built
Deliverables
The Outcome
Defendra ships as an Android app with a working real-time detection pipeline and zero network egress. The model, trained on ~2,300 examples (~87% safe, ~13% scam), runs inference entirely on-device via LiteRT. The BroadcastReceiver catches and classifies incoming SMS before the notification surfaces. The manual scanner lets users retrospectively audit their inbox. Because SMS permissions restrict Play Store distribution, the APK is distributed via F-Droid — keeping it in the hands of privacy-conscious users who chose the trade-off deliberately.
Results
Built with