Abstract
Detecting anomalies in large, distributed systems presents several challenges. The first challenge arises from the sheer volume of data that needs to be processed. Flagging anomalies in a high-throughput environment calls for a careful consideration of both algorithm and system design. The second challenge comes from the heterogeneity of time-series datasets that leverage such a system in production. In practice, anomaly detection systems are rarely deployed for a single use case. Typically, there are several metrics to monitor, often across several domains (e.g. engineering, business and operations). A one-size-fits-all approach rarely works, so these systems need to be fine-tuned for every application - this is often done manually. The third challenge comes from the fact that determining the root-cause of anomalies in such settings is akin to finding a needle in a haystack. Identifying (in real time) a time-series dataset that is associated causally with the anomalous time-series data is a very difficult problem. In this paper, we describe a unified framework that addresses these challenges. Reasoning based Anomaly Detection Framework (RADF) is designed to perform real time anomaly detection on very large datasets. This framework employs a novel technique (mSelect) that automates the process of algorithm selection and hyper-parameter tuning for each use case. Finally, it incorporates a post-detection capability that allows for faster triaging and root-cause determination. Our extensive experiments demonstrate that RADF, powered by mSelect, surpasses state-of-the-art anomaly detection models in AUC performance for 5 out of 9 public benchmarking datasets. RADF achieved an AUC of over 0.85 for 7 out of 9 datasets, a distinction unmatched by any other state-of-the-art model.
Introduction
Monitoring large-scale enterprise systems—such as cloud infrastructure, payment networks, or global subscription services—requires tracking hundreds of thousands of time-series metrics across diverse dimensions. Traditional anomaly detection systems often fail in these environments due to three primary factors: data heterogeneity, the lack of labeled training data, and the difficulty of real-time Root Cause Analysis (RCA).
A "one-size-fits-all" algorithm is ineffective because metrics behave differently; for instance, daily active user counts exhibit different patterns than CPU temperature fluctuations. Manually tuning models for every metric is impossible at scale. Furthermore, real-world data is rarely labeled, precluding supervised learning. Finally, detecting an anomaly is only the first step; engineers must quickly identify why it occurred. RCA is typically a disconnected process, hindering real-time response.
The RADF Framework
The Reasoning-based Anomaly Detection Framework (RADF) is an end-to-end, configuration-driven system designed for scalability and real-time performance. Deployed via PySpark for batch processing and PyFlink for streaming, it utilizes a core library of 33 algorithms to handle diverse data profiles.
Automated Model Selection (mSelect)
To address the challenge of manual tuning, RADF introduces mSelect, an unsupervised module for automated model selection. Instead of expensive hyperparameter searches, mSelect uses heuristics to classify unlabeled time-series data into three categories:
- Stable: Stationary data.
- Unstable: Non-stationary data, identified using the Augmented Dickey-Fuller test.
- Trend: Data exhibiting clear directional movement, identified via rolling median smoothers and linear regression.
Based on this classification, the system automatically applies a pre-optimized ensemble of algorithms best suited for that specific data shape. This approach ensures robustness against noise by using majority voting across multiple tailored algorithms.
Integrated Root Cause Analysis
RADF treats RCA as an integral part of the detection pipeline rather than a downstream task. Once an anomaly is flagged, the RCA module immediately begins triaging.
The module employs conditional probabilities and various correlation/causality algorithms—such as Granger Causality, Dynamic Time Warping, and Pearson correlation—to compare the anomalous metric against candidate metrics. It supports both Cross-Dimension RCA (e.g., identifying a specific region causing a global traffic dip) and Cross-Metric RCA (e.g., linking a transaction failure spike to database latency).
Experimental Evaluation
The authors evaluated RADF using nine public datasets from the TSB-UAD benchmark suite (including YAHOO, IOPS, and SMD) and 11 internal datasets containing 40,000 manually labeled points.
Key Results
- State-of-the-Art Performance: RADF outperformed models like Isolation Forest, CNN, and LSTM-AD in AUC on 5 out of 9 public datasets. It achieved an AUC > 0.85 on 7 out of 9 datasets, with near-perfect scores (0.99) on YAHOO and Genesis.
- mSelect Accuracy: On internal benchmarks,
mSelectachieved F1 scores of 0.977 for stable and 0.986 for unstable time series, validating the heuristic classification approach. - Production Scalability: RADF has been operational in a large-scale production environment for over three years, supporting 30+ use cases and processing hundreds of thousands of data points per second.
Conclusion and Future Work
RADF provides a scalable, automated solution for real-time anomaly detection. While highly effective, the framework faces challenges with trend-based data, where the F1 score for mSelect dropped to 0.798. Future work will focus on improving de-trending preprocessing and refining the precision-recall balance to reduce false positives in noisy environments. Additionally, the authors plan to provide more granular evaluations of the RCA module's performance in complex, multi-metric scenarios.
Summary updated