Next Article in Journal
Learning to Hack, Playing to Learn: Gamification in Cybersecurity Courses
Previous Article in Journal
Fairness-Aware Face Presentation Attack Detection Using Local Binary Patterns: Bridging Skin Tone Bias in Biometric Systems
Previous Article in Special Issue
Statistical and Multivariate Analysis of the IoT-23 Dataset: A Comprehensive Approach to Network Traffic Pattern Discovery
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Evaluation of Anomaly-Based Network Intrusion Detection Systems with Unclean Training Data for Low-Rate Attack Detection

by
Angela Oryza Prabowo
1,
Deka Julian Arrizki
1,
Baskoro Adi Pratomo
1,*,
Ahmad Ibnu Fajar
1,
Krisna Badru Wijaya
1,
Hudan Studiawan
1,
Ary Mazharuddin Shiddiqi
1 and
Siti Hajar Othman
2
1
Department of Informatics, Institut Teknologi Sepuluh Nopember, Surabaya 60111, East Java, Indonesia
2
Faculty of Computing, Universiti Teknologi Malaysia, Johor Bahru 81310, Malaysia
*
Author to whom correspondence should be addressed.
J. Cybersecur. Priv. 2026, 6(1), 14; https://doi.org/10.3390/jcp6010014
Submission received: 6 November 2025 / Revised: 6 December 2025 / Accepted: 9 December 2025 / Published: 6 January 2026
(This article belongs to the Special Issue Intrusion/Malware Detection and Prevention in Networks—2nd Edition)

Abstract

Anomaly-based network intrusion detection systems (NIDSs) complement signature-based detection methods to identify unknown (zero-day) attacks. The integration of machine and deep learning enhanced the efficiency of such NIDSs. However, since anomaly-based NIDSs heavily depend on the quality of the training data, the presence of malicious traffic in the training set can significantly degrade the model’s performance. Purging the training data of such traffic is often impractical. This study investigates performance degradation caused by increasing amounts of malicious traffic in the training data. We introduced varying portions of malicious traffic into the training sets of machine and deep learning models to determine which approach is most resilient to unclean training data. Our experiments revealed that Autoencoders, using a byte frequency feature set, achieved the highest F2 score (0.8989), with only a minor decrease of 0.0009 when trained on the most contaminated dataset. This performance drop was the smallest compared to other algorithms tested, including an Isolation Forest, a Local Outlier Factor, a One-Class Support Vector Machine, and Long Short-Term Memory.

1. Introduction

The advancement of the internet has been accompanied by the emergence of new vulnerabilities that attackers exploit with increasingly sophisticated techniques. Among these, low-rate attacks pose significant challenges as they operate covertly by mimicking legitimate communication patterns, making them substantially more difficult to detect than high-rate attacks such as Distributed Denial of Service (DDoS) [1]. Unlike DDoS attacks that generate obvious traffic spikes, low-rate attacks silently infiltrate systems without triggering traditional volume-based detection mechanisms.
Network-based Intrusion Detection Systems (NIDSs) offer an effective method for detecting low-rate attacks by analyzing network traffic in real time to identify unauthorized intrusions or malicious activities. For instance, since a significant portion of HTTP traffic comprises printable ASCII characters and should not contain executable code, the presence of executable code in HTTP packets indicates a potential malware injection attack [2]. Traditional signature-based NIDSs rely on predefined patterns of known attacks, making them effective against recognized threats but vulnerable to zero-day attacks and novel attack variants [3]. In contrast, anomaly-based NIDSs detect deviations from established baselines of normal behavior, enabling them to identify previously unseen attacks.
Research on anomaly-based NIDSs has evolved significantly over the past few decades. Early systems were basic, rule-based structures that scrutinized system logs using predefined thresholds and statistical measures [4,5]. The integration of machine learning (ML) and deep learning (DL) has fundamentally enhanced the efficiency of anomaly-based NIDSs by enabling systems to learn patterns directly from data without requiring explicit rules for every possible scenario [6]. Recent studies have demonstrated the effectiveness of various ML approaches. For example, a study by Auskalnis, Paulauskas, and Baskys [7] employed Local Outlier Factor (LOF) to evaluate network events based on distance from k-nearest neighbors. Ripan et al. [8] showed that Isolation Forest improved classification accuracy through effective outlier removal. Zhang, Xu, and Gong [9] demonstrated that a One-Class Support Vector Machine (OCSVM) achieved higher detection rates compared to traditional methods on benchmark datasets. DL architectures have also shown promising results, with Autoencoders achieving up to 7% improvement in classification performance through reconstruction-based anomaly detection [10], and bidirectional Long Short-Term Memory (Bi-LSTM) networks demonstrating superior accuracy and detection rates compared to traditional ML approaches [11].
A typical approach to training ML-based intrusion detection models involves providing either clearly labeled malicious and benign data (supervised learning) or exclusively benign data (unsupervised learning). However, obtaining well-labeled and representative data from network traffic in real-world scenarios poses significant challenges, as manual labeling or collecting benign traffic without any malicious traffic is time-consuming given the vast volume of network traffic. Several factors contribute to this impracticality. First, the manual labeling process is extremely resource-intensive due to the enormous volume of network traffic, with malicious traffic typically constituting a small fraction of total traffic, resulting in severely imbalanced training datasets. Second, during the data collection process, some attacks may remain undetected and inadvertently be included in what is assumed to be benign training data.
Consequently, it becomes imperative to develop anomaly detection models that not only learn from benign data but are also robust when small amounts of malicious traffic are unintentionally included in the training set. In this research, such datasets are referred to as unclean training sets, where most traffic is benign but a small fraction of malicious samples may be mixed in. The possibility of contamination in real-world traffic collection has not been adequately addressed in previous NIDS research. Since malicious traffic typically constitutes a small portion of total network traffic and some attacks may evade detection during capture, it is crucial to understand how such contamination affects model performance. Therefore, this research systematically evaluates the resilience of various anomaly-based NIDS architectures when trained on unclean datasets with controlled levels of noise. The main contributions of this study are as follows:
  • We introduce controlled amounts of malicious traffic into otherwise benign datasets to simulate realistic contamination scenarios.
  • We assess multiple anomaly-based NIDS architectures, including LOF, Isolation Forest, One-Class SVM, Autoencoders, and LSTM models, under varying degrees of noise to analyze their robustness
This paper is structured as follows. In Section 2, we present the related work on anomaly-based NIDSs and their assumptions regarding training data. In Section 3, we outline the research methodology, including model architectures and threshold calculation. Next, in Section 4, we discuss the scope and environmental setting of this work. In Section 5, we present the experimental results and an analysis of the impact of contamination. Based on the above, in Section 6, we provide further explanation and in-depth analysis regarding the results acquired. Finally, the article concludes by summarising our findings and offering directions for future work in Section 7.

2. Related Works

This section begins with how anomaly-based NIDSs have evolved. We focus on various techniques and algorithms used in machine-learning-based NIDSs (ML-NIDSs) and highlight the problem with their implementation in real-world environments: the need for clean training data.
Anomaly-based intrusion detection systems (IDS) have been widely examined to counter low-rate, stealthy attacks. Early systems predominantly relied on statistical modeling and threshold-driven anomaly scoring. For instance, Bhange and Marhas used statistical profiling to detect deviations from normal traffic behavior [12]. Bhuyan et al. applied clustering to isolate anomalous traffic patterns [13], while Zhao and Wu leveraged subspace-based methods with entropy and clustering weights for large-scale anomaly detection [14]. However, as adversarial strategies evolved, these traditional approaches struggled with high false alarm rates and limited generalizability. To address these limitations, researchers began adopting machine learning (ML)-based anomaly detection techniques. Several surveys have reviewed the development trend in IDS research [15,16,17,18], emphasizing unsupervised models due to their capability to detect novel attacks and cope with imperfectly labeled datasets.
Machine learning-based IDSs initially focused on classical algorithms such as Support Vector Machines, k-Nearest Neighbors, and tree-based classifiers [7,8,19] to identify abnormal traffic patterns. These approaches often relied on handcrafted features and statistical assumptions, limiting their robustness under noisy or imbalanced traffic conditions. To overcome feature engineering challenges, deep learning emerged as an alternative, enabling automated representation extraction. Autoencoder-based techniques were introduced to learn latent representations of benign traffic [20,21], while recurrent models—particularly LSTM architectures—were employed to capture sequential dependencies in flow or payload records [22,23].
Developing robust ML-based IDS solutions requires discriminative and representative feature sets. Flow-based IDS approaches extract information such as packet counts, volume, flow duration, and connection states, and have proven scalable and lightweight in practical deployments [11,24,25]. However, flow-only features lack semantic visibility into packet content, making them ineffective in detecting low-rate or injection-driven attacks where malicious behavior is embedded within payload bytes. To address this constraint, content-based IDS research began incorporating raw packet inspection, including byte frequency modeling, n-gram payload profiling, entropy-based characterization, and deep content embeddings [26,27,28]. These representations allow detection systems to capture fine-grained structural anomalies that would otherwise appear benign in flow metadata.
Recent research trends in IDS development have focused on adaptability, online responsiveness, and hybrid detection mechanisms. Hybrid IDS frameworks combine signature-based screening with anomaly-based learning to improve coverage and reduce false alarms [29,30]. Meanwhile, adaptive and incremental learning mechanisms allow IDS models to update themselves against concept drift and evolving attack behaviors [31,32]. Despite these advancements, a persistent challenge remains: ML-based IDS require substantial and representative benign traffic samples for training, yet network traces in reality frequently contain malicious connections. This assumption of access to clean datasets, implicitly made in most prior works [21,33,34], reduces practical relevance. Therefore, robust IDS techniques must be able to tolerate unclean training sets containing contaminated or mislabeled samples, rather than assuming perfectly benign data availability.
The main purpose of this research is to look for a combination of robust features and algorithms that can handle some malicious traffic in the training set. We introduced varying quantities of malicious data into benign datasets to assess the impact of malicious data on the model’s outcomes. Then, with the prepared unclean training sets, we evaluated two types of content-based features, i.e., byte frequencies and byte subsequences, and several machine learning algorithms, such as LOF, IF, OCSVM, Autoencoders, and LSTM. As shown in Table 1, to the best of our knowledge, no extensive research has explored this area. The corresponding check mark in the table indicates that unclean data are considered in our experimental scenarios.

3. Proposed Methods

This section outlines the stages of the proposed methods for anomaly detection, encompassing dataset preparation, feature extraction, model development (training and detection phases) using ISOF, LOF, OCSVM, Autoencoders, and LSTM, and culminating in the computation and application of a threshold to judge whether a connection is malicious or not. Figure 1 illustrates the overall workflow of the proposed method.
The process begins with Dataset Preparation, where initial training sets (comprising primarily legitimate connections) are transformed into noisy training sets. These noisy sets are specifically designed to contain mostly legitimate connections, but with a controlled and intentional injection of malicious instances to reflect real-world scenarios more accurately. Following dataset preparation, representative feature is extracted from these noisy training sets. The specific feature varies for each proposed model. For LSTM, byte sequences (raw ordered sequences of bytes within a connection) are utilized. In contrast, Autoencoders and the classical machine learning models, namely ISOF, LOF, and OCSVM, leverage byte frequencies (the statistical distribution of byte values within a connection). The proposed models then proceed through the Model Development (Training Phase) to learn the patterns of their respective features from the prepared datasets.
After training, the Model Development (Detection Phase) commences. For LSTM and Autoencoder models, an anomaly score is computed for each connection based on its prediction or reconstruction error, respectively. This score is then compared against a pre-determined threshold to classify the connection. This threshold is derived from the training data’s anomaly score distribution to effectively distinguish between normal and anomalous behavior. Classical machine learning algorithms (ISOF, LOF, OCSVM), on the other hand, inherently detect anomalies using their internal algorithms, and thus do not require a separate threshold computation step. Detailed explanations of each stage and model will be provided in the subsequent subsections.

3.1. Dataset Preparation

As mentioned earlier, the dataset plays a critical role in determining the outcomes of a model, especially in the context of an anomaly detection model. The appropriate selection and processing of the dataset contribute significantly to the model’s improved performance. In this study, the UNSW-NB15 dataset was selected due to its comprehensive representation of legitimate network traffic and well-labeled attack categories [35]. To maintain a focused scope on low-rate attacks, this research considers only four out of the ten available traffic categories, namely Normal, Backdoors, Exploits, and Worms. Additionally, the analysis is restricted to HTTP, FTP, and SMTP protocols, as examining network packet content (payload) is deemed more effective in detecting low-rate attacks.
The dataset used in this study consists of PCAP files captured over two separate days. The PCAP file dated 22 January 2015 (UNSW-01) (https://unsw-my.sharepoint.com/personal/z5025758_ad_unsw_edu_au/_layouts/15/onedrive.aspx?id=%2Fpersonal%2Fz5025758%5Fad%5Funsw%-5Fedu%5Fau%2FDocuments%2FUNSW%2DNB15%20dataset%2-Fpcap%20files%2Fpcaps%2022%2D1%2D2015&viewid=f8d1dec5%2Dcd5f%2D42ae%2D8b06%2D2fece580c74a&ga=1, accessed on 8 September 2024) is designated as the training data, while the file from 17 February 2015 (UNSW-02) (https://unsw-my.sharepoint.com/personal/z5025758_ad_unsw_edu_au/_layouts/15/onedrive.aspx?id=%2Fpersonal%2Fz5025758%5Fad%5Funsw%5Fedu%5Fau%2FDocuments%2FUNSW%2DNB15%20dataset%2Fpcap%20files%2Fpcaps%2017%2D2%2D2015&viewid=f8d1dec5%2Dcd5f%2D42ae%2D8b06%2D2fe-ce580c74a&ga=1, accessed on 8 September 2024) is used for testing. For the training dataset construction, PCAP files are split based on their TCP tuples (source and destination IP addresses and ports) using tcpflow. Each extracted TCP tuple is then classified as either legitimate or malicious by indexing it against the corresponding CSV files in the UNSW-NB15 dataset. Subsequently, all identified legitimate traffic is grouped based on its respective protocol, forming three distinct PCAP files representing HTTP, SMTP, and FTP. These files serve as the clean training sets and are merged using the mergecap library while preserving the original packet timestamps.
To achieve the main objective of this research, which is to comprehend how the quantity of malicious traffic in the training set impacts the model performance, we calculated the ratio of malicious traffic for every protocol. The statistics are summarized in Table 2. As shown, the FTP protocol has the lowest proportion of malicious traffic at 0.39% of its connections classified as malicious. To ensure a consistent and fair comparative analysis across all three protocols, we therefore established a maximum injection limit of 0.4% for the experiments involving HTTP and SMTP.
To systematically assess the effect of malicious traffic in the training dataset, we gradually injected the malicious traffic to the clean training sets. The injection was performed using fine-grained increments to capture detailed model behavior under varying contamination scenarios. This injection methodology was designed to simulate realistic conditions where training data cleanliness cannot be guaranteed in operational environments. For FTP, the proportion of injected malicious connections, referred to as noise levels, is set at 0.05%, 0.1%, 0.15%, 0.2%, 0.25%, 0.3%, 0.35%, and 0.39%. For SMTP and HTTP, the noise levels are configured at 0.1%, 0.2%, 0.3%, 0.4%, 0.5%, 0.6%, 0.7%, and 0.8%. After identifying the malicious TCP connections to be injected, we combined each set of malicious traffic with legitimate traffic into a PCAP file using the mergecap library to preserve the original packet timestamps. This resulting set is what we refer to as an unclean dataset or unclean training set. An example of a noisy training set for FTP, illustrating how malicious connections appear within the legitimate traffic, is shown in Table 3. The rows highlighted in red indicate malicious connections.

3.2. Feature Extraction

In this study, payload-based analysis is employed instead of relying solely on packet headers, as it is considered more effective in detecting low-rate attacks [36]. Since application-layer messages often exceed the maximum IP packet size, they are segmented into multiple packets, which may arrive in or out of order. To ensure a complete representation of network activity, incoming packets are temporarily stored in a queue buffer and grouped based on their respective TCP flows, identified by source and destination IP addresses and port numbers, before being reassembled according to the TCP protocol standard defined in RFC 793 [37]. This reassembly process enables the system to analyze entire reconstructed payloads, providing a more comprehensive view of network traffic.
Once the TCP connection is terminated, typically marked by a FIN packet, the reassembled payload is processed by the model. However, if a connection remains incomplete beyond a predefined timeout, it is considered disrupted and is processed accordingly. By enforcing this timeout mechanism, the system prevents stalled or abandoned connections from affecting the accuracy of anomaly detection.
Once reassembled, the complete application-layer message (payload) is ready for feature extraction. To be processed by our machine learning models, the raw payload must first be transformed into a meaningful numerical format. While various payload representation methods exist, including [38,39,40], this study focuses on two complementary approaches: byte frequencies and byte sequences. The fundamental difference in how these two features are constructed from the same payload is illustrated in Figure 2. The process begins by converting the raw payload into a universal sequence of integers, where each byte is mapped to its corresponding value from 0 to 255. From this numerical sequence, the two distinct feature sets are derived. The precise formulation and rationale for each of these representations are detailed in the subsequent subsections.

3.2.1. Byte Frequencies

Byte frequencies capture the statistical distribution of byte values within network payloads, representing how often each possible byte value (0–255) appears in a given message. We chose this approach based on the observation that different types of network traffic exhibit distinct byte distribution patterns. Legitimate application-layer protocols typically conform to well-defined character sets and structural patterns. For instance, HTTP traffic predominantly comprises printable ASCII characters (bytes 32–126), while DNS queries follow specific encoding schemes. In contrast, malicious payloads, such as injected executable code, shellcode, or encrypted malware, introduce anomalous byte distributions that deviate significantly from these expected patterns.
Formally, for a payload of length N bytes, we construct a 256-dimensional feature vector where each dimension represents the frequency of occurrence of a specific byte value. However, payload lengths vary considerably across different traffic types and network conditions, potentially biasing the analysis toward longer payloads. To address this, we normalize the byte frequencies by dividing each byte count (x) by the total payload length (N), as described in Equation (1). After normalization ( x norm ), the byte frequency data is used for training and testing the detection models (i.e., ISOF, LOF, OCSVM, and Autoencoders).
x norm = x N

3.2.2. Byte Sequences

While byte frequencies effectively capture the statistical composition of payloads, they inherently discard positional information—the order in which bytes appear. However, many attack signatures are characterized not merely by the presence of specific bytes but by particular byte patterns and their sequential arrangement. For example, return-oriented programming (ROP) chains, format string exploits, and certain injection attacks rely on specific byte sequences that would be indistinguishable from benign traffic when examining only frequency distributions [41].
To preserve this sequential information, we employ byte sequences as an alternative feature representation specifically for LSTM-based models, which are architecturally designed to capture temporal dependencies in sequential data [42]. We extract byte subsequences using a sliding window approach with configurable window size, similar to n-gram extraction in natural language processing. This method generates overlapping subsequences that capture local byte patterns within the payload. Algorithm 1 illustrates the transformation process from raw packet payload to byte subsequences.
Algorithm 1 Sliding Window for Byte Sequence
  1:
procedure CreateSlidingWindow(byteSequence, windowSize, stepSize)
  2:
    Input: byteSequence, windowSize, stepSize
  3:
    Output: List of sliding windows
  4:
    windowsList ← []
  5:
    for  i 0 to  | b y t e S e q u e n c e | windowSize  step stepSize do
  6:
        window ← byteSequence[i : i + windowSize ]
  7:
        windowsList.append(window)
  8:
    end for
  9:
    return windowsList
10:
end procedure

3.3. Anomaly Detection

Anomalies are data points that deviate significantly from normal patterns, also known as outliers or rare events. Anomaly detection works by analyzing historical data to identify these unusual instances. In domains like NIDSs, this process provides critical insights by flagging potential threats.
There are three different ways to detect anomalies: supervised learning, unsupervised learning, and semi-supervised learning. This research focuses on using unsupervised learning to detect anomalies. Unlike supervised or semi-supervised learning, unsupervised learning techniques don’t require labelled training data [43]. By assuming that normal data points occur much more often than anomalous data points, unsupervised techniques detect anomalies by classifying data points that occur less frequently. Instead of assigning labels to data points, unsupervised techniques assign each data point a score that indicates how likely it is to be an anomaly. However, this approach usually works assuming that the training data are clean and do not contain any malicious instances. Therefore, this study examines the impact of different noise levels in training data on anomaly detection model performance.
As previously mentioned, this research evaluates various machine learning models for anomaly-based intrusion detection, comparing their effectiveness in identifying network intrusion. The models examined include Long Short-Term Memory (LSTM), Autoencoders, and classical machine learning techniques such as Isolation Forest (ISOF), Local Outlier Factor (LOF), and One-Class Support Vector Machine (OCSVM). This subsection provides an in-depth discussion of each model’s core concepts, architecture, and their utilization in detecting intrusions through anomaly detection.

3.3.1. Long Short-Term Memory

An Long Short-Term Memory (LSTM) model is typically used for classification problems where labelled data is provided to train the model. However, in this research, LSTM is employed for anomaly detection, requiring a different approach. The development of the LSTM model is divided into two phases, which are training and detection.
In the training phase, the LSTM model is trained to predict the next item in a subsequence obtained from the network packet payload. The model learns to predict the next byte in a byte subsequence. As illustrated in the “Byte Sequence” portion of Figure 2, the model is given an input subsequence x i (e.g., [85, 83]) and trained to predict the immediately following byte, which serves as the target label y i (e.g., 69).
Formulating the LSTM classifier as a simple function would be an oversimplification, as multiple operations are involved. Instead, the function is expressed in more detail in Equation (2). E ( x ) transforms input into a vector of specific dimensions, acting as an embedding layer. The function R represents the recurrent layer, which takes the embedded vectors as inputs and outputs an intermediate vector value. This intermediate vector is then processed by the softmax function S F , which calculates the probability distribution over possible next-byte candidates. Finally, the function selects the byte with the highest probability as the predicted next item in the sequence.
F p ( x ) = a r g m a x ( S F ( R ( E ( x ) ) ) ) )
The primary objective of training is to enable the LSTM model to remember common byte sequences found in network packet payloads. If the LSTM has encountered a byte sequence before, its prediction error is expected to be low. Conversely, unusual traffic or unseen attack patterns are likely to yield higher prediction errors due to unfamiliar byte sequences.
In the detection phase, the trained LSTM model processes incoming byte sequences, similar to the training phase. However, in addition to predicting the next byte, the model also computes prediction errors, which are used to detect anomalies. Two methods are employed for error calculation: binary anomaly scoring and floating anomaly scoring. The binary anomaly score ( a p binary ) assesses mispredictions by assigning a value ( v i ) of one if the predicted byte ( y ^ i ) does not match the actual byte ( y i ), as formally defined in Equation (3). In contrast, the floating anomaly score ( a p float ) quantifies the numerical deviation between the softmax output of the model ( P r o b ( y ^ i ) ) and the expected probability distribution ( P r o b ( y i ) ) , as defined in Equation (4). Both scoring methods are normalized by the message length (l) to ensure comparability across sequences. A connection is flagged as malicious if its resulting anomaly score exceeds a predetermined threshold. While this threshold can be set manually, in this research it is computed statistically. (See Section 3.4)
a p binary = i = 0 l n v i l v i = 1 , y ^ i = y i v i = 0 , otherwise
a p f l o a t = i = 0 l n Prob ( y ^ i Prob ( y i ) ) 2 l

3.3.2. Autoencoders

Unlike LSTM networks, which process byte sequences, Autoencoders operate on vectorized representations of byte frequencies, as they are not designed to handle sequential data with variable lengths. Formally, an Autoencoder model is defined as a non-linear function G ( p ) , which maps an input vector X to its reconstructed output X ^ , as expressed in Equation (5). The function G ( p ) consists of stacked neural network layers and is optimized through backpropagation to minimize the reconstruction error, ensuring that X ^ closely approximates X.
X ^ = G p ( X )
This study adopts the Autoencoder model developed by Pratomo et al. [44], which is trained on an unclean dataset containing both normal and anomalous network traffic. The detection phase evaluates anomaly scores based on reconstruction errors, computed using the mean squared error (MSE) between input and output (Equation (6)). Specifically, if x i represents the input frequency of byte i and x i its reconstructed value, the anomaly score reflects deviations from learned patterns. Higher reconstruction errors indicate traffic patterns that were uncommon in the training data. A connection is classified as malicious if its anomaly score surpasses a precomputed threshold.
e = 1 256 i = 0 i = 255 ( x i x i ) 2

3.3.3. Classical Machine Learning

Unlike deep learning models such as LSTM and Autoencoders, the machine learning models used in this study, OCSVM (One-Class Support Vector Machine) [45], LOF (Local Outlier Factor) [46], and ISOF (Isolation Forest) [47], are specifically designed for anomaly detection. As a result, these models can be applied without architectural modifications.
All three models process byte frequency vectors rather than byte sequences, as they are not designed for sequential data. Given that the training dataset consists primarily of legitimate connections with some malicious traffic as noise, malicious data points are more likely to fall outside OCSVM’s decision boundary, exhibit higher LOF scores, and have longer path lengths in ISOF’s tree structure.

3.4. Calculating Threshold

As mentioned in Section 3.3.1 and Section 3.3.2, in this research, the threshold for determining whether a connection is malicious or legitimate is statistically computed exclusively for LSTM and Autoencoders. This threshold is derived from the anomaly scores obtained during the detection phase. LSTM produces two types of anomaly scores: binary and floating (see Section 3.3.1 for details), while Autoencoders use reconstruction error as their anomaly score (see Section 3.3.2). Any anomaly score exceeding the computed threshold is classified as anomalous, whereas scores below it are considered benign.
This research employs three methods to determine the floating anomaly score threshold. The first method classifies a connection as malicious if its anomaly score falls beyond mean ± two times the standard deviation. While straightforward, this approach assumes a near-normal distribution and is sensitive to outliers itself.
Therefore, we implement a second, more robust method based on the work of [48], which utilizes the median and interquartile range (IQR). The median is less influenced by extreme values, making this method suitable for non-normally distributed data. For skewed distributions, a further adjustment using the medcouple (MC) is recommended [49]. The resulting threshold, T I Q R can be computed, as described in Equation (7), with Q 3 representing the 3rd quartile.
T I Q R = Q 3 + e 3 · M C · 1.5 · I Q R , if MC 0 Q 3 + e 4 · M C · 1.5 · I Q R , if MC < 0
The third method for defining the threshold involves using the Median Absolute Deviation (MAD) [50]. This approach utilizes both the median and median absolute deviation as robust measures of central tendency and dispersion, respectively. In this method, the threshold remains static, but cannot be directly compared with the reconstruction error. To make such a comparison, the reconstruction error must be transformed into its z-score, as outlined in Equation (8). In this context, a TCP connection is identified as malicious when its z-score exceeds the specified threshold, usually set at 3.5 [50].
z = 0.6745 · ( | e m e d i a n ( E ) | ) M A D
After the training phase, one of these three threshold calculation methods is applied. Before transitioning to detection mode, the LSTM and Autoencoder models reprocess the training set to compute anomaly scores for each TCP connection. LSTM calculates both binary and floating scores, while Autoencoders compute the reconstruction error. These scores are then used to determine the final threshold, which is subsequently applied in the detection phase.

4. Problem Setting

To systematically evaluate the proposed detection approach, it is necessary to establish the adversarial context, deployment constraints, and dataset characteristics that define the scope of this work. In what follows, we characterise the adversarial capabilities, outline the operational constraints of realistic network environments, and justify our selection of UNSW-NB15 for modelling low-rate, stealthy intrusion scenarios.

4.1. Threat Model

In this work, we consider an attacker with moderate capabilities who operates under constraints that favour low-rate, stealth-oriented behaviour. Rather than overwhelming the network with high-volume traffic, the attacker sends carefully crafted, low-frequency requests designed to mimic legitimate client activity. We focus on adversaries capable of injecting malicious scripting content—including PHP, Python, Ruby, and SQL—alongside shellcode fragments or command sequences intended to gain remote access, escalate privileges, or maintain persistence on a target host. The attacker is assumed to deliver these payloads through text-based TCP protocols such as HTTP and FTP, which provide well-structured, human-readable request formats that facilitate covert manipulation without triggering volumetric anomalies.

4.2. Deployment Assumptions

The proposed detection approach assumes that packet payloads are accessible in plaintext form for inspection. Although modern networks commonly transmit traffic over TLS, this assumption remains realistic in enterprise environments where intermediate systems legitimately terminate encrypted channels. Examples include reverse proxies, TLS-terminating load balancers, API gateways, and application firewalls, all of which receive decrypted content before forwarding it to backend services.
Figure 3 illustrates this deployment assumption. Under these conditions, the anomaly detection logic may be integrated as a module within existing traffic inspection components—such as ModSecurity-enabled web servers or NGINX App Protect deployments—without violating end-to-end security guarantees. Since payload inspection occurs post-TLS termination, the method does not require intrusive key extraction, man-in-the-middle interception, or packet decryption at unauthorised points.

4.3. Dataset Representativeness and Generalisability

UNSW-NB15 was selected due to the diversity and realism of its attack samples. Compared to DARPA, NSL-KDD, and CIC-IDS2017, where they provide at most 222 low-rate attack samples, UNSW-NB15 provides approximately 27,000 labelled low-rate connections. CSE-CIC-IDS2018 offers a larger quantity (approximately 162,000 samples); however, many of its low-rate attacks were generated using scripted interactions against the DVWA testbed, resulting in repetitive patterns with limited behavioural diversity. In contrast, UNSW-NB15 traffic was generated using IXIA PerfectStorm, which simulates enterprise-like traffic streams with realistic timing variations, protocol noise, and exploit behaviours, making it more suitable for modelling stealthy intrusion behaviour. While UNSW-NB15 captures realistic network interaction patterns, additional validation on contemporary datasets would help further substantiate the robustness of our approach, particularly under different traffic compositions and adversarial behaviours.

5. Experiments and Results

This research aims to determine which combination of detection model (OCSVM, LOF, ISOF, Autoencoders, and LSTM) and feature set (byte frequencies or byte sequences) yields the optimal detection performance, especially when trained on unclean datasets containing varying degrees of malicious traffic. As detailed in Section 3.1, these models are trained on such datasets and then rigorously evaluated using a dedicated testing set. Figure 4 illustrates this comprehensive evaluation process. Initially, relevant features, either byte sequences or byte frequencies, are extracted from the testing sets. Byte sequences serve as features exclusively for the LSTM model, while byte frequencies are utilized by Autoencoders and all other machine learning models (ISOF, LOF, and OCSVM).
For the deep learning models (LSTM and Autoencoders), as previously outlined in Section 3, an anomaly score is calculated based on their predictions on the testing dataset (refer to Section 3.3.1 for LSTM and Section 3.3.2 for Autoencoders). This score is then compared against a predefined threshold, established during the detection phase (Section 3.4). A connection is classified as malicious if its anomaly score surpasses this threshold. In contrast, machine learning models (ISOF, LOF, and OCSVM) operate differently. These models inherently determine anomalous data without requiring a separate manual anomaly score computation or thresholding. Instead, their respective algorithms (explained in Section 3.3.3) directly process the extracted byte frequencies from the testing set connections to classify them as either legitimate or malicious.

5.1. Experiment Setup

5.1.1. Dataset and Evaluation Metrics

The methodology for creating the noisy training sets, including the variation of noise ratios for each protocol, is detailed in Section 3.1. It is important to note that while the noise ratio for the HTTP protocol was varied up to 0.8%, for this study, we limited the maximum noise level to 0.5% due to time constraints.
For the testing phase, we utilized the UNSW-02 dataset. The construction of the testing set followed a similar preparation process as the training set: they are split based on their TCP tuples and classified as either legitimate or malicious by indexing against the corresponding CSV files in the UNSW-NB15 dataset. All connections (both legitimate and malicious) are then grouped based on their respective protocols (HTTP, SMTP, and FTP). An excerpt from the resulting dataset is shown in Table 4, illustrating the structure where labels ‘0’ and ‘1’ denote legitimate and malicious traffic, respectively. The final composition of the testing set, detailing the number of TCP connections per protocol, is summarized in Table 5.
The performance of the detection model was evaluated using a confusion matrix, as depicted in Figure 5. In this matrix, rows correspond to the actual class instances, where the positive condition (P) represents malicious traffic and the negative condition (N) represents benign traffic, while columns represent the predicted class instances [51,52,53,54]. The resulting two-by-two contingency table reports the counts for four key outcomes: true positives (TP), denoting correctly identified malicious connections; false negatives (FN), representing undetected malicious instances; false positives (FPs), indicating benign traffic incorrectly classified as malicious; and true negatives (TN), reflecting correctly classified benign traffic. This comprehensive breakdown facilitates a more detailed performance analysis than the proportion of correct classifications (accuracy), as accuracy can yield misleading results when the dataset is unbalanced and class observations vary significantly.
The confusion matrix results will be used to generate the evaluation metrics. In this study, we employ three types of evaluation metrics: Detection Rate, False-Positive Rate, and F2 score.
Detection Rate (DR) measures the model’s ability to identify positive instances correctly. A higher detection rate indicates the model’s enhanced capability to identify malicious cases effectively. Equation (9) shows the formula of detection rate.
D R = T P T P + F N
False-Positive Rate (FPR) provides insights into the model’s tendency to misclassify negative instances as positive. A lower FPR signifies that the model makes fewer errors by classifying negative instances as positive. Equation (10) shows the formula of FPR.
F P R = F P T N + F P
The F2 Score is the weighted harmonic mean of precision and recall for a given threshold. It diverges from the F1 Score by placing a greater emphasis on recall than on precision. Greater weight is attributed to recall in cases where false negatives (undetected attacks) have more negative consequences and are deemed more severe than false positives. A higher F2 Score indicates a well-balanced consideration of precision and recall, with a pronounced emphasis on recall. Equation (11) illustrates the computation of the F2 Score, highlighting that False Negatives have a greater impact than False Positives, with FN values carrying a higher weight than FP values.
F 2 = ( 1 + 2 2 ) · T P ( 1 + 2 2 ) · T P + ( 2 2 ) · F N + F P
By incorporating these three evaluation matrices, we aim to comprehensively evaluate the model’s performance, considering its ability to correctly identify positive instances and avoid false positives.

5.1.2. Network Architecture and Hyperparameters

The overview of the proposed deep learning architectures (LSTM and Autoencoders) has been discussed previously in Section 3.3. As deep learning models contain numerous hyperparameters, we list both the LSTM and Autoencoders’ hyperparameters used in this research in Table 6 for reproducibility purposes. For machine learning models, all parameters were set to their default values.

5.2. Experiment Results

This study involves experiments using the LSTM model and classical machine learning models, including OCSVM, LOF, and ISOF, as well as the Autoencoders model for comparison. For the byte sequence feature, each sequence consistently set to a length of 2 bytes. This length was selected as the baseline condition representing the minimum sequence length that preserves ordinal information; sequences of length 1 would eliminate sequential dependencies entirely.
In the Autoencoder experiments, the testing methodology involved varying the number of hidden layers to 1, 3, and 5. The anomaly detection thresholds for these experiments were determined using three distinct methods: mean, interquartile range (IQR), and z-score. For the LSTM experiments, testing was systematically divided based on two computational approaches for generating anomaly scores: a binary and floating approach. Each computational approach was further evaluated using three corresponding threshold methods: b_mean, b_iqr, and b_zscore for the binary scores, and f_mean, f_iqr, and f_zscore for the floating-point scores. Furthermore, the LSTM’s performance was differentiated across various network protocols analyzed, specifically HTTP, FTP, SMTP, and a combined dataset encompassing all mentioned protocols, as well as by the ratio of noise introduced into the datasets.

5.2.1. Protocol-Based Attack Detection Performance

Our experimental evaluation systematically assessed model performance across three protocols (HTTP, FTP, and SMTP) under varying noise conditions. We conducted experiments with varying noise ratios as detailed in Section 3.1 to evaluate the robustness of each approach. The comprehensive results are presented in Table A1, Table A2, Table A3, Table A4, Table A5, Table A6, Table A7, Table A8 and Table A9, organized by model category and protocol: HTTP traffic (Table A1, Table A2 and Table A3), FTP traffic (Table A4, Table A5 and Table A6), and SMTP traffic (Table A7, Table A8 and Table A9).
For HTTP traffic, our findings reveal distinct performance characteristics across model architectures. In the clean data scenario (0% noise), the LOF model achieved the highest F2 score among classical machine learning approaches. Autoencoders demonstrated superior performance using z-score thresholding across all hidden layer configurations, while LSTM networks achieved optimal results with floating anomaly scores combined with IQR thresholding. Notably, autoencoders outperformed the other two categories by up to 13% in F2 score when evaluated on clean data. To assess noise resilience, we examined performance degradation patterns illustrated in Figure 6, which depicts model behavior under increasing noise levels, with dotted lines representing linear regression trends. The gradient of these trends serves as an indicator of noise sensitivity, where steeper negative gradients correspond to greater performance degradation. As observed, autoencoders exhibited the smallest gradient values, demonstrating robust noise resistance. Conversely, the LOF model experienced the steepest decline (gradient = 0.0943 ), indicating high susceptibility to training data contamination.
The experimental results for FTP traffic, detailed in Table A4, Table A5 and Table A6, reveal performance patterns consistent with those observed for HTTP. In the clean data scenario, the LOF model again achieved the highest F2 score among classical machine learning approaches. For autoencoders, optimal performance was obtained using IQR thresholding with a single hidden layer configuration. LSTM networks achieved peak performance with binary anomaly scores paired with mean thresholding. The performance gap between model categories narrowed considerably for FTP, with autoencoders leading by only 1.21% in F2 score. Figure 7 illustrates the noise sensitivity across models for FTP traffic. Consistent with HTTP results, autoencoder variants demonstrated the lowest gradient values, confirming their superior noise tolerance. The LOF model exhibited the highest sensitivity (gradient = 0.0272 ), though the magnitude of degradation was substantially lower than that observed in HTTP traffic.
For SMTP traffic, the experimental outcomes are presented in Table A7, Table A8 and Table A9 following the same organizational structure. Unlike HTTP and FTP, the ISOF model produced the highest F2 score among classical machine learning methods when tested on clean data. Autoencoders achieved optimal performance using IQR thresholding with five hidden layers, while LSTM networks performed best with binary anomaly scores combined with mean thresholding. Autoencoders maintained their performance advantage with an 11.5% higher F2 score relative to competing approaches. The noise sensitivity analysis for SMTP traffic, depicted in Figure 8, reinforces the patterns observed across other protocols. Autoencoder variants consistently exhibited the lowest gradient values, demonstrating robust performance under noise. The LOF model again showed the highest sensitivity (gradient = 0.0547 ), with degradation magnitude falling between the values observed for HTTP and FTP protocols.
Our experiments across all three protocols consistently demonstrate that autoencoders exhibit superior noise resilience compared to classical machine learning and LSTM approaches. While classical methods—particularly LOF—can achieve competitive performance on clean data, they suffer substantial degradation when trained on contaminated datasets. LSTM networks show intermediate sensitivity, with performance varying based on the anomaly scoring and thresholding combination employed.

5.2.2. Overall Attack Detection Performance

To evaluate the generalizability of the proposed models across diverse traffic types, we conducted an aggregate performance analysis that averaged the detection rate, F2 scores, and FPR from the same model variations across all protocols. These variations encompass the specific algorithms for classical machine learning, the threshold method and layer count for Autoencoders, and the scoring calculation and threshold method for LSTM. Due to the varying maximum noise limits in the protocol-specific datasets, this aggregate analysis utilizes consistent noise variations of 0%, 0.1%, 0.2%, and 0.3%. The aggregated results are reported in Table A10, Table A11 and Table A12, representing classical machine learning, Autoencoders, and LSTM, respectively.
As illustrated in Table A10, the results remain consistent with the protocol-specific experiments: LOF achieves the highest F2 score among classical machine learning methods in the clean data scenario. For Autoencoders (Table A11), the highest F2 score is obtained when employing z-score thresholding with a single hidden layer. Regarding LSTM (Table A12), the highest F2 score was achieved utilizing floating anomaly calculation with the IQR thresholding method. Consistent with previous findings, Autoencoders demonstrate a substantial advantage, leading by up to 13% in F2 score compared to other algorithms. The impact of noise variation, illustrated in Figure 9, further confirms that Autoencoders exhibit the most resilience to noise (lowest gradient value), while LOF proves to be the least robust (highest gradient value of 0.1382 ).
Moreover, Table 7 presents a comprehensive comparison of the optimal performance parameters for each model category using the F2 score as the primary evaluation metric. The optimal parameters were identified by selecting the configurations that yielded the highest average F2 score across all noise levels. This metric was selected to provide a balanced representation of recall and precision, ensuring that both false negatives and false positives are appropriately weighted. The comparative analysis reveals that while LSTM models generally yield lower F2 scores than Autoencoders, they surpass classical machine learning models in performance. Notably, Autoencoders consistently achieved the highest values across all test cases, demonstrating their superiority in anomaly detection tasks under varying noise conditions.
Figure 10 provides a comparative visual analysis of the optimal F2 scores achievable by each algorithm category across the tested protocols. Across all four subplots (a–d), the Autoencoder model (represented by the green line) consistently maintains the highest performance trajectory, visually distinct from the RNN (orange) and classical machine learning (blue) baselines. Crucially, the trend lines for the Autoencoder exhibit minimal negative gradients, appearing nearly horizontal in the FTP and Overall scenarios, which underscores the model’s remarkable stability against increasing noise ratios. Conversely, classical machine learning models display the most significant performance degradation, particularly evident in the HTTP and Overall traffic plots where the downward slope is most pronounced.

5.2.3. Overall Attack Detection Performance with Best Parameter

While the analysis presented in Section 5.2.2 evaluated performance using a single parameter set averaged across all traffic types, that generalized approach provides a constrained perspective on model capabilities. The reason is that optimal hyperparameters and thresholding methods vary significantly depending on the specific network protocol under examination. To address this limitation, this subsection assesses detection capabilities by aggregating the mean F2 scores obtained using the best-performing parameters tailored to each specific traffic type, as detailed in Table 8.
The aggregated results, illustrated in Figure 11, confirm the performance hierarchy observed in the previous section. Our findings reveal that the LSTM model generally yields lower F2 scores than Autoencoders but consistently outperforms traditional machine learning models. Nevertheless, the stability metrics derived from this optimized approach are more definitive than those obtained in the general analysis. As it can be observed in Figure 11, the distinction between the models lies heavily in their resilience to unclean training data. Even when tuned to their optimal parameters, classical machine learning models exhibit the highest sensitivity to noise, manifesting as a steep negative gradient of 0.0425 . On the contrary, Autoencoders demonstrate remarkable robustness that is inherent to the architecture rather than a result of specific parameter tuning. Their performance trend line in Figure 11 is virtually flat, with a minimum gradient of 0.0013 , indicating that they are the least sensitive to malicious traffic in the training set. The LSTM model occupies a middle ground with a gradient of 0.0128 , showing moderate resilience that exceeds classical models but lacks the near-total immunity to unclean training data exhibited by the Autoencoders.

6. Discussion

Throughout all experiments, whether protocol-specific or protocol-free, the relative performance rankings of the algorithms remained remarkably consistent. Autoencoders consistently achieved the highest F2 scores, followed by LSTM models in second place, with classical machine learning algorithms trailing in third. However, the performance nuances within each algorithmic family varied considerably across experimental scenarios. For instance, in the classical machine learning category, LOF typically achieved the highest F2 scores when trained on clean datasets across different experimental configurations. However, when F2 scores were averaged across all noise levels, ISOF demonstrated superior performance in most experimental settings. This shift can be attributed to LOF’s pronounced sensitivity to noise, as evidenced by the steep decline in its performance gradient.
Although the injected noise levels in our experiments were capped below 1%—a conservative representation compared to potentially higher contamination rates in operational networks—the linear degradation trends observed allow us to infer expected performance under greater noise levels. Assuming the degradation patterns remain approximately linear, the computed gradients provide a reasonable basis for extrapolation to real-world scenarios. Consider the cross-protocol scenario with optimal parameters as an example (see Section 5.2.3). Referring to Figure 11, autoencoders exhibit the linear regression equation y = 0.0128 x + 0.8769 . If the noise level were 1%, the F2 score of the corresponding autoencoder model under this scenario would approximate 0.8767.
Autoencoders not only dominated in F2 score performance but also exhibited the greatest resilience to noise across all experimental configurations, as demonstrated by their minimal gradient values. This robustness stems from the synergy between their architectural complexity and the byte frequency feature representation. Byte frequencies capture distributional patterns rather than sequential dependencies, making them inherently tolerant to perturbations in byte ordering. Consequently, when bytes are reordered but maintain similar frequency distributions, Autoencoders can still recognize legitimate connections. The reconstruction-based anomaly detection mechanism of Autoencoders learns a compressed representation of normal traffic patterns in the latent space, enabling them to distinguish genuine anomalies from noise-induced variations. This is reflected in their consistently high detection rates (reaching 100% in several FTP experiments) while maintaining acceptably low false-positive rates.
LSTM models occupied an intermediate position in both performance and noise resilience. The byte sequence representation leverages temporal dependencies and ordering information, providing advantages when attacks manipulate byte arrangements rather than substituting byte values entirely. The recurrent architecture enables LSTM to capture complex behavioral patterns in malicious connections, as evidenced by detection rates exceeding 99% in several scenarios. However, this sequential sensitivity introduces a critical vulnerability: LSTM models become overly rigid to learned data patterns and sensitive to noise, manifested in elevated false-positive rates (up to 14.64% in some FTP experiments) that ultimately depress F2 scores.
Classical machine learning algorithms, despite benefiting from the relatively simple byte frequency features, demonstrated the most limited performance due to their algorithmic constraints. These methods struggled to achieve balanced trade-offs between detection rate and false-positive rate. For instance, ISOF consistently achieved perfect detection rates (100%) in FTP and SMTP protocols but suffered from elevated false-positive rates (up to 14.64%), while OCSVM maintained lower false-positive rates but at the cost of substantially reduced detection capabilities. This limitation reflects the fundamental challenge these algorithms face in learning complex decision boundaries from high-dimensional feature spaces without the representational capacity of deep neural networks.
In real-world deployment, these findings suggest distinct operational niches for each approach. Autoencoders are well-suited for long-running enterprise NIDSs where imperfect retraining data is inevitable, as their minimal performance degradation addresses the reality that production networks contain some proportion of malicious traffic. LSTM models excel in protocol-aware inspection components such as reverse proxies or web application firewalls where sequence patterns matter. Classical machine learning algorithms remain useful as lightweight edge filters in IoT gateways or SD-WAN appliances where computational efficiency is paramount.

7. Conclusions

This work systematically evaluated the resilience of anomaly-based network intrusion detection models when trained on unclean datasets containing varying levels of malicious traffic. We assessed five approaches—Autoencoders, LSTM, Isolation Forest, Local Outlier Factor, and One-Class Support Vector Machine—across HTTP, FTP, and SMTP protocols to determine which combination of algorithm and feature representation maintains robust performance under realistic training conditions where malicious traffic inadvertently contaminates benign datasets.
Our experimental results demonstrate that Autoencoders using byte frequency features achieved superior performance across all evaluation scenarios, with an average F2 score of 0.8975 representing only a 0.001 decrease from clean training conditions. This minimal performance degradation contrasts sharply with classical machine learning approaches (0.04 decrease) and LSTM models (0.01 decrease). LSTM models occupied an intermediate position, effectively capturing attack signatures through sequential byte pattern processing, though this sensitivity introduces vulnerability to training data contamination. Classical machine learning algorithms exhibited the highest sensitivity to noise, with LOF showing the steepest performance degradation across protocols.
These findings provide actionable guidance for practitioners in selecting intrusion detection approaches based on operational requirements. Autoencoders are well-suited for enterprise environments where perfect training data cleanliness cannot be guaranteed, LSTM models excel in protocol-aware inspection scenarios where sequence patterns are critical, and classical methods remain viable for resource-constrained edge deployments where computational efficiency is paramount.
Nevertheless, several limitations warrant acknowledgment. This study focused primarily on detection accuracy and noise resilience without comprehensive assessment of system constraints such as training time, inference speed, and memory consumption—critical factors in cases where computational overhead may offset performance advantages. Future work should incorporate systematic evaluation of these operational constraints, investigate whether LSTM performance can be enhanced through alternative feature representations that reduce noise sensitivity, and validate findings on contemporary datasets.

Author Contributions

Conceptualization, A.O.P., D.J.A., B.A.P.; methodology, A.O.P.; software, A.O.P., A.I.F., K.B.W.; validation, H.S., A.M.S., S.H.O.; formal analysis, A.O.P.; investigation, A.O.P.; resources, B.A.P.; data curation, A.O.P.; writing—original draft preparation, A.O.P., D.J.A., B.A.P.; writing—review and editing, B.A.P., H.S., A.M.S., S.H.O.; visualization, A.O.P.; supervision, B.A.P.; project administration, B.A.P.; funding acquisition, B.A.P. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Department of Informatics, Institut Teknologi Sepuluh Nopember, Surabaya, Indonesia, under funding number 1700/PKS/ITS/2022.

Institutional Review Board Statement

Ethical review and approval were waived for this study as it did not involve humans or animals.

Informed Consent Statement

Not applicable.

Data Availability Statement

The datasets analyzed during the current study are available at: https://research.unsw.edu.au/projects/unsw-nb15-dataset (accessed on 8 September 2024). The code used in this study is publicly available: LSTM: https://github.com/bazz-066/neuralnetwork-AD/tree/master/rnn-ryza, accessed on 8 September 2024; Autoencoders: https://github.com/bazz-066/FP-UG-ITS-2021-noisy-IDS-AE, accessed on 8 September 2024; Classical ML: https://github.com/bazz-066/FP-UG-ITS-2021-noisy-IDS-classic-ML, accessed on 8 September 2024.

Acknowledgments

The authors gratefully acknowledge the financial support they received from the Institut Teknologi Sepuluh Nopember for this work, under project scheme of the Publication Writing and IPR Incentive Program (PPHKI) 2026.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
DRDetection Rate
FPRFalse-Positive Rate
FTPFile Transfer Protocol
HTTPHypertext Transfer Protocol
ISOFIsolation Forest
LOFLocal Outlier Factor
LSTMLong Short-Term Memory
NIDSNetwork-based Intrusion Detection System
OCSVMOne-Class Support Vector Machine
SMTPSimple Mail Transfer Protocol

Appendix A

Table A1. Experimental Results of Classical Machine Learning Algorithm for HTTP Traffic.
Table A1. Experimental Results of Classical Machine Learning Algorithm for HTTP Traffic.
Classical Machine Learning-HTTP
Malicious Traffic (%)AlgorithmDetection RateF2 ScoreFPR Score
0OCSVM0.32710.33240.0168
0LOF0.81070.64800.0409
0ISOF0.82000.59080.0600
0.1OCSVM0.31690.31400.0202
0.1LOF0.48920.40830.0416
0.1ISOF0.77240.54350.0647
0.2OCSVM0.30640.29650.0242
0.2LOF0.34040.29910.0380
0.2ISOF0.65760.48510.0596
0.3OCSVM0.30580.31040.0182
0.3LOF0.26660.20330.0674
0.3ISOF0.61770.47680.0547
0.4OCSVM0.29280.29740.0177
0.4LOF0.24360.21140.0426
0.4ISOF0.63590.46740.0607
0.5OCSVM0.29410.29130.0205
0.5LOF0.21630.12530.1203
0.5ISOF0.84270.57500.0677
Table A2. Experimental Results of Autoencoder Algorithm for HTTP Traffic.
Table A2. Experimental Results of Autoencoder Algorithm for HTTP Traffic.
Malicious Traffic (%)ParametersThresholdDetection RateF2 ScoreFPR Score
01 Hidden LayerMean0.10310.12300.0144
01 Hidden LayerIQR000
01 Hidden LayerZ Score0.97510.82800.1475
03 Hidden LayerMean0.07580.09220.00584
03 Hidden LayerIQR0.10200.12310.0065
03 Hidden LayerZ Score0.52250.56080.0219
05 Hidden LayerMean0.07460.09070.0058
05 Hidden LayerIQR0.09240.11190.00626
05 Hidden LayerZ Score0.36160.40300.0202
0.11 Hidden LayerMean0.11440.13600.0147
0.11 Hidden LayerIQR0.04840.05940.00486
0.11 Hidden LayerZ Score0.96880.82380.1471
0.13 Hidden LayerMean0.07590.09290.00585
0.13 Hidden LayerIQR0.10240.12390.00654
0.13 Hidden LayerZ Score0.59970.61390.0459
0.15 Hidden LayerMean0.07530.09160.00582
0.15 Hidden LayerIQR0.09910.11970.0064
0.15 Hidden LayerZ Score0.47350.50870.0292
0.21 Hidden LayerMean0.10860.12930.0149
0.21 Hidden LayerIQR0.001370.001710.00008
0.21 Hidden LayerZ Score0.97380.82700.1476
0.23 Hidden LayerMean0.07570.09200.00589
0.23 Hidden LayerIQR0.09560.11560.00638
0.23 Hidden LayerZ Score0.41240.41750.0851
0.25 Hidden LayerMean0.07590.09230.00585
0.25 Hidden LayerIQR0.09820.11870.00638
0.25 Hidden LayerZ Score0.46540.50270.0263
0.31 Hidden LayerMean0.11300.13430.01501
0.31 Hidden LayerIQR0.01120.01400.00029
0.31 Hidden LayerZ Score0.98980.83810.1477
0.33 Hidden LayerMean0.07460.09070.0058
0.33 Hidden LayerIQR0.10050.12140.00643
0.33 Hidden LayerZ Score0.57540.59910.0365
0.35 Hidden LayerMean0.07500.09120.0058
0.35 Hidden LayerIQR0.10870.13100.00663
0.35 Hidden LayerZ Score0.74690.75030.0372
0.41 Hidden LayerMean0.10770.12820.0148
0.41 Hidden LayerIQR000
0.41 Hidden LayerZ Score0.89030.77000.1439
0.43 Hidden LayerMean0.07640.09290.00589
0.43 Hidden LayerIQR0.10270.12390.0065
0.43 Hidden LayerZ Score0.57660.60860.0260
0.45 Hidden LayerMean0.07610.09250.00587
0.45 Hidden LayerIQR0.09600.11610.00634
0.45 Hidden LayerZ Score0.43290.47120.0259
0.51 Hidden LayerMean0.13130.15520.0156
0.51 Hidden LayerIQR0.07390.08880.0141
0.51 Hidden LayerZ Score0.99540.84190.1479
0.53 Hidden LayerMean0.07550.09120.00581
0.53 Hidden LayerIQR0.11160.13440.00668
0.53 Hidden LayerZ Score0.64580.64840.0539
0.55 Hidden LayerMean0.07450.09100.0058
0.55 Hidden LayerIQR0.09330.11290.00633
0.55 Hidden LayerZ Score0.40400.42180.0622
Table A3. Experimental Results of LSTM Algorithm for HTTP Traffic.
Table A3. Experimental Results of LSTM Algorithm for HTTP Traffic.
Malicious Traffic (%)ThresholdDetection RateF2 ScoreFPR Score
0b_mean0.10210.10910.0697
0b_iqr0.93550.81170.1002
0b_zscore10.75910.1923
0f_mean0.00760.00840.0632
0f_iqr0.98040.8430.1011
0f_zscore0.98940.82490.1221
0.1b_mean0.09120.09850.0658
0.1b_iqr0.66600.62260.0839
0.1b_zscore0.99960.77250.1808
0.1f_mean0.01040.01150.06
0.1f_iqr0.98860.84350.1071
0.1f_zscore0.99040.84150.11
0.2b_mean0.09950.10680.0681
0.2b_iqr0.97210.83990.0993
0.2b_zscore0.99830.77050.1804
0.2f_mean0.01040.01150.0624
0.2f_iqr0.77940.65850.1388
0.2f_zscore0.92280.74390.1560
0.3b_mean0.05040.05540.0615
0.3b_iqr0.10360.11210.0633
0.3b_zscore0.99710.77060.1806
0.3f_mean0.00650.00730.0592
0.3f_iqr0.48200.45540.0993
0.3f_zscore0.98810.77730.1677
0.4b_mean0.10210.10940.0686
0.4b_iqr0.97260.84010.0993
0.4b_zscore10.78590.1658
0.4f_mean0.00740.00820.0616
0.4f_iqr0.98710.84860.1009
0.4f_zscore0.99250.83650.1144
0.5b_mean0.11980.12880.0656
0.5b_iqr0.99850.78270.1707
0.5b_zscore0.99960.78340.1708
0.5f_mean0.00730.00810.0584
0.5f_iqr0.99260.81220.1383
0.5f_zscore0.99190.80690.1428
Table A4. Experimental Results of Classical Machine Learning Algorithm for FTP Traffic.
Table A4. Experimental Results of Classical Machine Learning Algorithm for FTP Traffic.
Malicious Traffic (%)AlgorithmDetection RateF2 ScoreFPR Score
0OCSVM0.87980.75600.0180
0LOF0.97280.86630.0123
0ISOF1.00000.59530.0651
0.05OCSVM0.69570.57740.0248
0.05LOF0.66890.63370.0113
0.05ISOF1.00000.44660.1154
0.1OCSVM0.68460.57170.0246
0.1LOF0.69800.66330.0106
0.1ISOF1.00000.53080.0835
0.15OCSVM0.66590.54520.0269
0.15LOF0.69040.64850.0118
0.15ISOF1.00000.46190.1089
0.2OCSVM0.64670.57280.0189
0.2LOF0.64670.62420.0101
0.2ISOF1.00000.52920.0845
0.25OCSVM0.65850.56000.0229
0.25LOF0.55800.53880.0116
0.25ISOF1.00000.49360.0961
0.3OCSVM0.63110.54200.0224
0.3LOF0.59560.57610.0108
0.3ISOF1.00000.49660.0953
0.35OCSVM0.63360.52220.0273
0.35LOF0.59820.58230.0103
0.35ISOF1.00000.51680.0891
0.39OCSVM0.64140.56120.0203
0.39LOF0.59240.56810.0118
0.39ISOF1.00000.49110.0980
Table A5. Experimental Results of Autoencoder Algorithm for FTP Traffic.
Table A5. Experimental Results of Autoencoder Algorithm for FTP Traffic.
Malicious Traffic (%)ParametersThresholdDetection RateF2 ScoreFPR Score
01 Hidden LayerMean0.90700.82850.0425
01 Hidden LayerIQR0.99070.87840.0505
01 Hidden LayerZ Score10.87540.0534
03 Hidden LayerMean0.65160.61620.0477
03 Hidden LayerIQR10.87670.0528
03 Hidden LayerZ Score10.87480.0537
05 Hidden LayerMean0.65160.61620.0477
05 Hidden LayerIQR10.87670.0528
05 Hidden LayerZ Score10.87480.0537
0.051 Hidden LayerMean0.90130.82770.0408
0.051 Hidden LayerIQR0.95600.84890.0506
0.051 Hidden LayerZ Score10.87500.0536
0.053 Hidden LayerMean0.65820.62180.0477
0.053 Hidden LayerIQR10.87730.0525
0.053 Hidden LayerZ Score10.87510.0536
0.055 Hidden LayerMean0.65820.62180.0477
0.055 Hidden LayerIQR10.87730.0525
0.055 Hidden LayerZ Score10.87510.0536
0.11 Hidden LayerMean0.90950.83230.0415
0.11 Hidden LayerIQR0.95940.85220.0501
0.11 Hidden LayerZ Score10.87410.0539
0.13 Hidden LayerMean0.65500.61900.0477
0.13 Hidden LayerIQR0.99940.87600.0529
0.13 Hidden LayerZ Score10.87450.0539
0.15 Hidden LayerMean0.65500.61900.0477
0.15 Hidden LayerIQR0.99940.87600.0529
0.15 Hidden LayerZ Score10.87450.0539
0.151 Hidden LayerMean0.89940.82590.0409
0.151 Hidden LayerIQR0.95640.85000.0502
0.151 Hidden LayerZ Score10.87560.0533
0.153 Hidden LayerMean0.62040.59100.0472
0.153 Hidden LayerIQR0.99170.87090.0528
0.153 Hidden LayerZ Score10.87470.0538
0.155 Hidden LayerMean0.62040.59100.0472
0.155 Hidden LayerIQR0.99170.87090.0528
0.155 Hidden LayerZ Score10.87470.0538
0.21 Hidden LayerMean0.74100.69750.0428
0.21 Hidden LayerIQR0.99050.87500.0502
0.21 Hidden LayerZ Score10.87490.0537
0.23 Hidden LayerMean0.65460.61890.0476
0.23 Hidden LayerIQR10.87670.0527
0.23 Hidden LayerZ Score10.87480.0537
0.25 Hidden LayerMean0.65460.61890.0476
0.25 Hidden LayerIQR10.87670.0527
0.25 Hidden LayerZ Score10.87480.0537
0.251 Hidden LayerMean0.91030.83080.0426
0.251 Hidden LayerIQR0.99200.87660.0500
0.251 Hidden LayerZ Score10.87610.0531
0.253 Hidden LayerMean0.67840.63790.0480
0.253 Hidden LayerIQR10.87590.0531
0.253 Hidden LayerZ Score10.87380.0542
0.255 Hidden LayerMean0.67840.63790.0480
0.255 Hidden LayerIQR10.87590.0531
0.255 Hidden LayerZ Score10.87380.0542
0.31 Hidden LayerMean0.89660.82180.0420
0.31 Hidden LayerIQR0.98840.87240.0507
0.31 Hidden LayerZ Score10.87350.0543
0.33 Hidden LayerMean0.63400.60200.0473
0.33 Hidden LayerIQR10.87630.0530
0.33 Hidden LayerZ Score10.87420.0540
0.35 Hidden LayerMean0.63400.60200.0473
0.35 Hidden LayerIQR10.87630.0530
0.35 Hidden LayerZ Score10.87420.0540
0.351 Hidden LayerMean0.90700.82980.0419
0.351 Hidden LayerIQR0.99240.87370.0516
0.351 Hidden LayerZ Score10.87440.0539
0.353 Hidden LayerMean0.64240.60900.0474
0.353 Hidden LayerIQR0.99900.87640.0526
0.353 Hidden LayerZ Score10.87510.0536
0.355 Hidden LayerMean0.64240.60900.0474
0.355 Hidden LayerIQR0.99900.87640.0526
0.355 Hidden LayerZ Score10.87510.0536
0.391 Hidden LayerMean0.91260.83540.0412
0.391 Hidden LayerIQR0.99180.87450.0509
0.391 Hidden LayerZ Score10.87600.0530
0.393 Hidden LayerMean0.63490.60260.0475
0.393 Hidden LayerIQR10.87670.0528
0.393 Hidden LayerZ Score10.87450.0538
0.395 Hidden LayerMean0.63490.60260.0475
0.395 Hidden LayerIQR10.87670.0528
0.395 Hidden LayerZ Score10.87450.0538
Table A6. Experimental Results of LSTM Algorithm for FTP Traffic.
Table A6. Experimental Results of LSTM Algorithm for FTP Traffic.
Malicious Traffic (%)Threshold TypeDetection RateF2 ScoreFPR Score
0b_mean0.98540.82220.0737
0b_iqr10.71430.1464
0b_zscore10.71430.1464
0f_mean0.92030.81640.0524
0f_iqr10.71430.1464
0f_zscore10.71430.1464
0.05b_mean0.99610.86310.0565
0.05b_iqr10.71410.1462
0.05b_zscore10.71410.1462
0.05f_mean0.96450.85450.0496
0.05f_iqr10.71410.1462
0.05f_zscore10.71410.1462
0.1b_mean0.89600.80830.0475
0.1b_iqr10.72510.1393
0.1b_zscore10.72510.1393
0.1f_mean0.85710.78190.0458
0.1f_iqr10.72510.1393
0.1f_zscore10.72510.1393
0.15b_mean0.88980.76890.0659
0.15b_iqr10.71760.1447
0.15b_zscore10.71760.1447
0.15f_mean0.82880.77230.0395
0.15f_iqr10.71760.1447
0.15f_zscore10.71760.1447
0.2b_mean0.86770.78530.0479
0.2b_iqr10.71410.1461
0.2b_zscore10.71410.1461
0.2f_mean0.83500.77750.0390
0.2f_iqr10.71410.1461
0.2f_zscore10.71410.1461
0.25b_mean0.85190.76730.0511
0.25b_iqr10.71730.1440
0.25b_zscore10.71730.1440
0.25f_mean0.80410.75360.0388
0.25f_iqr10.71730.1440
0.25f_zscore10.71730.1440
0.3b_mean0.89410.80410.0486
0.3b_iqr10.71340.1467
0.3b_zscore10.71340.1467
0.3f_mean0.77480.73580.0358
0.3f_iqr10.71340.1467
0.3f_zscore10.71340.1467
0.35b_mean0.83300.77400.0403
0.35b_iqr10.72030.1428
0.35b_zscore10.72030.1428
0.35f_mean0.74720.71330.0361
0.35f_iqr10.72030.1428
0.35f_zscore10.72030.1428
0.39b_mean0.87540.79750.0445
0.39b_iqr10.71390.1455
0.39b_zscore10.71390.1455
0.39f_mean0.85330.78260.0434
0.39f_iqr10.71390.1455
0.39f_zscore10.71390.1455
Table A7. Experimental Results of Classical Machine Learning Algorithm for SMTP Traffic.
Table A7. Experimental Results of Classical Machine Learning Algorithm for SMTP Traffic.
Malicious Traffic (%)AlgorithmDetection RateF2 ScoreFPR Score
0OCSVM0.99720.18400.3816
0LOF0.99860.77060.0256
0ISOF1.00000.87160.0127
0.1OCSVM0.99720.18230.3826
0.1LOF0.37920.32300.0255
0.1ISOF1.00000.85290.0148
0.2OCSVM0.99730.18880.3757
0.2LOF0.25510.22430.0251
0.2ISOF1.00000.87370.0127
0.3OCSVM0.99580.18760.3683
0.3LOF0.23630.20640.0254
0.3ISOF1.00000.87650.0120
0.4OCSVM0.99580.18820.3715
0.4LOF0.21110.18580.0255
0.4ISOF1.00000.86940.0130
0.5OCSVM0.98610.19010.3634
0.5LOF0.22750.19980.0254
0.5ISOF1.00000.89250.0104
0.6OCSVM0.91510.18560.3466
0.6LOF0.23700.20850.0254
0.6ISOF1.00000.89500.0103
0.7OCSVM0.86990.17390.3464
0.7LOF0.23920.20900.0255
0.7ISOF1.00000.87560.0122
Table A8. Experimental Results of Autoencoder Algorithm for SMTP Traffic.
Table A8. Experimental Results of Autoencoder Algorithm for SMTP Traffic.
Malicious Traffic (%)ParametersThresholdDetection RateF2 ScoreFPR Score
01 Hidden LayerMean0.99900.98470.0077
01 Hidden LayerIQR0.99930.98490.0077
01 Hidden LayerZ Score10.98530.0078
03 Hidden LayerMean0.99620.98730.0051
03 Hidden LayerIQR0.99640.98290.0076
03 Hidden LayerZ Score0.99980.98520.0077
05 Hidden LayerMean0.99220.98450.0049
05 Hidden LayerIQR0.99520.98690.0049
05 Hidden LayerZ Score0.99980.98620.0072
0.11 Hidden LayerMean0.99900.98460.0078
0.11 Hidden LayerIQR0.99930.98460.0078
0.11 Hidden LayerZ Score10.98530.0078
0.13 Hidden LayerMean0.92340.93010.0043
0.13 Hidden LayerIQR0.99790.98350.0079
0.13 Hidden LayerZ Score0.99980.98490.0079
0.15 Hidden LayerMean0.68260.72440.0030
0.15 Hidden LayerIQR0.99260.98500.0048
0.15 Hidden LayerZ Score10.98650.0072
0.21 Hidden LayerMean0.99900.98460.0078
0.21 Hidden LayerIQR0.99930.98480.0078
0.21 Hidden LayerZ Score10.98530.0078
0.23 Hidden LayerMean0.78620.81560.0035
0.23 Hidden LayerIQR0.99790.98390.0077
0.23 Hidden LayerZ Score0.99980.98520.0078
0.25 Hidden LayerMean0.58110.63100.0025
0.25 Hidden LayerIQR0.99600.98760.0049
0.25 Hidden LayerZ Score0.99980.98520.0077
0.31 Hidden LayerMean0.99900.98450.0078
0.31 Hidden LayerIQR0.99930.98470.0078
0.31 Hidden LayerZ Score10.98520.0079
0.33 Hidden LayerMean0.54260.59430.0023
0.33 Hidden LayerIQR0.99640.98650.0057
0.33 Hidden LayerZ Score0.99880.98450.0077
0.35 Hidden LayerMean0.52290.57530.0023
0.35 Hidden LayerIQR0.99620.98760.0049
0.35 Hidden LayerZ Score0.99980.98510.0078
0.41 Hidden LayerMean0.99900.98460.0078
0.41 Hidden LayerIQR0.99950.98500.0078
0.41 Hidden LayerZ Score10.98530.0078
0.43 Hidden LayerMean0.52070.57320.0023
0.43 Hidden LayerIQR0.99640.98360.0072
0.43 Hidden LayerZ Score0.99930.98470.0078
0.45 Hidden LayerMean0.47360.52690.0021
0.45 Hidden LayerIQR0.99260.98490.0049
0.45 Hidden LayerZ Score10.98690.0070
0.51 Hidden LayerMean0.99900.98460.0078
0.51 Hidden LayerIQR0.99930.98480.0078
0.51 Hidden LayerZ Score10.97350.0142
0.53 Hidden LayerMean0.50240.53530.0023
0.53 Hidden LayerIQR0.99640.98280.0077
0.53 Hidden LayerZ Score10.98530.0078
0.55 Hidden LayerMean0.46480.51830.0021
0.55 Hidden LayerIQR0.99600.98750.0049
0.55 Hidden LayerZ Score10.98530.0078
0.61 Hidden LayerMean0.99900.98480.0077
0.61 Hidden LayerIQR0.99930.98500.0077
0.61 Hidden LayerZ Score10.97370.0141
0.63 Hidden LayerMean0.48500.53830.0021
0.63 Hidden LayerIQR0.99670.98280.0077
0.63 Hidden LayerZ Score0.99980.98500.0079
0.65 Hidden LayerMean0.44950.50290.0020
0.65 Hidden LayerIQR0.99620.98770.0049
0.65 Hidden LayerZ Score0.99980.973714.0000
0.71 Hidden LayerMean0.99900.98450.0078
0.71 Hidden LayerIQR0.99950.98490.0078
0.71 Hidden LayerZ Score10.98520.0079
0.73 Hidden LayerMean0.44970.50310.0020
0.73 Hidden LayerIQR0.99640.98440.0067
0.73 Hidden LayerZ Score0.99900.98440.0079
0.75 Hidden LayerMean0.43040.48380.0019
0.75 Hidden LayerIQR0.98480.97880.0048
0.75 Hidden LayerZ Score0.99980.98700.0068
Table A9. Experimental Results of LSTM Algorithm for SMTP Traffic.
Table A9. Experimental Results of LSTM Algorithm for SMTP Traffic.
Malicious Traffic (%)ThresholdDetection RateF2 ScoreFPR Score
0b_mean0.99600.96340.0172
0b_iqr0.99850.94410.0288
0b_zscore0.99850.94410.0288
0f_mean0.92620.90840.0171
0f_iqr0.95970.92430.0230
0f_zscore0.94330.92020.0181
0.1b_mean0.88530.87740.0160
0.1b_iqr0.98620.93720.0276
0.1b_zscore0.98130.93350.0275
0.1f_mean0.84050.84260.0148
0.1f_iqr0.97640.93970.0219
0.1f_zscore0.97130.93610.0217
0.2b_mean0.88330.87470.0165
0.2b_iqr0.98550.93560.0280
0.2b_zscore0.98030.93160.0280
0.2f_mean0.80690.81310.0155
0.2f_iqr0.94330.91310.0222
0.2f_zscore0.92220.89730.0216
0.3b_mean0.76980.78170.0154
0.3b_iqr0.97240.89990.0429
0.3b_zscore0.96750.92300.0273
0.3f_mean0.75250.76960.0136
0.3f_iqr0.93170.90640.0207
0.3f_zscore0.90490.89340.0159
0.4b_mean0.95310.93010.0170
0.4b_iqr0.99330.92020.0403
0.4b_zscore0.99310.94130.0281
0.4f_mean0.63030.65890.0152
0.4f_iqr0.91890.89770.0198
0.4f_zscore0.89350.88170.0173
0.5b_mean0.76680.77760.0163
0.5b_iqr0.97160.90450.0398
0.5b_zscore0.96170.91720.0280
0.5f_mean0.57820.61570.0117
0.5f_iqr0.90420.88140.0224
0.5f_zscore0.86770.86040.0174
0.6b_mean0.72620.74290.0161
0.6b_iqr0.97040.90850.0369
0.6b_zscore0.95630.90680.0315
0.6f_mean0.63480.66420.0144
0.6f_iqr0.93850.89460.0306
0.6f_zscore0.91930.89060.0241
0.7b_mean0.75770.76980.0164
0.7b_iqr0.97170.89960.0430
0.7b_zscore0.96630.91440.0318
0.7f_mean0.62800.65700.0152
0.7f_iqr0.88700.86320.0251
0.7f_zscore0.86760.84860.0244
Table A10. Experimental Results of Classical Machine Learning Algorithm for All Traffic.
Table A10. Experimental Results of Classical Machine Learning Algorithm for All Traffic.
Malicious Traffic (%)AlgorithmDetection RateF2 ScoreFPR Score
0OCSVM0.73470.42410.1388
0LOF0.92740.76170.0262
0ISOF0.94000.68590.0459
0.1OCSVM0.66620.35600.1425
0.1LOF0.52210.46490.0259
0.1ISOF0.92410.64240.0543
0.2OCSVM0.65010.35270.1396
0.2LOF0.41410.38250.0244
0.2ISOF0.88590.62930.0523
0.3OCSVM0.64420.34670.1363
0.3LOF0.36620.32860.0345
0.3ISOF0.87260.61660.0540
Table A11. Experimental Results of Autoencoder Algorithm for All Traffic.
Table A11. Experimental Results of Autoencoder Algorithm for All Traffic.
Malicious Traffic (%)Hidden LayersThresholdDetection RateF2 ScoreFPR Score
01Mean0.66970.64540.0215
01IQR0.66330.62110.0194
01Z Score0.99170.89620.0696
03Mean0.57450.56520.0195
03IQR0.69950.66090.0223
03Z Score0.84080.80690.0278
05Mean0.57280.56380.0195
05IQR0.69590.65850.0213
05Z Score0.78710.75470.0270
0.11Mean0.67430.65100.0213
0.11IQR0.66900.63210.0209
0.11Z Score0.98960.89440.0696
0.13Mean0.55140.54730.0193
0.13IQR0.69990.66110.0224
0.13Z Score0.86650.82440.0359
0.15Mean0.47100.47830.0189
0.15IQR0.69700.66020.0214
0.15Z Score0.82450.78990.0301
0.21Mean0.61620.60380.0218
0.21IQR0.66370.62050.0194
0.21Z Score0.99130.89570.0697
0.23Mean0.50550.50880.0190
0.23IQR0.69780.65870.0223
0.23Z Score0.80410.75920.0489
0.25Mean0.43720.44740.0186
0.25IQR0.69810.66100.0213
0.25Z Score0.82170.78760.0292
0.31Mean0.66950.64690.0216
0.31IQR0.66630.62370.0196
0.31Z Score0.99660.89890.0700
0.33Mean0.41710.42900.0185
0.33IQR0.69900.66140.0217
0.33Z Score0.85810.81930.0327
0.35Mean0.41060.42280.0185
0.35IQR0.70160.66500.0215
0.35Z Score0.91560.86990.0330
Table A12. Experimental Results of LSTM Algorithm for All Traffic.
Table A12. Experimental Results of LSTM Algorithm for All Traffic.
Malicious Traffic (%)ThresholdDetection RateF2 ScoreFPR Score
0b_mean0.69450.63160.0536
0b_iqr0.9780.82340.0918
0b_zscore0.99950.80580.1225
0f_mean0.6180.57770.0442
0f_iqr0.980.82720.0902
0f_zscore0.97760.81980.0955
0.1b_mean0.62410.59470.0431
0.1b_iqr0.88410.76170.0836
0.1b_zscore0.99370.81040.1159
0.1f_mean0.56940.54530.0402
0.1f_iqr0.98830.83610.0894
0.1f_zscore0.98720.83420.0903
0.2b_mean0.61680.58890.0442
0.2b_iqr0.98580.82990.0911
0.2b_zscore0.99290.80540.1182
0.2f_mean0.55080.53400.0390
0.2f_iqr0.90760.76190.1024
0.2f_zscore0.94830.78510.1079
0.3b_mean0.57140.54710.0418
0.3b_iqr0.69200.57520.0843
0.3b_zscore0.98820.80230.1182
0.3f_mean0.51130.50420.0362
0.3f_iqr0.80460.69180.0889
0.3f_zscore0.96430.79470.1101

References

  1. Algaolahi, A.; Aljoby, W.; Ghaleb, M.; Harras, K.A. Detecting and Identifying the Targets of Covert DDoS Attacks. In Proceedings of the 2024 IEEE 21st International Conference on Smart Communities: Improving Quality of Life Using AI, Robotics and IoT (HONET), Doha, Qatar, 3–5 December 2024; pp. 143–148. [Google Scholar] [CrossRef]
  2. Ahmed, I.; Lhee, K.S. Classification of packet contents for malware detection. J. Comput. Virol. 2011, 7, 279–295. [Google Scholar] [CrossRef]
  3. Fauzi, N.; Yulianto, F.A.; Nuha, H.H. The Effectiveness of Anomaly-Based Intrusion Detection Systems in Handling Zero-Day Attacks Using AdaBoost, J48, and Random Forest Methods. In Proceedings of the 2023 IEEE Asia Pacific Conference on Wireless and Mobile (APWiMob), Bali, Indonesia, 10–12 October 2023; pp. 57–62. [Google Scholar] [CrossRef]
  4. Faizal, M.A.; Zaki, M.M.; Shahrin, S.; Robiah, Y.; Rahayu, S.S.; Nazrulazhar, B. Threshold Verification Technique for Network Intrusion Detection System. arXiv 2009, arXiv:0906.3843. [Google Scholar] [CrossRef]
  5. David Akande, T.; Kaur, B.; Dadkhah, S.; Ghorbani, A.A. Threshold based Technique to Detect Anomalies using Log Files. In Proceedings of the 2022 7th International Conference on Machine Learning Technologies, New York, NY, USA, 11–13 March 2022; ICMLT ’22. pp. 191–198. [Google Scholar] [CrossRef]
  6. Almuhanna, R.; Dardouri, S. A deep learning/machine learning approach for anomaly based network intrusion detection. Front. Artif. Intell. 2025, 8, 1625891. [Google Scholar] [CrossRef] [PubMed]
  7. Auskalnis, J.; Paulauskas, N.; Baskys, A. Application of local outlier factor algorithm to detect anomalies in computer network. Elektron. Ir Elektrotechnika 2018, 24, 96–99. [Google Scholar] [CrossRef]
  8. Ripan, R.C.; Sarker, I.H.; Anwar, M.M.; Furhad, M.H.; Rahat, F.; Hoque, M.M.; Sarfraz, M. An isolation forest learning based outlier detection approach for effectively classifying cyber anomalies. In Hybrid Intelligent Systems: 20th International Conference on Hybrid Intelligent Systems (HIS 2020), December 14–16, 2020; Springer: Cham, Switzerland, 2021; pp. 270–279. [Google Scholar]
  9. Zhang, M.; Xu, B.; Gong, J. An anomaly detection model based on one-class svm to detect network intrusions. In Proceedings of the 2015 11th International Conference on Mobile Ad-Hoc and Sensor Networks (MSN), Shenzhen, China, 16–18 December 2015; pp. 102–107. [Google Scholar]
  10. Nguimbous, Y.N.; Ksantini, R.; Bouhoula, A. Anomaly-based intrusion detection using auto-encoder. In Proceedings of the 2019 International Conference on Software, Telecommunications and Computer Networks (SoftCOM), Split, Croatia, 19–21 September 2019; pp. 1–5. [Google Scholar]
  11. Imrana, Y.; Xiang, Y.; Ali, L.; Abdul-Rauf, Z. A bidirectional LSTM deep learning approach for intrusion detection. Expert Syst. Appl. 2021, 185, 115524. [Google Scholar] [CrossRef]
  12. Anup, B.; Kaur, M.M. Anomaly Detection in Network Traffic; A Statistical Approach; LAP Lambert Academic Publishing: Saarbrücken, Germany, 2012. [Google Scholar]
  13. Bhuyan, M.H.; Bhattacharyya, D.K.; Kalita, J.K. Network Traffic Anomaly Detection Techniques and Systems. In Network Traffic Anomaly Detection and Prevention: Concepts, Techniques, and Tools; Springer International Publishing: Cham, Switzerland, 2017; pp. 115–169. [Google Scholar] [CrossRef]
  14. Zhao, X.; Wu, Q. Subspace-Based Anomaly Detection for Large-Scale Campus Network Traffic. J. Appl. Math. 2023, 2023, 8489644. [Google Scholar] [CrossRef]
  15. Modi, C.; Patel, D.; Borisaniya, B.; Patel, H.; Patel, A.; Rajarajan, M. A survey of intrusion detection techniques in cloud. J. Netw. Comput. Appl. 2013, 36, 42–57. [Google Scholar] [CrossRef]
  16. Othman, S.M.; Alsohybe, N.T.; Ba-Alwi, F.M.; Zahary, A.T. Survey on intrusion detection system types. Int. J. Cyber-Secur. Digit. Forensics 2018, 7, 444–463. [Google Scholar]
  17. Liu, H.; Lang, B. Machine learning and deep learning methods for intrusion detection systems: A survey. Appl. Sci. 2019, 9, 4396. [Google Scholar] [CrossRef]
  18. Otoum, S.; Kantarci, B.; Mouftah, H. A comparative study of ai-based intrusion detection techniques in critical infrastructures. ACM Trans. Internet Technol. (TOIT) 2021, 21, 1–22. [Google Scholar] [CrossRef]
  19. Jain, M.; Kaur, G.; Saxena, V. A K-Means clustering and SVM based hybrid concept drift detection technique for network anomaly detection. Expert Syst. Appl. 2022, 193, 116510. [Google Scholar] [CrossRef]
  20. Zavrak, S.; İskefiyeli, M. Anomaly-based intrusion detection from network flow features using variational autoencoder. IEEE Access 2020, 8, 108346–108358. [Google Scholar] [CrossRef]
  21. Sadaf, K.; Sultana, J. Intrusion detection based on autoencoder and isolation forest in fog computing. IEEE Access 2020, 8, 167059–167068. [Google Scholar] [CrossRef]
  22. Aljbali, S.; Roy, K. Anomaly Detection Using Bidirectional LSTM. In Intelligent Systems and Applications; Advances in Intelligent Systems and Computing; Springer: Cham, Switzerland, 2021; Volume 1250. [Google Scholar] [CrossRef]
  23. Abdallah, M.; An Le Khac, N.; Jahromi, H.; Delia Jurcut, A. A hybrid CNN-LSTM based approach for anomaly detection systems in SDNs. In Proceedings of the 16th International Conference on Availability, Reliability and Security, Vienna, Austria, 17–20 August 2021; pp. 1–7. [Google Scholar]
  24. Farahnakian, F.; Heikkonen, J. A deep auto-encoder based approach for intrusion detection system. In Proceedings of the 2018 20th International Conference on Advanced Communication Technology (ICACT), Chuncheon, Republic of Korea, 11–14 February 2018; pp. 178–183. [Google Scholar]
  25. Paulauskas, N.; Bagdonas, A.F. Local outlier factor use for the network flow anomaly detection. Secur. Commun. Netw. 2015, 8, 4203–4212. [Google Scholar] [CrossRef]
  26. Nguyen, Q.T.; Tran, K.P.; Castagliola, P.; Huong, T.T.; Nguyen, M.K.; Lardjane, S. Nested one-class support vector machines for network intrusion detection. In Proceedings of the 2018 IEEE Seventh International Conference on Communications and Electronics (ICCE), Hue, Vietnam, 18–20 July 2018; pp. 7–12. [Google Scholar]
  27. Abolhasanzadeh, B. Nonlinear dimensionality reduction for intrusion detection using auto-encoder bottleneck features. In Proceedings of the 2015 7th Conference on Information and Knowledge Technology (IKT), Urmia, Iran, 26–28 May 2015; pp. 1–5. [Google Scholar]
  28. Zhang, B.; Yu, Y.; Li, J. Network intrusion detection based on stacked sparse autoencoder and binary tree ensemble method. In Proceedings of the 2018 IEEE International Conference on Communications Workshops (ICC Workshops), Kansas City, MO, USA, 20–24 May 2018; pp. 1–6. [Google Scholar]
  29. Chen, Z.; Simsek, M.; Kantarci, B.; Bagheri, M.; Djukic, P. Machine learning-enabled hybrid intrusion detection system with host data transformation and an advanced two-stage classifier. Comput. Netw. 2024, 250, 110576. [Google Scholar] [CrossRef]
  30. Narayana Rao, K.; Venkata Rao, K.; P.V.G.D., P.R. A hybrid Intrusion Detection System based on Sparse autoencoder and Deep Neural Network. Comput. Commun. 2021, 180, 77–88. [Google Scholar] [CrossRef]
  31. Zha, C.; Wang, Z.; Fan, Y.; Bai, B.; Zhang, Y.; Shi, S.; Zhang, R. A-NIDS: Adaptive Network Intrusion Detection System Based on Clustering and Stacked CTGAN. IEEE Trans. Inf. Forensics Secur. 2025, 20, 3204–3219. [Google Scholar] [CrossRef]
  32. Ma, Z.; Liu, L.; Meng, W.; Luo, X.; Wang, L.; Li, W. ADCL: Toward an Adaptive Network Intrusion Detection System Using Collaborative Learning in IoT Networks. IEEE Internet Things J. 2023, 10, 12521–12536. [Google Scholar] [CrossRef]
  33. Winter, P.; Hermann, E.; Zeilinger, M. Inductive intrusion detection in flow-based network data using one-class support vector machines. In Proceedings of the 2011 4th IFIP International Conference on New Technologies, Mobility and Security, Paris, France, 7–10 February 2011; pp. 1–5. [Google Scholar]
  34. Mirsky, Y.; Doitshman, T.; Elovici, Y.; Shabtai, A. Kitsune: An Ensemble of Autoencoders for Online Network Intrusion Detection. arXiv 2018, arXiv:2018.23204. [Google Scholar] [CrossRef]
  35. Moustafa, N.; Slay, J. UNSW-NB15: A comprehensive data set for network intrusion detection systems (UNSW-NB15 network data set). In Proceedings of the 2015 Military Communications and Information Systems Conference (MilCIS), Canberra, Australia, 10–12 November 2015; pp. 1–6. [Google Scholar] [CrossRef]
  36. Pratomo, B. Low-Rate Attack Detection with Intelligent Fine-Grained Network Analysis. Ph.D. Thesis, Cardiff University, Cardiff, UK, 2020. [Google Scholar]
  37. Transmission Control Protocol. RFC 793, 1981. Available online: https://www.rfc-editor.org/info/rfc0793 (accessed on 12 August 2025).
  38. Hao, Y.; Sheng, Y.; Wang, J. Variant Gated Recurrent Units with Encoders to Preprocess Packets for Payload-Aware Intrusion Detection. IEEE Access 2019, 7, 49985–49998. [Google Scholar] [CrossRef]
  39. Saeed, R.; Khaliq Qureshi, H.; Ioannou, C.; Lestas, M. A Proactive Model for Intrusion Detection Using Image Representation of Network Flows. IEEE Access 2024, 12, 160653–160666. [Google Scholar] [CrossRef]
  40. Nie, F.; Liu, W.; Liu, G.; Gao, B.; Huang, J.; Tian, W.; Yuen, C. Empowering Anomaly Detection in IoT Traffic Through Multiview Subspace Learning. IEEE Internet Things J. 2025, 12, 15911–15925. [Google Scholar] [CrossRef]
  41. Brizendine, B.; Kusuma, S.S.; Rimal, B.P. Process Injection Using Return-Oriented Programming. IEEE Access 2025, 13, 133790–133816. [Google Scholar] [CrossRef]
  42. Viviani, L.A.; Ranganathan, P. Evaluating the Suitability of LSTM Models for Edge Computing. In Proceedings of the 2024 Cyber Awareness and Research Symposium (CARS), Grand Forks, ND, USA, 28–29 October 2024; pp. 1–7. [Google Scholar] [CrossRef]
  43. Chandola, V.; Banerjee, A.; Kumar, V. Anomaly detection: A survey. ACM Comput. Surv. (CSUR) 2009, 41, 1–58. [Google Scholar] [CrossRef]
  44. Pratomo, B.A.; Fajar, A.I.; Munif, A.; Ijtihadie, R.M.; Studiawan, H.; Santoso, B.J. Training Autoencoders with Noisy Training Sets for Detecting Low-rate Attacks on the Network. In Proceedings of the 2022 IEEE International Conference on Cybernetics and Computational Intelligence (CyberneticsCom), Malang, Indonesia, 16–18 June 2022; pp. 138–143. [Google Scholar]
  45. Bounsiar, A.; Madden, M.G. One-Class Support Vector Machines Revisited. In Proceedings of the 2014 International Conference on Information Science and Applications (ICISA), Seoul, Republic of Korea, 6–9 May 2014; pp. 1–4. [Google Scholar] [CrossRef]
  46. Breunig, M.; Kröger, P.; Ng, R.; Sander, J. LOF: Identifying Density-Based Local Outliers. In Proceedings of the 2000 ACM SIGMOD International Conference on Management of Data, Dallas, TX, USA, 15–18 May 2000; Volume 29, pp. 93–104. [Google Scholar] [CrossRef]
  47. Liu, F.T.; Ting, K.M.; Zhou, Z.H. Isolation Forest. In Proceedings of the 2008 Eighth IEEE International Conference on Data Mining, Pisa, Italy, 15–19 December 2008; pp. 413–422. [Google Scholar] [CrossRef]
  48. Diez, D.M.; Barr, C.D.; Cetinkaya-Rundel, M. OpenIntro Statistics; OpenIntro: Boston, MA, USA, 2012. [Google Scholar]
  49. Hubert, M.; Vandervieren, E. An adjusted boxplot for skewed distributions. Comput. Stat. Data Anal. 2008, 52, 5186–5201. [Google Scholar] [CrossRef]
  50. Crosby, T. How to Detect and Handle Outliers; Taylor & Francis: Oxfordshire, UK, 1994. [Google Scholar]
  51. Powers, D.M. Evaluation: From precision, recall and F-measure to ROC, informedness, markedness and correlation. arXiv 2020, arXiv:2010.16061. [Google Scholar] [CrossRef]
  52. Sammut, C.; Webb, G.I. Encyclopedia of Machine Learning; Springer Science & Business Media: Berlin/Heidelberg, Germany, 2011. [Google Scholar]
  53. Shepperd, M.; Bowes, D.; Hall, T. Researcher bias: The use of machine learning in software defect prediction. IEEE Trans. Softw. Eng. 2014, 40, 603–616. [Google Scholar] [CrossRef]
  54. Deng, X.; Liu, Q.; Deng, Y.; Mahadevan, S. An improved method to construct basic probability assignment based on the confusion matrix for classification problem. Inf. Sci. 2016, 340, 250–261. [Google Scholar] [CrossRef]
Figure 1. The overall workflow of the proposed methodology. Differences in color doesn’t explain anything.
Figure 1. The overall workflow of the proposed methodology. Differences in color doesn’t explain anything.
Jcp 06 00014 g001
Figure 2. Comparison between byte frequencies and byte sequences.
Figure 2. Comparison between byte frequencies and byte sequences.
Jcp 06 00014 g002
Figure 3. Deployment assumption for the proposed payload-based NIDSs.
Figure 3. Deployment assumption for the proposed payload-based NIDSs.
Jcp 06 00014 g003
Figure 4. Workflow for the evaluation phase.
Figure 4. Workflow for the evaluation phase.
Jcp 06 00014 g004
Figure 5. Confusion matrix illustration.
Figure 5. Confusion matrix illustration.
Jcp 06 00014 g005
Figure 6. Graphics of F2 score from Classical ML, LSTM, and Autoencoder-based results on HTTP traffic.
Figure 6. Graphics of F2 score from Classical ML, LSTM, and Autoencoder-based results on HTTP traffic.
Jcp 06 00014 g006
Figure 7. Graphics of F2 score from Classical ML, LSTM, and Autoencoder-based results on FTP traffic.
Figure 7. Graphics of F2 score from Classical ML, LSTM, and Autoencoder-based results on FTP traffic.
Jcp 06 00014 g007
Figure 8. Graphics of F2 score from Classical ML, LSTM, and Autoencoder-based results on SMTP traffic.
Figure 8. Graphics of F2 score from Classical ML, LSTM, and Autoencoder-based results on SMTP traffic.
Jcp 06 00014 g008
Figure 9. Graphics of F2 score from Classical ML, LSTM, and Autoencoder-based results on all traffic.
Figure 9. Graphics of F2 score from Classical ML, LSTM, and Autoencoder-based results on all traffic.
Jcp 06 00014 g009
Figure 10. Graphics of F2 best score: (a) HTTP traffic; (b) FTP traffic; (c) SMTP traffic; (d) All traffic.
Figure 10. Graphics of F2 best score: (a) HTTP traffic; (b) FTP traffic; (c) SMTP traffic; (d) All traffic.
Jcp 06 00014 g010
Figure 11. Graphics of F2 best score with best parameter.
Figure 11. Graphics of F2 best score with best parameter.
Jcp 06 00014 g011
Table 1. Summary of Related Research Works.
Table 1. Summary of Related Research Works.
YearResearch TitleAlgorithmAnalysis TypeUnclean Data
2022A K-Means clustering and SVM-based hybrid concept drift detection technique for network anomaly detectionK-Means, SVMcontent-based
2021An Isolation Forest Learning Based Outlier Detection Approach for Effectively Classifying Cyber AnomaliesISOFflow-based
2021Anomaly Detection Using Bidirectional LSTMLSTMflow-based
2021A Hybrid CNN-LSTM Based Approach for Anomaly Detection Systems in SDNsCNN-LSTMflow-based
2021A bidirectional LSTM deep learning approach for intrusion detectionLSTMflow-based
2020Anomaly-based intrusion detection from network flow features using variational autoencoderVAEflow-based
2020Intrusion detection based on Autoencoder and Isolation Forest in fog computingAE-ISOFflow-based
2019Anomaly-based intrusion detection using auto-encoderAEcontent-based
2018Application of Local Outlier Factor to Detect Anomalies in Computer NetworksLOFflow-based
2018A deep Autoencoder-based approach for intrusion detection systemDeep AEflow-based
2018Network intrusion detection using stacked sparse autoencoder and binary tree ensembleSSAE-XGBcontent-based
2018Web attack detection using stacked Auto-EncoderSAE-ISOFcontent-based
2018Nested One-Class Support Vector Machines for network intrusion detectionOCSVMcontent-based
2015Local outlier factor usage for network flow anomaly detectionLOFflow-based
2015Nonlinear dimensionality reduction for intrusion detection using autoencoder bottlenecksAEcontent-based
2015One-class SVM anomaly detection modelOCSVMcontent-based
2011Inductive intrusion detection in flow-based network data using one-class SVMOCSVMflow-based
NowThe proposed articleLOF, ISOF, OCSVM, AE, LSTMcontent-based
Table 2. Baseline Malicious Traffic Statistics in Original Training Data.
Table 2. Baseline Malicious Traffic Statistics in Original Training Data.
ProtocolLegitimate Conn.Malicious Conn.Malicious Ratio
FTP45,5251800.39%
SMTP83,4336240.70%
HTTP200,06017140.80%
Table 3. An excerpt from a noisy FTP training set.
Table 3. An excerpt from a noisy FTP training set.
No.SourceDestinationProtocolInfo
24724359.166.0.7149.171.126.9FTPSTOR README.txt
24725559.166.0.7149.171.126.9FTPQUIT
248804175.45.176.0149.171.126.15FTPUSER anonymous
248916175.45.176.0149.171.126.15FTP[TCP Previous segment not captured] TYPE I
248920175.45.176.0149.171.126.15FTPPASV
24893459.166.0.7149.171.126.5FTPUSER anonymous
24894259.166.0.7149.171.126.5FTPPASS jobs@server.com
24895059.166.0.7149.171.126.5FTPEPSV
249012175.45.176.0149.171.126.15FTPSIZE ../../../../../../x2CxsSUW/lwgclmRGLvZu
249018175.45.176.0149.171.126.15FTPRETR ../../../../../../x2CxsSUW/lwgclmRGLvZu
24902459.166.0.7149.171.126.5FTPQUIT
24965059.166.0.7149.171.126.8FTPUSER anonymous
Table 4. Sample entries from the FTP testing dataset.
Table 4. Sample entries from the FTP testing dataset.
TCP TuplePayloadLabel
149.171.126.17-21-175.45.176.2-42810-tcp213 2549
150 Data connection accepted from 175.45.176.2:49220; transfer
starting for exploit8.NWF(12558)bytes)
226 Transfer completed.
0
175.45.176.2-4108-149.171.126.11-21-tcpUSER test
PASS foobar
CWD /op/apache-1.3.31/htdocs/test
PORT 10,2,1,90,17,159
STOR poc.shtml
QUIT
0
175.45.176.1-11178-149.171.126.13-21-tcpUSER lWthZryPx
PASS b2Ulm2K
PORT 175,45,176,1,194,72
RETR /../../../..//4AfjB1/yDellcx.gOa
1
59.166.0.3-7585-149.171.126.2-21-tcpUSER anonymous
PASS jobs@server.com
EPSV
LIST
CWD pub
EPSV
RETR README.txt
EPSV
STOR README.txt
QUIT
0
175.45.176.3-42152-149.171.126.13-21-tcpUSER anonymous
PASS IEUser@
TYPE I
PASV
SIZE /../../../nM63/AwrIGL.aqd
RETR /../../../nM63/AwrIGL.aqd
1
Table 5. Number of TCP Connections in Testing Dataset.
Table 5. Number of TCP Connections in Testing Dataset.
ProtocolBenignMaliciousTotal
HTTP132,34416,116148,460
FTP24,465177726,242
SMTP40,704403144,735
Table 6. Hyperparameter Configurations for LSTM and Autoencoder Models.
Table 6. Hyperparameter Configurations for LSTM and Autoencoder Models.
HyperparametersLSTM ValuesAutoencoder Values
Number of Hidden Layer(s)21; 3; 5
Activation Functions in Hidden Layer(s)TanhReLU
Activation Functions in Output LayerSoftmaxSigmoid
Dropout0.20.2
OptimizerAdamAdadelta
Loss FunctionCategorical CrossentropyBinary Crossentropy
Number of Epochs1010
Table 7. Optimal F2 Score Parameter Results for Each Algorithm on Each Protocol.
Table 7. Optimal F2 Score Parameter Results for Each Algorithm on Each Protocol.
Best Parameter Results
ProtocolAlgorithmF2 ScoreParameters
OverallMAX ML0.6436ISOF
MAX LSTM0.8085f_zscore
MAX AUTOENCODERS0.89631 hidden layer-zscore
FTPMAX ML0.6335LOF
MAX LSTM0.7990b_mean
MAX AUTOENCODERS0.87593 hidden layer-IQR
SMTPMAX ML0.8759ISOF
MAX LSTM0.9265b_zscore
MAX AUTOENCODERS0.98585 hidden layer-IQR
HTTPMAX ML0.5231ISOF
MAX LSTM0.8052f_zscore
MAX AUTOENCODERS0.82151 hidden layer-zscore
Table 8. Optimal F2 Score Parameter Results for Each Algorithm on Each Protocol with Best Threshold.
Table 8. Optimal F2 Score Parameter Results for Each Algorithm on Each Protocol with Best Threshold.
AlgorithmBest Threshold ParametersNoise %F2 Score
MAX ML– FTP: LOF
– SMTP: ISOF
– HTTP: ISOF
00.7762
0.10.6866
0.20.6610
0.30.6431
Gradient−0.0425
Average0.6917
MAX LSTM– FTP: b_mean
– SMTP: b_zscore
– HTTP: f_zscore
00.8637
0.10.8611
0.20.8203
0.30.8348
Gradient−0.0128
Average0.8450
MAX AE– FTP: 3 layer-iqr
– SMTP: 5 layer-iqr
– HTTP: 1 layer-zscore
00.8972
0.10.8949
0.20.8971
0.30.9007
Gradient0.0013
Average0.8975
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Prabowo, A.O.; Arrizki, D.J.; Pratomo, B.A.; Fajar, A.I.; Wijaya, K.B.; Studiawan, H.; Shiddiqi, A.M.; Othman, S.H. Evaluation of Anomaly-Based Network Intrusion Detection Systems with Unclean Training Data for Low-Rate Attack Detection. J. Cybersecur. Priv. 2026, 6, 14. https://doi.org/10.3390/jcp6010014

AMA Style

Prabowo AO, Arrizki DJ, Pratomo BA, Fajar AI, Wijaya KB, Studiawan H, Shiddiqi AM, Othman SH. Evaluation of Anomaly-Based Network Intrusion Detection Systems with Unclean Training Data for Low-Rate Attack Detection. Journal of Cybersecurity and Privacy. 2026; 6(1):14. https://doi.org/10.3390/jcp6010014

Chicago/Turabian Style

Prabowo, Angela Oryza, Deka Julian Arrizki, Baskoro Adi Pratomo, Ahmad Ibnu Fajar, Krisna Badru Wijaya, Hudan Studiawan, Ary Mazharuddin Shiddiqi, and Siti Hajar Othman. 2026. "Evaluation of Anomaly-Based Network Intrusion Detection Systems with Unclean Training Data for Low-Rate Attack Detection" Journal of Cybersecurity and Privacy 6, no. 1: 14. https://doi.org/10.3390/jcp6010014

APA Style

Prabowo, A. O., Arrizki, D. J., Pratomo, B. A., Fajar, A. I., Wijaya, K. B., Studiawan, H., Shiddiqi, A. M., & Othman, S. H. (2026). Evaluation of Anomaly-Based Network Intrusion Detection Systems with Unclean Training Data for Low-Rate Attack Detection. Journal of Cybersecurity and Privacy, 6(1), 14. https://doi.org/10.3390/jcp6010014

Article Metrics

Back to TopTop