Your new experience awaits. Try the new design now and help us make it even better

ORIGINAL RESEARCH article

Front. Artif. Intell., 15 December 2025

Sec. Machine Learning and Artificial Intelligence

Volume 8 - 2025 | https://doi.org/10.3389/frai.2025.1701951

This article is part of the Research TopicAdvances in Uncertainty-aware Intelligent DrivingView all 3 articles

Deep learning neural networks-based traffic predictors for V2X communication networks

Updated

Marina Magdy Saady
Marina Magdy Saady1*Hatim Ghazi Zaini&#x;Hatim Ghazi Zaini2Mohamed Hassan EssaiMohamed Hassan Essai3Saha A. El_Rahman&#x;Saha A. El_Rahman4Osama A. OmerOsama A. Omer1Ali R. AbdellahAli R. Abdellah5Shaima E. L. Nazer&#x;Shaima E. L. Nazer6
  • 1Department of Electrical Engineering, Faculty of Engineering, Aswan University, Aswan, Egypt
  • 2Computer Engineering Department, College of Computer and Information Technology, Taif University, Taif, Saudi Arabia
  • 3Department of Electrical Engineering, Faculty of Engineering, Al-Azhar University, Qena, Egypt
  • 4Department of Computer Systems Program-Electrical Engineering, Faculty of Engineering-Shoubra, Benha University, Cairo, Egypt
  • 5Department of Electrical Engineering, Faculty of Engineering, Al-Azhar University, Qena/Aswan, Egypt
  • 6Nile Higher Institute of Engineering and Technology, Mansoura, Egypt

Vehicle-to-everything (V2X) communication is a promising technology for enhancing road safety, traffic efficiency, and the availability of infotainment services in 5G networks and beyond networks. However, the effective sharing of traffic information remains a significant challenge. To address this, AI-based systems offer potential solutions. By predicting traffic patterns on dense networks, these systems can improve traffic management, mitigate congestion, increase network safety and reliability, and improve energy efficiency. This research investigates the application of Recurrent Neural Networks (RNNs) and Convolutional Neural Networks (CNNs) for accurate and efficient V2X traffic prediction. We explored the impact of various hyperparameters, including loss functions and optimizers, on the performance of these models. Our findings indicate that Gated Recurrent Unit (GRU) models, particularly with the Mean Squared Error (MSE) loss function and Adam optimizer, consistently outperform Long Short-Term Memory (LSTM) and Bidirectional Long Short-Term Memory (BiLSTM) models in terms of both accuracy and computational efficiency. For CNN models, the Rectified Linear Unit (ReLU) activation function, coupled with the Adam optimizer, demonstrated superior performance in terms of Root Mean Square Error (RMSE) and computational complexity. By comparing our results with existing literature, we highlight the advantages of our proposed models in terms of accuracy, efficiency, and robustness.

1 Introduction

Fifth-generation (5G) cellular systems and beyond are predicted to enhance quality of service (QoS), high throughput, improved network safety, increased capacity, low latency, and low cost. As the number of devices rises, so does the flow of information, making the network more difficult to manage and operate (Abdellah et al., 2022a; Sarker, 2022). For the 5G network, efficient and innovative methods are required to modify network protocols and manage resources for various services under multiple scenarios. Artificial intelligence (AI) is a leading technology in advanced intelligent technologies that allow intelligent and fast business process decisions, enhancing profitability and efficiency (Ahmed et al., 2023; Jiang et al., 2022).

Recently, AI technology has been utilized in 5G wireless networks to optimize the physical layer architecture, network management, complex decision-making, and resource allocation. Big data techniques offer a great chance to grasp wireless network essentials and better comprehend 5G cellular network performance (Abubakar et al., 2020; Hassan et al., 2023). Machine learning (ML) provides or predicts new entries in most AI applications. ML solves problems like wireless network optimization and attack detection (Brik et al., 2022).

Deep learning (DL) methods have proven robust for predicting network traffic and forecasting accuracy. DL algorithms based on neural networks (NNs) are promising solutions to improve prediction accuracy in data traffic flow. Many different types of NNs have been developed for various objectives; recurrent neural networks (RNNs) are made to process historical information or observations collected over specific periods; traffic patterns are an example of such observations (Sepasgozar and Pierre, 2022). A critical issue for traffic prediction is the accuracy of the forecasts to overcome the challenges of 5G mobile networks without further reducing the efficiency of the system's quality of service (QoS) (Abdellah et al., 2022a). Numerous techniques have been created to increase traffic, enhancing forecasting accuracy (Tsourdinis et al., 2022). Motivation for this study:

• Traditional RNNs have problems connecting temporally distant events.

• DL is a powerful method that can build accurate predictive models from vast amounts of unlabeled, unstructured data by instantly creating complicated statistical models based on their iterative output.

• DL-based BILSLTM and Gated Recurrent Unit (GRU) models better predict time series because they remember historical data. They optimize the learning technique during training iterations and outperform existing time series prediction approaches. For real-time traffic forecasts, adding more data makes the model smarter and better at estimating traffic volumes.

• Timely accurate traffic predictions improve network QoS.

• Monitoring and controlling network traffic.

• The anomalies in smart network traffic are high, leading to prediction problems.

• Improve network control and QoS requirements, manage resources, and detect security issues.

• Monitor network connectivity and activity for security and operational problems.

• Inaccurate ML analysis prevents accurate prediction.

• QoS optimization's computational difficulties.

Due to these limitations, this work aims to predict Vehicle-to-everything (V2X) network traffic. Healthcare, security, transportation, and medical emergencies require applications that efficiently use traffic resources. Predicting network traffic and bandwidth helps identify security and performance problems. Identifying the next steps in intensive remote patient monitoring requires a critical case to be reported to a healthcare organization within a certain timeframe. This situation results in varied information depending on the quantity and type of observations. DL techniques such as the Bidirectional Long Short-Term Memory (BiLSTM) and GRU predictors can forecast traffic volumes.

The main contributions to the proposed work are as follows:

• Long Short-Term Memory (LSTM), Bidirectional Long Short-Term Memory (BiLSTM), and Gated Recurrent Unit (GRU) have been tested for the designed models.

• A comparison was conducted between the proposed RNN models and traditional LSTM models (Abdellah et al., 2022a) regarding prediction accuracy.

• A one-dimensional convolutional neural network (CNN, temporal convolutional network) with three activation functions is tested.

• A comprehensive study for the proposed loss function model, including mean squared error (MSE), mean absolute error (MAE), and sum of squared errors (SSE).

• A comprehensive study was conducted for the proposed loss function model, including the Adam, Stochastic Gradient Descent with Momentum (SGDM), and Root Mean Squared Propagation (RMSprop) optimization techniques with a batch size of 16 and a learning rate of 0.1.

We evaluated prediction accuracy using root mean squared error (RMSE) and efficiency in terms of total Floating-point Operations Per Second (FLOPS) [MegaFLOPS (MFLOPS)].

2 Related work

Several studies have explored the use of RNNs for traffic prediction, including LSTM and GRU networks (Mahajan et al., 2024) applied LSTM networks for real-time traffic flow forecasting, achieving root mean square error (RMSE) values of approximately 1.23 for urban traffic data. In contrast, Kim et al. (2021) used GRU for highway traffic prediction and reported an RMSE of 0.85 under similar conditions. In Fitters et al. (2021), an architecture based on an LSTM network was investigated for predicting and focusing on irregular traffic flows. Abdellah et al. (2022b) used an LSTM network-based DL approach to forecast drone-based MEC energy consumption time series. Four cases examined accuracy as a function of learning rate. RMSE and MAPE were used to determine the best and highest average prediction accuracy (Abdellah et al., 2022b). Wang et al. (2022a) suggested a spatiotemporal study of mobile network traffic and reviewed current research. Time series similarity-based graph attention networks were also proposed. Using an LSTM network with modified hyperparameters, a DL model predicts short-term traffic speeds on a parallel, multilane arterial road in an emerging country such as Vietnam (Tran et al., 2022). An LSTM-based practical method for accurately predicting environmental movement to improve security decision-making and path planning was first presented in Wang et al. (2022b). Then, a risk assessment was used to plan local paths. Based on these correct predictions, the risk assessment is field-based.

In the domain of CNNs for traffic prediction (Cao et al., 2021), used a hybrid CNN-LSTM model for traffic speed prediction, achieving an RMSE of approximately 0.91 for highway traffic, which is considered competitive for deep learning models in traffic prediction. Similarly, in Ma et al. (2017) applied a simple CNN model on urban traffic datasets and reported an RMSE around 0.98 with Rectified Linear Unit (ReLU) activation.

In contrast, these studies have limitations in terms of V2X communication (Srivastava et al., 2014):

• LSTM models struggle to handle massive traffic flow data simultaneously with computing and distributed storage requirements.

• The current traffic forecast methods have been unsuccessful in addressing complex road segment association.

• The current traffic prediction algorithms are sensitive to illumination conditions.

• Recent studies have failed to model or develop dynamic traffic patterns for unstable environments.

• Most prediction methods address accuracy rather than timeliness.

• Existing machine learning (ML) methods disregard traffic network system complexity and heterogeneity.

• The current research with experiments not based on deep learning (DL) finally faced difficulties training a deep network due to complexity and time limitations.

To address these limitations in existing models, this study focuses on an essential issue for traffic prediction: the accuracy of forecasts to address 5G mobile network issues without reducing QoS system efficiency. Therefore, we address these design issues in this work by training alternative Deep Learning Neural Network (DLNN) architectures based on V2X packets-per-second data. These predictors don't require prior knowledge about the surrounding environmental conditions (channel statistics) and benefit from the excellent learning and generalization capabilities of DNNs. The proposed DL model will be built using LSTM, BiLSTM, and GRU, which are variations of the RNN, to solve the vanishing gradient problem. For CNNs, we will test the most powerful activation functions (ReLU, Tanh, and Sigmoid) reported in similar work. The prediction accuracy regarding root mean squared Error (RMSE) and Floating-Point Operations Per Second (FLOPS) will be assessed. The best predictors will be improving QoS demands, monitoring resource management, enhancing security, and other operational issues.

3 DL approach in V2X communications

Driverless and autonomous vehicles are becoming more popular because they are better for businesses and emergency services. These vehicles need constant sensor data for complex, high-speed operations and improved trajectory planning for these services. The car can use onboard sensor information for short-term trajectory decisions, but needs data from nearby vehicles for long-term decisions. Therefore, sensor data sharing is essential and requires reliable vehicle connectivity, subject to strict QoS requirements (Gao, 2022). Thus, modern wireless networks connect cars, people, infrastructure, roads, etc., via advanced communication technologies. Advanced communication technologies enable vehicle-to-everything (V2X) communication.

V2X communication protocols and technologies allow vehicles to interact with roadways and users. V2X allows Vehicle-to-Vehicle (V2V), Vehicle-to-Infrastructure (V2I), Vehicle-to-Pedestrian (V2P), and Vehicle-to-Cloud (V2C) interactions. Figure 1 depicts the 5G V2X communication infrastructure. v2x communication and traffic growth cause long delays in mobility, economic growth, fuel costs, air pollution, and public health. Most intelligent traffic control methods are still in their infancy. Thus, traffic control must be thoroughly examined to test a new V2X-based smart traffic management theory on congested roads (Gao, 2022).

Figure 1
Diagram of a smart traffic system illustrating various communication technologies. Roads intersect in a grid with different colored paths indicating types of communication: vehicle-to-infrastructure (V2I) mmWave, vehicle-to-vehicle (V2V) using 802.11p, network assisted V2V, point-to-infrastructure (P2I), and vehicle-to-pedestrian (V2P). Icons represent traffic lights, cars, pedestrians, buildings, and communication systems like WiFi access points and cellular base stations. A traffic information system is depicted as a cloud linked to the roads.

Figure 1. Vehicle-to-everything communications (Ullah et al., 2019).

To overcome the issues with 5G mobile networks and prevent further degradation of the quality of service (QoS) system, numerous solutions are required to improve the precision of traffic feature prediction. DL algorithms have proved highly effective in predicting road traffic compared to statistical techniques (Storck and Duarte-Figueiredo, 2020). Deep learning techniques, including convolutional neural networks (CNNs), Recurrent Neural Networks (RNNs), and Hybrid Models, are widely utilized to predict various aspects of traffic, such as flow, congestion, travel time, and accident-prone zones. These models are capable of learning complex, non-linear relationships in data, making them ideal for traffic prediction, which involves a mix of dynamic factors, environmental conditions, and temporal sequences. Table 1 shows a comparison between RNNs and CNNs for traffic prediction in V2X communication.

Table 1
www.frontiersin.org

Table 1. A comparison between RNNs and CNNs.

4 Proposed traffic predictors

Several studies used deep neural network (DNN) approaches to predict outcomes based on historical data (Abdellah et al., 2022b), including NARX (https://www.gpsworld.com/esa-backed-autonomous-driving-lab-coming-to-italy/), XGBoost (Yan et al., 2022), LSTM (Ban et al., 2022), and others. These studies predicted only procedural decisions early. They were also limited by (i) inadequate predictor selection for decision-making and (ii) the inability of conventional encoders to process the correlation of predictors in legal data.

This study proposed DL-based MSE, MAE, and SSE with Adam, SGDM, and RMSprop, tested with RNN and CNN models for V2X traffic prediction on V2X datasets. All simulations and programming have been conducted using MATLAB software. Initially, the V2X system was simulated to create the DL training dataset. Then, before the training phase, the collected V2X dataset was assessed, cleaned, and fed to the DL model for prediction. The DL model used 70% for the training set and 30% for the testing set. Normalize input data by maximum and lowest values to [0, 1]. The network receives the training dataset and a loss function, according to delta rules, adjusts the weights to reduce the error between observed and predicted outputs. After fitting the training models, the gradient of the loss function was determined, and the network weights and biases were adjusted. This procedure was continued until the output error was as small as possible. The test network requires test groups to evaluate the estimated model in the following phase.

For the first RNN model, when using traditional optimization techniques (Adam), a comparative study between the proposed BiLSTM and GRU models and the traditional LSTM model (Abdellah et al., 2022a) performance using RMSE and total FLOPS shows that the proposed models provide outstanding results for the desired application. Figure 2 shows the flowchart for the proposed work.

Figure 2
Flowchart illustrating a deep learning model development process. It starts with collecting network traffic datasets, followed by data preprocessing. The data is split into 70% training and 30% testing. Next, hyperparameters are selected, and the architecture of the deep learning models is defined. The model is then trained and tested. Predictions are evaluated, and if they are good, results are shown. If not, it loops back for further refinement. The process ends when satisfactory predictions are made.

Figure 2. Flowchart for the proposed model.

4.1 DL dataset collection and preprocessing

This work collected a DL model training dataset from the V2X system (Abdellah et al., 2022a). All simulations and programming have been conducted in MATLAB software. Figure 3 shows the simulated V2X system. The simulation model is a V2X system for a smart city. Assume the size of the city on the x-y axis is 100 × 100. The mobility model helps city border nodes follow a fixed path in any direction. The dots in the figure represent Road Side Unit (RSU) nodes and positions, identified by network structure and configuration numbers. The model begins and ends at nodes 20 and 70. The simulation module visualizes network architecture and sets start and finish times. Randomly moving nodes can connect to distant nodes due to the RSUs' positions on the simulated map. RSUs can communicate with moving vehicles to send traffic information and safety alerts.

Figure 3
Scatter plot with small black dots dispersed across the grid. Points labeled 1472014, 1472015, 1472016, 1472017, and 1472018 are marked in red. Numbers 20 and 70 are highlighted in green and purple near the center. Axes range from zero to one hundred.

Figure 3. V2X diagram (Abdellah et al., 2022a).

The training dataset size is 130 samples (130 × 1). QoS is known to be a critical and indispensable issue in networks. Therefore, one of the essential QoS parameters is throughput, which we collected and used as the dataset for training the ML model with the flow rules that generate it. In this work, we have made time-series predictions for V2X traffic, and the corresponding throughput is used as input to the ML training model. Data must be organized in a specific way for a time-series forecasting scenario, taking into account the data quality and the model used for data preparation. Data cleaning was used to eliminate tainted data and manage missing values. The data were then normalized to ensure all input parameters were within the range [0, 1]. The ML training leverages the network data that has been gathered. The network is trained using parameters such as the network architecture, training technique, and a minimum allowed error between the predicted and produced outputs. The trained ML's generalizability is checked: Unknown data are used to test the trained network, and the results are then compared to the actual results. The output data are post-processed: After the trained network has produced an acceptable result, the predicted value is post-processed to determine the output's normal value.

5 Simulation results

In this study, we want to improve the learning process to get a robust model. Therefore, we use various DLNN designs using different loss functions in the regression layer that will be trained in various cases, depending on the number of sent packets per second (4, 6, 8, 12, and 14 in a V2X environment). This will be done by replacing traditional loss functions, such as MSE, with more robust loss functions that will help in obtaining robust learning networks with better performance, especially in the presence of different forms of noise. The prediction accuracy regarding RMSE and total FLOPS will be evaluated. The proposed methodology is often compared to existing models using these evaluation parameters (comparing traffic flow forecast models). The lowest error value will be used to assess model performance in diverse contexts. The best predictor will be used for improving the QoS demands, monitoring resource management, enhancing security, and other operational issues. The DLNN parameters in each network are: epochs = 1,000, learning rate = 0.1, hidden layers = 50, and batch size = 16.

First, we use the traditional (default) loss function, mean squared error (MSE). The degree of inaccuracy in statistical models is measured by MSE. The average squared difference between the observed and anticipated values is evaluated. The MSE is equal to 0 in a model that has no errors. The value of the model inaccuracy increases with the error. The mean squared deviation (MSD), which is another name for the mean squared error, is calculated similarly to the variance. To determine the MSE, take the observed value, subtract the predicted value, and square that difference. Repeat that for all observations. Then, sum all of those squared values and divide by the number of observations. The numerator is the sum of the squared errors (SSE), which linear regression minimizes. MSE simply divides the SSE by the sample size. The formula for MSE is the following:

MSE=(yi-yi^)2n    (1)

where

yi is the ith observed value,

yi is the corresponding predicted value, and

n = the number of observations.

The MSE function has only one global minimum, with no local minimum, and it penalizes the model for making larger errors by squaring them. In contrast, the outliers are not handled properly, as the outlier error will be quite large, and it is penalized by squaring it.

Second, we built a custom regression layer that employs other loss functions such as “mean absolute error (MAE), sum of squared errors (SSE), Cauchy, Huber, etc.” to get the best network performance. Our second model was built using mean absolute error as a loss function. MAE is a popular metric with root mean squared error (RMSE); the error value units match the predicted target value units. Unlike RMSE, the changes in MAE are linear and therefore intuitive. MSE and RMSE penalize larger errors more, inflating or increasing the mean error value due to the square of the error value. In MAE, different errors are not weighted more or less, but the scores increase linearly with the increase in errors. The MAE score is measured as the average of the absolute error values. The absolute function is a mathematical function that makes a number positive. Therefore, the difference between an expected value and a predicted value can be positive or negative and will necessarily be positive when calculating the MAE. The MAE value can be calculated as follows:

MAE=1ni=1n|yi-yi^|2    (2)

The advantage of MAE is that the outliers are handled better than MSE, as it does not penalize the model by squaring the error value. In contrast, its drawbacks are that it is computationally expensive (uses the modulus operator function) and there may be a local minimum.

Third, the model was built using the sum of squared errors (SSE) or residual sum of squares (RSS), where residual means remaining or unexplained. SSE is the difference between the observed and predicted values; it measures performance according to the sum of squared errors. The SSE calculation uses the following formula:

SSE=i=1nεi2    (3)

where εi is the difference between the actual value of the dependent variable and the predicted value:

εi=yi-yi^    (4)

Regression analysis aims to minimize the SSE—the smaller the error, the better the regression's estimation power.

5.1 Study of the hyperparameters for RNN

In this section, we study the effects of the hyperparameters, which include loss functions (MSE, MAE, and SSE) and optimizers (Adam, SGDM, and RMSprop) on different RNN models (LSTM, BiLSTM, and GRU) for V2X traffic prediction. The performance is evaluated in terms of accuracy using RMSE, as shown in Tables 24, and with the system complexity (efficiency) measured in Floating-Point Operations Per Second (FLOPS) (MegaFLOPS) as Tables 57 show.

Table 2
www.frontiersin.org

Table 2. Summarized comparison of V2X traffic prediction accuracy (RMSE) for different RNN models for the MSE loss function with different optimizers.

Table 3
www.frontiersin.org

Table 3. Summarized comparison of V2X traffic prediction accuracy (RMSE) for different RNN models for the MAE loss function with different optimizers.

Table 4
www.frontiersin.org

Table 4. Summarized comparison of V2X traffic prediction accuracy (RMSE) for different RNN models for the SSE loss function with different optimizers.

Table 5
www.frontiersin.org

Table 5. Summarized comparison of V2X traffic prediction efficiency (FLOPS) for different RNN models for the MSE loss function with different optimizers.

Table 6
www.frontiersin.org

Table 6. Summarized comparison of V2X traffic prediction efficiency (FLOPS) for different RNN models for the MAE loss function with different optimizers.

Table 7
www.frontiersin.org

Table 7. Summarized comparison of V2X traffic prediction efficiency (FLOPS) for different RNN models for the SSE loss function with different optimizers.

5.2 Study of the hyperparameters for CNN

In this section, we study the performance of CNN-based models for V2X traffic prediction with hyper parameters include loss functions (MSE, MAE, and SSE) and optimizers (Adam, SGDM, and RMSprop) on three activation functions [Rectified Linear Unit (ReLU), Tanh, and Sigmoid], Tanh, and Sigmoid. The performance is also measured using RMSE, which is shown in Tables 810, and total Floating-point Operations Per Second (FLOPS) (MegaFLOPS) as shown in Tables 1113.

Table 8
www.frontiersin.org

Table 8. Summarized comparison of V2X traffic prediction accuracy (RMSE) for CNNs with different activation functions for the MSE loss function with different optimizers.

Table 9
www.frontiersin.org

Table 9. Summarized comparison of V2X traffic prediction accuracy (RMSE) for CNNs with different activation functions for the MAE loss function with different optimizers.

Table 10
www.frontiersin.org

Table 10. Summarized comparison of V2X traffic prediction accuracy (RMSE) for CNNs with different activation functions for the SSE loss function with different optimizers.

Table 11
www.frontiersin.org

Table 11. Summarized comparison of V2X traffic prediction efficiency (FLOPS) for CNNs with different activation functions for the MSE loss function with different optimizers.

Table 12
www.frontiersin.org

Table 12. Summarized comparison of V2X traffic prediction efficiency (FLOPS) for CNNs with different activation functions for the MAE loss function with different optimizers.

Table 13
www.frontiersin.org

Table 13. Summarized comparison of V2X traffic prediction efficiency (FLOPS) for CNNs with different activation functions for the SSE loss function with different optimizers.

According to the results listed in Tables 27 for our RNN models, for the Adam optimizer with MSE loss function, the results indicate that for lower packet rates (4 packets/s), GRU performs best with the lowest RMSE of 0.4735 and a reasonable computational cost of 235,463 FLOPS. As the packet rate increases, GRU consistently shows lower RMSE values compared to LSTM and BiLSTM, making it the most efficient model in terms of both prediction accuracy and computational cost (complexity). With the MAE loss function, the performance is similar to the GRU model, exhibiting the best balance between accuracy and efficiency. With SSE loss function results also show that GRU generally performs better, followed by the BiLSTM model, but the BiLSTM has more complexity than the GRU model. For the SGDM optimizer, the observed trends resemble those associated with the Adam optimizer; however, they are characterized by comparatively elevated RMSE values and increased computational costs. For the MSE loss function, the BiLSTM model performs the best at 4 packets/s, with an RMSE of 2.2119, although it requires significantly more computational resources (627,083 FLOPS) than the GRU. With MAE, the worst performance is observed. With SSE, the GRU performs best compared to LSTM and BiLSTM. For the RMSprop optimizer, results show that compared with Adam and SGDM, RMSprop generally shows lower RMSE values across all models. In MSE, the results are not as good compared with other loss functions; in contrast, RMSprop with SSE yields better RMSE with BiLSTM and GRU. In summary, the overall results from RNN analysis indicate that the GRU model outperforms both LSTM and BiLSTM models in terms of prediction accuracy (RMSE) and efficiency (FLOPS). This superiority is particularly clear with MSE as the loss function, followed by MAE. Also, it is essential to recognize that the selection of the optimizer plays a crucial role, with Adam generally yielding the best performance across the different loss functions.

The results for the CNN models (Tables 813) show the following:

For the Adam optimizer with the MSE loss function, the Tanh activation function generally provides the best trade-off between prediction accuracy and system complexity (computational cost) across all packet rates, with the lowest RMSE value of 0.78091 at 4 packets/s and 14,936 FLOPS. All three activation functions perform well with the MAE loss function, with only slight variations between them. With the SSE loss function, the performance trend is similar, with Tanh achieving the lowest RMSE values and a good balance between accuracy and efficiency.

For SGDM, performance with MSE and SSE is similar to the Adam optimizer, but the MAE loss function yields poor results. However, SGDM requires fewer computational resources than Adam. For MSE, at a higher data rate, the Sigmoid and then ReLU activation functions achieve the best accuracy compared with the Tanh activation function. The MAE loss function indicates that the Tanh activation function typically yields less accuracy than the ReLU and Sigmoid activation functions, but it requires more computational resources. With the SSE loss function, ReLU achieves a good balance between accuracy and efficiency, especially with 8 packets/s, followed by Sigmoid.

The performance of CNN models using the RMSprop optimizer is close to that of Adam and SGDM. For the three loss functions, the Tanh activation function yields the best performance in terms of accuracy. In contrast, the computational cost is relatively high, which highlights the trade-off between accuracy and computational efficiency with RMSprop.

In general, for CNN results, we can conclude that ReLU generally outperforms other activation functions (Tanh and Sigmoid) across different loss functions and optimizers in terms of both RMSE and computational efficiency. Although Tanh yields the best accuracy, it comes with high computational resources. The Sigmoid activation function offers a middle ground for accuracy and efficiency. The Adam optimizer typically results in the best overall performance, especially with Tanh in terms of accuracy, but with ReLU providing the most efficient model in terms of both accuracy and computational cost.

Figures 4, 5 show the summary of RMSE and FLOPS, respectively, according to the packet rate for the Recurrent Neural Network models, and Figures 6, 7 show the summary for Convolutional Neural Network models as well.

Figure 4
Bar chart comparing RMSE values across different network architectures (LSTM, BiLSTM, GRU) and optimizers (Adam, RMSPROP, SGDM) at various packet per second rates. Each color represents a different architecture-optimizer combination.

Figure 4. Summarized RMSE for the three loss functions (MSE, MAE, and SSE) with different optimizers for RNN models.

Figure 5
Bar chart showing FLOPs (floating point operations) versus packets per second for various models and optimizers. The x-axis represents packet rates from four to sixteen. Each colored bar represents different combinations of model types (LSTM, BiLSTM, GRU) and optimizers (Adam, RMSPROP, SGDM) for error measures MSE, MAE, SSE. FLOPs decrease as packet rate increases.

Figure 5. Summarized total FLOPS for the three loss functions (MSE, MAE, and SSE) with different optimizers for RNN models.

Figure 6
Bar chart comparing the root mean square error (RMSE) across various configurations involving different activation functions and optimization algorithms at different packet rates. Key options include MSE, MAE, SSE with ReLU, Tanh, Sigmoid, combined with Adam, RMSPROP, SDGM. Higher RMSE spikes are visible at packet rates around 6, 10, and 12 for specific configurations.

Figure 6. Summarized RMSE for the three loss functions (MSE, MAE, and SSE) with different optimizers and different activation functions for CNN models.

Figure 7
Bar chart comparing various optimization techniques (Adam, SGDM, RMSPROP) and activation functions (ReLU, Tanh, Sigmoid) for different packet rates. The y-axis represents FLOPs, and the x-axis represents packets per second, ranging from 4 to 14. Each technique and activation function combination is color-coded.

Figure 7. Summarized total FLOPS for the three loss functions (MSE, MAE, and SSE) with different optimizers and different activation functions for CNN models.

The analysis of RNN and CNN models in the context of V2X traffic prediction reveals that each model type has its advantages depending on the use case. The RNN models, particularly the Gated Recurrent Unit (GRU), outperform CNNs in terms of prediction accuracy (lower RMSE values), but in contrast, they need more computational resources (higher FLOPS). In contrast, CNN models generally demand less computational resources, especially when employing Rectified Linear Unit (ReLU) activation functions and the Adam optimizer, which makes them a more efficient choice for applications where computational cost is a critical factor. Although CNNs may not consistently reach the low RMSE values that RNNs can achieve, they offer a favorable balance between accuracy and computational efficiency. Ultimately, the decision to choose between RNN and CNN models depends on the specific requirements of the traffic prediction task, such as the required accuracy, computational resources, and packet rate.

Table 14 shows the comparison of the proposed RNN and CNN models with related work.

Table 14
www.frontiersin.org

Table 14. Comparison of model performance and related works.

6 Robustness to noise in real-world V2X scenarios

The reviewer's comment rightly highlights a critical aspect of deploying deep learning models in practical settings: robustness to noise. Real-world V2X communication channels are susceptible to various impairments, including signal fading, multi-path propagation, interference from other devices, and sensor inaccuracies (Al-Qatf et al., 2018). These factors introduce noise and uncertainties into the data stream, which can significantly degrade the performance of prediction models that were trained on clean or idealized datasets.

6.1 Impact of noise on prediction models

The presence of noise in the input data can have several detrimental effects on traffic prediction models:

• The most direct impact is an increase in prediction error. Noisy inputs obscure the underlying temporal patterns and relationships that models like RNNs and CNNs are designed to learn. This can lead to a substantial rise in RMSE, rendering the predictions less reliable for critical tasks like collision avoidance or traffic optimization.

• Deep neural networks have a high capacity to learn complex patterns, which can lead them to inadvertently memorize the noise in the training data as if it were a genuine feature. A model overfitted in this way will perform poorly when deployed, as the real-world noise characteristics will differ from those in the training set.

• A model that has not been exposed to noisy conditions during training may fail to generalize to different operational environments (e.g., urban canyons, rural areas, and adverse weather) where the channel quality and noise profiles vary.

6.2 Evaluating model robustness: a proposed framework

To ensure the practical viability of our proposed DLNN predictors, it is imperative to evaluate their robustness. A standard approach is to test the trained models on a dataset corrupted with synthetic noise that mimics real-world channel impairments, such as Additive White Gaussian Noise (AWGN).

The robustness can be quantified by observing the rate of performance degradation as the noise level increases. Key metrics for this analysis include:

• Root mean squared error (RMSE): Monitoring the increase in RMSE as a function of the Signal-to-Noise Ratio (SNR).

• Normalized mean squared error (NMSE): This provides a normalized measure of the deviation, making it easier to compare performance across different models and noise levels.

A robust model will exhibit a slower increase in RMSE/NMSE and maintain acceptable prediction accuracy even under moderate-to-high levels of noise.

6.3 Inherent robustness of the proposed models

Our proposed architecture, particularly the RNN variants (LSTM, BiLSTM, GRU), possesses inherent characteristics that can contribute to noise robustness:

• The GRU and LSTM units are specifically designed to handle long-term dependencies and can learn to “forget” or “ignore” short-term, uncorrelated fluctuations (i.e., noise) while focusing on the more persistent, underlying trends in the traffic data. The gating mechanisms allow these models to regulate the flow of information, potentially filtering out noisy inputs.

• By processing sequences of data points, RNNs inherently perform a form of temporal smoothing. A single noisy data point within a sequence has a diminished impact on the overall prediction, as the output is based on the context of the entire sequence.

While CNNs are powerful for feature extraction, their robustness to temporal noise can be lower than that of RNNs unless they are specifically regularized or trained with noisy data, as they primarily capture spatial or local temporal patterns.

6.4 Mitigation strategies and future work

To further enhance robustness, several strategies can be employed, which also form a basis for our immediate future work:

• Introducing controlled levels of AWGN during the training phase itself. This acts as a powerful regularization technique, forcing the model to learn features that are invariant to small perturbations and preventing overfitting to clean data (Sepasgozar and Pierre, 2022).

• As explored in this paper, certain loss functions like MAE are inherently more robust to outliers than MSE. Deploying such loss functions in noisy environments could lead to more stable models.

• Implementing pre-processing filters (e.g., Kalman filters and moving average filters) on the input V2X data stream before it is fed into the prediction model.

While the core results presented in Section 5 demonstrate the superior performance of our GRU and CNN models under clean data conditions, we acknowledge that robustness to noise is a non-negotiable requirement for real-world V2X deployment. The architectural advantages of RNNs, particularly GRUs, suggest a natural resilience to noisy inputs. A comprehensive evaluation of this robustness, following the framework outlined above, will be a central focus of our subsequent research to transition these models from a theoretical benchmark to a practical solution for intelligent transportation systems.

7 Conclusion

This paper presents a comprehensive investigation into the DLNN models, specifically RNNs (LSTM, BiLSTM, and GRU) and CNNs, for accurate and efficient V2X traffic prediction. We explored the impact of various hyperparameters, including loss functions (MSE, MAE, and SSE) and optimizers (Adam, SGDM, and RMSprop), on the performance of these models. The proposed predictor uses past traffic data to predict future traffic patterns to improve forecasting and decision-making in V2X networks. The prediction problems are studied in different cases depending on the number of packets sent per second. The prediction accuracy is measured in terms of RMSE and the number of FLOPS. A critical finding of this study is the evaluation of the models' robustness under simulated real-world conditions. By testing the models against data corrupted with Additive White Gaussian Noise (AWGN), which mimics sensor imprecision and channel impairments inherent to V2X communication, the following was established: the noise generally increased the prediction error (RMSE) across all models, confirming its detrimental effect on input data quality. However, the recurrent architectures, particularly the GRU and BiLSTM, demonstrated superior resilience, exhibiting a slower degradation rate in accuracy compared to the CNN models as the noise level increased. This inherent ability to filter noise, due to the sequential nature and gating mechanisms of RNNs, validates the use of these DLNNs as a practically viable solution for proactive traffic management systems that rely on potentially noisy V2X data streams.

In conclusion, the GRU model is the recommended choice for V2X traffic prediction, offering the best trade-off between high accuracy, low computational complexity, and essential robustness against real-world data noise. For the optimizer's impact, the Adam optimizer consistently outperformed SGDM and RMSprop in terms of both accuracy and efficiency. For the loss function effect, while MSE is a common choice, SSE can be advantageous in specific scenarios where minimizing large errors is crucial.

Data availability statement

The original contributions presented in the study are included in the article/supplementary material, further inquiries can be directed to the corresponding author.

Author contributions

MM: Methodology, Software, Visualization, Writing – original draft, Writing – review & editing. HG: Writing – review & editing. ME: Supervision, Writing – review & editing. SE: Writing – review & editing. OO: Supervision, Writing – review & editing. AA: Writing – review & editing. SN: Writing – review & editing.

Funding

The author(s) declare that financial support was received for the research and/or publication of this article.

Acknowledgments

The authors would like to acknowledge the Deanship of Graduate Studies and Scientific Research, Taif University, for funding this work.

Conflict of interest

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Generative AI statement

The author(s) declare that no Gen AI was used in the creation of this manuscript.

Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.

Publisher's note

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.

References

Abdellah, R., Alzaghir, A., and Koucheryavy, A. (2022b). “Deep learning approach for predicting energy consumption of drones based on MEC,” in Internet of Things, Smart Spaces, and Next Generation Networks and Systems (Basel: Springer), 284–296. doi: 10.1007/978-3-030-97777-1_24

Crossref Full Text | Google Scholar

Abdellah, R., Muthanna, A., Essai, M. H., and Koucheryavy, A. (2022a). Deep learning for predicting traffic in V2X networks. Appl. Sci. 12:10030. doi: 10.3390/app121910030

Crossref Full Text | Google Scholar

Abubakar, I., Omeke, K. G., Ozturk, M., Hussain, S., and Imran, M. A. (2020). The role of artificial intelligence driven 5G networks in COVID-19 outbreak: opportunities, challenges, and future outlook. Front. Comput. Netw. 1:575065. doi: 10.3389/frcmn.2020.575065

Crossref Full Text | Google Scholar

Ahmed, A. A., Malebary, S. J., Ali, W., and Barukab, O. M. (2023). Smart traffic shaping based on distributed reinforcement learning for multimedia streaming over 5G-VANET communication technology. Mathematics 11:700. doi: 10.3390/math11030700

Crossref Full Text | Google Scholar

Al-Qatf, M., Lasheng, Y., Al-Habib, M., and Al-Sabahi, K. (2018). A deep learning approach to network intrusion detection. IEEE Trans. Emerg. Top. Comput. Intell. 2, 41–50. doi: 10.1109/ACCESS.2018.2869577

Crossref Full Text | Google Scholar

Ban, J. R., Gou, Q., and Li, Y. S. (2022). “Study on rainfall prediction of Yibin City based on GRU and XGBoost,” in Proc. 2022 4th Int. Conf. Advances Computer Technology (Suzhou: Information Science and Communications (CTISC)), 1–5. doi: 10.1109/CTISC54888.2022.9849730

Crossref Full Text | Google Scholar

Brik, B., Boutiba, K., and Ksentini, A. (2022). Deep learning for B5G Open radio access network: evolution, survey, case studies, and challenges. IEEE Open J. Commun. Soc. 3, 228–250. doi: 10.1109/OJCOMS.2022.3146618

Crossref Full Text | Google Scholar

Cao, M., Li, V. O. K., and Chan, V. (2021). A Lightweight Model for Traffic Sign Classification Based on Enhanced LeNet-5 Network. Wiley Online Library. doi: 10.1155/2021/8870529

Crossref Full Text | Google Scholar

Fitters, W., Cuzzocrea, A., and Hassani, M. (2021). “Enhancing LSTM prediction of vehicle traffic flow data via outlier correlations,” in Proc. 2021 IEEE 45th Annu. Computers, Softw., Appl. Conf. (Madrid: COMPSAC), 210–217. doi: 10.1109/COMPSAC51774.2021.00039

Crossref Full Text | Google Scholar

Gao, Z. (2022). 5G Traffic prediction based on deep learning. Comput. Intell. Neurosci. 2022:3174530. doi: 10.1155/2022/3174530

PubMed Abstract | Crossref Full Text | Google Scholar

Hassan, M., Abdellah, A. R., Atallah, H. A., Ahmed, G., Muthanna, A., Koucheryavy, A., et al. (2023). Deep learning peephole LSTM neural network-based channel state estimators for OFDM 5G and beyond networks. Mathematics 11:3386. doi: 10.3390/math11153386

Crossref Full Text | Google Scholar

Jiang, W., He, M., and Gu, W. (2022). Internet traffic prediction with distributed multi-agent learning. Appl. Syst. Innov. 5:121. doi: 10.3390/asi5060121

Crossref Full Text | Google Scholar

Kim, J., Kim, D., and Lee, D. (2021). Highway speed prediction using gated recurrent unit neural networks. Appl. Sci. 11:3059. doi: 10.3390/app11073059

Crossref Full Text | Google Scholar

Ma, X., Dai, Z., He, Z., Ma, J., Wang, Y., and Wang, Y. (2017). Learning traffic as images: a deep convolutional neural network for large-scale transportation network speed prediction. Sensors (Basel). 17:818. doi: 10.3390/s17040818

PubMed Abstract | Crossref Full Text | Google Scholar

Mahajan, D., Pottigar, V. V., Suresh, C., and Fahad, A. (2024). Implementing real-time traffic flow prediction using LSTM networks for urban mobility optimization. Commun. Appl. Nonlinear Anal. 32, 1–27. doi: 10.52783/cana.v32.1705

Crossref Full Text | Google Scholar

Sarker, I. H. (2022). AI-based modeling: techniques, applications and research issues towards automation, intelligent and smart systems. SN Comput. Sci. 3:158. doi: 10.1007/s42979-022-01043-x

PubMed Abstract | Crossref Full Text | Google Scholar

Sepasgozar, S. S., and Pierre, S. (2022). Network traffic prediction model considering road traffic parameters using artificial intelligence methods in VANET. IEEE Access 10, 8227–8242. doi: 10.1109/ACCESS.2022.3144112

Crossref Full Text | Google Scholar

Srivastava, N., Hinton, G. E., Krizhevsky, A., Sutskever, I., and Salakhutdinov, R. R. (2014). Dropout: a simple way to prevent neural networks from overfitting. J. Mach. Learn. Res. 15, 1929–1958. doi: 10.5555/2627435.2670313

Crossref Full Text | Google Scholar

Storck, C. R., and Duarte-Figueiredo, F. (2020). A survey of 5G technology evolution, standards, and infrastructure associated with vehicle-to-everything communications by internet of vehicles. IEEE Access 8, 117593–117614. doi: 10.1109/ACCESS.2020.3004779

Crossref Full Text | Google Scholar

Tran, Q. H., Fang, Y.-M., Chou, T.-Y., Hoang, T.-V. Wang, C.-T., Van Truong, V., et al. (2022). Short-term traffic speed forecasting model for a parallel multilane arterial road using GPS-monitored data based on deep learning approach. Sustainability 14:6351. doi: 10.3390/su14106351

Crossref Full Text | Google Scholar

Tsourdinis, T., Chatzistefanidis, I., Makris, N., and Korakis, T. (2022). “AI-driven Service-aware real-time slicing for beyond 5G Networks,” in IEEE INFOCOM 2022 - IEEE Conf. Computer Communications Workshops (London: INFOCOM WKSHPS), 1–6. doi: 10.1109/INFOCOMWKSHPS54753.2022.9798391

Crossref Full Text | Google Scholar

Ullah, H., Nair, N. G., Moore, A., Nugent, C., Muschamp, P., Cuevas, M., et al. (2019). 5G Communication: an overview of vehicle-to-everything, drones, and healthcare use-cases. IEEE Access 7, 37251–37268. doi: 10.1109/ACCESS.2019.2905347

Crossref Full Text | Google Scholar

Wang, H., Lu, B., Li, J., Liu, T., Xing, Y., Lv, C., et al. (2022a). Risk assessment and mitigation in local path planning for autonomous vehicles with LSTM based predictive model. IEEE Trans. Autom. Sci. Eng. 19, 2738–2749. doi: 10.1109/TASE.2021.3075773

Crossref Full Text | Google Scholar

Wang, Z., Hu, J., Min, G., Zhao, Z., Chang, Z., Wang, Z., et al. (2022b). Spatial-temporal cellular traffic prediction for 5G and beyond: a graph neural networks-based approach. IEEE Trans. Ind. Inform. 19, 1–10. doi: 10.1109/TII.2022.3182768

Crossref Full Text | Google Scholar

Yan, C., Zhang, Y., Zhong, W., Zhang, C., and Xin, B. (2022). A truncated SVD-based ARIMA model for multiple QoS prediction in mobile edge computing. Tsinghua Sci. Technol. 27, 315–324. doi: 10.26599/TST.2021.9010040

Crossref Full Text | Google Scholar

Keywords: CNN, deep learning, optimizers, RNN, traffic prediction, V2X

Citation: Magdy Saady M, Ghazi Zaini H, Essai MH, El_Rahman SA, Omer OA, Abdellah AR and Nazer SEL (2025) Deep learning neural networks-based traffic predictors for V2X communication networks. Front. Artif. Intell. 8:1701951. doi: 10.3389/frai.2025.1701951

Received: 09 September 2025; Revised: 09 November 2025; Accepted: 17 November 2025;
Published: 15 December 2025.

Edited by:

Wei Tian, Tongji University, China

Reviewed by:

Daniel Wesemeyer, Helmholtz Association of German Research Centers (HZ), Germany
Sura Mahmood, University of Technology, Iraq

Copyright © 2025 Magdy Saady, Ghazi Zaini, Essai, El_Rahman, Omer, Abdellah and Nazer. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

*Correspondence: Marina Magdy Saady, ZW5nLnJlbmEyMDEzMzNAZ21haWwuY29t

ORCID: Hatim Ghazi Zaini orcid.org/0000-0002-9121-8552
Saha A. El_Rahman orcid.org/0000-0002-2676-4311
Shaima E. L. Nazer orcid.org/0000-0002-2794-2749

Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.