Abstract
Statistical anomaly detection in network traffic often relies on Hoeffding’s test, which uses relative entropy to identify deviations from a baseline. A critical challenge is determining the optimal threshold ($\eta$) to balance false alarms and detection sensitivity. While Sanov’s theorem is commonly used, its asymptotic nature leads to inaccuracies with finite data. This paper proposes a tighter threshold approximation using Weak Convergence (WC) and the Central Limit Theorem (CLT) for Markovian traffic models. The proposed method significantly reduces false alarms in both stationary and dynamic network environments.
Introduction
In network security, statistical anomaly detection works by comparing current traffic to a "normal" baseline. A popular tool for this is Hoeffding’s test, which uses a metric called relative entropy (or divergence) to measure how much current observations deviate from the expected probability law.
The central challenge in this field is setting the detection threshold ($\eta$). If the threshold is too low, the system generates excessive false alarms; if it is too high, actual attacks may go undetected. Traditionally, researchers have relied on Sanov’s theorem from Large Deviations Theory to estimate this threshold. However, Sanov’s theorem is an asymptotic result—it is accurate only with an infinite number of observations. In practical scenarios with finite data packets, it tends to be highly inaccurate, leading to detection systems that are either overly sensitive or dangerously unresponsive.
Methodology
The authors propose a more precise threshold approximation by leveraging Weak Convergence (WC) and the Central Limit Theorem (CLT). Their approach involves several key steps:
- Markovian Modeling: Unlike previous models that assumed independent and identically distributed (i.i.d.) data, this work models network traffic as a finite-state Markov chain. This better reflects real-world network behavior, where packet characteristics often depend on preceding states.
- Multidimensional CLT: The researchers establish a multidimensional CLT for the empirical measures of these Markov chains. This allows them to describe the fluctuations of observed traffic around the baseline as a Gaussian process.
- Taylor Expansion: To handle the non-linear complexity of relative entropy, the authors use a second-order Taylor series expansion. This approximates the test statistic as a simpler quadratic form involving Gaussian random variables.
- Threshold Estimation: By generating Gaussian samples based on a calculated covariance matrix ($\Lambda$) and the Hessian of the divergence function, they can numerically estimate a precise threshold ($\eta^{wc}$) for any target false alarm probability.
Experimental Evaluation
The method was evaluated using synthetic Markov chains to validate mathematical accuracy and the SADIT/fs-simulator package to generate realistic flow-level network traffic. Features such as flow duration, size, and IP-based "distance to cluster center" were used to test detection performance against annotated anomalies.
Key Results
- Threshold Accuracy: Numerical tests demonstrated that the proposed threshold ($\eta^{wc}$) tracks the actual required threshold almost perfectly. In contrast, the Sanov-based threshold ($\eta^{sv}$) consistently underestimated the necessary value, as shown in Figure 1.
- False Alarm Reduction: In stationary traffic scenarios, the underestimation inherent in Sanov-based methods leads to constant false alarms during normal operation. The WC-based method successfully suppressed these false alarms while maintaining the sensitivity required to detect a simulated "large access rate" anomaly.
- Dynamic Adaptation: The method was also tested in time-varying scenarios, such as networks with day-night cycles. It successfully identified distinct "normal" probability laws (e.g., morning vs. evening) and maintained accurate detection without requiring manual threshold tuning.
Discussion and Conclusion
The core insight of this work is that while Large Deviations Theory describes the rate of error decay, Weak Convergence describes the actual shape of the distribution for finite samples. This makes WC a superior tool for practical engineering in network monitoring. Furthermore, the approach is computationally efficient; generating Gaussian samples and applying a quadratic formula is suitable for near-real-time applications.
However, some limitations remain. The method requires a sufficiently long sample path to accurately estimate the baseline Markov transition matrix. Additionally, the robustness of the "epsilon trick" used to handle zero-probability transitions in sparse datasets warrants further investigation. Future work may also address potential computational bottlenecks as the number of states in the Markov model increases.
Overall, this improved composite hypothesis test provides a robust framework for reducing false alarms and enhancing the reliability of statistical network anomaly detection systems.
Summary updated