What is anomaly detection?

Anomaly detection is a family of machine learning and statistical methods that learn normal behaviour in data and flag records, events or patterns that deviate markedly from it.

It is also called outlier detection. It differs from out-of-distribution detection in focus: OOD detection notices that a model's input does not resemble its training data, while anomaly detection finds unusual records in business data itself. Since it often works with unlabelled data, it relies on unsupervised learning; one-class methods trained only on clean normal data are semi-supervised.

Topic
Machine learning, models and training
Also known as
Outlier detection

How anomaly detection works

  1. Normal behaviour is represented by a statistical distribution, clusters or a model trained on normal data.
  2. A new record is scored against it: distance from the distribution, distance to the nearest cluster or an autoencoder's reconstruction error.
  3. Methods such as isolation forest look at how many splits isolate a record; outliers separate with fewer splits.
  4. Records whose score passes a threshold are flagged; the threshold balances false alarms against missed events.

In more detail

Point, contextual and collective anomalies

Anomalies fall into three main categories: point anomalies (a single unusual transaction), contextual anomalies (normal absolute value but abnormal given context, such as high power draw at 3 a.m.) and collective anomalies (a sequence of individually normal events that together form an attack or fault). Identifying the right type dictates whether tabular, seasonal or sequence models are required.

Evaluation metrics for rare events

Because anomalies typically represent a very small share of records, standard classification accuracy is misleading. Practitioners evaluate models using Precision-Recall AUC (PR-AUC), F1-score, Recall at a fixed False Positive Rate or Precision@K aligned with the security or fraud team's daily review budget.

High dimensionality and deep approaches

Traditional distance-based detectors degrade in high-dimensional data due to the curse of dimensionality, where distances between points become nearly indistinguishable. Modern enterprise pipelines address this using deep representations (VAEs, contrastive embeddings), time-series foundation models or hybrid rule-plus-ML ensembles for logs and telemetry.

Commonly confused terms

TermHow it differs
Change-point detectionChange-point detection identifies structural shifts in the underlying regime of a time series (e.g., mean or variance step change), whereas point anomaly detection flags isolated spikes or short-lived deviations.

Why anomaly detection matters for on-premises AI

Fraud, security incidents, equipment faults and data quality issues are the most common enterprise uses. Real incidents are rare, so labelled examples are few and methods mostly learn from normal data alone. This data is sensitive and processed in-house. Normal behaviour shifts over time, so the model is updated regularly or false alarms rise. Analysts' review capacity is the practical limit that sets the threshold.

ON-PREMISES EXAMPLE

A bank monitors card transactions with an in-house anomaly detection model; transactions far from a customer's usual spending pattern are flagged for instant verification.

Common questions

Does anomaly detection need labelled data?

Usually not. Most methods learn from normal data alone; labelled examples, if any, help tune thresholds and evaluate.

How are false alarms reduced?

The threshold is set to analysts' review capacity, the model is updated as normal behaviour shifts and flagged records are filtered again with business rules.

Sources

In the glossary: Glossary, A to D

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.