{"course":{"slug":"ai-actually-explained","title":"AI, Actually Explained","url":"https://addaly.com/learn/ai-actually-explained","level":"beginner","track":"start"},"lesson":{"slug":"spam-fraud-and-the-oldest-ai","title":"The models that have been working since 2002","url":"https://addaly.com/learn/ai-actually-explained/spam-fraud-and-the-oldest-ai","position":12,"of":92,"minutes":9,"answer":"When the positive condition is rare, false alarms can outnumber genuine detections. Ask for prevalence, class-specific error rates and the fraction of flagged cases that are real; an overall accuracy figure alone is insufficient.","keyIdea":"When the positive condition is rare, false alarms can outnumber genuine detections. Ask for prevalence, class-specific error rates and the fraction of flagged cases that are real; an overall accuracy figure alone is insufficient."},"body":{"format":"markdown","text":"## The quiet success story\n\nSpam filtering and fraud screening show why machine learning matters outside a conversational interface. They can help sort unwanted messages or identify suspicious activity, but useful systems still make mistakes. Studying those errors is as important as studying their successes.\n\nStatistical spam filtering did not begin in 2002. Sahami and colleagues published a [Bayesian junk-email filtering paper](https://cdn.aaai.org/Workshops/1998/WS-98-05/WS98-05-009.pdf) in 1998. [Paul Graham's August 2002 essay](https://paulgraham.com/spam.html), *A Plan for Spam*, later described his own content-based approach: compare token evidence from spam and legitimate messages, then combine it to estimate how likely a new message is to be spam. These are historical examples, not a specification or performance promise for today's filters.\n\nA mail service can consider message content, authentication and sending behaviour or reputation, and can combine models with written rules. [Gmail's sender guidelines](https://support.google.com/mail/answer/81126?hl=en) describe several factors relevant to delivery. A score-and-threshold model is a useful pattern to study, not proof that every filter uses the same architecture or a calibrated probability.\n\n## The thing that makes these different\n\nSpam and fraud detection face deliberate attempts to evade detection. Other AI applications, including chatbots, can also face adversarial behaviour; the relevant issue is how the particular threat and data change.\n\nThis is called an **adversarial** setting: people may change messages or behaviour to evade a detector. Altered wording, misleading presentation or compromised accounts are possible tactics. Which tactics affect a particular system, and how quickly, must be investigated rather than inferred from the word adversarial.\n\nDetection systems need ongoing monitoring against changing behaviour and attacks. Depending on the system, responses can include investigation, rule or threshold updates, new data and retraining. Update frequency and performance drift must be measured, not inferred from the application name.\n\n## Why a threshold is also a policy choice\n\nConsider a detector whose higher score means greater suspicion. A threshold can turn that score into a flag. Choosing it involves technical evidence about errors and decisions about their consequences. A threshold can be selected or updated through different procedures; it need not be a number somebody manually chooses for every event.\n\nFor this score convention, lowering the threshold can flag more transactions, including both fraud and genuine purchases. Raising it can reduce flags while missing more fraud. Evaluate the actual data, losses, delays and inconvenience rather than assuming either side has no cost. The threshold is one part of the process; review and response policies matter too.\n\nThis introduces an idea that runs through the course: **a prediction and the action taken from it are different parts of a system.** An operator is responsible for the policies and workflows that use an output, including when software executes them automatically. Ask how that conversion works; do not assume every algorithmic decision is a single fixed cutoff or a person reviewing each case.\n\n## The trap in the numbers: how rare fraud is\n\nHere is the arithmetic that surprises everybody, and it needs no maths beyond counting.\n\nIn an invented example, suppose one transaction in a thousand is fraudulent. Assume the detector catches 99% of fraudulent transactions and correctly clears 99% of genuine ones. Run it over a million transactions. Those two class-specific assumptions, rather than an overall accuracy figure alone, determine the counts below.\n\n- Of the 1,000 fraudulent ones, it catches 990.\n- Of the 999,000 genuine ones, it wrongly flags 1%: about 9,990.\n\nSo the queue of flagged transactions contains roughly 990 real frauds and 9,990 false alarms. Nine out of every ten alerts are wrong, from a model that is 99% accurate.\n\n> Figure: Invented fraud example: 99% sensitivity and 99% specificity. A two by two grid, rows Actually fraud (1,000) and Actually genuine (999,000), columns Model flags and Model clears: Actually fraud (1,000) and Model flags: 990; Actually fraud (1,000) and Model clears: 10; Actually genuine (999,000) and Model flags: 9,990; Actually genuine (999,000) and Model clears: 989,010. An invented million-transaction example assumes 1,000 fraudulent and 999,000 genuine transactions. Sensitivity 99% catches 990 frauds; specificity 99% correctly clears 989,010 genuine transactions, leaving 9,990 false alarms. Of 10,980 flags, 990 are real: about 9% precision. The supplied class-specific rates, not an overall accuracy claim alone, determine these counts.\n\nWith those supplied error rates, rare fraud is outnumbered by false alarms in the flagged queue. Rarity alone does not determine a detector's precision: different class-specific error rates could give a different result. For a rare event, ask how common it is, which errors were measured and **of the cases flagged, how many are real**.\n\n## What this means for you\n\nThree practical consequences.\n\nA card declined abroad is a reason to check with the issuer, not proof that a model recognised unusual travel or that the bank preferred a false alarm. Several checks can affect a payment. If your issuer offers a travel-notice process, follow its documented instructions; do not assume every bank uses such notices or that one will prevent declines.\n\nA legitimate email landing in spam does not identify one cause. Check the service's guidance on authentication, reputation, sending behaviour and message content, and inspect the actual evidence. [Gmail's sender guidelines](https://support.google.com/mail/answer/81126?hl=en) are one product-specific starting point; neither a particular word nor a sending-domain explanation should be assumed to explain every failure.\n\nWhen a fraud team says \"the system flagged you\", ask what the flag means, what information can be checked and what review or correction process is available. Treating a flag as proof of wrongdoing can magnify false-alarm harm. The practical process and any legal entitlements depend on the service and place; a model score alone is not a verdict."},"check":{"question":"A benefits agency reports that its fraud model is 98% accurate overall, and that fraud occurs in about 1 in 200 claims. An official concludes that flagged claimants are almost certainly cheating. What information is missing?","options":[{"text":"Nothing: 98% overall accuracy means 98% of flagged claims are fraudulent.","correct":false,"tempting":"Overall accuracy counts all correct classifications. The fraction of flags that are real is precision, a different quantity."},{"text":"Only the total number of claims; the same overall accuracy always implies the same fraction of genuine fraud among flags.","correct":false,"tempting":"The same overall accuracy can arise from different mixtures of missed fraud and false flags."},{"text":"Only whether the software uses AI; an AI label makes its flags reliable.","correct":false,"tempting":"The label supplies no detection rate, false-positive rate or evidence about a particular claimant."},{"text":"We need the detection and false-positive rates, or the actual outcome counts. Overall accuracy and prevalence alone do not establish what fraction of flagged cases are fraudulent.","correct":true}]},"prev":{"slug":"the-feed-that-learns-you","title":"The feed is a prediction machine","url":"https://addaly.com/learn/ai-actually-explained/the-feed-that-learns-you"},"next":{"slug":"the-camera-in-your-pocket","title":"Your photographs are partly predicted","url":"https://addaly.com/learn/ai-actually-explained/the-camera-in-your-pocket"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Source and assessment review continues. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'The models that have been working since 2002', in AI, Actually Explained. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/ai-actually-explained/spam-fraud-and-the-oldest-ai (Accessed: 29 November 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"The models that have been working since 2002","courseTitle":"AI, Actually Explained","module":{"index":2,"slug":"where-it-already-is","title":"Where it already is, without a label"},"answer":null,"keyIdea":"When the positive condition is rare, false alarms can outnumber genuine detections. Ask for prevalence, class-specific error rates and the fraction of flagged cases that are real; an overall accuracy figure alone is insufficient.","hero":{"kind":"figure","figure":{"t":"figure","label":"Figure","figure":{"type":"matrix","title":"Invented fraud example: 99% sensitivity and 99% specificity","caption":"An invented million-transaction example assumes 1,000 fraudulent and 999,000 genuine transactions. Sensitivity 99% catches 990 frauds; specificity 99% correctly clears 989,010 genuine transactions, leaving 9,990 false alarms. Of 10,980 flags, 990 are real: about 9% precision. The supplied class-specific rates, not an overall accuracy claim alone, determine these counts.","rows":["Actually fraud (1,000)","Actually genuine (999,000)"],"cols":["Model flags","Model clears"],"cells":[["990","10"],["9,990","989,010"]],"cellLabels":[["caught","missed"],["false alarm","correctly cleared"]]},"alt":"Figure: Invented fraud example: 99% sensitivity and 99% specificity. A two by two grid, rows Actually fraud (1,000) and Actually genuine (999,000), columns Model flags and Model clears: Actually fraud (1,000) and Model flags: 990; Actually fraud (1,000) and Model clears: 10; Actually genuine (999,000) and Model flags: 9,990; Actually genuine (999,000) and Model clears: 989,010. An invented million-transaction example assumes 1,000 fraudulent and 999,000 genuine transactions. Sensitivity 99% catches 990 frauds; specificity 99% correctly clears 989,010 genuine transactions, leaving 9,990 false alarms. Of 10,980 flags, 990 are real: about 9% precision. The supplied class-specific rates, not an overall accuracy claim alone, determine these counts."}},"blocks":[{"t":"h2","id":"the-quiet-success-story","runs":[{"text":"The quiet success story"}]},{"t":"p","runs":[{"text":"Spam filtering and fraud screening show why machine learning matters outside a conversational interface. They can help sort unwanted messages or identify suspicious activity, but useful systems still make mistakes. Studying those errors is as important as studying their successes."}]},{"t":"p","runs":[{"text":"Statistical spam filtering did not begin in 2002. Sahami and colleagues published a "},{"text":"Bayesian junk-email filtering paper","href":"https://cdn.aaai.org/Workshops/1998/WS-98-05/WS98-05-009.pdf"},{"text":" in 1998. "},{"text":"Paul Graham’s August 2002 essay","href":"https://paulgraham.com/spam.html"},{"text":", "},{"text":"A Plan for Spam","i":true},{"text":", later described his own content-based approach: compare token evidence from spam and legitimate messages, then combine it to estimate how likely a new message is to be spam. These are historical examples, not a specification or performance promise for today’s filters."}]},{"t":"p","runs":[{"text":"A mail service can consider message content, authentication and sending behaviour or reputation, and can combine models with written rules. "},{"text":"Gmail’s sender guidelines","href":"https://support.google.com/mail/answer/81126?hl=en"},{"text":" describe several factors relevant to delivery. A score-and-threshold model is a useful pattern to study, not proof that every filter uses the same architecture or a calibrated probability."}]},{"t":"h2","id":"the-thing-that-makes-these-different","runs":[{"text":"The thing that makes these different"}]},{"t":"p","runs":[{"text":"Spam and fraud detection face deliberate attempts to evade detection. Other AI applications, including chatbots, can also face adversarial behaviour; the relevant issue is how the particular threat and data change."}]},{"t":"p","runs":[{"text":"This is called an "},{"text":"adversarial","b":true},{"text":" setting: people may change messages or behaviour to evade a detector. Altered wording, misleading presentation or compromised accounts are possible tactics. Which tactics affect a particular system, and how quickly, must be investigated rather than inferred from the word adversarial."}]},{"t":"p","runs":[{"text":"Detection systems need ongoing monitoring against changing behaviour and attacks. Depending on the system, responses can include investigation, rule or threshold updates, new data and retraining. Update frequency and performance drift must be measured, not inferred from the application name."}]},{"t":"h2","id":"why-a-threshold-is-also-a-policy-choice","runs":[{"text":"Why a threshold is also a policy choice"}]},{"t":"p","runs":[{"text":"Consider a detector whose higher score means greater suspicion. A threshold can turn that score into a flag. Choosing it involves technical evidence about errors and decisions about their consequences. A threshold can be selected or updated through different procedures; it need not be a number somebody manually chooses for every event."}]},{"t":"p","runs":[{"text":"For this score convention, lowering the threshold can flag more transactions, including both fraud and genuine purchases. Raising it can reduce flags while missing more fraud. Evaluate the actual data, losses, delays and inconvenience rather than assuming either side has no cost. The threshold is one part of the process; review and response policies matter too."}]},{"t":"p","runs":[{"text":"This introduces an idea that runs through the course: "},{"text":"a prediction and the action taken from it are different parts of a system.","b":true},{"text":" An operator is responsible for the policies and workflows that use an output, including when software executes them automatically. Ask how that conversion works; do not assume every algorithmic decision is a single fixed cutoff or a person reviewing each case."}]},{"t":"h2","id":"the-trap-in-the-numbers-how-rare-fraud-is","runs":[{"text":"The trap in the numbers: how rare fraud is"}]},{"t":"p","runs":[{"text":"Here is the arithmetic that surprises everybody, and it needs no maths beyond counting."}]},{"t":"p","runs":[{"text":"In an invented example, suppose one transaction in a thousand is fraudulent. Assume the detector catches 99% of fraudulent transactions and correctly clears 99% of genuine ones. Run it over a million transactions. Those two class-specific assumptions, rather than an overall accuracy figure alone, determine the counts below."}]},{"t":"ul","items":[[{"text":"Of the 1,000 fraudulent ones, it catches 990."}],[{"text":"Of the 999,000 genuine ones, it wrongly flags 1%: about 9,990."}]]},{"t":"p","runs":[{"text":"So the queue of flagged transactions contains roughly 990 real frauds and 9,990 false alarms. Nine out of every ten alerts are wrong, from a model that is 99% accurate."}]},{"t":"p","runs":[{"text":"With those supplied error rates, rare fraud is outnumbered by false alarms in the flagged queue. Rarity alone does not determine a detector’s precision: different class-specific error rates could give a different result. For a rare event, ask how common it is, which errors were measured and "},{"text":"of the cases flagged, how many are real","b":true},{"text":"."}]},{"t":"h2","id":"what-this-means-for-you","runs":[{"text":"What this means for you"}]},{"t":"p","runs":[{"text":"Three practical consequences."}]},{"t":"p","runs":[{"text":"A card declined abroad is a reason to check with the issuer, not proof that a model recognised unusual travel or that the bank preferred a false alarm. Several checks can affect a payment. If your issuer offers a travel-notice process, follow its documented instructions; do not assume every bank uses such notices or that one will prevent declines."}]},{"t":"p","runs":[{"text":"A legitimate email landing in spam does not identify one cause. Check the service’s guidance on authentication, reputation, sending behaviour and message content, and inspect the actual evidence. "},{"text":"Gmail’s sender guidelines","href":"https://support.google.com/mail/answer/81126?hl=en"},{"text":" are one product-specific starting point; neither a particular word nor a sending-domain explanation should be assumed to explain every failure."}]},{"t":"p","runs":[{"text":"When a fraud team says “the system flagged you”, ask what the flag means, what information can be checked and what review or correction process is available. Treating a flag as proof of wrongdoing can magnify false-alarm harm. The practical process and any legal entitlements depend on the service and place; a model score alone is not a verdict."}]}],"check":{"question":[{"text":"A benefits agency reports that its fraud model is 98% accurate overall, and that fraud occurs in about 1 in 200 claims. An official concludes that flagged claimants are almost certainly cheating. What information is missing?"}],"options":[{"text":[{"text":"Nothing: 98% overall accuracy means 98% of flagged claims are fraudulent."}],"correct":false,"tempting":[{"text":"Overall accuracy counts all correct classifications. The fraction of flags that are real is precision, a different quantity."}]},{"text":[{"text":"Only the total number of claims; the same overall accuracy always implies the same fraction of genuine fraud among flags."}],"correct":false,"tempting":[{"text":"The same overall accuracy can arise from different mixtures of missed fraud and false flags."}]},{"text":[{"text":"Only whether the software uses AI; an AI label makes its flags reliable."}],"correct":false,"tempting":[{"text":"The label supplies no detection rate, false-positive rate or evidence about a particular claimant."}]},{"text":[{"text":"We need the detection and false-positive rates, or the actual outcome counts. Overall accuracy and prevalence alone do not establish what fraction of flagged cases are fraudulent."}],"correct":true,"tempting":null}],"order":[2,1,0,3],"why":null},"prev":{"slug":"the-feed-that-learns-you","title":"The feed is a prediction machine","minutes":9},"next":{"slug":"the-camera-in-your-pocket","title":"Your photographs are partly predicted","minutes":9}}}