Abstract
In the high-stakes environment of cloud computing, maintaining system health requires monitoring thousands of multivariate metrics such as CPU load, network traffic, and memory usage. Detecting anomalies in this complex data is challenging due to the intricate dependencies between metrics and the high computational cost of existing deep learning models. This paper introduces CMAnomaly, an unsupervised framework designed for accurate and efficient industrial deployment. CMAnomaly utilizes a "Collaborative Machine" to explicitly model pairwise interactions between features and time steps with linear time complexity. Our evaluation on public and industrial datasets demonstrates that CMAnomaly achieves a state-of-the-art F1 score of 0.9494 while running 10x–20x faster than baseline models.
Introduction
Modern online services are built on tightly coupled microservices, where a single failure can ripple across multiple metrics simultaneously. For instance, a malfunctioning load balancer might trigger concurrent spikes in network inflow and CPU utilization. Traditional univariate detection methods often fail in these scenarios, either by generating false alarms for normal spikes or missing subtle anomalies that only appear when metrics are viewed in context. While multivariate models like LSTMs or Graph Neural Networks offer better accuracy, their $O(m^2)$ computational complexity makes them impractical for real-time monitoring of thousands of metrics.
Methodology
CMAnomaly addresses these challenges through a four-stage pipeline: Preprocessing, the Collaborative Machine, Model Training, and Anomaly Detection.
The Collaborative Machine
The core innovation is the Collaborative Machine, which explicitly models pairwise interactions between different metrics ("cross-feature") and different timestamps ("cross-time"). Unlike standard approaches that calculate every possible interaction pair in quadratic time, CMAnomaly mathematically reformulates these interactions into linear time complexity ($O(m)$). This allows the model to capture deep dependencies without the massive computational overhead typical of deep learning architectures.
Forecasting-Based Detection
By leveraging the efficient feature interactions from the Collaborative Machine, CMAnomaly uses a simple Multi-Layer Perceptron (MLP) to forecast the system's next state. The model is trained to minimize the Mean Square Error (MSE) between the predicted and observed metrics. During the detection phase, a high error indicates a deviation from normal historical patterns, which is then flagged as an anomaly.
Evaluation and Results
We evaluated CMAnomaly using three public benchmarks (SMD, SMAP, and MSL) and a 30-day industrial dataset from Huawei Cloud’s networking services. The industrial dataset includes metrics from 13 online services, each with 15–30 metric types.
Performance and Efficiency
CMAnomaly outperformed state-of-the-art baselines like OmniAnomaly and USAD, achieving an average F1 score of 0.9494. Beyond accuracy, the framework's efficiency is its primary advantage for industrial use.
As shown in the efficiency analysis, CMAnomaly maintains low training and prediction times even as the historical window size increases. It consistently operates 10x to 20x faster than traditional deep learning models, making it suitable for environments that require frequent model retraining to handle system upgrades and concept drift.
Conclusion
CMAnomaly provides a practical solution for multivariate anomaly detection in online services by balancing high accuracy with linear computational complexity. By explicitly modeling metric interactions through the Collaborative Machine, it achieves superior precision and recall while remaining fast enough for real-time industrial applications. Future work will focus on automating threshold settings and integrating human-in-the-loop expert knowledge to further refine detection in extremely high-dimensional environments.
Summary updated