← Lab /AI/ML

ST-GAT achieves 96.65% Macro-F1 intrusion detection without temporal leakage

ST-GAT with inverse class weighting reaches 96.65% Macro-F1 on CSE-CIC-IDS-2018, outperforming a Random Forest baseline

AI/ML arXiv 14 Nov 2026 Method Prototype evidence

Published as “ST-GAT: A Leakage-Free Spatio-Temporal Graph Attention Framework for Robust Network Intrusion Detection”

Why it matters

ST-GAT provides a more reliable NIDS evaluation by removing common leakage errors and improves detection rates on the CSE-CIC-IDS-2018 benchmark.

Summary

ST-GAT achieves a mean Macro-F1 of 96.65% (±0.87) on CSE-CIC-IDS-2018, 14.3 points higher than a per-flow Random Forest baseline. The model combines k-NN graph construction, multi-head graph attention, and a BiLSTM with temporal attention, and is evaluated using non-overlapping windows and training-only preprocessing to avoid temporal leakage and pre-split contamination. Results are reported over three random seeds, showing modest variance, but the evaluation is limited to a single public benchmark.

What they found 1

  1. ST-GAT reaches a Macro-F1 of 96.65% (±0.87) on the test split.

    “ST-GAT with inverse class weighting reached a Macro-F1 of 96.65% (±0.87) and an accuracy of 99.14%.”

Caveats 6

  • The Infiltration class achieved a lower Macro-F1 of 0.8250, indicating weaker detection for that attack type.
  • Perfect F1 scores for several minority classes rest on very small test supports (e.g., 3-9 windows), so a single error would dramatically lower performance.
  • Future work has three directions. First, the k-NN graph is a proxy for topology when endpoint identifiers are unavailable.
  • Second, results on a single dataset cannot show that the learned patterns generalise.
  • Infiltration was the only class with markedly lower performance (F1 = 0.8250).
  • These perfect scores rest on very small supports (3 and 9 test windows for Slowloris and GoldenEye), where even a single misclassification would substantially degrade performance.

What’s new here 3

  • Integrates spatial graph attention over k-NN flow graphs with temporal BiLSTM attention in a single architecture.
  • Uses a strict evaluation protocol with non-overlapping windows and training-only preprocessing to eliminate temporal leakage and pre-split contamination.
  • Compares three class-imbalance strategies within the same model, showing inverse class-frequency weighting is most effective.