Development of a Gated Recurrent Unit (GRU) Classifier for Detection of Malicious Network Flows
DOI:
https://doi.org/10.38124/ijsrmt.v5i10.1775Keywords:
Internet of Things, Intrusion Detection, Gated Recurrent Unit, RT-IoT2022, Network Security, Flow ClassificationAbstract
The Internet of Things (IoT) brings heterogenous network traffic which is sourced from resource-constrained devices. Detection of network intrusions can help provide an important functionality at the gateway. In this study, a Gated Recurrent Unit (GRU) model is developed to detect network flows containing malicious traffic using the RT-IoT2022 dataset. The dataset contained 123,117 records from 3 classes of benign data and 9 attack classes. After dropping the identifying fields, port numbers, opposing predictor variables and ensuring only one sample was available per remaining predictor variable, there were 18,265 samples. All numeric variables were log transformed and scaled using the training set. The protocol and service variables were converted using one-hot encoding so there were a total of 92 variables. A GRU model with 32 gates was tested with a single network flow. It was compared to logistic regression, linear support vector machine and random forest, all applied to the same split. The benchmark GRU model provided an accuracy, precision, recall, F1 score and AUC of 98.58%, 97.59%, 98.31%, 0.9795 and 0.9994 respectively using 2,740 samples in the test set. There were 23 false positives and 16 missed attacks. The mean accuracy across 3 seeds for the GRU was 98.60%. The random forest model had the highest test accuracy (99.42%). This paper provides a repeatable baseline for using GRUs on network flows. It demonstrates how important it is to consider false positives, duplicated samples and competitive classical models.
Downloads
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 International Journal of Scientific Research and Modern Technology

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
PlumX Metrics takes 2–4 working days to display the details. As the paper receives citations, PlumX Metrics will update accordingly.