Your Naive Bayes spam filter degrades over time as spammers change their vocabulary. How would you keep it accurate?

Quick Overview

Asks how to keep a Naive Bayes spam filter accurate while spammers keep changing the words they use. Tests handling of adversarial concept drift: incremental updates from user feedback, forgetting old evidence, features that resist obfuscation, monitoring and defending against poisoned labels.

Your Naive Bayes spam filter degrades over time as spammers change their vocabulary. How would you keep it accurate?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

Your Naive Bayes spam filter degrades over time as spammers change their vocabulary. How would you keep it accurate? ```hint Look at the parameters Naive Bayes stores very little. Think about what its parameters are and what that makes cheap to do as new mail arrives. ``` ```hint Think like the spammer Ask which inputs a spammer can change cheaply and which ones they cannot change without hurting their own delivery. ``` ### Clarifying Questions to Ask - Where do labels come from today, and how many labeled emails arrive per day? - Is there one global filter, or a model per user or per organization? - What costs more for this product: a spam email reaching the inbox, or a legitimate email landing in the spam folder? - How quickly do new spam campaigns need to be caught: within hours, or is a daily update enough? ### What a Strong Answer Covers - How to keep the model current with new labeled data, and where those labels come from - How to reduce the weight of old evidence as spam changes - Features that hold up against new and deliberately obfuscated vocabulary - Signals outside the message text that spammers find hard to change - Monitoring, safe rollout of updated models, and protection against poisoned feedback ### Follow-up Questions - How would you choose the decay factor or the window length? - A coordinated group of accounts starts marking legitimate newsletters as spam. How would you detect it and limit the damage? - How would you handle a "good word" attack, where spam is padded with words common in legitimate mail? - When would you replace Naive Bayes with a different model, and what would you give up?

Overview: Asks how to keep a Naive Bayes spam filter accurate while spammers keep changing the words they use. Tests handling of adversarial concept drift: incremental updates from user feedback, forgetting old evidence, features that resist obfuscation, monitoring and defending against poisoned labels.

General logo
General
Nov 25, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

Your Naive Bayes spam filter degrades over time as spammers change their vocabulary. How would you keep it accurate?

Clarifying Questions to Ask Guidance

  • Where do labels come from today, and how many labeled emails arrive per day?
  • Is there one global filter, or a model per user or per organization?
  • What costs more for this product: a spam email reaching the inbox, or a legitimate email landing in the spam folder?
  • How quickly do new spam campaigns need to be caught: within hours, or is a daily update enough?

What a Strong Answer Covers Guidance

  • How to keep the model current with new labeled data, and where those labels come from
  • How to reduce the weight of old evidence as spam changes
  • Features that hold up against new and deliberately obfuscated vocabulary
  • Signals outside the message text that spammers find hard to change
  • Monitoring, safe rollout of updated models, and protection against poisoned feedback

Follow-up Questions Guidance

  • How would you choose the decay factor or the window length?
  • A coordinated group of accounts starts marking legitimate newsletters as spam. How would you detect it and limit the damage?
  • How would you handle a "good word" attack, where spam is padded with words common in legitimate mail?
  • When would you replace Naive Bayes with a different model, and what would you give up?