| Literature DB >> 34996940 |
Zsigmond Benkő1,2, Tamás Bábel1, Zoltán Somogyvári3.
Abstract
Recognition of anomalous events is a challenging but critical task in many scientific and industrial fields, especially when the properties of anomalies are unknown. In this paper, we introduce a new anomaly concept called "unicorn" or unique event and present a new, model-free, unsupervised detection algorithm to detect unicorns. The key component of the new algorithm is the Temporal Outlier Factor (TOF) to measure the uniqueness of events in continuous data sets from dynamic systems. The concept of unique events differs significantly from traditional outliers in many aspects: while repetitive outliers are no longer unique events, a unique event is not necessarily an outlier; it does not necessarily fall out from the distribution of normal activity. The performance of our algorithm was examined in recognizing unique events on different types of simulated data sets with anomalies and it was compared with the Local Outlier Factor (LOF) and discord discovery algorithms. TOF had superior performance compared to LOF and discord detection algorithms even in recognizing traditional outliers and it also detected unique events that those did not. The benefits of the unicorn concept and the new detection method were illustrated by example data sets from very different scientific fields. Our algorithm successfully retrieved unique events in those cases where they were already known such as the gravitational waves of a binary black hole merger on LIGO detector data and the signs of respiratory failure on ECG data series. Furthermore, unique events were found on the LIBOR data set of the last 30 years.Entities:
Year: 2022 PMID: 34996940 PMCID: PMC8742065 DOI: 10.1038/s41598-021-03526-y
Source DB: PubMed Journal: Sci Rep ISSN: 2045-2322 Impact factor: 4.379
Figure 1Schema of our unique event detection method and the Temporal Outlier Factor (TOF). (A) An ECG time series from a patient with Wolff-Parkinson-White Syndrome, a strange and unique T wave zoomed on graph (B). (C) The reconstructed attractor in the 3D state space by time delay embedding (). Two example states (red and blue diamonds) and their 6 nearest neighbors in the state space (orange and green diamonds respectively) are shown. The system returned several times back to the close vicinity of the blue state, thus the green diamonds are evenly distributed in time, on graph (A). In contrast, the orange state-space neighbors of the red point (zoomed on graph D) are close to the red point in time as well on graph (A). These low temporal distances show that the red point marks a unique event. (E) TOF measures the temporal dispersion of the k nearest state-space neighbors (). The red dashed line is the threshold . Low values of TOF below the threshold mark the unique events, denoted by orange dots on the original ECG data on graph (F).
Figure 2Detection examples on simulated time series with anomalies of different kinds. (A) Logistic map time series with tent-map anomaly. (B) Logistic map time series with linear anomaly. (C) Simulated ECG time series with tachycardia. (D) Random walk time series with linear anomaly, where TOF was measured on the discrete-time log derivative (). Each subplot shows an example time series of the simulations (black) in arbitrary units and in three forms: Top left the return map, which is the results of the 2D time delay embedding and defines the dynamics of the system or its 2D projection. Bottom: Full length of the simulated time series (black) and the corresponding TOF values (green). Shaded areas show anomalous sections. Top right: Zoom to the onset of the anomaly. In all graphs, the outliers detected by TOF, LOF, and Keogh’s brute force discord detection algorithms are marked by orange dots, blue plus, and red x signs respectively. While anomalies form clear outliers on A and B, D shows an example where the unique event is clearly not an outlier, but it is located in the center of the distribution. All the three algorithms detected the example anomaly well in case A, TOF, and discord detected well the anomalies in B and C cases, but only TOF was able to detect all the four anomaly examples.
Figure 3Performance evaluation of TOF, LOF, and Keogh’s discord detection algorithms on four simulated datasets. (A) Mean Receiver Observer Characteristic Area Under Curve (ROC AUC) score and SD for TOF (orange) and LOF (blue) are shown as a function of neighborhood size (k). TOF showed the best results for small neighborhoods. In contrast, LOF showed better results for larger neighborhoods in the case of the logistic map and ECG datasets but did not reach reasonable performance on random walk with linear outliers. (B) Mean score for TOF (orange), LOF (blue), and Keogh’s discord detection (red) algorithms as a function of the expected anomaly length (for TOF) given in either data percentage (for LOF) or window length parameter (for discord). Black dashed lines show the theoretical maximum of the mean score for algorithms with prefixed detection numbers or lengths (LOF and discord), but this upper limit does apply for TOF. The score of TOF was very high for the linear anomalies and slightly lower for logistic map—tent map anomaly and ECG datasets, but it was higher than the score of the two other methods and their theoretical limits in all cases. Note, that the only comparable performance was shown by discord detection on ECG anomaly, while neither algorithms based on discord nor LOF were able to detect the linear anomaly on random background.
Detection performance on simulations in terms of ROC AUC scores and the optimal neighborhood parameter k. Maximal mean ROC AUC values and the corresponding SDs are shown. LOF was able to distinguish tent map and linear outliers from logistic background and tachycardia from the normal rhythm with reasonable reliability but TOF outperformed LOF for all data series. Linear outliers can not be detected on random walk background by the LOF method at all, while TOF detected them almost perfectly. TOF reached its maximal performance mostly for low k values, while LOF required larger k for optimal performance on those three data series, on which it worked reasonably. While the ROC AUC was maximal at in the case of random walk with linear outlier, the performance was not significantly lower for lower k values.
| Dataset | TOF | LOF | ||
|---|---|---|---|---|
| AUC | AUC | |||
| Logmap-tent | 2 | 42 | ||
| Logmap-linear | 6 | 199 | ||
| Sim ECG-tachy | 2 | 129 | ||
| Randwalk-linear | 30 | 1 | ||
Performance evaluation by , precision and recall scores on simulations. The optimal expected anomaly length parameter (M) in time steps, mean scores, and their standard deviations are shown for all methods and datasets; the highest scores are highlighted in bold. In case of TOF, neighbour number is used, while for LOF, the k resulted the best ROC AUC were used from Table 1: for logmap-tent map, for logmap-linear, for ECG tachycardia and for random walk-linear datasets. TOF resulted in the highest scores and highest precision for all datasets and the highest recall in three of the four cases but the simulated ECG tachycardia, where Keogh’s brute force discord detection algorithm reached a slightly higher recall score. The only comparable performance was reached by Keogh’s discord detection algorithm on ECG tachycardia in terms of score while LOF produced reasonable results on logmap-tent map anomaly series. Although Senin’s discord detection algorithm resulted in reasonable mean estimations for the lengths of the anomalies, its detection performance was worse than the other three algorithms.
| Method | TOF | LOF | Keogh | Senin |
|---|---|---|---|---|
| Dataset | Logistic map—tent map | |||
| Length (M) | 121 | 91 | 91 | |
| Precision | ||||
| Recall | ||||
| Dataset | Logistic map—linear | |||
| Length (M) | 81 | 91 | 101 | |
| Precision | ||||
| Recall | ||||
| Dataset | Sim ECG—tachycardia | |||
| Length (M) | 910 | 1110 | 1210 | |
| Precision | ||||
| Recall | ||||
| Dataset | Random walk—linear | |||
| Length (M) | 51 | 11 | 141 | |
| Precision | ||||
| Recall | ||||
Figure 4TOF detects unique events only. Detection performance measured by ROC AUC as a function of the minimum Inter-Event Interval (IEI) between two inserted tent-map outlier segments. TOF was able to distinguish outliers from the background very well when IEIs were below 300 steps, and the two events can be considered one. However, the detection performance of TOF decreased for higher IEIs. In contrast, LOF’s peak performance was lower, but independent of the IEI.
Figure 5Detecting apnea with arousal on ECG. (A) ECG time series with unique events detected by TOF (orange dots, ), outliers detected by LOF (blue + signs, , threshold ) and the top discord (red x signs, M=5 s). The inset shows the more detailed pattern of detections: unique behavior mainly appears on the T waves. (B–D) Breathing air-flow time series parallel to the above ECG recording, colored according to the scores of the three anomaly methods. The anomaly starts with a period of irregular breathing at 340 s, followed by the apnea when breathing almost stops (350–370 s). After this anomalous period, arousal restores the normal breathing. (B) Airflow is colored according to the TOF score at each sample. Low values (darker colors) mark the anomaly corresponding to the period of apnea. (C) Air-flow time series with coloring corresponds to the LOF score at each sample. Higher LOF values mark the outliers. LOF finds irregular breathing preceding the apnea. (D) Airflow time series colored according to the matrix profile values by the discord. Discord detection algorithm finds the point of transition from irregular breathing to the apnea.
Figure 6Detection of the GW150914 event on LIGO open data with TOF and LOF and discord. (A) Strain time series (black) from Hanford detector around GW150914 event (grey vertical line) with TOF (orange dots), LOF (blue plus) and discord (red x) detections. TOF score values (B), LOF scores (C) and matrix profile scores (D) are mapped to the time series (orange, blue and red colors respectively), the strongest colors show the detected event around 0 s. (E) The Q-transform of the event shows a rapidly increasing frequency bump in the power spectra right before the merger event (grey). The grey horizontal dashed lines show the lower (50 Hz) and upper (300 Hz) cutoff frequencies of the bandpass filter, which was applied on the time series as a preprocessing step before anomaly detection. (F) Filtered strain data at 0.1 s neighborhood around the event. TOF, LOF, and discord detection algorithms detected the merger event with different sensitivity. LOF detected more points of the event, while TOF found the period which has the highest power in the power spectra, and a discord was detected at the end of the event. (, ms, , ms, ; , ms, , threshold%, ).
Figure 7Analysis of LIBOR dataset. The detections were run on the temporal derivative of the LIBOR time series. (A) time-series with detections. (B) TOF score values. (C) LOF score values. (D) Matrix profile scores by the discord detection algorithm. TOF detected two rising periods: the first between 2005 and 2007 and a second, started in 2012 and lasts until now. While both periods exhibit unique dynamics, they differ from each other as well.