smishield

A lie detector for text messages

Paste a suspicious SMS. A small model reads it word by word, the needle tracks its suspicion, and nothing you paste leaves this tab.

The message under examination

The number, short code, name or email address the message came from. Used only for the pattern checks.

or press Ctrl + Enter in the message box

Loading the model

Case files

Suspicion trace

The needle rests until a message is examined. Paste one into the phone or open a case file.

Calibration record

How often the instrument was right on 1,115 held-out messages it never saw during training.

--F1 on spam

Accuracy
--
Precision
--
Recall
--
Confusion matrix, held-out test set
Called legitimateCalled spam
Was legitimate----
Was spam----

Limits of the test

  1. 2012-era evidence. The model learned from the SMS Spam Collection, collected around 2011 and 2012. Modern smishing (fake parcel fees, bank and toll alerts, shortened links) looks different, so the model can miss it. The examiner's notes help explain those cases but do not change the score.
  2. English only. The training messages are English, mostly from the UK and Singapore. Other languages will not be scored reliably.
  3. Not a guarantee. This is a demo and learning project, not a replacement for your carrier's spam filtering or your phone's protections. "No deception indicated" does not mean a message is safe.
  4. When in doubt, go to the organisation's own site or app instead of tapping a link. In the US and UK you can forward spam texts to 7726.

How the instrument works

  1. Read. The message is lowercased and split into words. Links, currency symbols and long numbers become placeholder tokens, and neighbouring word pairs are added.
  2. Weigh. Each word and pair is weighted by TF-IDF, using the vocabulary and IDF values learned during training.
  3. Decide. A logistic regression turns the weights into a spam probability. At 50% or above the message is flagged, the same rule used in training.
  4. Trace. The needle above re-scores the message after every word it has read, so you see where suspicion rose or fell. The final point is the verdict.

Trained in Python with scikit-learn and exported to model.json. Scoring is plain TypeScript with no machine-learning runtime. Metrics: metrics.json. Source: github.com/battlettt/smishield.