A contextual anomaly is a value that appears normal across the full dataset but becomes unusual under its temporal or situational conditions. The context may include nearby observations, previous readings, trends, cycles, or readings from other sensors. This distinguishes contextual anomalies from point anomalies, which are unusual in isolation. section 1.1.5 section 17.2.2
Detect contextual anomalies by choosing and interpreting an appropriate reference context:
- Compare offline observations with points immediately before and after them; streaming systems generally compare only with preceding data. section 17.2.2
- Choose a reference window carefully: looking too far back can hide a local anomaly, while looking too briefly can make comparison unreliable. section 17.2.2
- Check changes as well as absolute values, since a sudden vibration increase may be anomalous even when its level remains within the normal range. section 17.2.2
- Compare sensors for unusual combinations or associations, and monitor repeated or escalating anomalies rather than treating every isolated alert as equally important. section 1.1.5
A local spike in equipment data
An equipment reading at 120 seconds rises by about 200 points relative to its neighbors. Its absolute value is normal across the full series, but the immediate spike is anomalous in context. A smoothed reference line can provide a more stable comparison than the raw neighboring values. section 17.2.2
Figure 17.3 Example of contextual point outlier. The x-axis indicates time values in seconds. The point indicated with a dot at 120 seconds is unusual considering the context of its immediate neighborhood of values, though it has a normal value considering the full range of data shown.
Inspect the time-series example where a normal-range value becomes anomalous because of its immediate neighborhood. section 17.2.2
