NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Detecting Path Anomalies in Time Series Data on Networks

Timothy LaRock, Vahan Nanumyan, Ingo Scholtes, Giona Casiraghi, Tina Eliassi‐RadZurich 2019

Abstract

Traditional anomaly detection often fails to account for the structural constraints of networks, leading to false positives for rare but expected paths and false negatives for frequent but suspicious ones. We present HYPA (HYpergeometric Path Anomalies), a novel framework that leverages higher-order De Bruijn graphs and hypergeometric ensembles to identify path anomalies. By comparing observed path frequencies against a null model derived from network topology, HYPA provides a statistically grounded and computationally efficient method for anomaly detection in diverse domains such as transportation, finance, and information flow.

Introduction

Many real-world time series data are best represented as sequences of nodes traversed in a network, such as flight itineraries, web clickstreams, or financial transactions. Standard frequency-based anomaly detection (FBAD) treats these sequences as independent categories, ignoring the underlying graph topology. This approach is problematic because network flows are inherently "lumpy"—hubs naturally attract more traffic, making some paths frequent and others rare without either being anomalous.

Comparison of Frequency-Based Anomaly Detection (FBAD) and HYPA in different network flow scenarios.

As illustrated in Figure 2, FBAD may incorrectly flag a rare path as anomalous even if it is expected given the network structure, or fail to detect an over-represented path that deviates from expected flow patterns. HYPA addresses this by incorporating the network's topology and edge statistics into its statistical model.

Methods

The HYPA framework consists of three integrated components designed to capture the nuances of network flow:

  1. Higher-Order De Bruijn Graphs: Paths of length $k$ are mapped to edges in a higher-order graph where nodes represent sequences of length $k-1$. This structure explicitly models the memory and directional constraints of the network.
  2. The $(k-1)$ Null Model: To isolate anomalies at a specific path length, HYPA uses the frequencies of sub-paths of length $k-1$ as a baseline. This ensures that a long path is only flagged if its specific sequence is unusual, rather than just containing an unusual segment.
  3. Hypergeometric Ensembles: Rather than relying on computationally intensive simulations, HYPA uses an analytical approach based on the multivariate hypergeometric distribution. This allows for the direct calculation of a HYPA-score, representing the statistical significance of a path's frequency.
Overview of the HYPA framework, from input graph and path data to anomaly scores and robustness analysis.

The complete pipeline, from raw path data to validated anomaly scores, is shown in Figure 4.

Experimental Validation

The researchers evaluated HYPA using both synthetic benchmarks and diverse real-world datasets:

  • Synthetic Networks: Erdős-Rényi graphs with injected anomalies were used to measure detection accuracy via Area Under the Curve (AUC).
  • Transportation: US flight itineraries and London Tube travel patterns.
  • Information Flow: Journal citation networks and Wikipedia clickstreams (Wikispeedia).
  • Social Interaction: Time-stamped hospital staff-patient interactions.

Key Results and Insights

HYPA demonstrated significant performance gains over traditional methods:

  • Accuracy: In synthetic tests, HYPA achieved an AUC of approximately 0.9, outperforming the FBAD baseline (~0.78), particularly in networks with highly skewed edge statistics.
  • Semantic Meaning: In flight data, HYPA identified "return flights" and geographically direct routes as statistically over-represented, aligning with logical travel behavior. In the London Tube, it revealed that under-represented paths often corresponded to short distances where walking is a more efficient alternative.
  • Computational Efficiency: The analytical nature of the HYPA-score allows the algorithm to scale linearly with the number of observations, making it suitable for large-scale forensic analysis.

Conclusion and Future Work

HYPA provides a robust, network-aware framework for path anomaly detection. While highly effective, future research could address the manual selection of discrimination thresholds and explore multi-order analysis to combine insights from paths of varying lengths. Integrating domain-specific costs or temporal dynamics could further enhance the detection of contextually meaningful anomalies.

Summary updated

BibTeX
@inproceedings{larock2019detecting,
  author = {Timothy LaRock and Vahan Nanumyan and Ingo Scholtes and Giona Casiraghi and Tina Eliassi‐Rad},
  title = {{Detecting Path Anomalies in Time Series Data on Networks}},
  booktitle = {Zurich},
  year = {2019},
  doi = {10.5167/uzh-174430},
}

Loading related content...

Figure