# Uncertainty-Aware Time Series Anomaly Detection
## 3 Proposed Approach
### Thresholding Mechanism
Figure 4: Median aleatoric uncertainty for models trained on a certain level of noise and evaluated on several other levels of noise in data. Figure 5: Median epistemic uncertainty for models trained on a certain level of noise and evaluated on several other levels of noise in data. on data with low to no noise demonstrates limited sensitivity to different levels of noise. In such cases, the model's noise prediction appears less reliable. This observation underlines the importance of training the model on data close to the one on which it is going to be tested. A model that learned diverse levels of noise in training data will be able to better differentiate these levels during the test and enhance its adaptability. The influence of the input window on noise detection is also sufficiently visible. A model's ability to differentiate between noise levels in the test data is notably impacted by the noise levels it was exposed to during training. Models trained on higher noise levels tend to produce higher noise estimates, but they may lose the ability to distinguish between levels of noise in the test data, possibly due to overfitting. Further, the model size does not seem to have a significant effect on noise detection capabilities. This suggests that model performance is not necessarily tied to the complexity or size of the architecture. Moreover, the absence of a distinct absolute threshold for noise categorization implies that the model relies more on relative changes in noise levels. This relative perspective allows the model to adapt to the specific noise distribution it has been exposed to during training, underlining the importance of training data diversity. The effect of noise in data on epistemic uncertainty shows parallel behavior to that observed for aleatoric uncertainty, providing several interesting insights (Figure 5). In general, it becomes clear that epistemic uncertainty increases when the model is subject to higher levels of noise in the test data. This finding seems to support the thesis that the presence of noisy data has an influence on the model's epistemic uncertainty. Models trained on datasets with lower noise levels once again struggle with data with higher noise. This phenomenon underscores the importance of incorporating diverse noise levels in the training dataset, as models trained only on clean data may struggle to develop a good understanding of uncertainty. Furthermore, a notable observation is that the absolute values of epistemic uncertainty appear to be more consistent, especially when considering the same size of the input window. This suggests that, compared to aleatoric uncertainty, epistemic uncertainty may rely less on the specific model architecture and size and more on the noise within the data. Interestingly, models trained on higher noise levels exhibit an improved understanding of noise, expressed in the uncertainty of the model. This indicates that models can adapt to and learn from varying noise levels during the training process, enhancing their ability to interpret and quantify epistemic uncertainty in different noise conditions. #### 4.1.4 Discussion

This experiment gave a couple of insights into the model's proficiency in recognizing noise in the data and its effect on aleatoric and epistemic uncertainty. We saw that noise in the training data plays an important role. It enables the model, to better recognize and assess noise it sees in test data. This is clearly visible in both aleatoric and epistemic uncertainty. Further, it supports the common thesis that noise in data has an influence on epistemic uncertainty. Higher noise leads to an increase in the model's ability to precisely reconstruct the input. A takeaway from this experiment is the importance of training data. As with the intended goal of prediction, the training data have to be balanced to guarantee proper learning. This accounts also for noise. A model, that could learn noise from the training data, will not be able to recognize noise in test data.