UoCAD2: An unsupervised online contextual anomaly detection approach using optimized hyperparameters of RNNs for multivariate time series

Aafan Ahmad Toor, Jia‐Chun Lin, Ernst Gunnar Gran · Internet of Things · 2025

Internet of Things (IoT) based smart devices are gradually becoming part of daily lives through their increasing usage in industry, healthcare, agriculture, environmental monitoring, energy, transportation, and smart cities, buildings, and homes. IoT devices generate fast-paced time-bound data known as time series. Time series often contain anomalies, i.e., unusual patterns or deviations from the norm, that can disrupt services and must be detected quickly. Many researchers have tried to detect unlabeled anomalies by employing unsupervised online anomaly detection approaches based on Recurrent Neural Networks (RNN). RNNs are specially designed to process sequential data. However, selecting the right type of RNN and appropriate hyperparameters for a specific data domain is challenging. Another challenge in the online processing of time series is to pick out an appropriate sliding window size, that is small enough to process the incoming data in a limited time and large enough to capture the underlying deviations in the data. This study extends the Unsupervised Online Contextual Anomaly Detection (UoCAD) approach to overcome these challenges by proposing UoCAD2. UoCAD2 conducts hyperparameter optimisation on six RNN variants in an offline phase and uses fine-tuned hyperparameters to detect anomalies during the online phase. The experiments evaluate the proposed framework on three IoT datasets containing contextual anomalies. Precision, Recall, F1 score, and detection time are the evaluation metrics used in this study. This study recommends selecting the best combination of RNN-based models, optimal hyperparameters, and window sizes for contextual anomaly detection in multivariate time series data.

Read the paper · More papers on PaperTik