Graph Neural Networks for Multiclass IoT Botnet Detection: A Comparative Study of In-Distribution and Cross-Device Generalization Using N-BaIoT

Authors

  • Nadeem Ahmed Mehran university of Engineering and Technology

Keywords:

Botnet Detection, Graph Neural Networks, IoT Security, Cross-Device Generalization

Abstract

The widespread deployment of IoT devices across critical infrastructure has significantly widened the attack surface for botnet-based intrusions, with Mirai and BASHLITE among the most destructive documented threats. Despite extensive research on IoT intrusion detection, most studies still rely on random train/test splits drawn from the same pool of devices, which does not directly test generalization to unseen hardware. This paper addresses that deployment-oriented question. We present a two-layer Graph Convolutional Network (GCN) for multiclass IoT botnet detection using the N-BaIoT dataset, covering 11 traffic classes across three commercial IoT devices, and evaluate it alongside Random Forest and XGBoost under two protocols: a conventional in-distribution split (Protocol 1) and a cross-device split in which all samples from the test device are excluded from training (Protocol 2). Under Protocol 1, tree-based classifiers achieve 99.88% and 99.85% accuracy, compared with 86.67% for the GCN. Under Protocol 2, both baselines maintain accuracy at or above 99.65% on the unseen device, while the GCN achieves 93.29%. The GCN also reproduces a Mirai ACK/UDP confusion pattern across the two protocols and on the held-out device, while Protocol 1 reveals additional confusion among BASHLITE flood subtypes. These class-level patterns show limitations of the N-BaIoT flow-level feature representation that aggregate accuracy alone can obscure. The paired in-distribution and held-out-device evaluation provides a more deployment-oriented comparison of graph-based and flat classifiers.

Downloads

Published

2026-09-30