# Spam and Fraud Detection

> How a spam filter scores each mail before you see it. How fraud checks spot a payment that does not fit the way you spend.

**Course:** [AI Assistants and Chatbots](https://learn.benibix.com/learn/ai-use-case)  
**Time:** 9 min

**After this lesson you can:**

- Say how a spam filter decides where a mail goes
- Explain why a bank might stop a real payment
- Name the two kinds of mistake both systems make

## How does AI catch spam and card fraud?

A spam filter decides if an email is junk before you see it. Google says its mail service blocks more than 99.9% of spam, scam mail and harmful files. Fraud detection uses AI to spot payments that look like theft. Both are AI you use every day, often without knowing it is there.

A spam filter looks at the words, the links, the sender and how the mail was sent. A model gives each message a score for how likely it is to be junk. High scores go to the spam folder, and the rest reach your inbox. Sorting things into groups like this is called classification.

The filter learns from you. When you mark a mail as spam, or drag one out of the spam folder, it uses that as a lesson. Spammers change their tricks all the time, so the filter has to keep learning. A real mail sometimes lands in spam, so check the folder now and then.

Fraud detection learns how each person usually spends: where, when and how much. A new payment that does not fit gets a high risk score. A $4 coffee near your home fits. A $900 phone bought in another country at 3 in the morning does not. Spotting what does not fit like this is called anomaly detection.

Then the bank decides what to do. It can let the payment pass, block it, or hold it and send you a message to confirm. It has to decide in a fraction of a second, while you wait at the till. So it will sometimes stop a real payment, such as one on a trip abroad.

Both systems make two kinds of mistake. They can let a bad thing through, or stop a good thing. Set the bar too low, and junk and theft get in. Set it too high, and real mail and real payments get stopped. Every bank and mail service picks its own balance.

![Three rows, each reading what comes in, the guess, and what happens. A new email goes to the spam filter, which asks how likely it is junk, and sends it to the inbox or the spam folder. A card payment goes to fraud detection, which asks if it fits this person, and lets it pass or holds it and asks. The words see you go to predictive text, which asks what word comes next, and offers soon, later and tomorrow.](https://learn.benibix.com/diagrams/ai2-everyday-ai.svg)

### Example: Lucy pays for a hotel abroad

Lucy spends about $40 a day, close to home. On holiday in another country, she pays $250 for a hotel.

The bank holds the payment and texts her to ask if it is her. She replies yes, and the payment goes through 30 seconds later.

**Words in this lesson:** [Spam Filter](https://learn.benibix.com/term/ai/spam-filter), [Classification (Machine Learning)](https://learn.benibix.com/term/ai/classification), [Fraud Detection](https://learn.benibix.com/term/ai/fraud-detection), [Anomaly Detection](https://learn.benibix.com/term/ai/anomaly-detection)

**Question:** Why might your bank stop a real payment on a trip abroad?

**Answer:** It does not fit how you usually spend, so it scores as risky. Fraud detection checks each payment against how you usually spend. A payment in a new country does not fit. It gets a high risk score, and it may be held until you say it is you.

---

Source: https://learn.benibix.com/learn/ai-use-case/spam-and-fraud-detection
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
