Next Article in Journal
Comparing EEG-Based Epilepsy Diagnosis Using Neural Networks and Wavelet Transform
Next Article in Special Issue
A Study on Exploring the Level of Awareness of Privacy Concerns and Risks
Previous Article in Journal
The Adhesion and Moisture Damage Resistance between Castor Oil-Based Bio-Asphalt and Aggregates under the Action of Thermal-Oxidative Aging
Previous Article in Special Issue
NTT and Inverse NTT Quantum Circuits in CRYSTALS-Kyber for Post-Quantum Security Evaluation
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Analysis of Temporal Features in Multivariate Time Series to Forecast Network Events

1
Department of Computer Science, Bowie State University, Bowie, MD 20715, USA
2
Department of Management and Decision Sciences, Coastal Carolina University, Conway, SC 29528, USA
3
Department of Computer Science and Information Technology, University of the District of Columbia, Washington, DC 20759, USA
*
Authors to whom correspondence should be addressed.
Appl. Sci. 2023, 13(18), 10411; https://doi.org/10.3390/app131810411
Submission received: 27 August 2023 / Revised: 13 September 2023 / Accepted: 15 September 2023 / Published: 18 September 2023
(This article belongs to the Special Issue Advanced Technologies in Data and Information Security III)

Abstract

:
Analyzing network traffic over time is crucial for understanding the changes in network activity. To properly examine network traffic patterns over time, multiple network events in each timestamp need to be converted to time series data. In this study, we propose a new approach to transform network traffic data into time series formats by extracting temporal features to analyze normal/attack patterns. The normal patterns indicate network traffic occurred without any intrusion-related activities, whereas the attack patterns denote potential threats that deviate from the normal patterns. To evaluate the features, long short-term memory (LSTM) is applied to forecast multi-step network normal and attack events. Visual analysis is also performed to enhance the understanding of key features in the network. We compared the performance differences using time scales of 60 and 120 s. Upon evaluation, we found that the temporal features extracted with the 60 s time scale exhibited better performance in forecasting future network events.

1. Introduction

Time series data is a collection of successive observations that are recorded in chronological order. Time series prediction (TSP) involves analyzing historical time series data to discover patterns and predict future values. TSP has commonly been utilized in various fields such as stock price prediction [1], weather forecasting [2], earthquake prediction [3], river water level forecasting [4], physiological symptoms detection [5], and more. Monitoring and forecasting network events are imperative in network intrusion to understand future attack trends. Network traffic analysis poses a particular challenge due to the ever-changing nature of network activities over time. Time series analysis can play a vital role in pinpointing essential attributes of attack events during the examination of network activities. However, it may not be suitable for analyzing network traffic data directly, given that network traffic events generally occur as a series of consecutive observations within the same timestamp. Furthermore, monitoring sudden changes in the network over time can serve as a key characteristic for identifying attack events.
In modern network environments, an enormous volume of network events is generated within seconds. Consequently, the analysis of network events requires significant effort, particularly when dealing with large numbers of captured network variables. To analyze time series network events data, it is critical to transform the data into time series formats with equal intervals. Previously, researchers used aggregation [6] to analyze a large number of streaming intrusion alerts. However, applying the aggregation technique to time-stamped events may be susceptible to high variation because of numerous events at time t i . In this study, we propose an approach to convert multiple sequences of network events to time series formats and forecast network normal and attack events. Specifically, our approach extracts temporal features by utilizing statistical measurements and computational methods to convert network events to time series data with a targeted time scale. A publicly available network traffic dataset captured in a honeypot system is used to test our proposed approach and to highlight the effectiveness of identifying attack patterns and forecasting possible future attacks. To determine the effectiveness of forecasting future attack patterns, we evaluated two different time scales to predict network attack events and understand the temporal patterns of attackers. We also performed a series of data analyses to determine the effectiveness of our proposed approach. In summary, we make the following contributions in this study:
  • An advanced approach is introduced to extract temporal features by integrating wavelet transform, permutation entropy, and statistical measurements from network events. We also propose a new way to extract temporal features of categorical network traffic variables.
  • The performance evaluation with different time scales ( t s = 60 and 120 s) is conducted to determine the effectiveness of the proposed approach.
  • Deep learning (DL) is utilized to evaluate the features and forecast multiple outputs (i.e., network normal and attack events).
  • Visual analysis with multiple visualization techniques is performed to determine the effectiveness of analyzing network events with the extracted temporal features.
This paper begins by describing related work in Section 2. Then, we explain our proposed approach and the network traffic dataset in Section 3. In Section 4, experimental results are presented. Lastly, we discuss the implications of this study and future research in Section 5 and  Section 6.

2. Related Work

Capturing the trends from time series data is a major task in analyzing anomaly detection. Researchers have employed a range of methods to improve the performance of network traffic prediction. These methods encompass statistical, machine learning, and deep learning techniques. Also, time series techniques, such as AR, ARMA, and ARIMA, are often used to predict time series data [7].
Wan et al. [8] proposed a predictive model for attack behaviors by aggregating traffic flows into bags, which are fixed intervals, using the distribution of data within each bag. The Gaussian mixture model (GMM) was used to check the data distribution. They analyzed the Kyoto 2006+ dataset and found that the model effectively predicted the number of security incidents. Werner et al. [6] introduced a novel approach known as CLEAR (concept learning for intrusion event aggregation in real time), which involves grouping intrusion alerts through concept learning and matching incoming alerts with attack behaviors that exhibit similar temporal characteristics. The study employed the concept of inter-arrival times (IATs) to aggregate alerts. By conducting a two-sample KS-Test, the approach can generate aggregated alert groups that are statistically similar to check any significant differences with the current aggregates and determine the status of updating known concepts. Yaacob et al. [9] used a univariate autoregressive integrated moving average (ARIMA) method to detect DoS attacks utilizing the protocol information. Zeng et al. [10] introduced a multivariate time series anomaly detection approach based on an adversarial transformer structure to ensure the quality of the Internet of Things (IoT) services. Abdullah et al. [11] proposed a cyber defense system using generalized autoregressive moving average (GARMA) to predict hourly attack rates. This study emphasized the significance of anticipating potential future attacks as such advanced predictions can provide valuable information to system administrators.
Sokol et al. [12] conducted a time series analysis employing the Box-Jenkins technique. They applied this technique to create autoregression (AR) models for predicting attacks, using network traffic information obtained from honeypots. The study suggested that bootstraps based on AR(p) were appropriate for attack prediction, particularly when p = 1 , indicating that the number of preceding values used to predict the following values was 1. Lee et al. [13] introduced an algorithm for proactive real-time anomaly detection. This algorithm employed long short-term memory (LSTM) to predict network anomalies in incoming data. Using short-term historical data points, the approach identified anomalies and dynamically adjusted the detection threshold over time. As a result, the algorithm could detect anomalies in real time without human intervention, offering early warnings. However, the approach accumulated time series data which used { t 0 , t 1 , , t n 1 } to generate an LSTM model and predict whether the upcoming at t n data point showed an anomaly based on a threshold. The proposed RePAD can detect anomalies to provide early warnings in real time. The LSTM model is continuously generated depending on a dynamically calculated threshold. Viinikka et al. [14] presented a time series model to filter out irrelevant alerts from alert flows using alert aggregates. The primary objective of this study was to remove alerts associated with normal flow behavior. A non-stationary autoregression (NAR) model was generated, and a Kalman fixed-lag smoother algorithm was utilized to estimate the parameters for the NAR. The results of the study demonstrated an enhancement in model accuracy through the implementation of the NAR model.
Fouladi et al. [15] proposed a DDoS attack detection approach using an autoregressive integrated moving average (ARIMA) model. The exponential filter and the dynamic threshold method were utilized to identify the changes in the network. For the study, source/destination IP address features were used. The proposed approach exhibited high accuracy and low false alarms. Nezhad et al. [16] used packet and source IP address data to calculate a feature as a one-minute interval time series, aiming to predict DoS and DDoS attacks. Specifically, the number of packets in every following minute was predicted using ARIMA. Ergan et al. [17] introduced a time series analysis to identify anomalies. The study utilized LSTM-based neural networks to find the optimal length for sequence data. Then, one-class support vector machines (OC-SVMs) or a support vector data description (SVDD) was used to determine the anomaly. Salahuddin et al. [18] introduced a method called Chronos, which utilizes a time-based autoencoder technique for identifying DDoS anomaly traffic. This technique aggregates features extracted from packets across different time windows and subsequently compares their respective performances.
Given that a time series comprises sequential data points obtained at consistent time intervals, network traffic data occurring across successive network events should be represented using time series analysis techniques. Previous studies used different approaches such as aggregation [14,19] or subtraction [20] to present time series data. While the studies have incorporated time series analysis, they predominantly employed univariate data to construct time series-based models through data aggregation. Furthermore, limited studies have examined consecutive sequences of observations like network traffic events. Numerous studies have been conducted to forecast short-term and long-term network traffic changes within data center networks. They used various time intervals of minutes, hours, and days to generate predictive models for better resource utilization scenarios [21,22,23]. However, limited studies have been performed to forecast possible network attacks in the network security community. Since a high volume of network traffic events occurs in seconds and minutes (often caused by DOS or DDOS attacks), finding appropriate time intervals or window sizes to forecast network attacks is considered a research challenge. In our previous work [24], we conducted a study incorporating statistical measurements to represent continuous variables in order to predict attacks by comparing short time scales (1, 5, and 15 s). While the study demonstrated good predictive capabilities for network attacks, such short time scales require high computational complexity because a large volume of data needs to be processed. Increasing time intervals can be an alternative approach to resolving this complexity problem. But, increased time intervals may impact the efficiency of extracted features significantly. Overall, no comparative study has been performed to show optimal time intervals in identifying network attacks due to constant changes in attack types. In electric power cyber-physical systems, researchers considered each type of network attack sequence as invalid attack results if the time interval exceeds 240 s [25]. However, many studies used 60 s to analyze network traffic data [26,27,28] to evaluate high bursts of attack events. Therefore, we utilize 60 s intervals to assess the network traffic data. Alternatively, 120 s intervals are used to determine the performance differences.
Also, most previous studies did not take into account categorical variables in network intrusion detection analysis. Given the significance of incorporating categorical variables in intrusion detection analysis, [29], we introduce an advanced approach to represent multiple sequential timestamped events as time series data by extracting temporal features and analyzing categorical variables. We also assess these temporal features using long short-term memory (LSTM) to predict future attacks and normal events.

3. Methodology

3.1. Dataset

We used a publicly available dataset (called the Kyoto dataset [30]). The dataset was generated by capturing real network traffic data within a honeypot environment. The honeypot comprises multiple computer systems that mimic a real computing environment, designed to deceive cyber attackers into perceiving it as a viable target. The rationale behind creating such an environment is to lure attackers and gain insights into their behaviors, as well as comprehend security vulnerabilities. Therefore, all network events coming to the honeypot environment are considered legitimate attacks. The dataset consists of twenty-four variables, including fourteen variables that are identical to the variables presented in the KDD Cup 99 dataset [31]. The dataset contains three distinctive network event categories: normal activities, known attacks, and unknown attacks. Due to the limited amount of unknown attack instances, ‘known attacks’ is designated as ‘attack’ within the scope of this study. Also, three trigger variables, including IDS_detection trigger, malware_detection trigger, ashula_detection trigger, were excluded. These three variables represent detected triggering alerts by the IDS system or detection software. They are not considered in the study because they possess limited information to predict normal or attack events.

3.2. Methods

Assume that the given original network sequence is comprised of a series of time sequence observations O = { ( T i , X i , Y i ) } , i = 1 , 2 , , N contains network traffic events (N is the total number of events). T represents time, X indicates the variables in the original network traffic sequences with nominal, real numbers, and binary variables, and Y {normal, attack} indicates network events. To identify the underlying patterns of network events over time, the time sequence observation series ( O ) needs to be transformed into time series data with a regular interval. Our approach consists of three steps: (1) generating one-hot encoded variables, (2) constructing time series with a pre-defined time scale t s , and (3) generating forecasting models. A performance evaluation was conducted with different time scales ( t s = 60 and 120 s) to determine the effectiveness of the proposed approach.

3.2.1. Generating One-Hot Encoded Variables

The original network event data contain three categorical variables: service type, flag, and protocol type. The service type indicates network connection types, such as HTTP, telnet, FTP, etc. The flag represents the state of the network connection. There are about thirteen connection states, including S0, S1, SF, REJ, S2, S3, RSTO, RSTR, RSTOS0, RSTRH, SH, SHR, and OTH, and each state indicates a specific network connection state. For more details about the connection states, please refer to ref. [30]. Protocol type denotes network protocols used by each network connection. One-hot encoding [32] is applied to the nominal variables. This process transforms categorical variables into numerical data by replacing each attribute value with a binary representation (1 or 0), which indicates the position of a corresponding attribute value. For example, the protocol type variable contains three attribute values: TCP, UDP, and ICMP. By applying one-hot encoding, three one-hot encoded nominal features are generated. Similarly, the remaining categorical variables are converted to one-hot encoded variables.

3.2.2. Constructing Time Series Data with a Pre-Defined Time Scale t s

Time series data are constructed by mapping a set of network traffic data series in t s to values over time through the extraction of temporal features. First, the original data is segmented with a pre-defined time scale t s . A new time index is created depending on the pre-defined time scale t s over time, t i = ( t s c ) t i 1 , c = 2 , , t N , i = 2 , , t N , t 1 = t s where t N = m t t s , m t is a maximum time. Thus, a new time index is generated as t i = { t 1 , t 2 , , t N } . Within each time index, t i contains a series of tuples { ( X i , Y i ) } forming M × J matrix ( X i R M × J ) and M × D matrix ( Y i R M × D ), where M ( M 1 ) indicates the total number of observations at time t i , J represents the total number of variables, and D ( D 1 ) denotes the size of dependent variables. It is important to note that the size of M may vary because the number of network events occurring over time is different.
For the one-hot encoded dependent variables, the frequency of network events over t i is computed as C ( Y i k ) = Σ 1 n t I Y i ( δ i ) , where δ i indicates if each network event is normal or an attack. The frequency of each one-hot encoded variable over t i is also measured for the nominal variables. For instance, for the variables (source and destination port numbers), the number of used port numbers over t i are counted. For the other variables, a representative value for each M dimensional vector over t i is measured to generate time series data with equal intervals. In this paper, we present a methodology that utilizes wavelet transform (DWT [33]) and permutation entropy (PE [34]) to map values from the original time sequences into time series features. The advantages of employing these techniques (i.e., DWT and PE) include the capability to identify sudden network event changes and to illustrate the trend of network event behaviors over time. DWT is well-suited for analyzing non-stationary data, such as network traffic, in both time and frequency domains. It achieves this by continually decomposing the data into two sub-bands. That is, detail and approximation coefficients are produced by successively passing data through high-pass and low-pass filters until they reach a predefined level. The coefficients represent time and frequency information associated with each decomposition level by the following.
W c = < d ( t ) , ϕ ( τ , γ ) > = d ( t ) ϕ ( τ , γ ) d t
where d ( t ) indicates data, ϕ ( τ , γ ) ( t ) represents a mother wavelet function, and τ and γ denote frequency resolution (i.e., scale) and shift parameters, respectively. Approximation coefficients ( a ( τ , γ ) ) present low-frequency information, while the detailed coefficients ( d ( τ , γ ) ) show the high-frequency characteristics of data. PE is applied to analyze the wavelet coefficients. It is a complexity measurement that integrates symbolic patterns and entropy. Specifically, we used the coefficients, a ( τ , γ ) , d ( τ , γ ) , and a ( τ , γ ) + d ( τ , γ ) to extract features. PE is used to construct subsequences ( s i ) with a pre-defined embedding dimension ( e d ) . Then, each subsequence is mapped into a unique permutation to capture the order as π ( i ) = { 0 , 1 , , e d } . The probability distribution of the permutation is computed as p π ( i ) = δ π ( i ) | s i | , where δ π ( i ) presents the occurrence of the pattern π ( i ) . Lastly, Shannon’s rule [35] is utilized to calculate the permutation entropy as Σ i p π ( i ) × l o g ( p π ( i ) ) .
In addition, statistical feature ( P ) is extracted as χ ( w o i , o i ) , where χ ( · ) indicates the ANOVA test, w o i represents the detailed coefficients of o i , and o i denotes the ith vector of the original sequences O at t i . This feature represents a p-value, indicating if there is any statistical difference between the original sequences and the wavelet coefficients. We also compute an additional feature using the first moment ( E ) as 1 | o i | o i in t i . Algorithm 1 presents a pseudo-code that converts network traffic series to a targeted time scale ( t s ).
Algorithm 1: Conversion of network traffic data to time series format with a pre-defined time scale t s
Applsci 13 10411 i001

3.3. Generating Forecasting Models

Long short-term memory (LSTM) is used to predict two future outputs (i.e., network normal and attack events). LSTM is a type of recurrent neural network (RNN) architecture that is frequently used in time-series analysis [36]. It addresses the vanishing gradient problem in RNN by providing longer-lived short-term memory to preserve information across timesteps [37]. It includes four components: a memory cell, an input gate, an output gate, and a forget gate. The memory cell serves as an information store, while the gates regulate the flow of that information [38]. We used a traditional LSTM model with four components to forecast network normal and attack events (see Figure 1). It has three layers to extract temporal features from the data. The model was built with two hidden layers, dense and dropout layers, and used the rectified linear unit (ReLU) activation function to forecast network attacks. The mean squared error (MSE) is used for loss function in model training and validation. Adaptive moment estimation (ADAM) is also used as a model optimizer to compute adaptive learning rates. The root mean square error (RMSE) is computed to evaluate forecasting performances.

4. Results

For the data analysis with wavelet transform, we used the decomposition level of three with the ‘db3’ wavelet function. Different time scales ( t s = 60 and 120 s) and embedding dimensions ( e d = 3 and 4) were taken into account to assess and compare performance differences. Based on the analysis, we also present the results from the forecasting models to predict future network events (i.e., normal and attack events). Rather than employing a one-step forecasting method that predicts a single value based on the past, a multi-step forecasting method is utilized to predict sequences of values.
Figure 2 shows visual representations of variables associated with ‘attack’ and ‘normal’ network events on the first day of January 2015. Figure 2a,c present the total number of connections, destination port, and duration using the original network traffic data. The total number of connections represents the number of network connections made in the past two seconds with the same source and destination IP addresses. These variables are used to identify suspicious activities by detecting a significant volume of continuous network connections directed toward the same computer machines. The most commonly used port numbers in cyberattacks are 22—SSH (secure shell), 80—HTTP (hypertext transfer protocol), and 443—HTTPS (hypertext transfer protocol secure). However, by evaluating the destination port information, we found that attackers tried to use various ports to penetrate server machines in a honeypot environment (see Figure 2b). From the analysis of the duration information, we determined that the time duration for the attack events varies. There were distinguishable patterns when comparing the difference between normal and attack events. However, further analysis needs to be performed to establish a clear distinction between them.
Figure 2d,f represent the converted time series data with different time scales with the t s = 1 s, t s = 60 s, and t s = 120 s. We found that the original network sequences data does not provide much information associated with normal and attack events, while the converted time series data clearly shows a difference between the normal and attack events. In addition, we discovered that the time scale with t s = 1 s—compared with the rest of the time scales—does not clearly separate between normal and attack events. Therefore, we excluded the t s = 1 s, and used t s = 60 s and t s = 120 s to analyze network traffic time series.
Figure 3 displays data distributions using box plots for the data from January 2015. Due to skewed distributions in the data, logarithmic scales are applied to all figures. Figure 3a,b show box plots of the variables (i.e., source and destination bytes) associated with normal and attack events using the original data. We found that the attack events exhibited significantly higher quartiles in the destination bytes compared to normal events. But, there were only slight variations in the source bytes between normal and attack events. We also observed that the source and destination bytes in the attack events showed multiple outliers (located outside the whiskers of the box plot). As a non-parametric test, the Mann–Whitney U test is used to compare the distribution of the variables between two groups. Comparisons between the normal and attack events for the variables (source and destination bytes) were assessed using the Mann–Whitney U test. From the test, we found significant differences ( p = 0.0004 ) in the distributions of the source byte variable between the normal and attack events. The destination byte variable was also determined as significant ( p < 0.0001 ) between the normal and attack events. Figure 3c,d present box plots of the total number of normal and attack events in the converted time series data with different time scales ( t s = 60 and 120 s), respectively.
When analyzing time series data, satisfying the stationarity property of data is essential because it influences the overall forecasting performances [39]. The augmented Dickey–Fuller (ADF) test is commonly used to check the stationarity of data. We performed the ADF test to validate if the converted time series data met the stationary assumption. The null hypothesis for the test was that the time series data were non-stationary. The test results demonstrated statistical significance ( p < 0.05 ) to reject the hypothesis, indicating that the converted time series data satisfied the stationary assumption.
In time series analysis, it is important to determine the effectiveness of a particular time series in forecasting another one. The Granger causality test [40,41] is commonly utilized to validate the effectiveness of time series. Thus, we performed the Granger causality test on the converted time series data, considering both time scales ( t s = 60 and 120 s) and the two embedding dimensions ( e d = 3 and 4). This test was carried out to assess the suitability of variables to forecast a dependent variable. We tested the extracted temporal features in forecasting network events with a 95 % significance. We found high similarity even with different dimensions (either e d = 3 or 4). We found that 67.6 % and 69 % of the temporal features showed their significance with t s = 60 s and 42.3 % and 61.9 % with t s = 120 s in forecasting normal and attack events, respectively. In addition, both 53.5 % and 26.8 % of features were determined as significant in predicting both normal and attack events with t s = 60 s and t s = 120 s. We also observed that all wavelet transform and permutation entropy features ( W ) demonstrated significance in predicting the attack events with t s = 60 s and t s = 120 s. The summary of the Granger causality test result to forecast normal and attack events is included in Table A1 in Appendix A.
The P features from the variables (i.e., source bytes and Dst_host_srv serror_rate) were significant to determine attack events with t s = 60 s and t s = 120 s. The source byte variable indicates the number of network event bytes transferred from source to destination in a single connection. The Dst_host_srv serror_rate indicates the percentage of the flag connections (i.e., s0, s1, s2, or s3) that have activated among the connections. Only the P features from multiple variables (duration, count, same_srv_rate, srv_serror_rate, srv_ serror_rate, dst_host_count, dst_host_same_src_port_rate, dst_host_serror_rate) were determined as significant in predicting attack events with t s = 60 s and t s = 120 s. Also, the N features from the variables (source port, destination port, TCP, and RSTOS0) were determined as significant in predicting attack events for both t s = 60 and 120 s. As one of the attribute values in the flag variable, the RSTOS0 indicates the originator sends a synchronization signal (SYN) followed by a reset signal, but, an acknowledgment (ACK) of the SYN does not appear. The TCP feature is one of the attribute values in the protocol type variable. Interestingly, more nominal features were identified as significant for the t s = 120 s ( 43.5 % ) to predict attack events. The nominal features from the flag variable, such as REJ, RSTO, and S0, were not determined as significant features for the t s = 60 s. REJ indicates a rejected connection attempt, and S0 represents a connection attempt that has appeared but no reply. This finding suggests that nominal features might be better presented for a larger time scale. However, further analysis is required to determine an optimal time scale. We intend to address this aspect as part of our future work since finding the optional time scale is not the primary focus of this study.
Figure 4 shows the extracted nominal features (i.e., protocol types and service types) based on our proposed approach with the targeted time scales ( t s = 60 and 120 s). Multiple charts are generated to understand the differences between daily and monthly network events. By analyzing the variable (protocol types), we found that TCP and UDP have been commonly utilized in network communications. ICMP was also widely used in normal and attack events. This is an interesting result because ICMP is a network layer protocol for diagnosing internal network communication issues. Specifically, since the Kyoto dataset was generated in a honeypot system consisting of multiple server nodes, each node communicates continuously to check its stability using ICMP. We also observed that ICMP was used in attack events as well. However, as stated earlier, ICMP was identified as significant in predicting normal events only. Among various service types, SSH was determined as a highly applied service type in network communication. SSH supports accessing systems remotely. While SSH supports highly secure network communication, it is frequently regarded as highly susceptible, especially when not properly administered and monitored. We found numerous brute-force attacks to gain access to systems (see Figure 4d).
To analyze the daily network traffic data, we used twenty-three hours of data to generate an LSTM model. Then, the model was used to predict the normal and attack events in the upcoming hour. For the LSTM model, the epoch and batch size numbers were set to 100 and 200, respectively. The model was generated with the learning rate (0.001) using the ‘ReLU’ activation function and Adam optimizer. For the loss function, MSE was evaluated. Table 1 shows forecasting performances with the targeted time scales t s = 60 and 120 s in two different embedding dimensions. We found that forecasting with t s = 60 s targeted time scale performed better than using t s = 120 s to predict normal and attack events. Interestingly, we observed relatively high RMSE and MAE scores for the t s = 120 s to forecast normal events using the March and April data. When evaluating the performances of the normal events with t s = 60 s, we observed that the embedding dimension ( e d = 4 ) showed smaller RMSE values except for the months of January, March, November, and December. Furthermore, except for the months of January, March, and September, RMSE showed better performance in the attack events using the embedding dimension ( e d = 4 ). Evaluating the performances of the normal events with t s = 120 s, we found that the embedding dimension ( e d = 3 ) showed smaller RMSE values except for the months of April and July. Similarly, except for the months of March, April, June, July, and November, better performance in predicting attack events was observed using the embedding dimension ( e d = 3 ).
Figure 5 presents visual representations of predicted network events with the time scale t s = 60 s by applying principal component analysis (PCA). PCA is a popular dimension reduction technique in visualization to represent high-dimensional data in a lower-dimensional space. The first and second principal components are determined and used to map all data instances into the x- and y-axis of the 2D space. To better represent the forecasted network events, the Fisher-Jenks algorithm (often called Jenks’ natural breaks classification method) is applied to form clusters. It determines the best arrangement of values into different classes. A classification process was performed to categorize different normal and attack events into three distinct groups. Figure 5 shows grouped representations of the events with distinctive colors using ‘red,’ ‘blue,’ and ‘green.’ The colors represent clusters G 1 , G 2 , and G 3 , respectively. Figure 5a,b present the clusters analyzed on 1 January 2015 (one-day data). The clusters were split into three classification groups for the normal events ( G 1 : 0 44 , G 2 : 44 244 , G 3 : 244 max ) and the attack events ( G 1 : 43 233 , G 2 : 233 583 , G 3 : 583 max ). When classification was performed with the normal events, we observed distinctively separated clusters (see G 1 : red and G 2 : blue). However, the cluster ( G 3 : green) was not clearly visible. Interestingly, we identified that the cluster ( G 3 : green) became distinct when analyzing the attack events (see blue-colored glyphs, Figure 5b).
For the one-month data in January 2015, the three groups were determined with the split ranges for for the normal events ( G 1 : 0 111 , G 2 : 111 517 , G 3 : 517 max ) and the attack events ( G 1 : 0 518 , G 2 : 518 6967 , G 3 : 6967 max ). With the Fisher-Jenks algorithm, we found that most network events fall into the lower classification group (i.e., G 1 ). Figure 5c,d show high-density regions (red-colored) representing G 1 . The blue-colored classification group ( G 2 ) does not form separated clusters. From the analysis of data from January 2015, we found that it was not easy to see the classification group ( G 3 ) in the PCA projections because not many network events are categorized into G 3 . Presenting the data on a PCA projection space aids in understanding the similarities and differences among network events. But, we could not identify clear patterns due to high similarities among a large number of network events. Consequently, parallel coordinate visualization is applied to provide a more detailed depiction of the data.
Figure 6 shows parallel coordinates of the network events. Parallel coordinates is a visualization technique that plots individual network events as polylines in vertically arranged axes. Based on the classification group information, three separated parallel coordinates are created and arranged as the top ( G 1 ), center ( G 2 ), and bottom ( G 3 ). We found high similarities between each group using the one-day data (1 January). However, when analyzing the entire January (monthly) data, we found clear differences among the groups because of the variables arranged at the end of parallel coordinates (see the black bounding box in Figure 6c,d. The variables in the bounding box represent converted nominal variables. These results suggest that nominal variables could potentially play an important role in distinguishing group patterns. However, a more comprehensive analysis is needed to understand the impact of nominal variables in distinguishing between normal and abnormal network patterns, especially across various intrusion detection datasets.

5. Discussion

In this study, we found that the extracted temporal features held significance in predicting network events. As demonstrated in the previous section, we found performance differences depending on the embedding dimensions ( e d = 3 and 4) to forecast normal and attack events. To understand the effectiveness of embedding dimensions further, we measured the statistical significance of all temporal features. 67.1 % ( t s = 60 ) and 58.6 % ( t s = 120 ) of the features were identified as significant features to forecast attack events with e d = 3 . With e d = 4 , we found similar results, as 68.6 % ( t s = 60 ) and 62.9 % ( t s = 120 ) of the features were determined significant. These results suggest that there is no significant difference between the embedding dimensions in predicting attack events. However, we found fewer significant features for predicting normal events. Specifically, 38.6 % ( t s = 60 ) and 37.1 % ( t s = 120 ) of the features were significant to forecast normal events with e d = 3 . On the other hand, 65.7 % ( t s = 60 ) and 38.6 % ( t s = 120 ) of the features were determined significant when using e d = 4 . While there was no clear difference between the dimensions in terms of the number of significant features for predicting normal events, the dimension e d = 4 provided a higher number of significant features when predicting normal events.
From the analysis of forecasting performances, we found about 25 % of the statistical features ( P ) were significant for the time scale ( t s = 60 s) in forecasting both normal and attack events. However, none of the P features were identified as significant for the t s = 120 s. We also found statistical significance in forecasting normal and attack events using the first moment features ( E ). More specifically, 91.7 % of the features were significant in predicting network normal and attack events at t s = 60 s. When using the time scale ( t s = 120 s), we found 75 % and 66.7 % of the features were determined as significant in predicting normal events, respectively. However, for predicting attack events, we found that fewer features ( 66.7 % ) were significant at predicting attack events. These results highlight the importance of utilizing the E features, as more than 50 % of them were statistically significant for predicting both normal and attack events.
In network analysis, many previous studies have overlooked the nominal features. This study highlights the importance of using the nominal features ( N ) to predict normal and attack events. When analyzing the N features, we found that 56.5 % and 52.2 % of the features were significant in predicting normal events using the time scale t s = 60 and 120, respectively. However, when predicting the attack events, we found that much fewer features were significant in predicting attack events: 39.3 % ( t s = 60 ) and 30.4 % ( t s = 120 ) . These results suggest that the N features are effective in predicting normal events (about 50 % significance). But, the effectiveness of the N features in predicting attack events remains inconclusive, as less than 50 % of the features showed significance.
By analyzing the nominal features (protocol types ‘TCP,’ ‘UDP,’ and ‘ICMP’), we found ‘TCP’ and ‘UDP’ were statistically significant in predicting network events in different time scales ( t s = 60 and 120). But, for the ‘Flag’ variable representing network connection statuses (‘S0,’ ‘S1,’ ‘SF,’ ‘REJ,’ ‘S2,’ ‘S3,’ ‘RSTO,’ ‘RSTR,’ ‘RSTRH,’ ‘SH,’ ‘SHR,’ etc. [30]), we observed that not all features were found to be significant. In detail, the features (‘RSTR,’ ‘RSTRH,’ and ‘SH’) were determined as non-significant features to predict normal and attack events. The ‘RSTR’ variable represents a network connection that has been established but is aborted by the destination-side machine before completion. The ‘RSTRH’ variable indicates that the destination machine sends a ‘synchronize acknowledge message’ (i.e., SYN-ACK) and subsequently issues a RST (connection established) signal to abort the connection (forceful termination). SH denotes that a connection establishment message (i.e., SYN) has been sent and terminated without receiving the SYN-ACK message. Since the features (‘RSTR,’ ‘RSTRH,’ and ‘SH’) represent instances of incomplete network connection establishment, they were determined as non-significant variables when it came to predicting network events. In addition, the ANOVA features extracted from the duration variable were not significant.
We found that the wavelet features ( W ) from DWT and PE were significant in forecasting normal and attack events. Most importantly, all wavelet features were significant in predicting attack events even with different embedding dimensions ( e d = 3 and 4) and time scales ( t s = 60 and 120). To predict normal events, we found that 91.7 % of the features were significant with the time scale ( t s = 60 ). But, with the time scale ( t s = 120 ), we found about 25 % of the features were significant. This may be due to the fact that data aggregation with a relatively large time scale might degrade the sudden changes. In such a case, using smaller time scales can be more effective in analyzing normal events.
As explained in Section 4, we conducted a comprehensive examination of all features using the Granger causality test to ascertain their statistical importance in predicting normal and attack events. Among the nominal variables, we found that the one-hot encoded variable (‘REJ’) was statistically significant in forecasting future events. Given that the ‘REJ’ variable represents the denial of a network connection request, it can prove valuable in predicting instances of rejected connection establishments, particularly in the context of attack events. ‘TCP’ and ‘UDP’ variables were determined as significant in predicting 70 % and 69.6 % of other features with t s = 60 s and t s = 120 s, respectively. We also found that the one-hot encoded variable ‘SF’ (indicating normal network connection establishment and termination) was significant in predicting 69 % of the temporal variables. Interestingly, the one-hot encoded variable (‘ICMP’) was identified as non-significant when examining one-day and monthly data. The variables ‘S0’ (indicating a connection attempt was seen, but no reply) and ‘SF’ (referring to normal establishment and termination) were determined as significant in predicting both normal and attack events with January data (one month). But, the ‘S0’ variable was not significant when analyzing the January 1 data (one day) with the Granger casualty test. The variables (source and destination port numbers) were significant in predicting network events even with different time scales. When performing the Granger casualty test, only a limited number of nominal features were recognized as significant. However, by analyzing the January data, we observed a substantial count of nominal features being designated as significant. This might be due to the necessity of substantial data volumes for accurately estimating trends in network events concerning nominal features.
We also performed the Mann–Whitney U test to compare the temporal features between t s = 60 s and t s = 120 s. We found that the temporal features using WT and PE showed statistical significance ( p < 0.05 ). However, for the temporal features with one-hot encoded nominal variables, we could not find any statistical significance. By analyzing the January data using the Granger causality test, we found that 88.8 % of the P and E features were significant for normal and attack events with the time scale ( t s = 60 ). With the time scale ( t s = 120 s), 50 % of the P features and 88.8 % of the E features were significant for normal and attack events. We also found that all W features were identified as significant for t s = 60 s and t s = 120 predicting normal and attack events. Overall, the time scale ( t s = 60 s) yielded better in evaluating the features and forecasting normal and attack events. By analyzing the N features, we found that ‘S2 ( p = 0.0029 ),’ ‘ICMP ( p = 0.0026 ),’ and ‘SNMP ( p = 0.0005 )’ were significant in predicting normal events. We observed that the variables (i.e., source and destination bytes) showed different results. In detail, the P and W features from the variables were significant in predicting network events. However, the A features from the variables were not significant.
We conducted an assessment of the temporal features using LSTM. Additionally, we compared two different embedding dimensions to determine an optimal dimension for analyzing the network data. While the optimal embedding dimension could not be determined clearly, the evaluation results showed different patterns depending on time scales and embedding dimensions. Specifically, with the time scale ( t s = 60 s) and the embedding dimension ( e d = 4 ), we found better forecasting performances to predict normal events in eight out of twelve months ( 66.7 % ) and attack events in nine out of twelve months ( 75 % ). However, when using the time scale ( t s = 120 s), we found that the embedding dimension ( e d = 3 ) presented better forecasting performances for normal events ( 88.3 % —ten months out of twelve) and attack events ( 58.3 % —seven months out of twelve). These findings suggest a potential avenue for future research to explore the relationship between time scales and embedding dimensions.

6. Conclusions and Future Work

A multivariate time series is a collection of sequences from multiple contemporaneous variables that change over time. Given the abundant information available in various application domains concerning time series data, there has been a growing interest in predicting multivariate time series. This paper presents a new approach for constructing network traffic time series at a pre-defined targeted time scale. This approach involves extracting temporal features by utilizing WT, PE, and statistical measurements to forecast normal and attack events. We also explored various techniques to extract temporal features from categorical variables by measuring the frequency of variables and creating one-hot encoded variables. The effectiveness of the proposed network activity analysis was demonstrated by comparing the performance of time series data with two targeted time scales in predicting future network event frequency using LSTM. Additionally, we employed multiple visualization techniques to analyze the time series network events, highlighting the distinctions between normal and attack events in the honeypot dataset. In future work, we plan to test different embedding dimensions to find the optimal dimension and analyze their differences across different time scales. We also plan to compare the results with different forecasting techniques, such as autoregression, vector autoregressive, and moving averages. Recently, Transformers [42] have received great attention in the time-series data analysis because they showed considerable prediction accuracy improvements over traditional methods by capturing long-range dependencies and interactions. Thus, we are going to extend our study by conducting a comparative analysis of our proposed approach with Transformers.

Author Contributions

Conceptualization, S.-Y.J. and D.H.J.; methodology, S.-Y.J., B.K.J. and D.H.J.; software, S.-Y.J. and D.H.J.; validation, S.-Y.J., D.H.J. and B.K.J.; formal analysis, S.-Y.J., D.H.J. and B.K.J.; investigation, writing—original draft preparation, S.-Y.J. and D.H.J.; writing—review and editing, S.-Y.J., B.K.J. and D.H.J.; visualization; funding acquisition, S.-Y.J. All authors have read and agreed to the published version of the manuscript.

Funding

Research was sponsored by the Army Research Office and was accomplished under Grant Number W911NF-23-1-0217. The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of the Army Research Office or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for Government purposes notwithstanding any copyright notation herein.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The Kyoto dataset is available on the website at https://www.takakura.com/Kyoto_data/ (accessed on 10 September 2023). The complete analysis data and source codes will become available upon request by email.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A. Granger Causality Test

As described in Section 4, the Granger causality test [41] was performed on the converted time series data, considering the time scales ( t s = 60 and 120 s). The Granger causality test determines whether one time series is good for forecasting another. Table A1 shows the Granger causality test result to forecast normal and attack events. We found that about 90 % of the temporal features showed their significance to forecast network events when analyzing the monthly data (i.e., January 2015 dataset).
Table A1. Evaluating the predictability of all measured variables with the Granger causality test on the data on 1 January 2015 and the entire January 2015. The variables are analyzed with the time scales ( t s = 60 and 60 s). P , W , E , and N indicate statistical features, wavelet features, first-moment features, and nominal features, respectively. The gradient color is used to show the scale of the p-values. Statistically significant ( p < 0.05 ) features are highlighted in a solid red color.
Table A1. Evaluating the predictability of all measured variables with the Granger causality test on the data on 1 January 2015 and the entire January 2015. The variables are analyzed with the time scales ( t s = 60 and 60 s). P , W , E , and N indicate statistical features, wavelet features, first-moment features, and nominal features, respectively. The gradient color is used to show the scale of the p-values. Statistically significant ( p < 0.05 ) features are highlighted in a solid red color.
EventsNormalAttack
Data 1 January 2015 January 2015 1 January 2015 January 2015
Features Time ( t s = 60 s) Time ( t s = 120 s) Time ( t s = 60 s) Time ( t s ) Time ( t s = 60s) Time ( t s = 120 s) Time ( t s = 60 s) Time ( t s = 120 s)
P 0.280.010.000.010.150.130.000.00
0.010.230.000.000.000.010.000.00
0.000.250.000.000.000.290.000.00
0.680.010.000.000.720.130.000.01
0.330.090.000.000.040.250.000.00
0.230.290.000.000.010.120.000.59
0.180.070.050.130.030.080.000.18
0.070.280.490.300.290.150.000.23
0.060.640.000.020.120.190.000.03
0.010.340.000.000.000.130.000.00
0.090.250.020.390.050.100.000.24
0.200.530.690.190.010.020.000.22
E 0.000.020.000.000.000.000.000.00
0.000.900.000.000.000.650.390.24
0.800.630.420.310.620.660.790.76
0.000.020.000.000.000.000.000.00
0.000.000.000.000.000.000.000.00
0.000.020.000.000.000.310.000.00
0.000.010.000.000.000.000.000.00
0.000.030.000.000.000.000.000.00
0.000.100.000.000.000.000.000.00
0.000.100.000.000.000.110.000.00
0.000.030.000.000.000.040.000.00
0.000.020.000.000.000.000.000.00
W 0.000.230.000.000.000.000.000.00
0.000.100.000.000.000.000.000.00
0.000.030.000.000.000.000.000.00
0.000.200.000.000.000.000.000.00
0.000.340.000.000.000.000.000.00
0.570.010.000.000.030.010.000.00
0.000.470.000.000.000.010.000.00
0.000.240.000.000.000.000.000.00
0.000.090.000.000.000.000.000.00
0.000.050.000.000.000.040.000.00
0.000.280.000.000.000.020.000.00
0.000.180.000.000.000.000.000.00
0.000.210.000.000.000.000.000.00
0.000.040.000.000.000.000.000.00
0.000.010.000.000.000.000.000.00
0.000.190.000.000.000.000.000.00
0.000.380.000.000.000.000.000.00
0.430.000.000.000.020.000.000.00
0.000.360.000.000.000.000.000.00
0.000.240.000.000.000.000.000.00
0.000.140.000.000.000.000.000.00
0.000.080.000.000.000.030.000.00
0.350.310.000.000.000.000.000.00
0.120.290.000.000.000.000.000.00
0.000.090.000.000.000.000.000.00
0.000.000.390.370.060.030.000.20
0.500.020.010.720.360.820.000.57
0.000.210.000.000.000.000.000.00
0.000.090.000.000.000.000.030.00
0.080.590.000.050.010.070.000.08
0.580.030.000.000.000.010.000.00
0.000.090.000.000.000.000.000.00
0.000.120.000.000.000.000.900.00
0.500.260.420.490.100.470.000.55
0.000.250.000.000.000.000.000.00
0.000.160.000.000.000.000.000.00
N 0.000.030.030.000.000.050.000.00
0.100.390.000.220.130.040.000.00
0.000.710.010.010.000.920.000.26
0.640.420.580.430.670.260.050.00
0.100.000.000.000.230.420.010.00
0.000.040.760.490.100.000.000.38
0.280.750.000.000.320.000.390.07
0.000.800.000.000.460.060.080.00
0.030.200.000.010.420.320.000.15
0.010.020.000.000.200.840.110.00
0.050.020.000.000.270.010.000.00
0.470.060.000.000.000.430.000.00
0.140.420.000.000.580.890.000.06
0.200.190.000.010.050.570.000.21
0.200.120.000.000.640.280.040.00
0.000.810.020.000.070.000.000.07
0.450.020.000.010.240.560.000.68
0.000.010.000.000.590.010.680.00
0.290.000.010.010.570.020.000.00
0.000.000.000.000.040.430.000.00
0.000.010.000.000.000.490.000.00
0.000.000.000.000.000.000.000.00
0.000.050.000.000.370.940.000.80

References

  1. Zhao, C.; Hu, P.; Liu, X.; Lan, X.; Zhang, H. Stock market analysis using time series relational models for stock price prediction. Mathematics 2023, 11, 1130. [Google Scholar] [CrossRef]
  2. Liu, Z.; Zhu, Z.; Gao, J.; Xu, C. Forecast Methods for Time Series Data: A Survey. IEEE Access 2021, 9, 91896–91912. [Google Scholar] [CrossRef]
  3. Vijay, R.K.; Nanda, S.J. Earthquake pattern analysis using subsequence time series clustering. Pattern Anal. Appl. 2023, 26, 19–37. [Google Scholar] [CrossRef]
  4. Ruma, J.F.; Adnan, M.S.G.; Dewan, A.; Rahman, R.M. Particle swarm optimization based LSTM networks for water level forecasting: A case study on Bangladesh river network. Results Eng. 2023, 17, 100951. [Google Scholar] [CrossRef]
  5. Yokoyama, S.; Kagawa, F.; Takamura, M.; Takagaki, K.; Kambara, K.; Mitsuyama, Y.; Shimizu, A.; Okada, G.; Okamoto, Y. Day-to-day regularity and diurnal switching of physical activity reduce depression-related behaviors: A time-series analysis of wearable device data. BMC Public Health 2023, 23, 1–9. [Google Scholar] [CrossRef]
  6. Werner, G.; Yang, S.J.; McConky, K. Near real-time intrusion alert aggregation using concept-based learning. In Proceedings of the 18th ACM International Conference on Computing Frontiers, Virtual, 11–13 May 2021; pp. 152–160. [Google Scholar]
  7. Montgomery, D.C.; Jennings, C.L.; Kulahci, M. Introduction to Time Series Analysis and Forecasting; John Wiley & Sons: Hoboken, NJ, USA, 2015. [Google Scholar]
  8. Wan, W.; Wang, Y.; Long, C.; Wei, J.; Zhao, J.; Du, G. An attack behaviors prediction model based on bag representation in time series. In Proceedings of the 2019 IEEE 44th Conference on Local Computer Networks (LCN) IEEE, Osnabrueck, Germany, 14–17 October 2019; pp. 113–116. [Google Scholar]
  9. Yaacob, A.H.; Tan, I.K.; Chien, S.F.; Tan, H.K. Arima based network anomaly detection. In Proceedings of the 2010 Second International Conference on Communication Software and Networks IEEE, Singapore, 26–28 February 2010; pp. 205–209. [Google Scholar]
  10. Zeng, F.; Chen, M.; Qian, C.; Wang, Y.; Zhou, Y.; Tang, W. Multivariate time series anomaly detection with adversarial transformer architecture in the Internet of Things. Future Gener. Comput. Syst. 2023, 144, 244–255. [Google Scholar] [CrossRef]
  11. Abdullah, A.; Pillai, T.R.; Cai, L.Z. Intrusion detection forecasting using time series for improving cyber defence. Int. J. Intell. Syst. Appl. Eng. 2015, 3, 28–33. [Google Scholar] [CrossRef]
  12. Sokol, P.; Gajdo, A. Prediction of Attacks Against Honeynet Based on Time Series Modeling. In Proceedings of the Computational Methods in Systems and Software, Szczecin, Poland, 12–14 September 2017; pp. 360–371. [Google Scholar]
  13. Lee, M.C.; Lin, J.C.; Gran, E.G. RePAD: Real-time Proactive Anomaly Detection for Time Series. arXiv 2020, arXiv:2001.08922. [Google Scholar]
  14. Viinikka, J.; Debar, H.; Mé, L.; Lehikoinen, A.; Tarvainen, M. Processing intrusion detection alert aggregates with time series modeling. Inf. Fusion 2009, 10, 312–324. [Google Scholar] [CrossRef]
  15. Fouladi, R.F.; Ermiş, O.; Anarim, E. A DDoS attack detection and defense scheme using time-series analysis for SDN. J. Inf. Secur. Appl. 2020, 54, 102587. [Google Scholar] [CrossRef]
  16. Nezhad, S.M.T.; Nazari, M.; Gharavol, E.A. A novel DoS and DDoS attacks detection algorithm using ARIMA time series model and chaotic system in computer networks. IEEE Commun. Lett. 2016, 20, 700–703. [Google Scholar] [CrossRef]
  17. Ergen, T.; Kozat, S.S. Unsupervised anomaly detection with LSTM neural networks. IEEE Trans. Neural Netw. Learn. Syst. 2019, 31, 3127–3141. [Google Scholar] [CrossRef] [PubMed]
  18. Salahuddin, M.A.; Pourahmadi, V.; Alameddine, H.A.; Bari, M.F.; Boutaba, R. Chronos: Ddos attack detection using time-based autoencoder. IEEE Trans. Netw. Serv. Manag. 2021, 19, 627–641. [Google Scholar] [CrossRef]
  19. Cortez, P.; Rio, M.; Rocha, M.; Sousa, P. Multi-scale Internet traffic forecasting using neural networks and time series methods. Expert Syst. 2012, 29, 143–155. [Google Scholar] [CrossRef]
  20. Tian, Z. Chaotic characteristic analysis of network traffic time series at different time scales. Chaos Solitons Fractals 2020, 130, 109412. [Google Scholar] [CrossRef]
  21. Mozo, A.; Ordozgoiti, B.; Gómez-Canaval, S. Forecasting short-term data center network traffic load with convolutional neural networks. PLoS ONE 2018, 13, 1–35. [Google Scholar] [CrossRef] [PubMed]
  22. Yoas, D.W. Using Forecasting to Predict Long-term Resource Utilization for Web Services. Ph.D. Thesis, Nova Southeastern University, Fort Lauderdale, FL, USA, 2013. [Google Scholar]
  23. Ferreira, G.O.; Ravazzi, C.; Dabbene, F.; Calafiore, G.C.; Fiore, M. Forecasting Network Traffic: A Survey and Tutorial With Open-Source Comparative Evaluation. IEEE Access 2023, 11, 6018–6044. [Google Scholar] [CrossRef]
  24. Ji, S.Y.; Jeong, B.K.; Kamhoua, C.; Leslie, N.; Jeong, D.H. Forecasting network events to estimate attack risk: Integration of wavelet transform and vector auto regression with exogenous variables. J. Netw. Comput. Appl. 2022, 203, 103392. [Google Scholar] [CrossRef]
  25. Wang, L.; Qu, Z.; Li, Y.; Hu, K.; Sun, J.; Xue, K.; Cui, M. Method for Extracting Patterns of Coordinated Network Attacks on Electric Power CPS Based on Temporal–Topological Correlation. IEEE Access 2020, 8, 57260–57272. [Google Scholar] [CrossRef]
  26. van Heerden, R.; Malan, M.M.; Mouton, F.; Irwin, B. Human Perception of the Measurement of a Network Attack Taxonomy in Near Real-Time; Kimppa, K., Whitehouse, D., Kuusela, T., Phahlamohlaka, J., Eds.; Springer: Berlin/Heidelberg, Germany, 2014; pp. 280–292. [Google Scholar]
  27. Wang, A.; Chang, W.; Chen, S.; Mohaisen, A. Delving Into Internet DDoS Attacks by Botnets: Characterization and Analysis. IEEE/ACM Trans. Netw. 2018, 26, 2843–2855. [Google Scholar] [CrossRef]
  28. Wawrowski, Ł.; Michalak, M.; Białas, A.; Kurianowicz, R.; Sikora, M.; Uchroński, M.; Kajzer, A. Detecting anomalies and attacks in network traffic monitoring with classification methods and XAI-based explainability. Procedia Comput. Sci. 2021, 192, 2259–2268. [Google Scholar] [CrossRef]
  29. Taha, A.; Hadi, A.S. Anomaly Detection Methods for Categorical Data: A Review. ACM Comput. Surv. 2019, 52. [Google Scholar] [CrossRef]
  30. Song, J.; Takakura, H.; Okabe, Y.; Eto, M.; Inoue, D.; Nakao, K. Statistical analysis of honeypot data and building of Kyoto 2006+ dataset for NIDS evaluation. In Proceedings of the First Workshop on Building Analysis Datasets and Gathering Experience Returns for Security, Salzburg, Austria, 10 April 2011; pp. 29–36. [Google Scholar]
  31. Tavallaee, M.; Bagheri, E.; Lu, W.; Ghorbani, A.A. A detailed analysis of the KDD CUP 99 data set. In Proceedings of the 2009 IEEE Symposium on Computational Intelligence for Security and Defense Applications, Ottawa, ON, Canada, 8–10 July 2009; pp. 1–6. [Google Scholar] [CrossRef]
  32. Cerda, P.; Varoquaux, G.; Kégl, B. Similarity encoding for learning with dirty categorical variables. Mach. Learn. 2018, 107, 1477–1494. [Google Scholar] [CrossRef]
  33. Daubechies, I. Ten Lectures on Wavelets; SIAM: Philadelphia, PA, USA, 1992. [Google Scholar]
  34. Bandt, C.; Pompe, B. Permutation entropy: A natural complexity measure for time series. Phys. Rev. Lett. 2002, 88, 174102. [Google Scholar] [CrossRef] [PubMed]
  35. Lin, J. Divergence measures based on the Shannon entropy. IEEE Trans. Inf. Theory 1991, 37, 145–151. [Google Scholar] [CrossRef]
  36. Zhou, H.; Zhang, Y.; Yang, L.; Liu, Q.; Yan, K.; Du, Y. Short-term photovoltaic power forecasting based on long short term memory neural network and attention mechanism. IEEE Access 2019, 7, 78063–78074. [Google Scholar] [CrossRef]
  37. DiPietro, R.; Hager, G.D. Deep learning: RNNs and LSTM. In Handbook of Medical Image Computing and Computer Assisted Intervention; Elsevier: London, UK, 2020; pp. 503–519. [Google Scholar]
  38. Fu, R.; Zhang, Z.; Li, L. Using LSTM and GRU neural network methods for traffic flow prediction. In Proceedings of the 2016 31st Youth Academic Annual Conference of Chinese Association of Automation (YAC). IEEE, Wuhan, China, 11–13 November 2016; pp. 324–328. [Google Scholar]
  39. Livieris, I.E.; Stavroyiannis, S.; Pintelas, E.; Pintelas, P. A novel validation framework to enhance deep learning models in time-series forecasting. Neural Comput. Appl. 2020, 32, 17149–17167. [Google Scholar] [CrossRef]
  40. Granger, C.W. Investigating causal relations by econometric models and cross-spectral methods. Econom. J. Econom. Soc. 1969, 37, 424–438. [Google Scholar] [CrossRef]
  41. Shojaie, A.; Fox, E.B. Granger Causality: A Review and Recent Advances. Annu. Rev. Stat. Appl. 2022, 9, 289–319. [Google Scholar] [CrossRef]
  42. Wen, Q.; Zhou, T.; Zhang, C.; Chen, W.; Ma, Z.; Yan, J.; Sun, L. Transformers in Time Series: A Survey. In Proceedings of the International Joint Conference on Artificial Intelligence, Vienna, Austria, 23–29 July 2022. [Google Scholar]
Figure 1. A diagram of the proposed time-series prediction using LSTM.
Figure 1. A diagram of the proposed time-series prediction using LSTM.
Applsci 13 10411 g001
Figure 2. Representations of the network traffic data on the first day of January 2015. Orange and blue color attributes are used to indicate attack and normal events, respectively. (a) Total number of connections with the same source and destination IP addresses in the past two seconds, (b) destination port number of each network, (c) connection duration of each network event, (d) total number of events in each second, (e) total number of events in the converted time series data with the time scale ( t s = 60 s), (f) total number of events in the converted time series data with the time scale ( t s = 120 s). In (c,f), logarithmic scales are applied along the y-axis to advance the visualizations to resolve data skewness toward large-density network events.
Figure 2. Representations of the network traffic data on the first day of January 2015. Orange and blue color attributes are used to indicate attack and normal events, respectively. (a) Total number of connections with the same source and destination IP addresses in the past two seconds, (b) destination port number of each network, (c) connection duration of each network event, (d) total number of events in each second, (e) total number of events in the converted time series data with the time scale ( t s = 60 s), (f) total number of events in the converted time series data with the time scale ( t s = 120 s). In (c,f), logarithmic scales are applied along the y-axis to advance the visualizations to resolve data skewness toward large-density network events.
Applsci 13 10411 g002
Figure 3. Box plot distributions of the network traffic data in January 2015. (a) Source and destination bytes of normal events, (b) source and destination bytes of attack events, (c) number of network events with the time scale ( t S = 60 s), and (d) number of network events with the time scale ( t S = 120 s). Logarithmic scales are applied to address data skewness.
Figure 3. Box plot distributions of the network traffic data in January 2015. (a) Source and destination bytes of normal events, (b) source and destination bytes of attack events, (c) number of network events with the time scale ( t S = 60 s), and (d) number of network events with the time scale ( t S = 120 s). Logarithmic scales are applied to address data skewness.
Applsci 13 10411 g003
Figure 4. Representations of nominal features with the time scale ( t s = 120 s). (a) Protocol types of the network events appeared on 1 January 2015, (b) protocol types of all network events in January 2015, (c) service types of the network events appeared on 1 January 2015, and (d) service types of all network events in January 2015. Logarithmic scales are applied to address data skewness along the y-axis.
Figure 4. Representations of nominal features with the time scale ( t s = 120 s). (a) Protocol types of the network events appeared on 1 January 2015, (b) protocol types of all network events in January 2015, (c) service types of the network events appeared on 1 January 2015, and (d) service types of all network events in January 2015. Logarithmic scales are applied to address data skewness along the y-axis.
Applsci 13 10411 g004
Figure 5. PCA projections by categorizing network events linearly into three groups (represented as ‘red,’ ‘blue,’ and ‘green.’) with determining natural breaks using the Fisher-Jenks algorithm. (a) PCA projection of the three groups based on the total number of projected normal events for the 1 January 2015 data, (b) PCA projection of the three groups based on the total number of projected attack events for the 1 January 2015 data, (c) PCA projection of the three groups based on the total number of projected normal events for the January 2015 data, (d) PCA projection of the three groups based on the total number of projected attack events for the January 2015 data.
Figure 5. PCA projections by categorizing network events linearly into three groups (represented as ‘red,’ ‘blue,’ and ‘green.’) with determining natural breaks using the Fisher-Jenks algorithm. (a) PCA projection of the three groups based on the total number of projected normal events for the 1 January 2015 data, (b) PCA projection of the three groups based on the total number of projected attack events for the 1 January 2015 data, (c) PCA projection of the three groups based on the total number of projected normal events for the January 2015 data, (d) PCA projection of the three groups based on the total number of projected attack events for the January 2015 data.
Applsci 13 10411 g005
Figure 6. Parallel coordinates plots by categorizing network events linearly into three groups with determining natural breaks using the Fisher-Jenks Algorithm. (a) Parallel coordinates of the three groups based on the total number of projected normal events for the 1 January 2015 data, (b) parallel coordinates of the three groups based on the total number of projected attack events for the 1 January 2015 data, (c) parallel coordinates of the three groups based on the total number of projected normal events for the January 2015 data, (d) parallel coordinates of the three groups based on the total number of projected attack events for the January 2015 data. The unique distinction between each group has happened because of the variable differences in the highlighted regions (see black bounding box in (c,d)).
Figure 6. Parallel coordinates plots by categorizing network events linearly into three groups with determining natural breaks using the Fisher-Jenks Algorithm. (a) Parallel coordinates of the three groups based on the total number of projected normal events for the 1 January 2015 data, (b) parallel coordinates of the three groups based on the total number of projected attack events for the 1 January 2015 data, (c) parallel coordinates of the three groups based on the total number of projected normal events for the January 2015 data, (d) parallel coordinates of the three groups based on the total number of projected attack events for the January 2015 data. The unique distinction between each group has happened because of the variable differences in the highlighted regions (see black bounding box in (c,d)).
Applsci 13 10411 g006
Table 1. Forecasting performances using LSTM models with the standard error means for different targeted time scales ( t s ) and embedding dimensions ( e d ).
Table 1. Forecasting performances using LSTM models with the standard error means for different targeted time scales ( t s ) and embedding dimensions ( e d ).
t s MonthEmbedding Dimension e d = 3 Embedding Dimension e d = 4
Normal Events Attack Events Normal Events Attack Events
RMSE MAE RMSE MAE RMSE MAE RMSE MAE
60January3.96 ± 0.032.39 ± 0.025.89 ± 0.043.82 ± 0.033.27 ± 0.022.25 ± 0.024.83 ± 0.033.66 ± 0.03
February2.35 ± 0.031.20 ± 0.013.38 ± 0.022.30 ± 0.025.09 ± 0.052.86 ± 0.024.07 ± 0.022.95 ± 0.01
March7.31 ± 0.104.85 ± 0.073.87 ± 0.012.88 ± 0.017.23 ± 0.104.85 ± 0.073.74 ± 0.012.88 ± 0.01
April5.42 ± 0.113.79 ± 0.093.05 ± 0.022.28 ± 0.017.40 ± 0.084.90 ± 0.064.97 ± 0.023.99 ± 0.02
May2.66 ± 0.011.39 ± 0.014.72 ± 0.013.29 ± 0.012.67 ± 0.011.40 ± 0.014.73 ± 0.013.31 ± 0.01
June3.17 ± 0.011.69 ± 0.016.33 ± 0.024.47 ± 0.013.21 ± 0.011.73 ± 0.016.61 ± 0.024.62 ± 0.01
July4.34 ± 0.042.75 ± 0.024.61 ± 0.023.19 ± 0.015.62 ± 0.063.28 ± 0.035.72 ± 0.043.64 ± 0.02
August3.33 ± 0.022.37 ± 0.014.46 ± 0.013.25 ± 0.013.35 ± 0.022.37 ± 0.024.47 ± 0.013.24 ± 0.01
September6.22 ± 0.072.63 ± 0.024.31 ± 0.022.73 ± 0.016.22 ± 0.072.64 ± 0.023.93 ± 0.012.69 ± 0.01
October3.96 ± 0.041.77 ± 0.014.24 ± 0.022.48 ± 0.014.41 ± 0.041.98 ± 0.014.88 ± 0.032.79 ± 0.01
November5.65 ± 0.043.62 ± 0.023.88 ± 0.012.85 ± 0.015.42 ± 0.043.59 ± 0.024.35 ± 0.022.88 ± 0.01
December3.57 ± 0.021.71 ± 0.013.04 ± 0.011.84 ± 0.013.53 ± 0.021.71 ± 0.013.12 ± 0.011.85 ± 0.01
120January4.42 ± 0.023.11 ± 0.026.42 ± 0.044.99 ± 0.044.31 ± 0.023.08 ± 0.026.38 ± 0.044.98 ± 0.04
February8.16 ± 0.104.22 ± 0.045.37 ± 0.033.65 ± 0.017.77 ± 0.104.16 ± 0.044.75 ± 0.023.57 ± 0.01
March11.85 ± 0.228.43 ± 0.174.97 ± 0.013.95 ± 0.0111.82 ± 0.228.43 ± 0.174.98 ± 0.013.97 ± 0.01
April10.53 ± 0.156.78 ± 0.176.65 ± 0.055.59 ± 0.0410.54 ± 0.156.79 ± 0.116.66 ± 0.055.60 ± 0.04
May3.82 ± 0.022.10 ± 0.015.77 ± 0.024.10 ± 0.013.69 ± 0.022.04 ± 0.015.36 ± 0.023.88 ± 0.01
June4.83 ± 0.022.60 ± 0.026.90 ± 0.024.99 ± 0.024.69 ± 0.022.59 ± 0.027.67 ± 0.035.10 ± 0.02
July5.19 ± 0.053.38 ± 0.035.13 ± 0.033.78 ± 0.025.22 ± 0.053.39 ± 0.035.18 ± 0.023.79 ± 0.02
August5.05 ± 0.052.89 ± 0.025.28 ± 0.023.95 ± 0.015.01 ± 0.052.85 ± 0.025.27 ± 0.023.93 ± 0.01
September7.02 ± 0.073.11 ± 0.035.03 ± 0.023.57 ± 0.016.39 ± 0.073.01 ± 0.035.00 ± 0.023.52 ± 0.01
October5.72 ± 0.052.35 ± 0.025.68 ± 0.023.55 ± 0.015.36 ± 0.052.16 ± 0.015.43 ± 0.023.40 ± 0.01
November6.64 ± 0.054.27 ± 0.034.87 ± 0.023.87 ± 0.026.63 ± 0.054.27 ± 0.036.23 ± 0.053.98 ± 0.02
December3.76 ± 0.032.00 ± 0.014.49 ± 0.022.81 ± 0.013.67 ± 0.031.98 ± 0.013.98 ± 0.012.76 ± 0.01
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

Ji, S.-Y.; Jeong, B.K.; Jeong, D.H. An Analysis of Temporal Features in Multivariate Time Series to Forecast Network Events. Appl. Sci. 2023, 13, 10411. https://doi.org/10.3390/app131810411

AMA Style

Ji S-Y, Jeong BK, Jeong DH. An Analysis of Temporal Features in Multivariate Time Series to Forecast Network Events. Applied Sciences. 2023; 13(18):10411. https://doi.org/10.3390/app131810411

Chicago/Turabian Style

Ji, Soo-Yeon, Bong Keun Jeong, and Dong H. Jeong. 2023. "An Analysis of Temporal Features in Multivariate Time Series to Forecast Network Events" Applied Sciences 13, no. 18: 10411. https://doi.org/10.3390/app131810411

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop