How the Graph Construction Technique Shapes Performance in IoT Botnet Detection: Insights from Graph Attention Networks
Hassan Wasswa, Hussein Abbass, Timothy Lynar · 2026
Read How the Graph Construction Technique Shapes Performance in IoT Botnet Detection: Insights from Graph Attention Networks by Hassan Wasswa, Hussein Abbass, Timothy Lynar (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2603-06654.txt.
Introduction
Wasswa and colleagues evaluate how graph construction choices affect GNN detection of IoT botnet traffic from NetFlow data. Five methods are compared: Gabriel Graph, epsilon-radius Graph, k-Nearest Neighbors, Shared Nearest Neighbor, and Mutual Nearest Neighbors. A Variational Autoencoder projects features into a latent space before graph generation. A Graph Attention Network is trained on each graph to classify N-BaIoT traffic as Normal, Mirai, or Gafgyt. The Gabriel graph achieves the highest detection accuracy at 97.56%, well above the lowest Shared Nearest Neighbor method. Construction choice matters.
Catalog record
| CREATOR | Hassan Wasswa, Hussein Abbass, Timothy Lynar |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 22730 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2603.06654
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
How the Graph Construction Technique Shapes Performance in IoT Botnet Detection: Insights from Graph Attention Networks Hassan Wasswa, Hussein Abbass, Timothy Lynar Abstract The increasing incidence of IoT-based botnet attacks has driven interest in advanced learning models for detection. Recent efforts have focused on leveraging attention mechanisms to model long-range feature dependencies and Graph Neural Networks (GNNs) to capture relationships between data instances. Since GNNs require graph-structured input, tabular NetFlow data must be transformed accordingly. This study evaluates how the choice of the method for constructing the graph-structured dataset impacts the classification performance of a GNN model. Five methods—k-Nearest Neighbors, Mutual Nearest Neighbors, Shared Nearest Neighbor, Gabriel Graph, and ϵ \epsilon -radius Graph—were evaluated in this research. To reduce the computational burden associated with high-dimensional data, a Variational Autoencoder (VAE) is employed to project the original features into a lower-dimensional latent space prior to graph generation. Subsequently, a Graph Attention Network (GAT) is trained on each graph to classify traffic in the N-BaIoT dataset into three categories: Normal, Mirai, and Gafgyt. The results indicate that using Gabriel graph achieves the highest detection performance with an accuracy of 97.56% while SNN recorded the lowest performance with an accuracy as low as 78.56%. Keywords Graph neural networks \cdot Graph attention network \cdot Graph data construction \cdot IoT botnet detection \cdot Variational autoencoder 1 Introduction Given the rising incidence of IoT-based botnet attacks, enhancing the effectiveness of learning models for detecting such threats has emerged as a key priority for researchers and practitioners in the field of IoT security. Prior research has examined a range of techniques, including conventional machine learning methods 2 ; 6 ; 34 ; 7 , sophisticated deep learning architectures 22 ; 24 ; 31 , and hybrid models aimed at strengthening network security, with a particular emphasis on IoT botnet detection 26 ; 2 ; 6 . A recent and increasingly prominent approach involves the integration of attention mechanisms, which are designed to capture long-range dependencies within input features. Notably, studies such as 33 ; 28 ; 32 have demonstrated that attention-based models can achieve near-optimal performance in the detection of IoT botnet traffic. Nevertheless, conventional models often treat each attack instance as an isolated data point, overlooking the potential inter-dependencies among different attack instances. To overcome this limitation, recent research has increasingly turned to exploring Graph Neural Network (GNN)-based approaches for attack detection 1 ; 19 ; 8 ; 3 ; 23 . These models are trained to generate an embedding space in which nodes with similar characteristics—and their relationships to neighboring nodes—are positioned in close proximity. To further boost detection performance, advanced methods have incorporated attention mechanisms into GNN architectures. This hybrid design enables the model to capture both long-range feature dependencies, through attention, and local inter-instance relationships, via graph structure, leading to more robust and accurate detection of IoT botnet traffic. Since the feature extraction process from the NetFlow capture (.pcaps) often results into tabular datasets (such as the .csv format), converting the dataset into a graph structure is a common preprocessing step when applying GNNs to network traffic classification tasks. The method used to construct the graph—i.e., how nodes (samples) are connected via edges—plays a critical role in shaping the graph’s topology and, consequently, the model’s performance. However, the impact of different graph construction strategies on the classification performance of GNN models remains an open question in the existing literature. To tackle this challenge, this work evaluates five .csv dataset-to-graph-dataset construction techniques—k-nearest neighbors (kNN), epsilon-radius graph ( \epsilon -graph), mutual nearest neighbors (MNN), Gabriel-graph, Shared nearest neighbors (SNN)—and evaluates the impact of each method on the performance of a Graph Attention Neural Network (GAT) model for botnet attack detection on the N-BaIoT dataset. The rest of this paper is organized as follows. Section 2 presents prior work integrating the GNN model with the attention mechanism for anomaly detection. This is followed by section 3 where a detailed description of the framework used in this work is presented, together with a brief description of the dataset and the various techniques used. In section 4 we present and discuss the findings of this study followed by the conclusion in section 5 . 2 Related Work Recent research has increasingly explored hybrid models that combine attention-based transformer architectures with GNNs to enhance anomaly detection capabilities. These hybrid approaches capitalize on the complementary strengths of GNNs, which are adept at capturing complex node-edge relationships, and transformers, known for their effectiveness in modeling long-range dependencies across features—resulting in superior detection performance. For example, the authors of study 1 aimed to address IoT security challenges caused by heterogeneous interconnected devices, where conventional methods such as encryption and authentication often prove inadequate. The authors proposed a graph-based approach, utilizing a Graph Attention Network (GAT)-driven Intrusion Detection System (IDS) to analyze IoT graphs. By evaluating the method on the NSL-KDD dataset, the study demonstrated the potential of graph neural networks as a scalable and robust solution for intrusion detection in IoT systems. The study in 38 introduced a hybrid model integrating a GNN with a transformer-based architecture specifically for intrusion detection. In this model, the GNN component is designed to capture intricate structural dependencies among nodes and edges, while the transformer module improves anomaly detection by effectively modeling extended contextual relationships. In a related development, 16 presented a framework that incorporates a graph convolutional neural network and an attention mechanism to analyze graph-structured data from IoT devices. This integration facilitates the detection of botnets by accurately modeling device interactions and uncovering latent patterns indicative of malicious behavior. Study 30 investigated the influence of three dimensionality reduction methods—AE-encoder, VAE-encoder, and PCA—on the performance of a Graph Attention Network (GAT) for IoT botnet detection. In their experiments, the original 84-dimensional CICIoT2022 feature space was compressed into 8 dimensions before being converted into graph-structured data for training. The results demonstrated that VAE-encoder yielded the best performance among the reduction methods. Additionally, the 3\text{-euclidean} “n_neighbors-metric” configuration showed superior results in graph construction using the kNN algorithm compared to other parameter combinations. The authors of study 39 aimed to address the challenge of detecting complex IoT cyberattacks by introducing EGAT-LSTM, a model that integrates an enhanced Graph Attention Network with an LSTM. The approach captures spatial and temporal characteristics of network traffic while refining feature aggregation to retain essential information. The study applied this method to IoT malicious traffic classification, offering a more effective solution than conventional single-flow analysis. The work in 29 compared the classification performance of GNN-based models—VAE-GCN and VAE-GAT—with two advanced deep learning models—VAE-MLP and ViT-MLP—using the 115-dimensional N-BaIoT dataset reduced to 8 dimensions. The findings showed that VAE-GAT outperformed VAE-GCN; however, both GNN-based models were generally outperformed by the other deep learning architectures, indicating a need for further refinement of GNN models to achieve competitive classification results. In another significant contribution, 18 focused on detecting cyber-attacks targeting electric vehicle (EV) charging infrastructure. Their methodology involved creating graph representations from hardware logs and applying a GNN to model the interrelationships among features. The inclusion of a transformer further enhanced the model’s ability to capture intricate feature interactions, thereby improving the accuracy of attack detection. Additionally, 36 proposed AJSAGE, a model that extends the GNN-based