Hierarchical Classification for Intrusion Detection System: Effective Design and Empirical Analysis

Md. Ashraf Uddin, Sunil Aryal, Mohamed Reda Bouadjenek, Muna Al-Hawawreh, Md. Alamin TalukderarXiv 2024

TL;DR

This paper demonstrates that while hierarchical classification doesn't significantly boost overall accuracy in Intrusion Detection Systems (IDS), it offers a critical safety advantage: it drastically reduces the number of attacks misclassified as "normal" traffic. By structuring classification into a three-level tree (Benign vs. Attack → Attack Family → Specific Subtype), the researchers show that hierarchical models fail "better" than traditional flat models, making them far more robust for high-stakes cybersecurity environments.

What Problem Does This Paper Address?

Traditional Intrusion Detection Systems typically use "flat" multi-class classification. Imagine a single model trying to distinguish between a dozen different types of cyberattacks and normal network traffic all at once. The problem is that network data is notoriously imbalanced—normal traffic vastly outweighs attack instances.

When a flat model is trained on this lopsided data, it becomes biased toward the majority "normal" class. This leads to high false negative rates, where dangerous attacks are mistakenly labeled as harmless traffic. In cybersecurity, this is catastrophic. Furthermore, many attacks are structurally similar (e.g., different flavors of Denial-of-Service), making them difficult for a single global classifier to separate effectively.

Methods

The authors propose a three-level hierarchical classification framework that mirrors the natural taxonomy of cyberattacks:

  1. Level 1 (Root): A binary classifier determines if the traffic is Benign or an Attack.
  2. Level 2: If an attack is detected, a multi-class classifier assigns it to a broad Attack Family (e.g., DDoS, Reconnaissance, or Theft).
  3. Level 3 (Leaf): A final set of specialized classifiers identifies the Specific Attack Type (e.g., DDoS TCP vs. DDoS UDP).
Figure 1: Hierarchical level of attacks in the Bot IoT dataset

The researchers benchmarked this approach using 10 different machine learning algorithms (including Random Forest, XGBoost, and Multi-Layer Perceptrons) to ensure the findings weren't tied to a specific model type. They also utilized 10-fold stratified cross-validation to ensure the results were statistically reliable.

Datasets

The study is impressively broad, evaluating the models across 10 widely used IDS datasets:

  • Legacy Benchmarks: NSL-KDD.
  • Modern Network Traffic: UNSW-NB15, CIC-DoS2017, CIC-DDoS2019, CIC-Darknet2020.
  • IoT-Specific: ToN-IoT (Network and IoT versions), BoT-IoT, XIIOTID.
  • Specialized: Malmem2022 (obfuscated malware), ISCX-URL2016.

For datasets lacking clear hierarchical labels, the authors mapped attack types to families using the well-established Cyber Kill Chain framework.

Key Insights and Ideas

  • The "Safety First" Failure Mode: The most significant finding is that hierarchical models change how the system fails. A flat model might misclassify a "Syn Flood" as "Normal." A hierarchical model is much more likely to misclassify it as a "UDP Flood." While the specific attack type is wrong, the system still correctly identifies it as an attack at Level 1, allowing security protocols to remain active.
  • Hierarchy as a Natural Prior: Cyberattacks aren't independent categories; they share behaviors. By separating the "Is this an attack?" question from the "What kind of attack is this?" question, the models can focus on the features most relevant to each specific decision.
  • Ease of Adaptation: Hierarchical models are easier to update. If a new type of DDoS attack emerges, you only need to retrain the specific Level 3 classifier for the DDoS family, rather than retraining a massive global model on the entire dataset.

Key Results

  • Performance Parity: In terms of overall Accuracy and F1-score, hierarchical (HR) and flat (FL) models performed similarly across most datasets.
  • False Negative Reduction: The HR model consistently outperformed the FL model in minimizing attacks misclassified as benign. For example, in the CIC-DDoS2019 dataset, the HR model reduced false negatives for "DrDoS_NTP" attacks from 223 (flat) down to just 43 (hierarchical).
  • Algorithm Consistency: Tree-based ensembles like Random Forest (RF) and Extra Trees (ET) emerged as the top performers across nearly all levels and datasets, showing high robustness in handling the complex, non-linear relationships in network data.

Limitations and Future Work

  • Computational Overhead: Hierarchical models are more complex to design and require running multiple classifiers for a single prediction, which increases latency and resource consumption. This might make them less suitable for low-power edge IoT devices.
  • Error Propagation: The system is highly dependent on the Level 1 (root) classifier. If the root model mistakenly labels an attack as benign, the lower levels never get a chance to correct the mistake.
  • Future Directions: The authors suggest exploring ensemble methods specifically tailored for the root level to further harden the system against false negatives. They also highlight the need for better interpretability—understanding why a hierarchical decision was made to build greater trust in automated security systems.

Summary updated

BibTeX
@misc{uddin2024hierarchical,
  author = {Md. Ashraf Uddin and Sunil Aryal and Mohamed Reda Bouadjenek and Muna Al-Hawawreh and Md. Alamin Talukder},
  title = {{Hierarchical Classification for Intrusion Detection System: Effective Design and Empirical Analysis}},
  year = {2024},
  eprint = {2403.13013},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.13013},
}
Figure