Abstract
Sampling is a popular method for improving the scalability of analyzing massive datasets such as network traffic traces, webclick traffic, and other forms of transaction data. However, in some cases, existing simple sampling strategies fail to capture the underlying distribution of the data. In particular, they often miss rare but significant events. This paper proposes a two-stage adaptive sampling scheme that prioritizes unusual data patterns, allowing clustering algorithms to scale to massive volumes while maintaining high sensitivity to rare events.
Introduction
In network traffic analysis, researchers frequently encounter the "Elephants and Mice" phenomenon. A small number of high-volume flows (the "Elephants") account for the vast majority of traffic, while a large number of low-volume flows (the "Mice") contain critical information, such as early indicators of worm outbreaks or sophisticated intrusions.
Standard data reduction techniques, such as systematic or random sampling, treat every packet equally. While "fair," this approach is biased toward the Elephants. By the time enough data is sampled to identify a "Mouse," the clustering engine is often overwhelmed by redundant data from the Elephants. The challenge lies in reducing data volume for scalability without sacrificing the visibility of rare patterns.
Methodology: Two-Stage Adaptive Sampling
To address this, we propose a Two-Stage Adaptive Sampling Scheme integrated with Echidna, a hierarchical clustering tool based on the BIRCH algorithm. The core idea is to "spend" computational resources on new or unusual traffic rather than re-processing known heavy-hitter patterns.
The process operates in four main steps:
- Stage One (Broad Sampling): Input traffic is initially sampled at a relatively high rate ($P_1$).
- Buffer Matching: Sampled records are compared against a buffer containing known, frequent traffic patterns extracted from previous clustering results.
- Stage Two (Filtering): If a record matches a known pattern, it is considered less informative and undergoes a second sampling stage at a much lower probability ($P_2$). If it is unusual (no match), it bypasses this stage.
- Adaptive Logic: The system dynamically adjusts $P_2$ based on the match ratio ($X$). As more traffic matches known patterns, $P_2$ is lowered to conserve resources.
Experimental Evaluation
The scheme was evaluated using the 1998 DARPA Intrusion Detection dataset. This benchmark includes 25 days of network traffic with labeled attacks, ranging from high-volume DoS attacks (e.g., Neptune, Smurf) to extremely rare "Mice" attacks (e.g., land, loadmodule, warez).
Results and Discussion
The adaptive scheme significantly outperformed traditional systematic sampling in identifying rare attack classes.
Rare Attack Detection
At a sampling rate of $SR=0.12$, the adaptive scheme uniquely identified 12 different types of rare attacks, compared to only 3 identified by systematic sampling. Specific attacks such as land, loadmodule, and warez were detected by the adaptive scheme but remained completely invisible to systematic sampling at identical data rates.
Efficiency and Stability
While buffer matching introduces computational overhead, it scales linearly with traffic. In 60% of test cases, this overhead was less than 20%. Furthermore, the overall precision and recall for clustering remained stable (above 80%) even as the sampling rate was aggressively reduced. This demonstrates that accuracy for the majority classes is not sacrificed to gain sensitivity for the minority classes.
Conclusion
The two-stage adaptive sampling scheme provides a scalable solution for network traffic clustering. By aggressively down-sampling redundant "Elephant" traffic and prioritizing "Mice," the system ensures that critical, rare events are captured even in high-volume environments. Future work will focus on incremental buffer updates to handle "concept drift" in non-stationary traffic environments and optimizing buffer lookup efficiency.
Summary updated