# Uncertainty-Aware Time Series Anomaly Detection
## 3 Proposed Approach
### Thresholding Mechanism
Comparing AE and the version with uncertainty quantification, we notice a similar decrease. Taking a look at the other metrics, we receive relatively good precision compared to other values but rather low recall and F-score with medians close to 0. While the upper box bound for precision is generally comparably high, it is rather low for recall and precision. Also, compared to its baselines, the versions of AE and LSTMAE with uncertainty quantification show lower performance. Figure 12 compares the performance of the LSTMAE-UQ to the baseline LSTMAE. In a direct comparison of performance metrics between the two algorithms, we are able to mostly observe similar performance on most datasets. On the ECG dataset, the proposed approach is clearly able to outperform its baseline in all metrics. Despite achieving mostly similar results, it shows significant differences for the YAHOO dataset. While the LSTMAE baseline shows the best results compared to all remaining datasets, LSTMAE-UQ shows particularly low performance. Further analysis of the anomaly types provides deeper insights. Table 11 (Appendix A) breaks down the datasets into four types of anomaly: point anomaly, short/long sequence anomaly and mixed anomalies. Point anomaly refers to an anomaly with length 1. Short sequence anomaly is defined as anomalies with an average duration of up to and including 10 data points with long anomalies starting from an average duration of more than 10. Mixed anomaly refers to a time series that contains point as well as short/long sequence anomalies. From this breakdown, we clearly see what the YAHOO dataset distinguishes. While the predominantly present anomaly type for most datasets is

Figure 11: Performance evaluation per algorithm over all datasets. The proposed algorithm is highlighted with a blue box. long sequences, the time series of YAHOO datasets mainly contain point and short sequence anomalies. The only other dataset in this collection that contains point and short sequence anomalies is KDD21. Retrospectively, comparing the performance between LSTMAE and LSTMAE-UQ in Figure 12, we observe a similar decrease, yet not as severe as for YAHOO since the proportion of point and short sequence anomalies to long sequence anomalies is lower. To provide evidence about lower anomaly detection capabilities for point and short sequence anomalies, we evaluate the results on the anomaly types. Figure 13 shows a breakdown for the models LSTMAE and LSTMAE-UQ. We can observe stable behavior between models for long sequence anomalies among all metrics. However, comparing point and short sequence anomalies, LSTMAE-UQ shows a significant decrease in performance. The same accounts for time series with mixed anomaly types. The reason for that could be the consideration of uncertainty in the model. Consideration of uncertainty makes the model count point anomalies as well as short sequences deviating from normal patterns as noise and learns to ignore them. This hypothesis finds support in the findings of the experiment about the behavior of uncertainty during anomalies, where the impact of anomalies, especially for longer input windows, remains low for point anomalies. Figure 12: Performance evaluation of LSTM Autoencoder without and with aleatoric and epistemic uncertainty quantification for the real-world datasets of the TSB-UAD. #### 4.3.3 Discussion

In this experiment, we evaluated the performance of the LSTMAE-UQ against its baselines and to other algorithms on 18 real-world datasets. Assessing the performance of the LSTMAE in comparison to both baseline models, LSTM and AE, it becomes clear that performance is comparable. Despite the computational expense connected with LSTMs, especially when compared to conventional neurons, their added value in univariate time series anomaly detection is rather low. However, the versatility of LSTMs in handling both univariate and multivariate time series renders them attractive across a broad spectrum of applications.