Statistical Anomaly Detection via Composite Hypothesis Testing for Markov Models

Jing Zhang, Ioannis Ch. Paschalidis · DOI

Abstract

Statistical Anomaly Detection (SAD) is critical for identifying atypical events in complex systems. Under Markovian assumptions, this research leverages a Central Limit Theorem (CLT) for the empirical measure to establish weak convergence results for the Hoeffding test statistic. This theoretical foundation allows for the derivation of a new threshold estimator that significantly improves the accuracy of anomaly detection. Numerical experiments demonstrate that this estimator provides superior control over false alarm rates compared to traditional methods. The approach is validated through two real-world applications: enhancing cyber security in communication networks and monitoring traffic congestion in smart transportation systems.

Introduction

Statistical Anomaly Detection (SAD) aims to distinguish "normal" system behavior from "atypical" events by measuring the statistical distance between observed data and a baseline model. A cornerstone of this field is the Hoeffding test, which utilizes relative entropy to quantify these deviations.

A persistent challenge in implementing the Hoeffding test is the selection of the critical threshold ($\eta$). If the threshold is set too low, the system suffers from excessive false alarms; if set too high, critical anomalies go undetected. Traditionally, researchers have relied on Sanov’s Theorem—a result from large deviations theory—to estimate this threshold. However, Sanov’s Theorem assumes an infinite data horizon. In practical scenarios involving finite observation windows, the Sanov-based threshold ($\eta^{sv}$) often fails to accurately control the False Positive Rate (FPR), leading to unreliable detection systems.

Methodology: From Large Deviations to Weak Convergence

This paper proposes a shift from large deviations theory to Weak Convergence (WC). The authors prove that, under Markovian assumptions, the Hoeffding test statistic converges in distribution to a weighted sum of independent $\chi^2$ (chi-squared) random variables. This insight allows for the creation of the $\eta^{wc}$ estimator, which captures the distributional fluctuations of the test statistic more accurately than previous methods.

Key Contributions:

  • Markovian Modeling: Unlike models that assume independent and identically distributed (i.i.d.) data, this method explicitly accounts for temporal dependencies, making it suitable for network traffic and transportation data.
  • Robust Hoeffding Test: The framework is extended to handle time-varying systems (e.g., distinguishing between day and night traffic patterns) by testing against a set of possible normal probability laws rather than a single static model.
  • Algorithmic Implementation: The authors provide two primary algorithms: Algorithm 1 for stationary systems and Algorithm 2 for robust, time-varying systems. These algorithms utilize Monte Carlo simulations of Gaussian vectors to numerically estimate the threshold for a specific target false alarm rate ($\beta$).

Experimental Validation

The proposed method was evaluated using three distinct datasets:

  1. Synthetic Markov Chains: Used to validate threshold accuracy against a known ground truth across various state-space sizes.
  2. SADIT (Systematic Anomaly Detection of Internet Traffic): A simulation environment for flow-level communication traffic, featuring annotated anomalies such as large file transfers.
  3. Waze Traffic Data: Real-world data from the City of Boston (March 2016), including reports on speed, delay, and jam length. This represents a novel application of SAD to urban infrastructure.

Key Insights and Results

Threshold Accuracy and Scaling

The experiments reveal that the standard Sanov estimator ignores specific distributional information, causing its error to grow significantly as the number of possible system states ($N$) increases. In contrast, the WC-based estimator ($\eta^{wc}$) remains consistently accurate across state spaces ranging from $N=2$ to $N=8$.

ROC Performance

Receiver Operating Characteristic (ROC) analysis shows that the proposed HTWC (Hoeffding Test with Weak Convergence) method aligns closely with target False Positive Rates. In one simulation, while the traditional Sanov method produced an actual FPR 400 times higher than the target (0.001), the new estimator successfully maintained the FPR near the intended level.

Real-World Application in Boston

When applied to the Waze dataset, the system effectively filtered thousands of routine traffic jams to identify six truly atypical incidents. These incidents corresponded to significant road closures and extreme weather hazards. Notably, the system achieved this detection with zero false alarms, demonstrating its utility for smart city management.

Discussion and Future Work

While the WC-based approach offers superior accuracy, it introduces higher computational overhead due to the need for generating Gaussian sample vectors and calculating eigenvalues. This is more intensive than the simple logarithmic calculations required by Sanov’s Theorem. However, the authors note that for real-time applications, the empirical distribution can be reused across sliding observation windows, mitigating some of the computational costs.

Future research will focus on a formal theoretical comparison of the tightness of CLT-based bounds versus large deviation-based bounds. Additionally, the team aims to investigate optimal quantization methods for continuous real-world data, as the performance of the Markovian model is sensitive to how states (like traffic speed) are discretized.

Summary updated

BibTeX
@article{zhang2017statistical,
  author = {Jing Zhang and Ioannis Ch. Paschalidis},
  title = {{Statistical Anomaly Detection via Composite Hypothesis Testing for Markov Models}},
  journal = {IEEE Trans. Signal Process.},
  year = {2017},
  doi = {10.1109/tsp.2017.2771722},
}
Figure