CRATOS: Cognition of Reliable Algorithm for Time-series Optimal Solution

Ziling Wu, Ping Liu, Zheng Hu, Bocheng Li, Jun Wang

TL;DR

CRATOS is a self-adaptive framework designed to automate anomaly detection for massive-scale time-series data. By clustering signals based on specific statistical features and using evolutionary algorithms to "evolve" the best detection pipeline for each group, it achieves 85.1% accuracy while drastically reducing the manual effort required by engineers.

What Problem Does This Paper Address?

In modern cloud computing environments, engineers monitor millions of Key Performance Indicators (KPIs)—such as CPU utilization or queries per second—to ensure system reliability. However, anomaly detection is not a "one size fits all" problem. A sudden spike might be a critical error in one system but normal behavior in another.

Currently, practitioners often have to manually configure detection algorithms for different types of time series. While some automated clustering methods exist (like YADING or ROCKA), they often rely on waveform similarity and use algorithms like DBSCAN, which frequently discard unusual but important signals as "noise." This creates a massive maintenance burden and leaves many time series without effective monitoring.

Methods

The authors propose a two-stage framework: Offline Training and Online Predicting.

Figure 1. The overview of our frame work. In the section of offline training, we first cluster KPIs in to a number of clusters, then we configure parameters and algorithms for each cluster with evolution algorithm. In the section of online predicting,we determine which cluster a new KPI belongs to and then we use the anomaly detection processes for the cluster to detect outliers in the new KPI.

1. Targeted Hierarchical Clustering

Instead of simple waveform matching, CRATOS extracts three specific features designed to distinguish how an anomaly detector should behave:

  • Section-sign feature: Inspired by Local Binary Patterns in image processing, this quickly identifies periodicity and interval trends.
  • Swing feature: Measures volatility and amplitude, helping the system decide on appropriate tolerances for "steep drops" or rises.
  • Diff-Thres feature: Classifies the density of impulses (spikes), which determines whether a signal needs median smoothing (for sparse spikes) or mean smoothing (for dense noise).

Unlike previous methods, CRATOS uses k-means in a hierarchical fashion. This ensures every KPI is assigned to a cluster rather than being labeled as unclassifiable noise.

2. Evolutionary Algorithm (EA) Optimization

For each identified cluster, CRATOS uses an EA to search for the optimal detection "recipe." This includes:

  • Function Selection: Choosing between different detectors (e.g., dynamic threshold vs. steep drop detectors).
  • Pre-processing: Deciding if the data needs normalization or specific smoothing techniques.
  • Hyperparameter Tuning: Automatically finding the best window sizes and sensitivities.

Datasets

The researchers evaluated CRATOS using two primary sources:

  1. Simulated Data: 4,000 pseudo-time-series generated by adding various levels of Gaussian and salt-and-pepper noise to real business baselines. This was used to benchmark clustering precision.
  2. Real Business Data: 206 manually labeled KPIs from HUAWEI Cloud BU. This dataset is particularly challenging because it is imbalanced, reflecting the real-world rarity of certain signal types.

Key Insights and Ideas

  • Feature-Driven Clustering: The core "aha moment" is that clustering for anomaly detection shouldn't just look at what the signal looks like (shape), but how it behaves statistically (periodicity, volatility, impulse density).
  • Data Utilization: By moving away from DBSCAN-based clustering, the authors avoid the "noise" trap where difficult-to-classify signals are simply ignored. CRATOS forces a classification, ensuring every KPI gets a tailored detection strategy.
  • Evolving the Pipeline: The use of EA allows the system to discover non-obvious combinations of pre-processing and detection logic that a human might not consider, such as the specific order in which smoothing and thresholding should occur.
Figure 2: Examples of KPIs with different properties that CRATOS aims to distinguish, such as interval tendency and impulse density.

Key Results

  • Clustering Superiority: CRATOS significantly outperformed state-of-the-art methods YADING and ROCKA. For example, in the "TTT" cluster (periodic, high amplitude, dense impulses), CRATOS achieved a precision of 0.886, compared to YADING's 0.256 and ROCKA's 0.369.
  • Detection Accuracy: The final end-to-end framework achieved an anomaly detection accuracy (pass rate) of 85.1% on real-world Huawei business data.
  • Efficiency: The Evolutionary Algorithm proved efficient, typically finding the optimal detection configuration within just 9 iterations.

Limitations and Future Work

The authors acknowledge that their business dataset is somewhat imbalanced, with fewer samples for specific types of KPIs (like those with high periodicity but low amplitude).

Future work could involve expanding the "pool" of available detection functions for the EA to choose from and further optimizing the computational cost of the offline training phase, which currently requires significant server resources (taking roughly two hours per iteration during the study).

Summary updated

Abstract

Anomaly detection of time series plays an important role in reliability systems engineering. However, in practical application, there is no precisely defined boundary between normal and anomalous behaviors in different application scenarios. Therefore, different anomaly detection algorithms and processes ought to be adopted for time series in different situation. Although such strategy improve the accuracy of anomaly detection, it takes a lot of time for practitioners to configure various algorithms to millions of series, which greatly increases the development and maintenance cost of anomaly detection processes. In this paper, we propose CRATOS which is a self-adapt algorithms that extract features from time series, and then cluster series with similar features into one group. For each group we utilize evolutionary algorithm to search the best anomaly detection methods and processes. Our methods can significantly reduce the cost of development and maintenance of anomaly detection. According to experiments, our clustering methods achieves the state-of-art results. The accuracy of the anomaly detection algorithms in this paper is 85.1%.
BibTeX
@inproceedings{wu2020cratos,
  author = {Ziling Wu and Ping Liu and Zheng Hu and Bocheng Li and Jun Wang},
  title = {{CRATOS: Cognition of Reliable Algorithm for Time-series Optimal Solution}},
  booktitle = {ESSE},
  year = {2020},
}
Figure