Anomaly detection is the identification of observations, events or data points that deviate from what is usual or expected. In SEO monitoring it is applied to series such as clicks, impressions, indexed pages or the share of error responses.
How does anomaly detection work?
The method first establishes what normal looks like, for example from the history of a metric including weekly cycles, and then flags values that fall outside that range. IBM names three kinds of anomalies:
- Point anomalies are single values far from the rest, such as one day with almost no clicks.
- Contextual anomalies are unusual only in context, for example normal traffic volume at a time when the site is usually quiet.
- Collective anomalies are groups of values that deviate together, for instance several consecutive days of unusually low clicks that look normal one by one.
Techniques range from statistical tests to machine learning. Wikipedia sorts approaches by labeling. Supervised methods need labeled normal and abnormal examples, which are rarely available. Unsupervised methods work on unlabeled data and are the most commonly used.
How does it differ from a fixed threshold?
A fixed threshold compares a value with one number. Anomaly detection compares it with a range derived from past behavior. Microsoft’s Azure Monitor, as one example, builds its dynamic thresholds from the metric’s history and treats hourly, daily and weekly patterns as normal. This suits metrics with a seasonal rhythm, such as organic clicks, where a Sunday value would trigger a fixed limit set for weekdays.
Example
A site gets about 2,000 organic clicks on weekdays and 1,200 on weekends. On a Tuesday it gets 1,150 clicks. A fixed threshold of 1,000 stays silent, while anomaly detection flags the value because it is far below the usual Tuesday range. The team finds a canonical tag that was changed in the last release. (Invented example.)
Common mistakes
- Training on a period that already contains an outage, so the fault becomes the new normal.
- Expecting results from too little history. Azure Monitor, for example, does not alert before three days and 30 samples of data.
- Treating every flagged value as a problem without checking the cause.
Sources
- What Is Anomaly Detection? – IBMibm.com
- What is Anomaly Detection? – AWSaws.amazon.com
- Anomaly detection – Wikipedia (secondary)en.wikipedia.org
- Dynamic thresholds in Azure Monitor alerts – Microsoft Learnlearn.microsoft.com
Last updated: