Abstract
Given a stream of graph edges from a dynamic graph, how can we assign anomaly scores to edges in an online manner, for the purpose of detecting unusual behavior, using constant time and memory? Existing approaches aim to detect individually surprising edges. In this work, we propose MIDAS, which focuses on detecting microcluster anomalies, or suddenly arriving groups of suspiciously similar edges, such as lockstep behavior, including denial of service attacks in network traffic data. MIDAS has the following properties: (a) it detects microcluster anomalies while providing theoretical guarantees about its false positive probability; (b) it is online, thus processing each edge in constant time and constant memory, and also processes the data 162-644 times faster than state-of-the-art approaches; (c) it provides 42%-48% higher accuracy (in terms of AUC) than state-of-the-art approaches.
Introduction
Many real-world systems, from computer networks to social media platforms, are best represented as edge streams: a continuous flow of interactions (edges) between entities (nodes) over time. Detecting anomalies in these streams is vital for identifying Denial of Service (DoS) attacks, financial fraud, or coordinated bot activity.
Existing research in this domain often suffers from three major gaps. First, most tools focus on individual edge surprises rather than "microclusters"—groups of similar edges arriving in lockstep, which is a hallmark of modern automated attacks. Second, many algorithms lack scalability, requiring increasing memory or time as the graph grows. Finally, most heuristic-based detectors do not provide theoretical bounds on false-positive rates, making them difficult to tune for production environments.
Methodology
MIDAS (Microcluster-Based Detector of Anomalies) addresses these gaps by combining streaming data structures with a principled statistical framework.
Streaming Data Structures
To maintain a constant memory footprint regardless of stream length, MIDAS utilizes Count-Min-Sketch (CMS). These data structures allow the algorithm to approximate edge frequencies without storing every interaction. Specifically, it tracks the total count of an edge since inception ($s_{uv}$) and its count in the current time tick ($a_{uv}$).
Statistical Scoring
MIDAS treats anomaly detection as a hypothesis testing problem. It uses a Chi-Squared Goodness-of-Fit test to determine if the rate of a specific edge in the current time tick is significantly higher than its historical average. This statistical approach allows the authors to provide theoretical guarantees (Theorem 1) that bound the false-positive probability ($\epsilon$).
MIDAS-R (Relational Extension)
The authors further extended the base model into MIDAS-R to capture more complex patterns:
- Temporal Relations: A decay factor ($\alpha$) ensures that recent past activity has more influence on the current score than distant history.
- Spatial Relations: By calculating anomaly scores for source and destination nodes in addition to specific edges, MIDAS-R can detect "one-to-many" or "many-to-one" bursts typical of network scanning or flooding.
Experimental Evaluation
The researchers evaluated MIDAS against the state-of-the-art SEDANSPOT baseline using three real-world datasets: DARPA (4.5 million IP communications), TwitterSecurity (2.6 million security-related tweets), and TwitterWorldCup (1.7 million tweets during the 2014 tournament).
Key Results
- Superior Accuracy: On the DARPA dataset, MIDAS-R achieved an AUC of 0.95, a significant improvement over SEDANSPOT's 0.64. This represents a 42%–48% increase in detection accuracy.
- Unprecedented Speed: MIDAS processed the DARPA dataset in just 0.13 seconds, compared to 84 seconds for the baseline. This makes MIDAS up to 644x faster than previous methods while maintaining a constant memory footprint.
- Real-World Utility: In the Twitter datasets, anomaly peaks generated by MIDAS aligned precisely with major real-world events, such as the Soma mine explosion, demonstrating its effectiveness in non-adversarial contexts.
Conclusion
MIDAS provides a robust, lightning-fast solution for real-time anomaly detection in dynamic graphs. By focusing on microcluster behavior and utilizing constant-memory data structures, it offers a scalable alternative to traditional methods. Future work may involve extending the algorithm to handle heterogeneous data types and higher-order graph structures like tensors.
Summary updated