Step 6 of 6
Every idea below is tied to something we actually saw in the data: the validation mistakes, the surprising feature weights or the size of the sets. Notice that the evidence comes from the validation set. We never mine the blind test set for ideas.
Evidence: 7 of the 9 spam emails the final model missed on validation were polished cold outreach or CEO / gift-card fraud: clean grammar, ordinary sender address, “Hi Sam” greeting, no links. None of our 9 features can see them.
Add “first-time sender” and relationship features
Has Sam ever replied to or emailed this address or domain? “Are you at your desk?” from a first-time Gmail address is suspicious; the same text from a colleague is not. This is the single most promising signal for the CEO-fraud misses.
Check display name against address
“Zoe Tanaka <zoe@pixelpine.com>” is fine, but a known colleague’s name on an @gmail.com address is the classic impersonation. Compare the display name with the domain and with the contact list.
Detect the ask, not the style
The CEO-fraud emails never use spam words; they ask for a favour, gift cards or an immediate reply. Add features or a text model for “request for money, gift cards, credentials or urgent secrecy”.
Treat unsolicited sales pitches as their own class
Cold outreach alone caused 5 validation misses. First decide with the labelling team whether it counts as spam, then add features such as no prior thread, “quick call” and “10 minutes” phrasing, and a tracking or unsubscribe footer.
Evidence: Our grammar and wording features are crude rules. The grammar counter knows about 20 misspellings and misses swapped-letter typos like “recieve” variants it was never taught, while it wrongly flags friendly lowercase emails.
Learn word patterns directly
Feed the subject and body into a bag-of-words / TF-IDF model, so the data picks up phrases such as “processing fee”, “beneficiary” or “redelivery fee” that we never listed by hand.
Try a pretrained text embedding
Embeddings capture meaning, so “verify your account” and “confirm your credentials” look alike even with different words. Compare against the TF-IDF baseline on the same validation set before adopting; it should earn its extra cost.
Retire features that did not earn their place
The sensational-subject score had almost no weight, and link count turned negative. Drop or redesign them (for example, links to a domain different from the sender’s domain) and re-measure.
Evidence: The final model binned 0 legit emails on validation, but our data has few of the awkward legit cases real inboxes have: shouty promo newsletters, bank alerts that say “verify immediately”, personal emails with typos.
Add sender-trust features
SPF / DKIM / DMARC pass, whether the sender is on a bulk-mail platform with a List-Unsubscribe header, and whether the user subscribed. A real “FLASH SALE” newsletter that passes these checks is not spam.
Look for lookalike domains
A phishing sender such as northbanksecure.com versus the real northbank.com has no funky characters and no cheap TLD. Add an edit-distance check against domains the user already does business with.
Use two thresholds, not one
Very high score: send to spam. Middle band: deliver to inbox with a warning banner or a “likely spam” folder. This recovers recall without risking silent loss of real mail.
Evidence: Each evaluation set has only 40 spam emails, so the plausible recall range on the blind test spans 60% to 86%. We cannot tell a real improvement of a few points from luck.
Collect more labels, aimed at the weak spots
Only 18 cold-outreach and 14 CEO-fraud examples exist across all 200 spam emails. Pull more of these from user “Report spam” clicks and from the previous model’s uncertain scores (active learning).
Evaluate by email type, not only overall
Report recall for each category (prize, phishing, invoice, cold outreach…) and precision for each legit category (receipts, newsletters, personal). An overall 90% can hide a 30% recall on the category that costs you most.
Use cross-validation to stabilise decisions
Instead of one 100-email validation set, rotate which part of the 400 non-test emails is held out, and average. Choices like the cut-off become far less noisy. Keep the blind test untouched.
Audit label quality
Re-review the emails the model confidently disagrees with. Some may be mislabelled (is a subscribed marketing email spam?). Fixing labels can beat any model change.
Evidence: The model’s cut-off and success metrics should come from what a mistake costs, and spam tactics change faster than models do.
Put a price on each mistake
If one lost real email is as bad as, say, 20 spam emails getting through, tune the cut-off to maximise value on validation, not accuracy. Agree this with the team before training.
Validate on a later time window
Re-split by date (train on older mail, validate on newer) to see how fast performance decays as spammers adapt. A random split hides this drift.
Monitor real-world signals after launch
Track “Not spam” clicks (a proxy for precision problems), “Report spam” clicks (missed spam) and per-category trends. Retrain on a schedule and re-run this whole evaluation loop each time, with a fresh blind test set.