# Uncertainty-Aware Time Series Anomaly Detection
## 3 Proposed Approach
### Thresholding Mechanism
In contrast, larger input window sizes exhibit either subtle changes or no discernible impact on uncertainties. The observed deviations are notably stronger for epistemic uncertainty. This implies a more nuanced response of the model to pattern anomalies, with epistemic uncertainty capturing and reflecting the alterations in the learned patterns more intensively. A distinctive observation emerges concerning the temporal sensitivity around the turning point. The model shows a more intense reaction in uncertainties at locations close to the

Figure 8: Results for experiments with anomaly of smaller amplitude. The highlighted area in red is the range where the anomaly takes place (see Figure 6). Figure 9: Results for experiments with anomaly of global extremum. The highlighted area in red is the range where the anomaly takes place (see Figure 6). turning point, while during the turning point itself, the uncertainty profiles tend to revert to roughly the normal pattern. This aligns with expected behavior, given the model's capacity to learn and adapt from the sine curve's inherent turning points. #### 4.2.3 Discussion

In this experiment, we saw that the model is responsive to various anomalies in its aleatoric and epistemic uncertainties. All uncertainty types exhibit patterns in reaction to anomalies, providing insights into the model's capacity to capture and quantify uncertainties under multiple conditions. A clear trend emerges, indicating that the duration of an anomaly temporally influences its effect on uncertainties. Longer-lasting anomalies, as deviations in amplitude, tend to show a more visible impact on smaller as well as larger input window sizes, highlighting the temporal sensitivity of the model. In contrast, short anomalies, such as point anomalies, are predominantly captured by shorter input windows. Epistemic uncertainty often demonstrates a more confident behavior during anomalous regions. Despite the differences, both aleatoric and epistemic uncertainties frequently exhibit similar patterns, providing confirmation that epistemic uncertainty is influenced by aleatoric uncertainty. A recurring observation is the occurrence of strong increases or decreases, or abnormal patterns at the beginnings and endings of curves. This behavior may be attributed to the influence of input windows, where limited information at the start and termination contributes to uncertainty until sufficient context is available. To avoid this and achieve more reliable curves, filters can be adapted. An observation that occurred not to any pattern is that some input window sizes are unaffected by anomalies. While others react heavily during anomalies, they continue normal patterns. An explanation could deliver the overfitting problem. As validation is conducted only every 10 th epoch and early stopping after a third increase in loss, this leaves the possibility that overfitting is not properly detected. ### Model Performance

We evaluate the model performance on a variety of real-world univariate time series datasets based on the TSB-UAD ([[https://github.com/TheDatumOrg/TSB-UAD](https://github.com/TheDatumOrg/TSB-UAD)]([https://github.com/TheDatumOrg/TSB-UAD](https://github.com/TheDatumOrg/TSB-UAD))) (accessed on 1 September 2024). This benchmark holds a repository of 12686 time series with labeled anomalies containing real-world, synthetic and artificial data. From those, we pick all 18 datasets from real-world applications, containing 1980 time series. They were recorded from diverse domains, such as transportation, healthcare, web services or environmental monitoring. The datasets are variable in size and differ in anomaly types, densities and length. We specifically picked those as they are partly recorded by sensors in real environments and thus prone to incorrect measurements which corresponds to our use case. Figure 10: Results for experiments with pattern anomaly. The highlighted area in red is the range where the anomaly takes place (see Figure 6). Table 6 provides a deeper insight into the details of each dataset.