AI Glossary / AI and machine learning / Beginner
Anomaly detection
Definition
Anomaly detection is the task of finding data points, events or patterns that differ markedly from what is normal, such as a fraudulent payment, a failing machine or an unusual login.
What it means
Most data has a normal shape. Most card payments are small and local, most servers hum along at steady load, most staff log in from the same city at similar hours. Anomaly detection learns or defines that normal shape and flags what falls outside it.
The word anomaly does not mean wrong. It means unusual. An unusual transaction might be fraud, or a customer buying a wedding ring. The system's job is to raise a hand; a person or a second check decides what the flag means.
It is often used where examples of the bad case are rare or constantly changing. You cannot train a normal classifier on a thousand fraud types you have not seen yet, but you can describe what ordinary looks like and watch for departures.
Approaches range from simple rules (alert if daily sales drop below half of the average) through statistical thresholds to machine learning models that learn normal behavior from history.
For a business, anomaly detection is a smoke alarm: it does not tell you what is burning, only that something merits a look, and a good one is tuned so it does not ring for toast.
How it works
First, define normal from history: the usual range, rhythm and combinations of values for the thing you watch, such as payment amounts, sensor readings or page traffic. Models may learn this directly from unlabeled data, because the training mostly needs examples of the normal case.
Each new observation is scored for how far it sits from normal. A statistical method might measure distance from the mean in standard deviations; a model might measure how badly it reconstructs the data or how isolated the point is from its neighbors.
A threshold turns the score into an alert. Set it too tight and people drown in false alarms; too loose and real problems slip through. Choosing it is a business decision about the cost of missing something versus the cost of checking.
Alerts go to a human or workflow, and the verdicts feed back: confirmed problems and dismissed false alarms help retune the threshold and the definition of normal as the business changes.
Three practical examples
- Payments: flagging a card used in two countries within an hour, or a sudden run of small test charges.
- Operations: spotting a machine or server whose temperature or response time drifts away from its usual range before it fails.
- Finance: highlighting expense claims or invoices that differ sharply from a supplier's or employee's usual pattern.
Think of it this way
Think of a night guard who has walked the same building for years. They could not list every possible problem, but they notice a door that is ajar, a light that is on, a sound that is new. Their skill is knowing what ordinary feels like.
The limit: the guard may stop a cleaner working late. Anomaly flags catch the unusual, not the guilty, so a quick check must follow.
Worked example
a shop watching its daily refunds
Suppose a small online shop usually sees about 20 refunds a day, rarely above 30. The owner sets an alert for any day above 45, based on the shop's recent history.
One Tuesday shows 80 refunds. The alert fires and the owner looks: a courier delay hit one region and customers canceled together, an operational problem, not fraud.
Another week the count is normal but one customer has six refunds in a day. A pure count rule misses it, so the shop adds a second rule per customer. The figures here are invented; the lesson is that normal must be defined for each thing you care about.
Over a month the owner notes which alerts mattered, and lifts the threshold slightly for sale periods, when high refunds are normal.
Illustrative case study
A fictional accountancy practice wants to catch duplicate or odd supplier invoices before payment. Reviewing every invoice by hand is slow, so it asks a model to score each invoice against that supplier's history.
The first version flags a quarter of invoices, mostly legitimate seasonal bills, and staff learn to ignore it. The practice raises the threshold and adds context such as month and supplier type; flags drop to a few per hundred and reviewers take them seriously.
The invented lesson: an anomaly system succeeds on trust. If most alerts are noise, people stop looking, so tuning matters as much as the model.
Common misconceptions and mistakes
- Anomalies are errors. They are only unusual; many are genuine, harmless events.
- You need labeled examples of every bad case. Many methods learn from normal data alone, though labels help tuning.
- Set it up once and leave it. Normal changes with seasons, products and customers, so the baseline needs review.
Business use
Use anomaly detection where problems are rare and varied: fraud checks, system monitoring, quality control and unusual-spend review.
Decide in advance what happens to an alert, who looks at it and how fast. An alert without an owner is just noise, and track false-alarm rates so you can retune.
People also ask
Is it the same as fraud detection?
Fraud detection often uses anomaly detection, but also uses labeled examples of known fraud. Anomaly methods are better for new, unseen patterns.
Do I need machine learning?
Not always. A simple threshold on a sensible measure is often enough, and easier to explain.
What is a false positive here?
An alert on something that turned out to be normal. Too many of them make people ignore the system.
Check your understanding
A shop's anomaly alert fires every sale weekend and staff now ignore it. What is the likely fix?
Answer: The baseline does not know sales are normal. Add seasonal context or adjust the threshold for those periods so that alerts mean something again.
Related terms
- Outlier
- Fraud detection
- Threshold (for decision trees)
- False positive
- Unsupervised learning
- threshold
- monitoring
Learn next
AI for Business Owners shows where AI monitoring and checks fit into everyday operations: https://aiforbusinessandlife.com/academy/ai-for-business-owners. [C2]
More in AI and machine learning
- Analogical modeling - Analogical modeling, in its specialized sense, is Royal Skousen's exemplar-based approach to predicting behavior from stored examples and their contexts.
- And - or tree - An and - or tree represents a problem using two kinds of branching.
- Anomaly - An anomaly is a data point or event that departs from what is normal in a way that deserves attention: the unusual transaction, the strange sensor reading...
- Application programming interface - An application programming interface, or API, is a defined way for one piece of software to ask another to do something or share data, without needing to...
- Apriori Algorithm - The Apriori algorithm is a classic method for finding items that frequently occur together in a large set of transactions and turning them into association...
- Argumentation framework - An argumentation framework is a formal representation of arguments and relationships between them, used to analyze which arguments can be accepted together.
Sources
[S2] Google, Machine Learning Glossary; [S14] KNIME, Data Science Glossary. Full URLs are in the source ledger. Verified 11 October 2026.
Previous: Anomaly Next: Anonymization