AI & Machine Learning

Anomaly Detection

Also known as: outlier detection, anomaly detection AI, behavioral analytics, statistical anomaly detection

Anomaly detection is the process of identifying data points, events, or observations that deviate significantly from an established baseline of normal behaviour.

It is used across a wide range of applications: detecting fraudulent credit card transactions, identifying network intrusions, catching equipment faults before they cause failures, flagging unusual financial reporting patterns, and monitoring industrial processes for deviations from safe operating conditions. Most modern anomaly detection uses machine learning models trained on historical data to establish what 'normal' looks like and then flag deviations.

Anomaly Detection, explained at three levels

At home

Anomaly detection is a way of automatically finding the things that don't fit. Imagine a bank that sees millions of transactions every day. It is impossible for humans to check every one for fraud. Anomaly detection looks at all the transactions and asks: 'does this one look different from how this customer usually behaves?' If someone whose card is usually used in Toronto suddenly makes a purchase in Paris at 3am, that is an anomaly -- it might be fraud, or it might be a holiday purchase, but it is different enough to flag for a closer look.

At work

Anomaly detection is a core component of cybersecurity, fraud prevention, industrial monitoring, and operational intelligence. In cybersecurity, it detects unusual network traffic patterns that might indicate an intrusion. In manufacturing, it flags sensor readings that deviate from normal equipment operation, allowing maintenance to intervene before a fault causes downtime. In financial audit, it identifies transactions or journal entries that stand out statistically from normal patterns.

Real-world examples

At home

Marcus noticed an alert from his bank saying his debit card had been temporarily blocked after an unusual transaction. His card had been used for a €400 purchase at a supermarket in a country he had never visited. The bank's anomaly detection system flagged the transaction as inconsistent with his normal spending pattern and blocked the card automatically -- preventing further fraudulent use.

At work

The operations team at a wind farm deployed anomaly detection across vibration sensors on 120 turbine gearboxes. The system learned normal vibration signatures for each turbine and began alerting when sensor readings deviated from the learned baseline. Over six months, it predicted three gearbox failures an average of 12 days before they would have caused unplanned downtime, saving an estimated £400,000 in emergency repair costs.

Common confusions

  • Anomaly detection does not automatically mean an anomaly is bad. An unusually large legitimate transaction, a new customer with a very different purchase pattern, or a peak in traffic during a major promotional event are all anomalies but are not problems. Every flagged anomaly needs to be triaged -- the system detects deviations; humans (or downstream automation) determine whether they are genuine problems.
  • Anomaly detection is not fraud detection, even though the two overlap. Fraud detection is a specific application of anomaly detection focused on intentional misuse. Anomaly detection is a broader capability used for fault detection, performance monitoring, safety monitoring, and many other applications. Not all anomalies are fraudulent, and not all fraud is anomalous -- sophisticated fraudsters specifically try to blend in with normal patterns.
  • Setting the detection threshold is a business decision, not just a technical one. Lowering the threshold catches more real anomalies but also generates more false alerts. The right threshold depends on the cost of a missed real anomaly (a successful fraud case, a missed equipment fault) versus the cost of a false alarm (analyst time, customer friction). Business stakeholders need to be involved in this calibration.

For analysts

In BA artefacts, anomaly detection requirements need to specify not just what the system should detect but the acceptable false positive rate, the notification workflow for flagged items, and who is responsible for triage and disposition. Define 'normal behaviour' as explicitly as possible for the domain: for a fraud detection system, normal might mean 'within the customer's historical spending country and category, within 3 standard deviations of their average transaction value.' Useful NFR: 'The anomaly detection model must maintain a false positive rate below 0.1% on the holdout test set, with a scheduled monthly review of the false positive rate in production and automatic retraining triggered when the rate exceeds 0.5%.'

History & origin

Statistical anomaly detection has existed since the 19th century in the form of outlier detection in statistics. The application to computer systems began in the 1980s with intrusion detection systems that compared network traffic patterns to baselines. Machine learning-based anomaly detection became practical in the 1990s-2000s as the volume of data generated by computer systems outgrew human ability to monitor it manually. The rise of IoT sensors, cloud infrastructure monitoring, and real-time transaction processing in the 2010s made automated anomaly detection a standard component of production systems.