Research on road traffic condition prediction of smart city based on spatio-temporal multi-source information fusion Authors: Chao Zheng, Qiankun Tang, Yanan Li Published: 2026 ABSTRACT AbstractThe number of motor vehicles have experienced significant growth over the past few decades as the economy continues to grow and urbanization accelerates. This phenomenon creates an urgent need for smart transportation technology. This paper aims to explore a prediction method suitable for predicting traffic flow in public transportation systems and the challenge of coping with the impact of abnormal traffic events on prediction. To this end, we propose a deep learning approach using dynamic graph networks and multi-head attention mechanisms to develop a traffic flow prediction method based on spatio-temporal multi-source information fusion. In addition, this paper also proposes an urban road traffic prediction method suitable for normal and abnormal traffic conditions. This method employs a deep learning framework to process traffic and accident data through dynamic graph networks and multi-task learning. The experimental results on three real traffic datasets, namely PEMS04, PEMS08 and Highways England, show that the proposed model has significantly better MAE than the optimal baseline AGCRN on PEMS04. On the England dataset, RMSE was 18.7% lower than DCRNN. In terms of long-term prediction, the MAE predicted by the model at 60 min is still lower than the baseline. Extensive experiments on a real-world dataset validate the effectiveness of our model. This study provides a novel perspective and solution for smart city traffic prediction, while developing a predictive tool for abnormal events, thereby enhancing the intelligence level of traffic management.Keywords: Traffic conditions, Deep learning, Urban road traffic prediction, Traffic systemSubject terms: Information technology, Computer science Introduction Urban traffic prediction is one of the key technologies of intelligent transportation system, which predicts the future development of urban road network by analyzing historical traffic observation data (such as traffic sensors, location information, social media, weather conditions, map information, etc.)1,2. Accurate and timely prediction is of great significance for intelligent management and effective guidance of urban traffic. However, traditional statistical and machine learning models struggle to capture complex nonlinear spatio-temporal dynamics, leading to suboptimal prediction performance3. With the increasing number of vehicles in urban routes, it is crucial to accurately predict the traffic flow at different time periods on urban roads. With the popularity of mobile Internet and iot devices, the proposed method is able to combine mobile terminal data and satellite positioning data to achieve traffic flow prediction and provide more intelligent services for residents. In recent years, deep learning has shown strong potential in representation learning ability, which provides an effective means to capture complex spatio-temporal correlation in traffic flow prediction4. Deep learning models can automatically learn and extract useful features from a large amount of raw data, and have made significant progress in the field of traffic flow prediction5. Methods based on convolutional Neural Network (CNN) and recurrent Neural network (RNN) have been widely used for traffic flow prediction at the macro level of cities. However, these models are mainly suitable for mining spatio-temporal correlations in 2D or 3D grid data with Euclidean spatial structure, such as region-level or station-level traffic flow prediction. Different from them, this paper needs to capture complex spatio-temporal correlations from non-Euclidean data on urban traffic road networks. Although traffic prediction research has made remarkable progress, existing methods do not make a clear distinction between urban traffic conditions. These methods can achieve good prediction performance under normal traffic conditions. However, the prediction performance of these methods usually degrades significantly when there are abnormal conditions on urban roads, such as severe weather, traffic accidents, road maintenance, temporary traffic control, and large events such as concerts and sports competitions. In order to solve the above challenges and fill the gap of research work, this chapter proposes a new deep learning model: spatio-temporal attention multi-graph convolutional network based on spatio-temporal multi-source information fusion. The model can simultaneously predict the traffic information (including the line-level flow) on the transportation network for multiple time intervals in the future, and achieve accurate flow prediction through integration. In addition, the traffic prediction model proposed in this paper has the ability to adapt to abnormal conditions for the universal traffic prediction demand of all road conditions. The model is not only suitable for traffic prediction under normal traffic conditions, but also can make accurate traffic prediction under abnormal traffic conditions. At present, only a few research works explicitly consider traffic anomaly conditions. However, these models only use abnormal traffic data for performance testing, or activate different models under different traffic conditions, without explicitly modeling the spatio-temporal impact of local abnormal events on irregular road networks, and it is difficult to achieve accurate traffic prediction under various complex urban traffic conditions6,7. The main contributions of this paper are as follows: This paper introduces an innovative deep learning model, spatio-temporal attention multi-graph convolutional network based on spatio-temporal multi-source information fusion. The adaptive graph convolutional neural network was used to automatically extract the hidden structural information between traffic flows from spatial nodes to extract spatial features. Multi-graph convolutional network and temporal attention mechanism were combined to capture the complex nonlinear time dynamic characteristics of traffic flow road network data, avoiding the problem of gradient disappearance or gradient explosion in long-term prediction. Finally, the prediction results were obtained through the fully connected layer. This paper introduces an innovative deep learning model, spatio-temporal attention multi-graph convolutional network based on spatio-temporal multi-source information fusion. The adaptive graph convolutional neural network was used to automatically extract the hidden structural information between traffic flows from spatial nodes to extract spatial features. Multi-graph convolutional network and temporal attention mechanism were combined to capture the complex nonlinear time dynamic characteristics of traffic flow road network data, avoiding the problem of gradient disappearance or gradient explosion in long-term prediction. Finally, the prediction results were obtained through the fully connected layer. Furthermore, the temporal attention mechanism is used to model the dynamic nonlinear temporal correlation between historical observations and future prediction time intervals. This approach helps alleviate the error propagation problem due to stepwise prediction. By dynamically adjusting and aggregating the importance of adjacent nodes in different ranges, the model can automatically capture the impact of abnormal events on road traffic while maintaining low computational complexity. Furthermore, the temporal attention mechanism is used to model the dynamic nonlinear temporal correlation between historical observations and future prediction time intervals. This approach helps alleviate the error propagation problem due to stepwise prediction. By dynamically adjusting and aggregating the importance of adjacent nodes in different ranges, the model can automatically capture the impact of abnormal events on road traffic while maintaining low computational complexity. In addition, this paper also proposes an abnormal event processing strategy based on multi-task multi-range multi-subgraph attention network. This model specifically considers abnormal traffic data and event data (such as traffic accidents, etc.), which are incorporated into the model fitting process to explicitly model the impact of abnormal events. The model can adaptively generate different subgraphs according to the characteristics of abnormal events, and model the characteristics of road nodes, which effectively solves the problem that it is difficult to model sudden traffic conditions caused by the sparsity of abnormal event data. In addition, this paper also proposes an abnormal event processing strategy based on multi-task multi-range multi-subgraph attention network. This model specifically considers abnormal traffic data and event data (such as traffic accidents, etc.), which are incorporated into the model fitting process to explicitly model the impact of abnormal events. The model can adaptively generate different subgraphs according to the characteristics of abnormal events, and model the characteristics of road nodes, which effectively solves the problem that it is difficult to model sudden traffic conditions caused by the sparsity of abnormal event data. The proposed model not only provides a new perspective and solution for urban traffic flow prediction, but also lays a solid theoretical foundation for the further development of intelligent transportation system. Through these advanced deep learning technologies, we can manage and guide urban traffic more effectively, improve the intelligence level of the transportation system, and provide a safer, more efficient and more comfortable travel environment for urban residents. Related work In the field of modern traffic flow prediction, data-driven approaches dominate. These methods are mainly divided into three categories: statistical theory based models8, deep learning models9 and graph convolutional network models10. Statistical theoretical models rely on the prior knowledge of researchers, but are limited by their ability to capture the dynamic changes in traffic flow. Deep learning models, such as Convolutional Neural Network (CNN), Long Short-Term memory (LSTM) and Gated Recurrent Unit (GRU), perform well in processing Euclidean spatial data. However, they fail to fully express the connection properties between nodes in the transportation network, which affects the simulation of the correlation between road segments. In recent years, with the rapid development of deep learning technology, Graph Convolutional neural Network (GCNN) has been introduced into traffic flow prediction, which significantly improves the ability to extract structured spatio-temporal features from non-Euclidean spatial data. Models such as DCRNN, Graph WaveNet, T-GCN, STGCN, and ASTGCN have started to show advantages in prediction accuracy11,12. In the prediction of traffic flow, To enhance prediction accuracy, Huang et al. proposed a Multi-scale Dual Graph Convolutional Network (MD-GCN) for traffic flow forecasting13. Likewise, Xu et al.14 introduced a deep learning framework featuring a Causal Gated Low-pass Graph Convolutional Network (CGLGCN) for traffic flow prediction. In addition, Xu et al.15 presented an advanced approach known as the Coupled Generative Graph Convolutional Model (CGGCN), designed to capture dynamic regional traffic relationships. In the field of dynamic graph convolution, Karim et al. proposed a traffic flow prediction method based on dynamic graph convolution networks. This method models the dynamic correlation of the road network through the probabilistic spatio-temporal adjacency matrix, captures the similarity features of non-adjacent roads by using the node-specific learning mechanism, and combines the gated recurrent unit (GRU) and the attention mechanism to extract the local trend and global periodic pattern of traffic flow respectively. Experiments show that this model outperforms the traditional static graph convolution method in both short-term and long-term prediction tasks16. Chen et al. proposed a spatio-temporal short-term traffic flow prediction model (Location-GCN) based on the convolution mechanism of dynamic learning graphs. This method automatically captures the dynamic spatial correlation between different road sections by introducing the learnable Weight matrix (Wmask) into the traditional GCN, and uses the LSTM network to extract temporal features. At the same time, it combines trigonometric function coding to transfer long-term periodic information, thereby achieving the comprehensive modeling of the spatiotemporal characteristics of traffic flow17. Chen et al. proposed a lane-level traffic flow prediction method based on dynamic graph convolutional networks. This method constructs a spatial topological structure through a data-driven adjacency matrix (including the basic distance matrix and the dynamic lane association matrix), regards different lanes of the same road section as independent nodes, and uses the Graph Convolutional Network (GCN) to capture the dynamic spatial association between lanes. Meanwhile, the timing features are extracted by combining the gated recurrent unit (GRU), and the spatio-temporal features are adaptively fused through the gating mechanism, ultimately achieving accurate prediction of lane-level traffic conditions18. In the field of automatic traffic anomaly detection, algorithms based on different theoretical basis emerge in endlessly. For example, The algorithm proposed by Li et al.19 effectively identifies and categorizes traffic anomaly scenarios through steps of video segmentation, feature extraction, and probabilistic modeling, demonstrating superior performance across a variety of traffic environments. Barria et al.20 proposed an anomaly detection and classification algorithm that combines the spatio-temporal variation of microscopic traffic variables such as relative speed, intershop time interval and lane change, which can detect and classify traffic anomalies using the statistical variance of microscopic traffic variables. For the external uncertain factors such as light, weather and obstacles, Li et al.21, using the advantages of fuzzy theory, designed the parameters including fuzzy traffic flow, density and motion state, combined with fuzzy control rules, and proposed an anomaly detection algorithm to accurately deal with uncertain information in traffic video surveillance. Based on the traffic anomaly detection method of neural network, Zhang et al. proposed a traffic anomaly detection method based on spatio-temporal graph neural network. The implicit features of the traffic flow time series are learned by the graph attention model to predict the traffic state, and the deviation between the predicted state and the actual state is used to calculate the graphical deviation score, so as to realize the automatic detection of traffic anomalies22. Nie et al.23 proposed a method to extract spatio-temporal features of network traffic using convolutional neural networks, estimate traffic through a fully connected architecture, and adopt a threshold-based strategy for anomaly detection. In addition, Luo et al. treat road anomaly detection as a classification problem, introduce a new type of anomaly defined from the perspective of vehicles, design three sets of road condition features, and compare the performance of three deep learning methods, namely DFN, CNN and RNN, on the anomaly detection task. Through experiments with fixed key hyperparameters, the effects of each model under different representations are evaluated. In a nutshell, they propose a comprehensive road anomaly detection scheme through deep learning methods and multi-angle feature representations6. Despite this, the existing spatio-temporal graph convolutional prediction methods still have some limitations in dealing with the influence of historical time series data on traffic flow characteristics at the time of prediction, and the dynamic change of spatial correlation over time. In addition, traditional GCNN tends to be immobilized in spatial feature extraction and may rely too much on prior knowledge. In the research hotspots of short-term traffic flow prediction, the method based on artificial neural network is particularly prominent. LSTM network, as an improvement of Recurrent Neural Network (RNN), effectively solves the problem of gradient disappearance or explosion, and can capture complex dependencies in time series data. The research shows that LSTM network has significant application potential in short-term traffic flow prediction. Yi et al. proposed a hybrid multi-layer architecture model based on deep learning for short-term traffic flow prediction in intelligent transportation systems. The model combines the Conv-LSTM module based on the attention mechanism to extract spatial and short-term features, in which the attention mechanism can automatically distinguish the importance of the traffic sequence at different periods. And Bi-LSTM module, which is used to mine daily and weekly periodic features to comprehensively capture the two-way traffic flow change trend. A large number of experimental results show that the model integrates Conv-LSTM and Bi-LSTM, and outperforms the existing methods in prediction performance24. In this paper, we integrate LSTM into our network to retain past traffic state information and handle multi-subgraph, multi-region attention fusion results. Methods Spatio-temporal attention multi-graph convolutional networks The proposed method framework based on Spatio-temporal Attention Multi-graph Convolutional Networks is shown in Fig. 1. The method firstly encodes the spatial correlation between the nodes in the traffic network based on the spatial connection relation and the semantic connection relation, and then constructs the spatial connection relation graph and the semantic connection relation graph. To quantify node importance in each subgraph, we employ Graph Convolution (GC) techniques. GC calculates node importance by dynamically assigning the same number of adjacent nodes into different convolutional buckets based on flow. We use spatiotemporal graph convolution and heterogeneous graph convolution to extract features based on spatial connection graph and semantic connection graph respectively from spatial connection graph and semantic connection graph by aggreging information of neighbors. Because single-layer graph convolution can only aggregate information of 1-hop neighbors, it cannot effectively model Multi-hop Spatial Dependencies. This limits its ability to capture Long-range Indirect Effects. Therefore, for indirect neighbors, spatial connection relation and semantic connection relation are used again, and features are extracted respectively, and feature fusion is achieved by weighting and concatenation. Then the time information is fused with the dynamic spatial features of GC output by time embedding module to capture the feature changes in time dimension. On this basis, a time concern module with residual connection is used to model the nonlinear time correlation of each node, which can capture the time correlation better. Finally, a fully connected neural network is used to convert the extracted features into traffic flow prediction results to achieve high-precision traffic flow prediction. Framework of the proposed method based on Spatio-temporal Attention Multi-graph Convolutional Networks. Building a connection graph Physical connection graph Given a node p, we construct its physical connection graph P = (T,X,B) based on spatial proximity. Where, T contains the co-directed nodes, adjoint nodes, and all direct adjacent nodes of node p,. In T, the edges between nodes are kept consistent with the edges in the original graph P. Based on this definition, the adjacency matrix B can be obtained by the following Eq. 1: Semantic connection graph construction As shown in Fig. 2, two nodes with similar semantic features may have similar passenger flow patterns even if they are far apart in physical Euclidean space. In this paper, we use GCN to infer the connection possibility between each node pair in the Instance Pivot Subgraph (ISP), and construct a semantic similarity subgraph for each node according to the node semantic features. The actual spatial physical relationship and the corresponding physical connection diagram on the traffic route. (a) Map of node distribution on traffic routes. (b) Physical relationship connection diagram. Straight connecting lines between nodes 1, 2, 3 represent direct relationships; The dashed lines between nodes 4,5,6 and 1 represent indirect relationships; Dashed lines between nodes 7,8,9 and 5 represent potential relationships. In this study, for a specific node p, we adopt a semantic classification based approach to construct its initial semantic similarity subgraph, as shown in Fig. 3. The process involves the following steps: Extraction of node semantic features: First, we use the semantic features of node p to identify the semantically closest candidate node subset with node p by calculating the cosine similarity between each node in the node set and node p, which contains k most similar nearest neighbor nodes. Extraction of node semantic features: First, we use the semantic features of node p to identify the semantically closest candidate node subset with node p by calculating the cosine similarity between each node in the node set and node p, which contains k most similar nearest neighbor nodes. Construction of initial semantic similarity subgraphs: Based on the candidate node subset, we further construct initial semantic similarity subgraphs with different hop counts. Construction of initial semantic similarity subgraphs: Based on the candidate node subset, we further construct initial semantic similarity subgraphs with different hop counts. The addition of supplementary edges: For any node v in subset, we check its nearest neighbour in the original set V of nodes. If a node already exists in, the complementary edge between the node and is added to the edge set. The addition of supplementary edges: For any node v in subset, we check its nearest neighbour in the original set V of nodes. If a node already exists in, the complementary edge between the node and is added to the edge set. Semantic relations and corresponding semantic connection graphs on traffic routes. (a) Classification map of areas on traffic routes. (b) The corresponding semantic relation and semantic relation graph of nodes on traffic routes. Solid lines of the same color in the figure indicate the same classification; The dashed line shows the influence of nodes in other areas on nodes in leisure areas. Through the above steps, we are able to construct an initial semantic similarity subgraph centered at node p and containing its semantically similar neighbors, which provides a basis for subsequent semantic analysis and information processing. Subgraph verification with graph convolutional networks (GCN) In this study, we perform further semantic similarity verification on the initial subgraph constructed by semantic classification to determine the connection relationship between nodes. This process relies on the deep learning ability of Graph Convolutional Network (GCN). The specific implementation steps are as follows: Input data preparation: The adjacency matrix A ∈ RN × N and the semantic feature matrix M ∈ RN × d are taken as inputs. Input data preparation: The adjacency matrix A ∈ RN × N and the semantic feature matrix M ∈ RN × d are taken as inputs. Graph convolutional Network Processing: The input data is passed through a graph convolutional network, which uses the attention mechanism to strengthen the semantic similarity between nodes. The graph convolution operation can be expressed as: A′ = σ(G⋅A′ ⋅W) where A′ is the transformed node feature matrix, G is the attention matrix, ⋅ represents matrix multiplication, W is the learnable weight matrix, and σ is the applied nonlinear activation function. Graph convolutional Network Processing: The input data is passed through a graph convolutional network, which uses the attention mechanism to strengthen the semantic similarity between nodes. The graph convolution operation can be expressed as: A′ = σ(G⋅A′ ⋅W) where A′ is the transformed node feature matrix, G is the attention matrix, ⋅ represents matrix multiplication, W is the learnable weight matrix, and σ is the applied nonlinear activation function. Feature concatenation: In the feature dimension, the transformed node feature matrix is concatenated with the original semantic feature matrix to enhance the model’s ability to capture the semantic information of nodes. Feature concatenation: In the feature dimension, the transformed node feature matrix is concatenated with the original semantic feature matrix to enhance the model’s ability to capture the semantic information of nodes. Through the above steps, GCN can effectively learn the semantic similarity between nodes, and adjust the connection relationship in the initial subgraph accordingly, so as to optimize the structure of the subgraph and make it more close to the actual semantic association. Spatio-temporal information fusion In this study, we adopted a Hash graph convolution (HGC) model to analyze the spatial correlation between transportation nodes in a transportation network, which includes factors based on physical adjacency and semantic similarity. Because the traditional GCN only deals with the adjacency matrix, and the hash graph convolution maps the nodes to the low-dimensional space through the learnable hash function, it solves the problem of computational efficiency of high-order relations in large-scale road networks. The fixed graph structure is difficult to adapt to sudden traffic incidents, while HGC can model dynamic processes such as congestion propagation by real-time updating of node embeddings. In order to deeply explore the temporal correlation between different trains within a station, this section proposes a novel time embedding method, which is able to encode each time interval into a vector. Encoding and transforming temporal features In traffic data processing, the encoding and fusion of time series information are the core links to improve prediction accuracy. For time features such as day of the week and hour, we use single-heat coding to encode the week information and specific time (hour) features in the time step into vectors of lengths K and F respectively. Eliminating the misleading numerical order relationship and then compressing it into a dense vector through a double-layer fully connected network not only solves the problem of high-dimensional sparsity but also captures combined patterns (such as "Friday evening rush Hour"). Its nonlinear projection ability is superior to that of traditional sinusoidal coding. Embedding temporal features For multi-step prediction requirements, it is necessary to separate the embedded historical step size (H step) from the future step size (such as 22 steps). The former encodes short-term memory (such as congestion propagation), while the latter is aligned with the prediction target length to avoid the gradient decay problem of RNN. At the same time, the continuous bell-shaped curve of the radial basis function (RBF) is used to replace discrete coding to enhance the smoothness of periodic modeling. Spatio-temporal information fusion To achieve long-term vehicle-level passenger flow prediction, we propose a method that fuses graph structure and temporal information of urban traffic flows. Specifically, we combine dynamic spatial features with temporal embeddings to form spatio-temporal embeddings. Dynamic nonlinear modeling based on the temporal attention mechanism In view of the error accumulation problem in multi-step traffic flow prediction, when the prediction step size of traditional stepwise prediction methods (such as Seq2Seq and autoregressive model) increases, the prediction error of the earlier step will be passed to the subsequent step step by step, resulting in a significant deviation from the real value of the long-term prediction result. To solve this problem, this model proposes a hierarchical time attention mechanism to achieve error propagation suppression from two levels. Intra-step attention The influence weight of historical observations on the target time interval is dynamically evaluated in the single-step prediction, focusing on historical patterns that are strongly correlated with the forecast period (such as cyclical laws, abnormal fluctuations caused by accidents). Specifically, the attention weight of the current prediction step t versus the historical step k is calculated as: The query vector and key vector are generated by the hidden state of encoder-decoder LSTM, and d is the feature dimension. This mechanism reduces the transmission of single-step prediction error to subsequent steps by amplifying the weights of key historical periods (such as similar periods in the morning peak) and suppressing the influence of noise periods. Inter-step attention Multiple self-attention layers are introduced in the decoding side to explicitly model the dependency between future multi-step prediction results. By jointly optimizing the prediction state of the step, the model has the ability of "forward-looking" adjustment to avoid the cascading amplification of errors in multi-step prediction. For example, when predicting step t + 3, the model can refer to the attention distribution at steps t + 1 and t + 2 to dynamically modify the estimate of the congestion propagation path. Dynamic spatial importance aggregation and anomaly event modeling The spatio-temporal interaction in the transportation network has significant heterogeneity: the influence of adjacent nodes changes dynamically with spatial distance and time context (such as peak/off-peak period). Therefore, the following mechanism is proposed in this paper. Design a learnable spatial attention module for each node v, evaluating the importance of neighbor nodes within different distance ranges (e.g., 1-hop, 2-hop). The attention score of neighbor v in range r is calculated as: where Δt encodes the observation time interval and is the range-specific weight matrix. This mechanism enables the model to adaptively distinguish between local congestion propagation and long-distance functional synergies. When an abnormal event (such as a traffic accident) occurs, the model automatically captures its impact through abnormal signal detection, influence area reconstruction, and propagation path modeling. Abnormal node is identified based on the flow mutation rate δ. Among them, is the actual observed flow value of node vi at time t; is the expected benchmark traffic value of node v i at time t; δ essentially refers to the percentage by which the actual flow deviates from the expected value. When δ exceeds the preset threshold, an abnormal alarm is triggered. Then, the attention weight of and of upstream and downstream node set is enhanced. Adjust the weight calculation function of the multi-head attention layer: Among them, ϵ ≈ 0.01 achieves suppression of the irrelevant region. is the set of upstream nodes; is the set of downstream nodes. Finally, according to the real-time traffic gradient , the aggregation range is dynamically adjusted to match the direction of congestion diffusion. x represents the traffic state variable (such as traffic flow, speed), and ∂ x is the differential form of this variable, indicating its infinitesimal change. represents the rate of change of the traffic condition along the direction of the traffic flow. represents the rate of change of the traffic condition in the lateral direction. Each component of the gradient ∇x(t) directly reflects the direction and intensity of congestion propagation: The flow or density increases along the direction of the traffic flow, meaning that congestion spreads downstream. The flow or density decreases laterally, meaning congestion spreads to adjacent lanes. ​In order to balance model performance and computational efficiency, a lightweight design strategy is proposed to optimize the computational overhead. Firstly, the sparse attention computing mechanism is used to reduce the computational complexity of traditional global attention from to O(N· K) by screening each node to focus only on the Top-K important neighbors, while preserving the key space dependency information. Secondly, a parallel architecture is designed to realize parallel computation of multi-head attention and graph convolution operations based on batch matrix multiplication, and make full use of GPU hardware acceleration characteristics to improve training and reasoning speed. In addition, for the time modeling module, a deep separable convolution alternative is proposed to reconstruct the timing features in the attention layer through channel separation and point-by-point convolution to reduce redundant parameters. Experiments show that the design can reduce the number of parameters by 40% while maintaining the model prediction accuracy. Multi-subgraph multi-region attention composite task network This network aims to deeply explore the complex dynamic correlation of urban road traffic under abnormal conditions, for which we propose an innovative multi-subgraph multi-region attention composite task network, as shown in Fig. 4. The network consists of three core components: multi-subgraph attention module, multi-region attention module and multi-task fusion module. Multi-subgraph multi-region attention fusion network architecture. This network aims to deeply explore the complex dynamic correlation of urban road traffic under abnormal conditions, for which we propose an innovative multi-subgraph multi-region attention composite task network, as shown in Fig. 4. The network consists of three core components: multi-subgraph attention module, multi-region attention module and multi-task fusion module. Multi-subgraph attention module In this network, the road network is first divided into a road segment graph and an intersection graph, and the conventional road segment traffic data XL and the intersection traffic data XJ are used as model inputs, respectively. By analyzing traffic data X and abnormal event type data Y, the module learns the common characteristics of traffic data implied by similar events in abnormal event Y. The learning result output is the road section traffic data and the intersection traffic data. These output data are subsequently fused with the input initial traffic data XL and XJ to form a hybrid feature of traffic data at each node, which provides the basis for the input of the next module. Multi-region attention module The multi-region attention module is designed to dynamically learn the importance of adjacent nodes in different neighborhood ranges and output the corresponding attention weights AL and AJ. This process allows the model to adaptively adjust the attention to information in different neighborhood ranges to capture both local and global traffic dynamics. Multi-task fusion and time series prediction Based on the multi-region attention module, a multi-task fusion module with parameter sharing strategy is further introduced to aggregate the features of the road segment graph GL and the intersection graph GJ. This fusion strategy not only enhances the model’s understanding of complex traffic patterns, but also improves the model’s generalization ability. After the multi-task fusion module, we introduce the Long Short-Term Memory (LSTM) network to learn the correlation of time series data to achieve accurate prediction of complex traffic flow. Experimental verification Experimental database In order to verify the accuracy and effectiveness of the proposed model, two data sets from PEMS, the California Traffic Flow Database, were selected for model validation. The PEMS database provides a detailed record of traffic flow on California highways. Dataset description PEMS04 dataset: This dataset collects highway information collected every 5 minutes from 307 traffic detection sensors in the San Francisco area between January 1 and February 28, 2018. PEMS08 dataset: This dataset collects highway information collected at five-minute intervals from 170 traffic detection sensors in the SAN Bernardino area between July 1 and August 31, 2016. Highways England dataset: This dataset collects information on each type of road and different regions of the motorways in the UK traffic network during the period from 2000 to 2023. Data preprocessing Handling Missing values: Missing values in the dataset were filled in by a linear interpolation method to ensure data integrity. Normalization: In order to improve the stability of the training process, all the data have been standard normalized. Experimental design Subjects: In this study, traffic flow was used as the experimental subject to verify the prediction ability of the model for traffic flow patterns. Time step: The historical data of 12 consecutive time steps are used in the experiment to predict the data of the next 12 time steps. Dataset Partitioning: The dataset is split into training, validation, and test sets in a 6:2:2 ratio to ensure that the generalization ability of the model is fully evaluated.4. Model training Optimizer: We use the Adam optimizer, which is an adaptive learning rate optimization algorithm that speeds up the training process and improves model performance. Number of iterations: The number of model training iterations is set to 100 to ensure that the model fully learns the data features. batch size: The batch size is set to 32 to achieve a balance between computational resources and model performance. Initial Learning Rate: The initial learning rate is set to 0.001, which is a common starting value recommended based on experiments and the literature. Experimental evaluation index In order to comprehensively evaluate the effectiveness of the model and the accuracy of its prediction results, this study selected three widely recognized evaluation indicators to measure the prediction performance of the model: Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and Mean Absolute Percentage Error (MAPE). These indicators can reflect the difference between the predicted values of the model and the actual observed values from different perspectives. Mean absolute error (MAE): where n is the total number of data points, yi is the ith observed value, and i is the ith predicted value. Root mean square error (RMSE): where n is the total number of data points, yi is the ith observed value, and y ^i is the ith predicted value. Mean absolute percentage error (MAPE): where n is the total number of data points, yi is the ith observed value, and y ^i is the ith predicted value. Through these evaluation metrics, we can make a comprehensive analysis and evaluation of the prediction performance of the model. MAE provides the average magnitude of the absolute value of the prediction error, RMSE measures the average magnitude of the squared prediction error, and MAPE provides the proportion of the prediction error relative to the actual observed magnitude. Analysis of experimental results Comparison of baseline models In order to comprehensively evaluate the performance of the proposed method in the traffic flow prediction task, this study carefully selected six advanced prediction models as the benchmark comparison. These models include: HA model: A traditional method based on the average of historical data used to predict traffic flow. This model is simple and intuitive and easy to implement, but may lack the ability to capture the complex dynamics of time series; HA model: A traditional method based on the average of historical data used to predict traffic flow. This model is simple and intuitive and easy to implement, but may lack the ability to capture the complex dynamics of time series; VAR model: An autoregressive model based on time series analysis, which is able to use the autocorrelation of historical data to make predictions. VAR model has good statistical properties when dealing with time series data, but it may have limitations in dealing with spatial correlation. VAR model: An autoregressive model based on time series analysis, which is able to use the autocorrelation of historical data to make predictions. VAR model has good statistical properties when dealing with time series data, but it may have limitations in dealing with spatial correlation. LSTM model: A Recurrent Neural Network (RNN) -based model that is particularly good at handling sequential data and capturing temporal dependencies. LSTM effectively solves the gradient vanishing problem of traditional RNN through its unique gating mechanism, but its ability to process spatial features is limited. LSTM model: A Recurrent Neural Network (RNN) -based model that is particularly good at handling sequential data and capturing temporal dependencies. LSTM effectively solves the gradient vanishing problem of traditional RNN through its unique gating mechanism, but its ability to process spatial features is limited. DCRNN model: A model that combines convolutional neural Network (CNN) and recurrent Neural network (RNN) is specifically designed to handle the spatial and temporal characteristics of traffic flow data. DCRNN captures local spatial features through convolutional layers and processes time series information through recurrent layers, but it may be insufficient in capturing global spatial features. DCRNN model: A model that combines convolutional neural Network (CNN) and recurrent Neural network (RNN) is specifically designed to handle the spatial and temporal characteristics of traffic flow data. DCRNN captures local spatial features through convolutional layers and processes time series information through recurrent layers, but it may be insufficient in capturing global spatial features. ASTGCN model: A Spatial-temporal graph convolutional network based on attention mechanism, which can adaptively learn the association and importance between nodes. ASTGCN dynamically adjusts the relationship weights between nodes through the attention mechanism, which improves the adaptability of the model to the dynamics of complex traffic networks. ASTGCN model: A Spatial-temporal graph convolutional network based on attention mechanism, which can adaptively learn the association and importance between nodes. ASTGCN dynamically adjusts the relationship weights between nodes through the attention mechanism, which improves the adaptability of the model to the dynamics of complex traffic networks. AGCRN model: A model that combines graph convolutional neural network and recurrent neural network, and introduces attention mechanism. AGCRN combines the advantages of the two networks and uses the attention mechanism to enhance the model’s ability to capture spatio-temporal features. AGCRN model: A model that combines graph convolutional neural network and recurrent neural network, and introduces attention mechanism. AGCRN combines the advantages of the two networks and uses the attention mechanism to enhance the model’s ability to capture spatio-temporal features. Comparisons with these baseline models comprehensively evaluate accuracy, stability, and generalization ability of the proposed method in traffic flow prediction. The selection of these benchmark models not only covers a wide range of traditional statistical methods to modern deep learning techniques, but also includes different processing strategies for temporal features, spatial features, and joint spatio-temporal features. With this comprehensive comparison, we can more accurately assess the strengths and potential improvement space of the proposed method. In this study, we performed a comprehensive evaluation of the proposed method against other traffic flow prediction models by comparing experimental data. The analysis results show that the proposed method on PEMS04, PEMS08 and England datasets shows low values in the three key evaluation indicators of MAE (Mean absolute error), RMSE (root mean square error) and MAPE (Mean absolute percentage error). This highlights the remarkable accuracy and predictive power of the proposed method on the traffic flow prediction task. According to Table 1, compared with the traditional HA (based on the average of historical data) and VAR (autoregressive model) prediction models, on PEMS04 dataset, the proposed method decreased by 19.33% and 6.31% in MAE, 24.79% and 6.55% in RMSE, respectively. It achieves 16.04% and 5.11% reduction on MAPE, respectively. This significant improvement shows that our deep learning-based prediction model has obvious advantages in improving the prediction accuracy compared with the model based on traditional statistical theory. Table 1Prediction accuracy of the proposed method with related models.DatasetMetricsHA17VAR25LSTM24DCRNN26ASTGCN27AGCRN28Proposed methodPEMS04MAE38.5625.5427.1421.2222.0319.8319.23RMSE56.8538.6141.5933.4434.7932.2632.06MAPE28.1717.2418.214.1716.2512.9712.13PEMS08MAE32.0619.5423.2516.8218.2516.5815.46RMSE47.1529.8134.0626.3628.1526.6725.23MAPE20.3413.0114.2510.9211.6510.589.74EnglandMAE63.2549.8353.2242.7254.3334.1432.81RMSE84.3767.4771.3749.6755.6242.8540.38MAPE47.5932.1331.4925.4129.8122.3721.65 Prediction accuracy of the proposed method with related models. Furthermore, by comparing the MAE, MAPE and RMSE results of the proposed method with the LSTM model that only considers the temporal features on the dataset, we find that incorporating the spatial information into the traffic flow prediction model can significantly improve the prediction accuracy. This point confirms the importance of spatial features in traffic flow prediction. Finally, compared with other spatio-temporal prediction models, the proposed method effectively avoids predefined assumptions on spatial features by constructing an adaptive adjacency matrix and introducing an attention mechanism. This method enables the model to capture the spatial dynamic correlation of the actual traffic network more accurately, and can dynamically assign different weights to the spatio-temporal features according to the traffic flow change law at different times. This adaptive and dynamic weight allocation strategy further improves the prediction accuracy of the model, which verifies the effectiveness and superiority of the proposed method in dealing with complex traffic flow prediction problems. Comparison of prediction duration In this study, we conducted an in-depth analysis of the prediction accuracy of the proposed method and the trend of model performance variation under different prediction durations. To this end, three advanced spatio-temporal prediction models, AGCRN, DCRNN and ASTGCN, are selected, and comparative experiments on the prediction performance are conducted on two representative traffic flow datasets, PEMS04 and PEMS08. The experimental design is as follows: We predict the future traffic flow situation from 10 minutes to 60 minutes at a time interval of every 10 minutes. This design allows us to comprehensively evaluate the prediction accuracy of the model for different prediction durations and observe the trend of model performance as the prediction duration increases. The experimental results are shown in Figs. 5, 6 and 7. By comparing the prediction performance of the baseline models (AGCRN, ASTGCN, DCRNN) under different prediction durations, we find that the proposed method shows better performance than other models in the three key evaluation indicators of MAE (Mean absolute error), RMSE (root mean square error) and MAPE (Mean absolute percentage error). This result shows that the proposed method has higher accuracy and stability in the traffic flow prediction task. Results of different models on PEM04 dataset. Results of different models on PEM08 dataset. Results of different models on England dataset. Specifically, the MAE of the proposed method is lower than that of other models at each prediction duration, which means that its prediction results are closer to the actual data and have better accuracy. In addition, the RMSE value of the proposed method is also significantly lower than that of the other models, which further confirms its advantage in prediction accuracy. RMSE, as a measure of prediction error, takes into account the squared error, so it can better reflect the accuracy of model prediction. Finally, the proposed method performs equally well on MAPE. MAPE calculates the percentage of prediction error relative to the actual value, and the low MAPE value of the proposed method indicates that its prediction results are closer to the true value with less error. In summary, the proposed method shows better performance than other models in the three evaluation indicators of MAE, RMSE and MAPE under different prediction durations. This result proves that the proposed method has higher accuracy, stability and reliability in the traffic flow prediction task. These findings provide a powerful tool for traffic flow prediction, expected to play an important role in future traffic management and planning. Ablation experiment In this study, in order to systematically evaluate the effectiveness of the various components in the proposed model, we designed a series of ablation experiments. Ablation experiments are a way to test the effect on the overall performance of a model by removing or replacing certain parts of it. We chose to perform these experiments on the PeMS04 dataset to ensure the reliability and validity of the results. The design of the ablation experiment included four variants: The design of the ablation experiment included four variants: No adaptive Graph Convolutions: In this variant, we remove the feature of adaptive graph convolutions and use plain graph convolutions instead. This design allows us to evaluate the role of adaptive graph convolutions in capturing spatial dynamic correlations in traffic networks. No adaptive Graph Convolutions: In this variant, we remove the feature of adaptive graph convolutions and use plain graph convolutions instead. This design allows us to evaluate the role of adaptive graph convolutions in capturing spatial dynamic correlations in traffic networks. No attention: In this variant, we remove the temporal attention module from the model. This step aims to test the importance of the attention mechanism in assigning different weights to the spatio-temporal features of historical traffic flows. No attention: In this variant, we remove the temporal attention module from the model. This step aims to test the importance of the attention mechanism in assigning different weights to the spatio-temporal features of historical traffic flows. Multi-head attention vs single-head attention: In this variant, we conducted separate experiments on two different graph convolution models in the model and then compared them with the complete experiments of our model. This design enables us to evaluate the role of different graph convolution models in capturing spatial dynamic correlations in the traffic network. Multi-head attention vs single-head attention: In this variant, we conducted separate experiments on two different graph convolution models in the model and then compared them with the complete experiments of our model. This design enables us to evaluate the role of different graph convolution models in capturing spatial dynamic correlations in the traffic network. GCN vs GAT: In this variant, we conducted separate experiments on two different graph convolution models in the model and then compared them with the complete experiments of our model. This design enables us to evaluate the role of different graph convolution models in capturing spatial dynamic correlations in the traffic network. GCN vs GAT: In this variant, we conducted separate experiments on two different graph convolution models in the model and then compared them with the complete experiments of our model. This design enables us to evaluate the role of different graph convolution models in capturing spatial dynamic correlations in the traffic network. The experimental results are shown in Fig. 8. By comparing the prediction performance of the original proposed model and these two variants, we observe significant performance differences. When normal graph convolution is used instead of adaptive graph convolution, the prediction performance of the model decreases significantly. This finding indicates that the adaptive graph convolution module effectively captures the spatial dynamic correlation of the transportation network by dynamically generating the adjacency matrix during the training process, thus significantly improving the prediction performance of the model. Results of ablation experiments. In addition, when the temporal attention module is removed, the prediction error of the model also increases. This further confirms the importance of the attention mechanism in the model. The attention mechanism allows the model to assign weights to different spatio-temporal features more flexibly, so as to capture the spatio-temporal changes of traffic flow more effectively. We found that when the core components were replaced or removed, the performance would significantly decline. When spatial modeling only used either GCN or GAT, this indicated that using only one type of graph structure could not capture traffic dynamics such as congestion propagation patterns. Similarly, using only HGCN or STAMGC would lead to a decrease in various performance indicators, confirming that the modeling of node and edge heterogeneity is crucial for traffic networks with multiple dependencies. Moreover, the temporal attention module proved to be indispensable–its deletion would cause a significant drop in all indicators, as rigid feature weighting cannot adapt to periodic patterns such as peak-hour surges. These research results collectively indicate that the proposed method outperforms the denoised version in all indicators, which validates the superiority of its collaborative design. In summary, the results of ablation experiments clearly demonstrate the key role of adaptive graph convolution and attention mechanism in the proposed method. These findings not only deepen our understanding of the inner workings of the model, but also provide valuable guidance for future model improvement and optimization. Through these experiments, we are able to more confidently recommend the proposed method as an effective tool for traffic flow prediction tasks. Conclusion To address the ​complexity​ of spatio-temporal features in traffic flow prediction, ​we propose​ a high-level model based on spatio-temporal multi-source information fusion. The model was validated on publicly available highway data sets and demonstrated excellent predictive performance. The core innovation of the model is its dynamic graph convolution operation, which effectively avoids the limitations of the predetermined graph structure in the traditional method. In addition, the temporal attention mechanism is combined with the LSTM network to realize the effective extraction of temporal features. At the same time, the temporal attention mechanism is used to model the dynamic nonlinear temporal correlation between historical observations and future forecast time intervals. This method helps to alleviate the error propagation problem caused by gradual prediction, and by dynamically adjusting and aggregating the importance of adjacent nodes in different ranges, the model can automatically capture the impact of abnormal events on road traffic. At the same time, the computational complexity is low. In addition, the multi-graph convolutional network can be combined with the time attention mechanism to capture the complex nonlinear temporal dynamic characteristics of traffic flow network data, avoiding the problem of gradient disappearance or gradient explosion in long-term prediction. In addition, an abnormal event processing strategy based on multi-task, multi-scope and multi-subgraph attention network is proposed, which specifically considers abnormal traffic data and event data (such as traffic accidents, etc.), and incorporates them into the model fitting process to clearly model the impact of abnormal events. The model can generate different subgraphs adaptively according to the characteristics of abnormal events, and effectively solve the problem that it is difficult to model sudden traffic conditions due to sparse abnormal event data. The spatiotemporal multi-source information fusion model optimized based on LSTM architecture provides a more accurate solution for traffic flow prediction. The experimental results show that the prediction accuracy of the proposed model on the highway data set has been significantly improved. By integrating these modules, we build a more comprehensive and accurate traffic flow prediction model, which provides strong support for traffic management and planning. To sum up, the traffic flow prediction model based on spatiotemporal multi-source information fusion proposed in this paper shows its potential in the field of traffic flow prediction both theoretically and practically. With further research in the future, we have reason to believe that this model will provide a more powerful tool for understanding and predicting complex traffic flow dynamics. Author contributions Chao Zheng and Qiankun Tang wrote the main manuscript text. Chao Zheng and Yana Li prepared Figs. 1–7 and Table 1. All authors reviewed the manuscript. Funding This research was funded by Henan Academy of Sciences research start-up project, grant number 231820014, Henan Academy of Sciences research start-up project, grant number 251820019, Henan Academy of sciences, innovative entrepreneurial team project, grant number 20230206 and supported by the Innovation and Entrepreneurship Team Project of Henan Academy of Sciences under Grant (20230201). Data availability The data were derived from the following resources available in the public domain: http://pems.dot.ca.gov, https://webtris.highwaysengland.co.uk/. Declarations Competing interests The authors declare no competing interests. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. References Associated Data Data Availability Statement The data were derived from the following resources available in the public domain: http://pems.dot.ca.gov, https://webtris.highwaysengland.co.uk/.