<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article">
 <front>
  <journal-meta>
   <journal-id journal-id-type="publisher-id">
    jcc
   </journal-id>
   <journal-title-group>
    <journal-title>
     Journal of Computer and Communications
    </journal-title>
   </journal-title-group>
   <issn pub-type="epub">
    2327-5219
   </issn>
   <issn publication-format="print">
    2327-5227
   </issn>
   <publisher>
    <publisher-name>
     Scientific Research Publishing
    </publisher-name>
   </publisher>
  </journal-meta>
  <article-meta>
   <article-id pub-id-type="doi">
    10.4236/jcc.2025.138008
   </article-id>
   <article-id pub-id-type="publisher-id">
    jcc-144823
   </article-id>
   <article-categories>
    <subj-group subj-group-type="heading">
     <subject>
      Articles
     </subject>
    </subj-group>
    <subj-group subj-group-type="Discipline-v2">
     <subject>
      Computer Science 
     </subject>
     <subject>
       Communications
     </subject>
    </subj-group>
   </article-categories>
   <title-group>
    Traffic Speed Prediction Based on Autoencoder and Deep Learning
   </title-group>
   <contrib-group>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Zhuowei
      </surname>
      <given-names>
       Fu
      </given-names>
     </name>
    </contrib>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Huifang
      </surname>
      <given-names>
       Feng
      </given-names>
     </name>
    </contrib>
   </contrib-group> 
   <aff id="affnull">
    <addr-line>
     aCollege of Mathematics and Statistics, Northwest Normal University, Lanzhou, China
    </addr-line> 
   </aff> 
   <pub-date pub-type="epub">
    <day>
     01
    </day> 
    <month>
     08
    </month>
    <year>
     2025
    </year>
   </pub-date> 
   <volume>
    13
   </volume> 
   <issue>
    08
   </issue>
   <fpage>
    163
   </fpage>
   <lpage>
    180
   </lpage>
   <history>
    <date date-type="received">
     <day>
      9,
     </day>
     <month>
      July
     </month>
     <year>
      2025
     </year>
    </date>
    <date date-type="published">
     <day>
      12,
     </day>
     <month>
      July
     </month>
     <year>
      2025
     </year> 
    </date> 
    <date date-type="accepted">
     <day>
      12,
     </day>
     <month>
      August
     </month>
     <year>
      2025
     </year> 
    </date>
   </history>
   <permissions>
    <copyright-statement>
     © Copyright 2014 by authors and Scientific Research Publishing Inc. 
    </copyright-statement>
    <copyright-year>
     2014
    </copyright-year>
    <license>
     <license-p>
      This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/
     </license-p>
    </license>
   </permissions>
   <abstract>
    Trafffc prediction is the core of intelligent transportation system, and accurate traffic speed prediction is the key to optimize traffic management. Currently, the traffic speed prediction model based on deep learning has become a research hotspot in the field of transportation. With the rapid development of deep learning and the improvement of computer hardware performance, traffic speed prediction based on deep learning has become a hot spot and mainstream of research. In this paper, a traffic speed prediction model based on autoencoder structure is proposed by combining Causal Convolutional Network (CCN), Graph Convolutional Network (GCN) and Multi-Head Self-Attention (MHSA). The model realizes efficient extraction and fusion of spatiotemporal features through a layered design: GCN handles spatial features, CCN and MHSA handle temporal features. First, in the encoder, multiple 2D causal convolution modules are utilized to capture the core features of traffic flow and remove redundant information. Second, the attention weights are dynamically computed using MHSA to identify important time points and sub-sequences in the traffic sequence, and the spatial features of the traffic flow captured using GCN. Further, when reconstructing potential features in the decoder, jump connections from the encoder are added, so that the decoder multiplexes the shallow features extracted by the encoder in the feature reconstruction stage and retains more detailed information of the original data. Finally, the prediction results are obtained by nonlinear fusion of the autoencoder information by the fully connected network. The experimental results show that compared with many baseline models, the proposed model in this paper is able to capture the spatio-temporal correlation of traffic speed data in traffic flow prediction and has good prediction performance.
   </abstract>
   <kwd-group> 
    <kwd>
     Traffic Speed Prediction
    </kwd> 
    <kwd>
      Causal Convolutional Network
    </kwd> 
    <kwd>
      Multi-Head Self-Attention
    </kwd> 
    <kwd>
      Graph Neural Network
    </kwd> 
    <kwd>
      Autoencoder
    </kwd>
   </kwd-group>
  </article-meta>
 </front>
 <body>
  <sec id="s1">
   <title>1. Introduction</title>
   <p>In the face of such a severe urban traffic predicament, the significance of traffic flow prediction as the cornerstone of urban traffic control and guidance has become more and more prominent. Traffic flow prediction through the future period of time on the road vehicle flow, speed, density and other parameters for the scientific prediction, for traffic management departments to provide a basis for decision-making. For example, in advance to grasp the changes in a road traffic flow, you can reasonably plan the traffic signal timing, to avoid excessive gathering of vehicles; for the possible congestion of the road, timely release of traffic warning information, to guide the public to choose the optimal travel route. Accurate traffic flow prediction is the core of optimized traffic management, which can help traffic management departments to achieve efficient allocation of traffic resources, enhance road capacity and ease traffic congestion.</p>
   <p>In recent years, with the rapid development of artificial intelligence technology, the traffic flow prediction model based on deep learning has been generated, and has rapidly become a research hotspot in the field of transportation. Deep learning, with its powerful feature extraction and data processing capabilities, can automatically mine the complex spatial and temporal features in traffic data, effectively deal with the complexity of traffic flow, and provide a more accurate and reliable solution for traffic flow prediction, thus opening up new paths for easing urban traffic congestion and optimizing traffic management.</p>
   <p>Currently, traffic flow prediction methods are broadly categorized into three types, i.e., traditional time series methods, machine learning methods and deep learning methods. Traditional time series methods mainly focus on the time-series information contained in the data, using methods such as Kalman filter analysis (KF) <xref ref-type="bibr" rid="scirp.144823-1">
     [1]
    </xref>, History Average (HA) <xref ref-type="bibr" rid="scirp.144823-2">
     [2]
    </xref>, Vector Autoregression (VAR) <xref ref-type="bibr" rid="scirp.144823-3">
     [3]
    </xref>, Autoregression Integrated Moving Average Model (ARIMA) <xref ref-type="bibr" rid="scirp.144823-4">
     [4]
    </xref>, etc., which predict future traffic conditions through simple mathematical operations. The advantage of traditional time series methods is that the model is simple and the calculation speed is fast; the disadvantage is that only smooth time series data can be considered, which is not applicable to nonlinear traffic flow data, and only the temporal information in the traffic flow can be extracted, and the spatial dependence contained therein cannot be modeled.</p>
   <p>In order to solve the limitations of traditional statistical models, many machine learning models have been widely used by researchers in the field of traffic state prediction, such as K-Nearest Neighbor (KNN) <xref ref-type="bibr" rid="scirp.144823-5">
     [5]
    </xref>, Support Vector Machine (SVM) <xref ref-type="bibr" rid="scirp.144823-6">
     [6]
    </xref>, Random Forest (RF) <xref ref-type="bibr" rid="scirp.144823-7">
     [7]
    </xref>, Feedforward Neural Network (FNN) <xref ref-type="bibr" rid="scirp.144823-8">
     [8]
    </xref> and other machine learning methods. Literature <xref ref-type="bibr" rid="scirp.144823-9">
     [9]
    </xref> discusses in detail the main factors affecting traffic, experiments on traditional machine learning based traffic flow prediction models on multiple datasets, and comparatively analyzes the prediction performance of each model. The experimental results show that these data-driven machine 2 W. S. Khedr learning-based methods can better capture the nonlinear dependencies in the data and achieve better prediction accuracy in short-term traffic flow prediction. However, traditional machine learning methods are difficult to effectively extract features from high-dimensional complex traffic data, and cannot tap into the deep and implicit spatio-temporal correlations in big data, and thus are difficult to be scaled up and applied to large-scale real-world traffic prediction applications <xref ref-type="bibr" rid="scirp.144823-10">
     [10]
    </xref>.</p>
   <p>In recent years, the rapid development of deep learning technology has injected new vigor into various industries. Deep learning models have gradually become the mainstream method in the field of traffic state prediction due to their excellent performance in capturing the complex structural attributes of data. Currently, the deep learning network models commonly used for traffic flow prediction are Convolutional Neural Network (CNN), Recurrent Neural Network (RNN), Graph Convolutional Network (GCN), and Transformer <xref ref-type="bibr" rid="scirp.144823-11">
     [11]
    </xref>-<xref ref-type="bibr" rid="scirp.144823-13">
     [13]
    </xref>, etc. Jiang et al. <xref ref-type="bibr" rid="scirp.144823-14">
     [14]
    </xref> proposed spatio-temporal meta-graph learning, a novel graph structure learning method, which was applied to a meta-graph convolutional recurrent network to achieve robust prediction performance. Yin et al. <xref ref-type="bibr" rid="scirp.144823-15">
     [15]
    </xref> proposed the bi-directional gated recurrent unit (BiGRU), which was combined with the Improved Variational Modular Decomposition (VMD), Graph Attention Network (GAT) to from a spatio-temporal hybrid prediction model ST-VGBiGRU, which is able to train the optimal parameters of the model using the improved RMSprop algorithm while improving the prediction accuracy of the model. Yu et al. <xref ref-type="bibr" rid="scirp.144823-16">
     [16]
    </xref> further combined temporal convolution with spatial convolution and proposed the STGCN model, which performs excellently in nonlinear feature modeling. Ji et al. <xref ref-type="bibr" rid="scirp.144823-17">
     [17]
    </xref> proposed the Spatio-Temporal Self-Supervised Learning (STSSL), which is able to achieve adaptive heterogeneity perception of noise perturbations on spatio-temporal graphs. Qi et al. <xref ref-type="bibr" rid="scirp.144823-18">
     [18]
    </xref> proposed the Spatial–Temporal Fusion Graph Neural Network, STFGCN, which constructs dynamic adaptive graphs for modeling by extracting multi-scale temporal dependencies from multiple semantic environments. Kong et al. <xref ref-type="bibr" rid="scirp.144823-19">
     [19]
    </xref> proposed the Spatio-Temporal Pivotal Graph Neural Network (STPGNN), which is capable of identifying key nodes and accurately capturing spatio-temporal dependencies centered on key nodes, in addition to extracting spatio-temporal traffic features on key and non-key nodes through a parallel framework.</p>
   <p>After the rise of the Transformer architecture, Jiang et al. <xref ref-type="bibr" rid="scirp.144823-20">
     [20]
    </xref> proposed the PDFormer model, which combines the propagation delay property with the dynamic attention mechanism to effectively solve the problem of modeling long time series. Ma et al. <xref ref-type="bibr" rid="scirp.144823-21">
     [21]
    </xref> proposed a framework that relies entirely on the original Transformer architecture, and designed the embedding module to extract the spatio-temporal dependencies of traffic flow, in addition to using a pre-trained language model to improve the prediction performance. Shi et al. <xref ref-type="bibr" rid="scirp.144823-22">
     [22]
    </xref> proposed a lightweight traffic flow prediction model, TFPformer, based on the Transformer model, which employs a parallel structure to capture spatio-temporal dependencies in traffic flow. Moon et al. <xref ref-type="bibr" rid="scirp.144823-23">
     [23]
    </xref> proposed a subgraph-based graphical Transformer traffic flow prediction model, which is capable of capturing spatial heterogeneity and can effectively handle the long-term temporal dependence of traffic flow, and the model validity was verified in four traffic benchmark tests. Li et al. <xref ref-type="bibr" rid="scirp.144823-24">
     [24]
    </xref> modeled traffic flow as a diffusion process on a directed graph, 3W. S. Khedr introduced a diffusion convolutional recurrent neural network, DCRNN, to capture spatial dependence through bi-directional stochastic wandering on the graph and used an encoder-decoder architecture to capture temporal dependence, and evaluated the results to show an improvement over the benchmark model. Zheng et al. <xref ref-type="bibr" rid="scirp.144823-25">
     [25]
    </xref> proposed Graph Multi-Attention Network GMAN, which reduces the error in traffic prediction by establishing a link between historical and future time steps through an attentional approach.</p>
   <p>With the rapid development of deep learning and the improvement of computer hardware performance, traffic flow prediction based on deep learning has become a research mainstream. However, existing models still face critical gaps: many struggle to simultaneously filter redundant spatio-temporal features in high-dimensional traffic data, leading to noise interference; others fail to capture directional temporal dependencies (e.g., rush-hour propagation patterns) or dynamically prioritize crucial time steps and road segments, resulting in suboptimal fusion of spatio-temporal correlations. In this paper, a traffic flow prediction model based on autoencoder structure is proposed by combining CCN, GCN and MHSA. The model realizes efficient extraction and fusion of spatio-temporal features through layered design, with its specific combination addressing the aforementioned gaps: the autoencoder compresses redundant information and retains core features via encoding-decoding, mitigating noise issues; CCN captures directional temporal dependencies that traditional models overlook; GCN models the road network topology and extracts the spatial features of the data; and MHSA dynamically weights critical spatio-temporal points, enhancing the adaptability of feature fusion. This synergistic integration enables the model to capture the spatio-temporal correlation of traffic speed data more comprehensively and achieve good prediction performance.</p>
  </sec><sec id="s2">
   <title>2. Description of the Problem</title>
   <sec id="s2_1">
    <title>2.1. Transportation Network Construction</title>
    <p>Let 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          G 
        </mi> 
        <mi>
          t 
        </mi> 
       </msub> 
       <mo>
         = 
       </mo> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           V 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           E 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           A 
         </mi> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            X 
          </mi> 
          <mi>
            t 
          </mi> 
         </msub> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math>, 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         t 
       </mi> 
       <mo>
         = 
       </mo> 
       <mn>
         1 
       </mn> 
       <mo>
         , 
       </mo> 
       <mn>
         2. 
       </mn> 
       <mo>
         ⋅ 
       </mo> 
       <mo>
         ⋅ 
       </mo> 
       <mo>
         ⋅ 
       </mo> 
       <mi>
         T 
       </mi> 
      </mrow> 
     </math>, where 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          G 
        </mi> 
        <mi>
          t 
        </mi> 
       </msub> 
      </mrow> 
     </math>is a dynamic complex network, V and E are sets of nodes and edges respectively, 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mrow> 
        <mo>
          | 
        </mo> 
        <mi>
          V 
        </mi> 
        <mo>
          | 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mi>
         N 
       </mi> 
      </mrow> 
     </math> is the number of nodes</p>
    <p>in the graph, 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         A 
       </mi> 
       <mo>
         = 
       </mo> 
       <msub> 
        <mrow> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <msub> 
            <mi>
              a 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mi>
               j 
             </mi> 
            </mrow> 
           </msub> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mrow> 
         <mi>
           N 
         </mi> 
         <mo>
           × 
         </mo> 
         <mi>
           N 
         </mi> 
        </mrow> 
       </msub> 
      </mrow> 
     </math> is the adjacency matrix. If 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          v 
        </mi> 
        <mi>
          i 
        </mi> 
       </msub> 
      </mrow> 
     </math>, 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          v 
        </mi> 
        <mi>
          j 
        </mi> 
       </msub> 
       <mo>
         ∈ 
       </mo> 
       <mi>
         V 
       </mi> 
      </mrow> 
     </math>, 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            v 
          </mi> 
          <mi>
            i 
          </mi> 
         </msub> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            v 
          </mi> 
          <mi>
            j 
          </mi> 
         </msub> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         ∈ 
       </mo> 
       <mi>
         E 
       </mi> 
      </mrow> 
     </math>, 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          a 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mi>
           j 
         </mi> 
        </mrow> 
       </msub> 
       <mo>
         = 
       </mo> 
       <mn>
         1 
       </mn> 
      </mrow> 
     </math>. Others 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          a 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mi>
           j 
         </mi> 
        </mrow> 
       </msub> 
       <mo>
         = 
       </mo> 
       <mn>
         0 
       </mn> 
      </mrow> 
     </math>. 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          X 
        </mi> 
        <mi>
          t 
        </mi> 
       </msub> 
       <mo>
         ∈ 
       </mo> 
       <mi>
         R 
       </mi> 
      </mrow> 
     </math> is the matrix of characteristic attributes. It represents the traffic flow information of the traffic network in time period t, such as traffic volume, traffic speed, and traffic density. When constructing a traffic network, the nodes of the network can be determined according to the data flow acquisition method, for example, if the traffic flow data is obtained through multiple sensors distributed on the road network, the sensors are viewed as network nodes to construct the traffic network. If the traffic flow data is obtained through vehicle GPS, the intersection can be viewed as a network node to construct the traffic network, i.e., the network can be constructed by using the master method, or by using the pairwise method to construct the traffic network <xref ref-type="bibr" rid="scirp.144823-26">
      [26]
     </xref>.</p>
   </sec>
   <sec id="s2_2">
    <title>2.2. Definition of the Problem</title>
    <p>Historical observations of the transportation network are known for the past p time periods 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mrow> 
        <mo>
          { 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            G 
          </mi> 
          <mrow> 
           <mi>
             t 
           </mi> 
           <mo>
             − 
           </mo> 
           <mi>
             p 
           </mi> 
           <mo>
             + 
           </mo> 
           <mn>
             1 
           </mn> 
          </mrow> 
         </msub> 
         <mo>
           , 
         </mo> 
         <mtext> 
         </mtext> 
         <msub> 
          <mi>
            G 
          </mi> 
          <mrow> 
           <mi>
             t 
           </mi> 
           <mo>
             − 
           </mo> 
           <mi>
             p 
           </mi> 
           <mo>
             + 
           </mo> 
           <mn>
             2 
           </mn> 
          </mrow> 
         </msub> 
         <mo>
           , 
         </mo> 
         <mo>
           ⋅ 
         </mo> 
         <mo>
           ⋅ 
         </mo> 
         <mo>
           ⋅ 
         </mo> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            G 
          </mi> 
          <mi>
            t 
          </mi> 
         </msub> 
        </mrow> 
        <mo>
          } 
        </mo> 
       </mrow> 
      </mrow> 
     </math> are known to predict the transportation network data for the future q time periods 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mrow> 
        <mo>
          { 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            G 
          </mi> 
          <mrow> 
           <mi>
             t 
           </mi> 
           <mo>
             + 
           </mo> 
           <mn>
             1 
           </mn> 
          </mrow> 
         </msub> 
         <mo>
           , 
         </mo> 
         <mtext> 
         </mtext> 
         <msub> 
          <mi>
            G 
          </mi> 
          <mrow> 
           <mi>
             t 
           </mi> 
           <mo>
             + 
           </mo> 
           <mn>
             2 
           </mn> 
          </mrow> 
         </msub> 
         <mo>
           , 
         </mo> 
         <mo>
           ⋅ 
         </mo> 
         <mo>
           ⋅ 
         </mo> 
         <mo>
           ⋅ 
         </mo> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            G 
          </mi> 
          <mrow> 
           <mi>
             t 
           </mi> 
           <mo>
             + 
           </mo> 
           <mi>
             q 
           </mi> 
          </mrow> 
         </msub> 
        </mrow> 
        <mo>
          } 
        </mo> 
       </mrow> 
      </mrow> 
     </math>. The traffic flow prediction problem can be defined as:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mrow> 
        <mo>
          [ 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            G 
          </mi> 
          <mrow> 
           <mi>
             t 
           </mi> 
           <mo>
             + 
           </mo> 
           <mn>
             1 
           </mn> 
          </mrow> 
         </msub> 
         <mo>
           , 
         </mo> 
         <mtext> 
         </mtext> 
         <msub> 
          <mi>
            G 
          </mi> 
          <mrow> 
           <mi>
             t 
           </mi> 
           <mo>
             + 
           </mo> 
           <mn>
             2 
           </mn> 
          </mrow> 
         </msub> 
         <mo>
           , 
         </mo> 
         <mo>
           ⋅ 
         </mo> 
         <mo>
           ⋅ 
         </mo> 
         <mo>
           ⋅ 
         </mo> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            G 
          </mi> 
          <mrow> 
           <mi>
             t 
           </mi> 
           <mo>
             + 
           </mo> 
           <mi>
             q 
           </mi> 
          </mrow> 
         </msub> 
        </mrow> 
        <mo>
          ] 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mi>
         f 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            G 
          </mi> 
          <mrow> 
           <mi>
             t 
           </mi> 
           <mo>
             − 
           </mo> 
           <mi>
             p 
           </mi> 
           <mo>
             + 
           </mo> 
           <mn>
             1 
           </mn> 
          </mrow> 
         </msub> 
         <mo>
           , 
         </mo> 
         <mtext> 
         </mtext> 
         <msub> 
          <mi>
            G 
          </mi> 
          <mrow> 
           <mi>
             t 
           </mi> 
           <mo>
             − 
           </mo> 
           <mi>
             p 
           </mi> 
           <mo>
             + 
           </mo> 
           <mn>
             2 
           </mn> 
          </mrow> 
         </msub> 
         <mo>
           , 
         </mo> 
         <mo>
           ⋅ 
         </mo> 
         <mo>
           ⋅ 
         </mo> 
         <mo>
           ⋅ 
         </mo> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            G 
          </mi> 
          <mi>
            t 
          </mi> 
         </msub> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> (1)</p>
    <p>where f(g) is a learnable prediction function. When q = 1 is a single-step prediction and q ≥ 2 is a multi-step prediction.</p>
   </sec>
  </sec><sec id="s3">
   <title>3. Traffic Speed Prediction Based on Autoencoder and Deep Learning</title>
   <sec id="s3_1">
    <title>3.1. General Framework of the Model</title>
    <p>In this paper, we propose a traffic prediction model based on autoencoder structure, whose core modules include Causal Convolutional Network (CCN), Multi-Head Self-Attention (MHSA) and Graph Convolutional Network (GCN), the overall framework of the model is shown in <xref ref-type="fig" rid="fig1">
      Figure 1
     </xref>, and the specific steps of traffic flow prediction include:</p>
    <p>Step 1: Input The traffic network is constructed by preprocessing the attribute features of the traffic network nodes (i.e., traffic speed).</p>
    <p>Step 2: Encoder It consists of two causal convolution-pooling layers sequentially connected, each consisting of a causal convolution, an activation function SiLU, and a Dropout layer, which achieves dimensionality compression by pooling.</p>
    <p>Step 3: MHSA For the features extracted by the encoder, the attention weights are adaptively assigned, the attention coefficients are computed, the importance of different time steps is learned, and the information of the time step that is most important for the current task is highlighted to capture long-term dependencies.</p>
    <p>Step 4: GCN The output of the multi-attention mechanism is used as the input to the graph convolution, and the graph structure information is utilized to further extract features, and the feature representations of the nodes are updated by computing the information transfer between the nodes.</p>
    <p>Step 5: Decoder Sequential connection of two causal convolution-pooling layers, recovering dimensionality by Up-pooling and using jump connections from encoder, allows the decoder to reuse shallow features extracted by the encoder in the feature reconstruction phase, preserving more detailed information of the original data. Specifically, the jump connections are implemented by addition: the second layer of the encoder is added to the first layer of the decoder, and the resulting output is fed into the second layer of the decoder; meanwhile, the first layer of the encoder is added to the second layer of the decoder. The output is passed through the fully connected layer to obtain the final prediction.</p>
    <fig id="fig1" position="float">
     <label>Figure 1</label>
     <caption>
      <title>Figure 1. General framework of the model.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1733254-rId45.jpeg?20250815015623" />
    </fig>
   </sec>
   <sec id="s3_2">
    <title>3.2. Autoencoder</title>
    <p>Autoencoder is a neural network model that learns an efficient representation of data through an unsupervised learning approach <xref ref-type="bibr" rid="scirp.144823-27">
      [27]
     </xref>. It usually consists of an encoder and a decoder. The encoder usually consists of a series of neural network layers that achieve data compression by gradually reducing the number of neurons, i.e., mapping the input data to a low-dimensional potential space. Decoder is constructed in contrast to an encoder and reconstructs the output similar to the input data by gradually increasing the number of neurons, i.e., mapping the potential space representation back to the original data space. The autoencoder construction is shown in <xref ref-type="fig" rid="fig2">
      Figure 2
     </xref>.</p>
    <fig id="fig2" position="float">
     <label>Figure 2</label>
     <caption>
      <title>Figure 2. Autoencoder.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1733254-rId46.jpeg?20250815015623" />
    </fig>
    <p>Let X be the input data. Z is the coded representation of the input data (potential space). 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mover accent="true"> 
       <mi>
         X 
       </mi> 
       <mo>
         ^ 
       </mo> 
      </mover> 
     </math> is the reconstructed output (decoded data). W<sub>e</sub> and W<sub>d</sub> are the encoder and decoder weight matrices. b<sub>e</sub> and b<sub>d</sub> are bias vectors. The encoder and decoder functions are mathematically defined as:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         Z 
       </mi> 
       <mo>
         = 
       </mo> 
       <mi>
         f 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          X 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mi>
         σ 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            W 
          </mi> 
          <mi>
            e 
          </mi> 
         </msub> 
         <mi>
           X 
         </mi> 
         <mo>
           + 
         </mo> 
         <msub> 
          <mi>
            b 
          </mi> 
          <mi>
            e 
          </mi> 
         </msub> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> (2)</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mover accent="true"> 
        <mi>
          X 
        </mi> 
        <mo>
          ^ 
        </mo> 
       </mover> 
       <mo>
         = 
       </mo> 
       <mi>
         g 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          Z 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mi>
         σ 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            W 
          </mi> 
          <mi>
            d 
          </mi> 
         </msub> 
         <mi>
           Z 
         </mi> 
         <mo>
           + 
         </mo> 
         <msub> 
          <mi>
            b 
          </mi> 
          <mi>
            d 
          </mi> 
         </msub> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> (3)</p>
    <p>where σ( ) is activation function.</p>
    <p>Autoencoder solves two functions f and g. So that the input data and reconstructed output errors are minimized:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"> <mrow> 
       <mi>
         f 
       </mi> 
       <mo>
         , 
       </mo> 
       <mi>
         g 
       </mi> 
       <mo>
         = 
       </mo> 
       <mi>
         arg 
       </mi> 
       <mtext> 
       </mtext> 
       <munder> 
        <mrow> 
         <mi>
           min 
         </mi> 
        </mrow> 
        <mrow> 
         <mi>
           f 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           g 
         </mi> 
        </mrow> 
       </munder> 
       <msup> 
        <mrow> 
         <mrow> 
          <mo>
            ‖ 
          </mo> 
          <mrow> 
           <mi>
             X 
           </mi> 
           <mo>
             − 
           </mo> 
           <mover accent="true"> 
            <mi>
              X 
            </mi> 
            <mo>
              ^ 
            </mo> 
           </mover> 
          </mrow> 
          <mo>
            ‖ 
          </mo> 
         </mrow> 
        </mrow> 
        <mn>
          2 
        </mn> 
       </msup> 
      </mrow> 
     </math> (4)</p>
   </sec>
   <sec id="s3_3">
    <title>3.3. Causal Convolution Network</title>
    <p>Causal Convolution Network <xref ref-type="bibr" rid="scirp.144823-28">
      [28]
     </xref> is a special convolution operation in convolutional neural network that follows a causal convolution operation in the time or sequence dimension. When processing sequence data, it ensures that when calculating the output of a certain moment, only the input information of that moment and its predecessors will be used, and not the input information of future moments, which avoids the problem of information leakage, and conforms to the causal logic of processing sequence data in practical applications. A schematic diagram of one-dimensional CCN computation is shown in <xref ref-type="fig" rid="fig3">
      Figure 3
     </xref>.</p>
    <fig id="fig3" position="float">
     <label>Figure 3</label>
     <caption>
      <title>Figure 3. Causal convolution network layer.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1733254-rId55.jpeg?20250815015623" />
    </fig>
    <p>Given an input one-dimensional time series 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         X 
       </mi> 
       <mo>
         = 
       </mo> 
       <mrow> 
        <mo>
          [ 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            x 
          </mi> 
          <mn>
            1 
          </mn> 
         </msub> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            x 
          </mi> 
          <mn>
            2 
          </mn> 
         </msub> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            x 
          </mi> 
          <mn>
            3 
          </mn> 
         </msub> 
         <mo>
           , 
         </mo> 
         <mo>
           ⋅ 
         </mo> 
         <mo>
           ⋅ 
         </mo> 
         <mo>
           ⋅ 
         </mo> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            x 
          </mi> 
          <mi>
            n 
          </mi> 
         </msub> 
        </mrow> 
        <mo>
          ] 
        </mo> 
       </mrow> 
      </mrow> 
     </math> and 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         F 
       </mi> 
       <mo>
         = 
       </mo> 
       <mrow> 
        <mo>
          [ 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            f 
          </mi> 
          <mn>
            1 
          </mn> 
         </msub> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            f 
          </mi> 
          <mn>
            2 
          </mn> 
         </msub> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            f 
          </mi> 
          <mn>
            3 
          </mn> 
         </msub> 
         <mo>
           , 
         </mo> 
         <mo>
           ⋅ 
         </mo> 
         <mo>
           ⋅ 
         </mo> 
         <mo>
           ⋅ 
         </mo> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            f 
          </mi> 
          <mi>
            k 
          </mi> 
         </msub> 
        </mrow> 
        <mo>
          ] 
        </mo> 
       </mrow> 
      </mrow> 
     </math> is the convolution kernel. The causal convolution operation F is defined as:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mrow> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             F 
           </mi> 
           <mo>
             ∗ 
           </mo> 
           <mi>
             X 
           </mi> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mi>
          t 
        </mi> 
       </msub> 
       <mo>
         = 
       </mo> 
       <mstyle displaystyle="true"> 
        <munderover> 
         <mo>
           ∑ 
         </mo> 
         <mrow> 
          <mi>
            k 
          </mi> 
          <mo>
            = 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
         <mrow> 
          <mi>
            K 
          </mi> 
          <mo>
            − 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
        </munderover> 
        <mrow> 
         <msub> 
          <mi>
            f 
          </mi> 
          <mi>
            k 
          </mi> 
         </msub> 
         <msub> 
          <mi>
            x 
          </mi> 
          <mi>
            t 
          </mi> 
         </msub> 
        </mrow> 
       </mstyle> 
       <mo>
         − 
       </mo> 
       <mi>
         K 
       </mi> 
       <mo>
         + 
       </mo> 
       <mi>
         k 
       </mi> 
      </mrow> 
     </math> (5)</p>
    <p>where * denotes the dilation convolution operator.</p>
    <p>Transportation time series data has both time dimension and spatial dimension information, so it is processed with two-dimensional causal convolution. Let the input feature map be 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         X 
       </mi> 
       <mo>
         = 
       </mo> 
       <msub> 
        <mrow> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <msub> 
            <mi>
              X 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               j 
             </mi> 
            </mrow> 
           </msub> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mrow> 
         <mi>
           T 
         </mi> 
         <mo>
           × 
         </mo> 
         <mi>
           S 
         </mi> 
        </mrow> 
       </msub> 
      </mrow> 
     </math>, where T is the length of the time dimension and S is the length of the space dimension. The convolution kernel is 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         K 
       </mi> 
       <mo>
         = 
       </mo> 
       <msub> 
        <mrow> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <msub> 
            <mi>
              K 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               j 
             </mi> 
            </mrow> 
           </msub> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mrow> 
         <msub> 
          <mi>
            K 
          </mi> 
          <mi>
            t 
          </mi> 
         </msub> 
         <mo>
           × 
         </mo> 
         <msub> 
          <mi>
            K 
          </mi> 
          <mi>
            s 
          </mi> 
         </msub> 
        </mrow> 
       </msub> 
      </mrow> 
     </math>, where K<sub>t</sub> is the convolutional kernel time dimension and K<sub>s</sub> is the convolutional kernel space dimension. The bias is b ∈ R. To ensure causality, zero-padding is performed from the beginning of the time dimension. Suppose that the time dimension is populated with 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          p 
        </mi> 
        <mi>
          t 
        </mi> 
       </msub> 
       <mo>
         = 
       </mo> 
       <msub> 
        <mi>
          K 
        </mi> 
        <mrow> 
         <mi>
           t 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
       </msub> 
      </mrow> 
     </math> zeros. The filled feature map is</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mover accent="true"> 
        <mi>
          X 
        </mi> 
        <mo>
          ˜ 
        </mo> 
       </mover> 
       <mo>
         = 
       </mo> 
       <msubsup> 
        <mrow> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <msub> 
            <mover accent="true"> 
             <mi>
               x 
             </mi> 
             <mo>
               ˜ 
             </mo> 
            </mover> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               j 
             </mi> 
            </mrow> 
           </msub> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mrow> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             T 
           </mi> 
           <mo>
             + 
           </mo> 
           <msub> 
            <mi>
              K 
            </mi> 
            <mrow> 
             <mi>
               t 
             </mi> 
             <mo>
               − 
             </mo> 
             <mn>
               1 
             </mn> 
            </mrow> 
           </msub> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mi>
          S 
        </mi> 
       </msubsup> 
      </mrow> 
     </math>. The two-dimensional causal convolution operation is:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mrow> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             K 
           </mi> 
           <mo>
             ∗ 
           </mo> 
           <mi>
             X 
           </mi> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mrow> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             t 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             s 
           </mi> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
       </msub> 
       <mo>
         = 
       </mo> 
       <mstyle displaystyle="true"> 
        <munderover> 
         <mo>
           ∑ 
         </mo> 
         <mrow> 
          <mi>
            i 
          </mi> 
          <mo>
            = 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
         <mrow> 
          <msub> 
           <mi>
             K 
           </mi> 
           <mi>
             t 
           </mi> 
          </msub> 
         </mrow> 
        </munderover> 
        <mrow> 
         <mstyle displaystyle="true"> 
          <munderover> 
           <mo>
             ∑ 
           </mo> 
           <mrow> 
            <mi>
              j 
            </mi> 
            <mo>
              = 
            </mo> 
            <mn>
              1 
            </mn> 
           </mrow> 
           <mrow> 
            <msub> 
             <mi>
               K 
             </mi> 
             <mi>
               s 
             </mi> 
            </msub> 
           </mrow> 
          </munderover> 
          <mrow> 
           <msub> 
            <mi>
              k 
            </mi> 
            <mrow> 
             <mi>
               i 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               j 
             </mi> 
            </mrow> 
           </msub> 
          </mrow> 
         </mstyle> 
        </mrow> 
       </mstyle> 
       <msub> 
        <mover accent="true"> 
         <mi>
           x 
         </mi> 
         <mo>
           ˜ 
         </mo> 
        </mover> 
        <mrow> 
         <mi>
           t 
         </mi> 
         <mo>
           + 
         </mo> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           s 
         </mi> 
         <mo>
           + 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
       </msub> 
       <mo>
         + 
       </mo> 
       <mi>
         b 
       </mi> 
      </mrow> 
     </math> (6)</p>
    <p>where * is the convolution operation. When 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         t 
       </mi> 
       <mo>
         + 
       </mo> 
       <mn>
         1 
       </mn> 
       <mo>
         &gt; 
       </mo> 
       <mi>
         T 
       </mi> 
       <mo>
         + 
       </mo> 
       <msub> 
        <mi>
          K 
        </mi> 
        <mrow> 
         <mi>
           t 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
       </msub> 
      </mrow> 
     </math> or s + j &gt; S, 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mover accent="true"> 
         <mi>
           x 
         </mi> 
         <mo>
           ˜ 
         </mo> 
        </mover> 
        <mrow> 
         <mi>
           t 
         </mi> 
         <mo>
           + 
         </mo> 
         <mi>
           i 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           s 
         </mi> 
         <mo>
           + 
         </mo> 
         <mi>
           j 
         </mi> 
        </mrow> 
       </msub> 
       <mo>
         = 
       </mo> 
       <mn>
         0 
       </mn> 
      </mrow> 
     </math>.</p>
    <p>The convolution operation is followed by a nonlinear transformation through activation functions, and the commonly used activation functions include Sigmoid, ReLU, SiLU, Tanh, and so on. In order to avoid overfitting the model on the training data, which leads to poor performance on the test data, the data is processed by the Dropout layer after the activation function. A portion of neurons and their connections are randomly dropped during the training process so that the model cannot rely on a specific combination of neurons, thus reducing the co-adaptation between neurons, forcing the network to learn more robust feature representations, improving the model’s generalization ability, and reducing the risk of overfitting.</p>
   </sec>
   <sec id="s3_4">
    <title>3.4. Multi-Head Self-Attention</title>
    <p>The traffic flow of a node is not only affected by the historical traffic flow of that node, but also by the traffic flow of its neighboring nodes. Therefore, a spatio-temporal attention mechanism can be used to capture the dynamic spatio-temporal correlation of traffic flow, where the spatial attention mechanism capture the dynamic spatial correlation between a node and its neighboring nodes, and the temporal attention mechanism capture the dynamic temporal correlation between nodes at different times.</p>
    <p>The self-attention mechanism portrays the interdependence between sequence elements by calculating the correlation (i.e., weight) of each element in the sequence with all other elements. Multi-Head Self-Attention (MHSA) <xref ref-type="bibr" rid="scirp.144823-29">
      [29]
     </xref> capture the distribution of attention in time series data in different subspaces from multiple perspectives by introducing multiple heads of attention, thus enabling a better understanding of the interactions between variables in complex series data, and improving the model representation and generalization capabilities.</p>
    <p>The steps to achieve MHSA include:</p>
    <p>Step 1: Input transformations The input sequence X is passed through three different linear transformations to obtain the query vector Q, the key vector K and the value vector V: Q = XW<sub>Q</sub>, K = XW<sub>K</sub>, V = XW<sub>V</sub>, where W<sub>Q</sub>, W<sub>K</sub>, W<sub>V</sub> are the learnable weight matrices of Q, K, V.</p>
    <p>Step 2: Parallel computation of multiple attentions For each head, the attention score was computed separately using dot product attention:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mrow> 
         <mtext>
           Head 
         </mtext> 
        </mrow> 
        <mi>
          i 
        </mi> 
       </msub> 
       <mo>
         = 
       </mo> 
       <mtext>
         Attention 
       </mtext> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            Q 
          </mi> 
          <mi>
            i 
          </mi> 
         </msub> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            K 
          </mi> 
          <mi>
            i 
          </mi> 
         </msub> 
         <mo>
           , 
         </mo> 
         <mi>
           V 
         </mi> 
         <mmultiscripts> 
          <mrow></mrow> 
          <mprescripts /> 
          <mi>
            i 
          </mi> 
          <none /> 
         </mmultiscripts> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mtext>
         SoftMa 
       </mtext> 
       <mi>
         x 
       </mi> 
       <mfrac> 
        <mrow> 
         <msub> 
          <mi>
            Q 
          </mi> 
          <mi>
            i 
          </mi> 
         </msub> 
         <msubsup> 
          <mi>
            K 
          </mi> 
          <mi>
            i 
          </mi> 
          <mi>
            T 
          </mi> 
         </msubsup> 
        </mrow> 
        <mrow> 
         <msqrt> 
          <mrow> 
           <msub> 
            <mi>
              d 
            </mi> 
            <mi>
              k 
            </mi> 
           </msub> 
          </mrow> 
         </msqrt> 
        </mrow> 
       </mfrac> 
       <msub> 
        <mi>
          V 
        </mi> 
        <mi>
          i 
        </mi> 
       </msub> 
      </mrow> 
     </math> (7)</p>
    <p>where d<sub>k</sub> is the embedding dimension.</p>
    <p>Step 3: Splicing the attention heads and linearly transforming them output The spliced vectors are passed through a linear transformation to get the final multi-head attention data:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mtext>
         MultiHead 
       </mtext> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           Q 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           K 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           V 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mtext>
         Concat 
       </mtext> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <msub> 
          <mrow> 
           <mtext>
             head 
           </mtext> 
          </mrow> 
          <mn>
            1 
          </mn> 
         </msub> 
         <mo>
           , 
         </mo> 
         <mo>
           ⋅ 
         </mo> 
         <mo>
           ⋅ 
         </mo> 
         <mo>
           ⋅ 
         </mo> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mrow> 
           <mtext>
             head 
           </mtext> 
          </mrow> 
          <mi>
            h 
          </mi> 
         </msub> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <msub> 
        <mi>
          W 
        </mi> 
        <mi>
          o 
        </mi> 
       </msub> 
      </mrow> 
     </math> (8)</p>
    <p>where W<sub>o</sub> is the output weight matrix and h is the number of attention heads. The structure of MHSA is shown in <xref ref-type="fig" rid="fig4">
      Figure 4
     </xref>.</p>
    <fig id="fig4" position="float">
     <label>Figure 4</label>
     <caption>
      <title>Figure 4. Multi-Head self-attention.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1733254-rId80.jpeg?20250815015624" />
    </fig>
   </sec>
   <sec id="s3_5">
    <title>3.5. Graph Convolutional Network</title>
    <p>Graph convolutional network <xref ref-type="bibr" rid="scirp.144823-30">
      [30]
     </xref> is a neural network structure for deep learning. Compared with the traditional network model CNN for deep learning, graph convolutional network is able to handle spatio-temporal data with non-Euclidean structure. Traffic road network is a typical complex network structure, and its network characteristics are inscribed with non-Euclidean structure data, using graph convolutional network can extract the topological relationship between nodes and their surrounding nodes in the complex network, so as to accurately extract the spatial characteristics of the traffic data, and lay the foundation for improving the accuracy of traffic speed prediction.</p>
    <p>Graph convolution usually includes null-domain convolution and spectral-domain convolution, the core of null-domain convolution is the aggregation process of neighboring node feature and inference to get the prediction, such as GraphSage network (2017). Spectral domain convolution is network learning by neighbor matrix and node attribute features, such as Graph Convolutional Network (GCN). In this paper, we use GCN to construct a deep learning network. In the spectral domain map convolution, we convolve the graph G with the convolution kernel g<sub>θ</sub>:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          g 
        </mi> 
        <mi>
          θ 
        </mi> 
       </msub> 
       <mo>
         ∗ 
       </mo> 
       <mmultiscripts> 
        <mi>
          X 
        </mi> 
        <mprescripts /> 
        <mi>
          G 
        </mi> 
        <none /> 
       </mmultiscripts> 
       <mo>
         = 
       </mo> 
       <msub> 
        <mi>
          g 
        </mi> 
        <mi>
          θ 
        </mi> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          L 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mi>
         X 
       </mi> 
       <mo>
         = 
       </mo> 
       <msub> 
        <mi>
          g 
        </mi> 
        <mi>
          θ 
        </mi> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           U 
         </mi> 
         <mi>
           Λ 
         </mi> 
         <msup> 
          <mi>
            U 
          </mi> 
          <mi>
            T 
          </mi> 
         </msup> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mi>
         X 
       </mi> 
       <mo>
         = 
       </mo> 
       <mi>
         U 
       </mi> 
       <msub> 
        <mi>
          g 
        </mi> 
        <mi>
          θ 
        </mi> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          Λ 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <msup> 
        <mi>
          U 
        </mi> 
        <mi>
          T 
        </mi> 
       </msup> 
       <mi>
         X 
       </mi> 
      </mrow> 
     </math> (9)</p>
    <p>where <sup>∗</sup>G is the graph convolution operation. Laplace 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         L 
       </mi> 
       <mo>
         = 
       </mo> 
       <msup> 
        <mi>
          D 
        </mi> 
        <mrow> 
         <mo>
           − 
         </mo> 
         <mfrac> 
          <mn>
            1 
          </mn> 
          <mn>
            2 
          </mn> 
         </mfrac> 
        </mrow> 
       </msup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           D 
         </mi> 
         <mo>
           − 
         </mo> 
         <mi>
           A 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <msup> 
        <mi>
          D 
        </mi> 
        <mrow> 
         <mo>
           − 
         </mo> 
         <mfrac> 
          <mn>
            1 
          </mn> 
          <mn>
            2 
          </mn> 
         </mfrac> 
        </mrow> 
       </msup> 
       <mo>
         = 
       </mo> 
       <msub> 
        <mi>
          I 
        </mi> 
        <mi>
          N 
        </mi> 
       </msub> 
       <mo>
         − 
       </mo> 
       <msup> 
        <mi>
          D 
        </mi> 
        <mrow> 
         <mo>
           − 
         </mo> 
         <mfrac> 
          <mn>
            1 
          </mn> 
          <mn>
            2 
          </mn> 
         </mfrac> 
        </mrow> 
       </msup> 
       <mi>
         A 
       </mi> 
       <msup> 
        <mi>
          D 
        </mi> 
        <mrow> 
         <mo>
           − 
         </mo> 
         <mfrac> 
          <mn>
            1 
          </mn> 
          <mn>
            2 
          </mn> 
         </mfrac> 
        </mrow> 
       </msup> 
      </mrow> 
     </math>, 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         D 
       </mi> 
       <mo>
         ∈ 
       </mo> 
       <msup> 
        <mi>
          R 
        </mi> 
        <mrow> 
         <mi>
           N 
         </mi> 
         <mo>
           × 
         </mo> 
         <mi>
           N 
         </mi> 
        </mrow> 
       </msup> 
      </mrow> 
     </math> is the degree matrix, 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          I 
        </mi> 
        <mi>
          N 
        </mi> 
       </msub> 
       <mo>
         ∈ 
       </mo> 
       <msup> 
        <mi>
          R 
        </mi> 
        <mrow> 
         <mi>
           N 
         </mi> 
         <mo>
           × 
         </mo> 
         <mi>
           N 
         </mi> 
        </mrow> 
       </msup> 
      </mrow> 
     </math> is the unit matrix and X is the attribute feature matrix of the graph. The eigenvalue decomposition of L is 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         L 
       </mi> 
       <mo>
         = 
       </mo> 
       <mi>
         U 
       </mi> 
       <mi>
         Λ 
       </mi> 
       <msup> 
        <mi>
          U 
        </mi> 
        <mi>
          T 
        </mi> 
       </msup> 
      </mrow> 
     </math>, where Λ is the diagonal matrix consisting of the eigenvalues of L and 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         U 
       </mi> 
       <mo>
         = 
       </mo> 
       <mrow> 
        <mo>
          { 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            u 
          </mi> 
          <mn>
            1 
          </mn> 
         </msub> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            u 
          </mi> 
          <mn>
            2 
          </mn> 
         </msub> 
         <mo>
           , 
         </mo> 
         <mo>
           ⋅ 
         </mo> 
         <mo>
           ⋅ 
         </mo> 
         <mo>
           ⋅ 
         </mo> 
         <msub> 
          <mi>
            u 
          </mi> 
          <mi>
            N 
          </mi> 
         </msub> 
        </mrow> 
        <mo>
          } 
        </mo> 
       </mrow> 
      </mrow> 
     </math> consists of the eigenvectors of L.</p>
    <p>Due to the large structure of the traffic road network graph, the computation of the Laplace transform on the graph usually involves complex operations such as eigen-decomposition of the Laplace matrix of the graph, which is computationally expensive. To avoid higher computational complexity, Chebyshev polynomials are used to obtain an efficient approximation, so the graph convolution can be rewritten as:</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          g 
        </mi> 
        <mi>
          θ 
        </mi> 
       </msub> 
       <mo>
         ∗ 
       </mo> 
       <mmultiscripts> 
        <mi>
          X 
        </mi> 
        <mprescripts /> 
        <mi>
          G 
        </mi> 
        <none /> 
       </mmultiscripts> 
       <mo>
         ≈ 
       </mo> 
       <mstyle displaystyle="true"> 
        <munderover> 
         <mo>
           ∑ 
         </mo> 
         <mrow> 
          <mi>
            k 
          </mi> 
          <mo>
            = 
          </mo> 
          <mn>
            0 
          </mn> 
         </mrow> 
         <mrow> 
          <mi>
            K 
          </mi> 
          <mo>
            − 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
        </munderover> 
        <mrow> 
         <msub> 
          <mi>
            θ 
          </mi> 
          <mi>
            k 
          </mi> 
         </msub> 
        </mrow> 
       </mstyle> 
       <msub> 
        <mi>
          T 
        </mi> 
        <mi>
          k 
        </mi> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mover accent="true"> 
         <mi>
           L 
         </mi> 
         <mo>
           ˜ 
         </mo> 
        </mover> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mi>
         X 
       </mi> 
      </mrow> 
     </math> (10)</p>
    <p>where θ ∈ R<sup>K</sup> is a vector of polynomial coefficients and K is the size of the graph convolution kernel. 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          T 
        </mi> 
        <mi>
          k 
        </mi> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mover accent="true"> 
         <mi>
           L 
         </mi> 
         <mo>
           ˜ 
         </mo> 
        </mover> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         ∈ 
       </mo> 
       <msup> 
        <mi>
          R 
        </mi> 
        <mrow> 
         <mi>
           N 
         </mi> 
         <mo>
           × 
         </mo> 
         <mi>
           N 
         </mi> 
        </mrow> 
       </msup> 
      </mrow> 
     </math> is a term of order k of the Chebyshev polynomial, which satisfies the recurrence formula: 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          T 
        </mi> 
        <mi>
          k 
        </mi> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          X 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mn>
         2 
       </mn> 
       <mi>
         X 
       </mi> 
       <msub> 
        <mi>
          T 
        </mi> 
        <mrow> 
         <mi>
           k 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          X 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         − 
       </mo> 
       <msub> 
        <mi>
          T 
        </mi> 
        <mrow> 
         <mi>
           k 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           2 
         </mn> 
        </mrow> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          X 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math>,</p>
    <p>T<sub>0</sub>(X) = 1, T<sub>1</sub>(X) = X, 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mover accent="true"> 
        <mi>
          L 
        </mi> 
        <mo>
          ˜ 
        </mo> 
       </mover> 
       <mo>
         = 
       </mo> 
       <mfrac> 
        <mrow> 
         <mn>
           2 
         </mn> 
         <mi>
           L 
         </mi> 
        </mrow> 
        <mrow> 
         <msub> 
          <mi>
            λ 
          </mi> 
          <mrow> 
           <mi>
             max 
           </mi> 
          </mrow> 
         </msub> 
        </mrow> 
       </mfrac> 
       <mo>
         − 
       </mo> 
       <msub> 
        <mi>
          I 
        </mi> 
        <mi>
          N 
        </mi> 
       </msub> 
      </mrow> 
     </math>, 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          λ 
        </mi> 
        <mrow> 
         <mi>
           max 
         </mi> 
        </mrow> 
       </msub> 
      </mrow> 
     </math> is the largest eigenvalue of L.</p>
   </sec>
   <sec id="s3_6">
    <title>3.6. Loss Function</title>
    <p>In this paper, Huberloss is chosen as the loss function for training, and the use of MSE for small errors and MAE for large errors is able to overcome the drawbacks of both by smoothing out the training process as well as minimizing the effect of outliers. The mathematical formula of Huberloss is defined as follows:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"> <mrow> 
       <msub> 
        <mi>
          L 
        </mi> 
        <mi>
          δ 
        </mi> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           y 
         </mi> 
         <mo>
           , 
         </mo> 
         <mover accent="true"> 
          <mi>
            y 
          </mi> 
          <mo>
            ^ 
          </mo> 
         </mover> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mrow> 
        <mo>
          { 
        </mo> 
        <mtable columnalign="left"> 
         <mtr> 
          <mtd> 
           <mfrac> 
            <mn>
              1 
            </mn> 
            <mn>
              2 
            </mn> 
           </mfrac> 
           <msup> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mrow> 
              <mi>
                y 
              </mi> 
              <mo>
                − 
              </mo> 
              <mover accent="true"> 
               <mi>
                 y 
               </mi> 
               <mo>
                 ^ 
               </mo> 
              </mover> 
             </mrow> 
             <mo>
               ) 
             </mo> 
            </mrow> 
            <mn>
              2 
            </mn> 
           </msup> 
           <mo>
             , 
           </mo> 
           <mtext> 
           </mtext> 
           <mrow> 
            <mo>
              | 
            </mo> 
            <mrow> 
             <mi>
               y 
             </mi> 
             <mo>
               − 
             </mo> 
             <mover accent="true"> 
              <mi>
                y 
              </mi> 
              <mo>
                ^ 
              </mo> 
             </mover> 
            </mrow> 
            <mo>
              | 
            </mo> 
           </mrow> 
           <mo>
             ≤ 
           </mo> 
           <mi>
             δ 
           </mi> 
          </mtd> 
         </mtr> 
         <mtr> 
          <mtd> 
           <mi>
             δ 
           </mi> 
           <mrow> 
            <mo>
              | 
            </mo> 
            <mrow> 
             <mi>
               y 
             </mi> 
             <mo>
               − 
             </mo> 
             <mover accent="true"> 
              <mi>
                y 
              </mi> 
              <mo>
                ^ 
              </mo> 
             </mover> 
            </mrow> 
            <mo>
              | 
            </mo> 
           </mrow> 
           <mo>
             − 
           </mo> 
           <mfrac> 
            <mn>
              1 
            </mn> 
            <mn>
              2 
            </mn> 
           </mfrac> 
           <msup> 
            <mi>
              δ 
            </mi> 
            <mn>
              2 
            </mn> 
           </msup> 
           <mo>
             , 
           </mo> 
           <mtext>
             others 
           </mtext> 
          </mtd> 
         </mtr> 
        </mtable> 
       </mrow> 
      </mrow> 
     </math> (11)</p>
    <p>where y is the true value, yˆ is the predicted value, δ is the threshold value. (In this paper, δ = 1.)</p>
   </sec>
  </sec><sec id="s4">
   <title>4. Experimental Results and Analysis</title>
   <sec id="s4_1">
    <title>4.1. Datasets Introduction and Preprocessing</title>
    <p>In this paper, the validity of the model is tested using the PEMSD7M and Traffic SH datasets. PEMSD7M (<xref ref-type="bibr" rid="scirp.144823-http://pems.dot.ca.gov/">
      http://pems.dot.ca.gov
     </xref>) were collected and provided by the Performance Measurement System (PeMS) of the California Department of Transportation. The dataset was selected from 228 sensor nodes from the transportation roadway network, and monitoring data was selected as a sample for the period from May 1, 2017 to August 31, 2017, with data collected at a frequency of every 5 minutes. TrafficSH selected 896 sensor nodes in Shanghai from March 5, 2022 to April 5, 2022, and the frequency of data collection was every 30 minutes. The data collected by each sensor each time includes features in three dimensions: flow rate, average speed and average occupancy. For the missing values present in the datasets, this paper employs missing value filling using periodic features of traffic flow. Normalization is done using Z-Score.</p>
   </sec>
   <sec id="s4_2">
    <title>4.2. Experimental Setup</title>
    <p>70% of the datasets was selected as the training set, 15% as the test set, and 15% as the validation set. Multi-step prediction is performed using historical 12-step traffic speed data, including future 3, 6, 12-step prediction. The model use AdamW optimizer with a learning rate of 0.001. The batch-size is 32 and the training period is 500 with an early stop mechanism. All experiments were performed on a machine equipped with NVIDIA GeForce 3080 Ti GPU and 128GB of RAM. Models were implemented using python 3.10.0.</p>
   </sec>
   <sec id="s4_3">
    <title>4.3. Metric</title>
    <p>Commonly used assessment metrics for traffic flow forecasting include Mean Absolute Error(MAE), Root Mean Squared Error (RMSE) and Mean Absolute Percentage Error(MAPE). The definitions of the three assessment metrics are presented as follows:</p>
    <p>1) Mean Absolute Error (MAE)</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"> <mrow> 
       <mtext>
         MAE 
       </mtext> 
       <mo>
         = 
       </mo> 
       <mfrac> 
        <mn>
          1 
        </mn> 
        <mi>
          n 
        </mi> 
       </mfrac> 
       <mstyle displaystyle="true"> 
        <munderover> 
         <mo>
           ∑ 
         </mo> 
         <mrow> 
          <mi>
            i 
          </mi> 
          <mo>
            = 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
         <mi>
           n 
         </mi> 
        </munderover> 
        <mrow> 
         <mrow> 
          <mo>
            | 
          </mo> 
          <mrow> 
           <msub> 
            <mi>
              y 
            </mi> 
            <mi>
              i 
            </mi> 
           </msub> 
           <mo>
             − 
           </mo> 
           <msub> 
            <mover accent="true"> 
             <mi>
               y 
             </mi> 
             <mo>
               ^ 
             </mo> 
            </mover> 
            <mi>
              i 
            </mi> 
           </msub> 
          </mrow> 
          <mo>
            | 
          </mo> 
         </mrow> 
        </mrow> 
       </mstyle> 
      </mrow> 
     </math> (12)</p>
    <p>where y<sub>i</sub> is the true value, 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mover accent="true"> 
         <mi>
           y 
         </mi> 
         <mo>
           ^ 
         </mo> 
        </mover> 
        <mi>
          i 
        </mi> 
       </msub> 
      </mrow> 
     </math> is the predicted value and n is the number of the records. The following formulas have the same meaning. The range of the MAE error is in the interval [0, +∞). The MAE value is taken to be 0 when the predicted and true values match exactly, and furthermore, the large the error, the large the value.</p>
    <p>2) Root Mean Squared Error (RMSE)</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"> <mrow> 
       <mtext>
         RMSE 
       </mtext> 
       <mo>
         = 
       </mo> 
       <msqrt> 
        <mrow> 
         <mfrac> 
          <mn>
            1 
          </mn> 
          <mi>
            n 
          </mi> 
         </mfrac> 
         <msup> 
          <mrow> 
           <mstyle displaystyle="true"> 
            <munderover> 
             <mo>
               ∑ 
             </mo> 
             <mrow> 
              <mi>
                i 
              </mi> 
              <mo>
                = 
              </mo> 
              <mn>
                1 
              </mn> 
             </mrow> 
             <mi>
               n 
             </mi> 
            </munderover> 
            <mrow> 
             <mrow> 
              <mo>
                ( 
              </mo> 
              <mrow> 
               <msub> 
                <mi>
                  y 
                </mi> 
                <mi>
                  i 
                </mi> 
               </msub> 
               <mo>
                 − 
               </mo> 
               <msub> 
                <mover accent="true"> 
                 <mi>
                   y 
                 </mi> 
                 <mo>
                   ^ 
                 </mo> 
                </mover> 
                <mi>
                  i 
                </mi> 
               </msub> 
              </mrow> 
              <mo>
                ) 
              </mo> 
             </mrow> 
            </mrow> 
           </mstyle> 
          </mrow> 
          <mn>
            2 
          </mn> 
         </msup> 
        </mrow> 
       </msqrt> 
      </mrow> 
     </math> (13)</p>
    <p>The range of the RMAE error is in the interval [0, +∞). Similar to the MAE, the RMSE value is taken to be 0 when the predicted and true values match exactly, and the large the error, the large the value.</p>
    <p>3) Mean Absolute Percentage Error (MAPE)</p>
    <p>
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         M 
       </mi> 
       <mi>
         A 
       </mi> 
       <mi>
         P 
       </mi> 
       <mi>
         E 
       </mi> 
       <mo>
         = 
       </mo> 
       <mfrac> 
        <mn>
          1 
        </mn> 
        <mi>
          n 
        </mi> 
       </mfrac> 
       <mstyle displaystyle="true"> 
        <munderover> 
         <mo>
           ∑ 
         </mo> 
         <mrow> 
          <mi>
            i 
          </mi> 
          <mo>
            = 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
         <mi>
           n 
         </mi> 
        </munderover> 
        <mrow> 
         <mrow> 
          <mo>
            | 
          </mo> 
          <mrow> 
           <mfrac> 
            <mrow> 
             <msub> 
              <mi>
                y 
              </mi> 
              <mi>
                i 
              </mi> 
             </msub> 
             <mo>
               − 
             </mo> 
             <msub> 
              <mover accent="true"> 
               <mi>
                 y 
               </mi> 
               <mo>
                 ^ 
               </mo> 
              </mover> 
              <mi>
                i 
              </mi> 
             </msub> 
            </mrow> 
            <mrow> 
             <msub> 
              <mi>
                y 
              </mi> 
              <mi>
                i 
              </mi> 
             </msub> 
            </mrow> 
           </mfrac> 
          </mrow> 
          <mo>
            | 
          </mo> 
         </mrow> 
        </mrow> 
       </mstyle> 
       <mo>
         × 
       </mo> 
       <mn>
         100 
       </mn> 
       <mi>
         % 
       </mi> 
      </mrow> 
     </math> (14)</p>
    <p>The range of the MAPE error is in the interval [0, +∞). MAPE is presented as a percentage, with a value of 0% indicating a perfect model and a value greater than 100% indicating a poor model.</p>
   </sec>
   <sec id="s4_4">
    <title>4.4. Results</title>
    <p>In this paper, we use History Average Model (HA), Feedforward Neural Network (FNN), Spatiotemporal Graph Convolutional Network (STGCN), Diffusion Convolutional Recurrent Neural Network (DCRNN), and Graph Multi-Attention Network (GMAN) for the comparison of the prediction performance with the proposed model (Ours).</p>
    <p>HA <xref ref-type="bibr" rid="scirp.144823-2">
      [2]
     </xref>: A simple and basic time series prediction model, usually used to forecast data with cyclical or seasonal patterns. Its core assumption is that the data has a cyclical pattern of change in time. Based on this assumption, the model predicts future values by calculating the average value over the same time period in history.</p>
    <p>FNN <xref ref-type="bibr" rid="scirp.144823-8">
      [8]
     </xref>: It is characterized by a unidirectional transfer of information from the input layer to the output layer, with a number of hidden layer in between, and the neurons in each layer are nonlinearly transformed by weighted sums and activation functions.</p>
    <p>STGCN <xref ref-type="bibr" rid="scirp.144823-16">
      [16]
     </xref>: A deep learning model combining Graph Convolutional Network (GCN) and Convolutional Neural Network (CNN) is specialized to deal with spatio-temporal relationships in graph-structure data. It captures spatial dependencies by mapping time-series data onto graphs using graph convolution, while combining it with temporal convolution to handle temporal dependencies.</p>
    <p>DCRNN <xref ref-type="bibr" rid="scirp.144823-24">
      [24]
     </xref>: It models the dynamics of traffic flow as a directed weighted graph and proposes diffusion convolution operations to capture spatial dependencies. The upstream and downstream traffic impacts are captured flexibly by incorporating bi-directional random wandering in the convolution.</p>
    <p>GMAN <xref ref-type="bibr" rid="scirp.144823-25">
      [25]
     </xref>: The model uses an encoder-decoder structure, where the encoder and decoder consist of multiple spatio-temporal attention blocks, each consisting of a spatial attention mechanism, a temporal attention mechanism, and a gated fusion mechanism.</p>
    <fig id="fig5" position="float">
     <label>Figure 5</label>
     <caption>
      <title>Figure 5. Visualization of true values and predicted values.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1733254-rId114.jpeg?20250815015627" />
    </fig>
    <p>
     <xref ref-type="fig" rid="fig5">
      Figure 5
     </xref> shows the comparison of traffic speed prediction between the five baseline models and the model proposed in this paper (Ours), with the 24 hours prediction results from a randomly selected sensor visualized. <xref ref-type="table" rid="table1">
      Table 1
     </xref> shows the prediction performance metrics of each model, where black bold indicates the metrics with the best results, and underlining marks the metrics with the second highest results.</p>
    <p>From <xref ref-type="table" rid="table1">
      Table 1
     </xref>, it can be seen that the HA and FNN models cannot well explore the mutual influence of traffic speeds between different road sections and at different time points, and lack of consideration of the spatial structure of the complex road network and the temporal correlation of traffic flow, and the prediction performances of these two models on both datasets are poorer. The STGCN, DCRNN, and GMAN models extract the features of the data in both the temporal and spatial dimension, and achieve better results on the two datasets. Both datasets with better results. Compared with the baseline model, the performance of the proposed model in this paper performs optimally. On the dataset TrafficSH, the values of three error metrics such as MAE, RMSE and MAPE are minimized for the multi-step prediction of the proposed model in this paper. On the dataset PEMSD7M, the value of other metrics are also minimized, except for the MAE of 6-step and 12-step, which are ranked second. The results fully demonstrate that the prediction model in this paper is able to capture the spatio-temporal characteristics of traffic flow simultaneously and has excellent prediction performance for traffic speed.</p>
    <table-wrap id="table1">
     <label>
      <xref ref-type="table" rid="table1">
       Table 1
      </xref></label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.144823-"></xref>Table 1. Comparison of multi-step prediction performance of various models.</title>
     </caption>
     <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
      <tr> 
       <td class="custom-bottom-td acenter" width="16.49%"><p style="text-align:center">Dataset</p></td> 
       <td class="custom-bottom-td acenter" width="8.25%"><p style="text-align:center">Step</p></td> 
       <td class="custom-bottom-td acenter" width="11.15%"><p style="text-align:center">Metric</p></td> 
       <td class="custom-bottom-td acenter" width="9.13%"><p style="text-align:center">HA</p></td> 
       <td class="custom-bottom-td acenter" width="9.13%"><p style="text-align:center">FNN</p></td> 
       <td class="custom-bottom-td acenter" width="12.51%"><p style="text-align:center">STGCN</p></td> 
       <td class="custom-bottom-td acenter" width="13.01%"><p style="text-align:center">DCRNN</p></td> 
       <td class="custom-bottom-td acenter" width="11.61%"><p style="text-align:center">GMAN</p></td> 
       <td class="custom-bottom-td acenter" width="8.71%"><p style="text-align:center">Ours</p></td> 
      </tr> 
      <tr> 
       <td rowspan="9" class="custom-top-td acenter" width="16.49%"><p style="text-align:center">TrafficSH</p></td> 
       <td rowspan="3" class="custom-top-td acenter" width="8.25%"><p style="text-align:center">3</p></td> 
       <td class="custom-top-td acenter" width="11.15%"><p style="text-align:center">MAE</p></td> 
       <td class="custom-top-td acenter" width="9.13%"><p style="text-align:center">1.03</p></td> 
       <td class="custom-top-td acenter" width="9.13%"><p style="text-align:center">1.27</p></td> 
       <td class="custom-top-td acenter" width="12.51%"><p style="text-align:center">0.54</p></td> 
       <td class="custom-top-td acenter" width="13.01%"><p style="text-align:center"><u>0.53</u></p></td> 
       <td class="custom-top-td acenter" width="11.61%"><p style="text-align:center">0.60</p></td> 
       <td class="custom-top-td acenter" width="8.71%"><p style="text-align:center">0.48</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="11.15%"><p style="text-align:center">RMSE</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">1.37</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">1.69</p></td> 
       <td class="acenter" width="12.51%"><p style="text-align:center">0.91</p></td> 
       <td class="acenter" width="13.01%"><p style="text-align:center"><u>0.88</u></p></td> 
       <td class="acenter" width="11.61%"><p style="text-align:center">0.97</p></td> 
       <td class="acenter" width="8.71%"><p style="text-align:center">0.78</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="11.15%"><p style="text-align:center">MAPE</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">16.83</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">21.23</p></td> 
       <td class="acenter" width="12.51%"><p style="text-align:center"><u>7.67</u></p></td> 
       <td class="acenter" width="13.01%"><p style="text-align:center">8.00</p></td> 
       <td class="acenter" width="11.61%"><p style="text-align:center">8.50</p></td> 
       <td class="acenter" width="8.71%"><p style="text-align:center">6.31</p></td> 
      </tr> 
      <tr> 
       <td rowspan="3" class="acenter" width="8.25%"><p style="text-align:center">6</p></td> 
       <td class="acenter" width="11.15%"><p style="text-align:center">MAE</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">1.03</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">1.37</p></td> 
       <td class="acenter" width="12.51%"><p style="text-align:center">0.62</p></td> 
       <td class="acenter" width="13.01%"><p style="text-align:center"><u>0.61</u></p></td> 
       <td class="acenter" width="11.61%"><p style="text-align:center">0.68</p></td> 
       <td class="acenter" width="8.71%"><p style="text-align:center">0.60</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="11.15%"><p style="text-align:center">RMSE</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">1.37</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">1.83</p></td> 
       <td class="acenter" width="12.51%"><p style="text-align:center"><u>0.93</u></p></td> 
       <td class="acenter" width="13.01%"><p style="text-align:center">0.93</p></td> 
       <td class="acenter" width="11.61%"><p style="text-align:center">1.01</p></td> 
       <td class="acenter" width="8.71%"><p style="text-align:center">0.90</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="11.15%"><p style="text-align:center">MAPE</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">16.83</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">23.08</p></td> 
       <td class="acenter" width="12.51%"><p style="text-align:center"><u>7.87</u></p></td> 
       <td class="acenter" width="13.01%"><p style="text-align:center">8.16</p></td> 
       <td class="acenter" width="11.61%"><p style="text-align:center">8.68</p></td> 
       <td class="acenter" width="8.71%"><p style="text-align:center">7.86</p></td> 
      </tr> 
      <tr> 
       <td rowspan="3" class="acenter" width="8.25%"><p style="text-align:center">12</p></td> 
       <td class="acenter" width="11.15%"><p style="text-align:center">MAE</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">1.03</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">1.39</p></td> 
       <td class="acenter" width="12.51%"><p style="text-align:center"><u>0.64</u></p></td> 
       <td class="acenter" width="13.01%"><p style="text-align:center"><u>0.64</u></p></td> 
       <td class="acenter" width="11.61%"><p style="text-align:center">0.75</p></td> 
       <td class="acenter" width="8.71%"><p style="text-align:center">0.63</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="11.15%"><p style="text-align:center">RMSE</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">1.37</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">1.85</p></td> 
       <td class="acenter" width="12.51%"><p style="text-align:center"><u>0.96</u></p></td> 
       <td class="acenter" width="13.01%"><p style="text-align:center">0.97</p></td> 
       <td class="acenter" width="11.61%"><p style="text-align:center">1.11</p></td> 
       <td class="acenter" width="8.71%"><p style="text-align:center">0.94</p></td> 
      </tr> 
      <tr> 
       <td class="custom-bottom-td acenter" width="11.15%"><p style="text-align:center">MAPE</p></td> 
       <td class="custom-bottom-td acenter" width="9.13%"><p style="text-align:center">16.83</p></td> 
       <td class="custom-bottom-td acenter" width="9.13%"><p style="text-align:center">22.63</p></td> 
       <td class="custom-bottom-td acenter" width="12.51%"><p style="text-align:center">8.38</p></td> 
       <td class="custom-bottom-td acenter" width="13.01%"><p style="text-align:center"><u>8.35</u></p></td> 
       <td class="custom-bottom-td acenter" width="11.61%"><p style="text-align:center">9.03</p></td> 
       <td class="custom-bottom-td acenter" width="8.71%"><p style="text-align:center">8.30</p></td> 
      </tr> 
      <tr> 
       <td rowspan="9" class="custom-top-td acenter" width="16.49%"><p style="text-align:center">PEMSD7M</p></td> 
       <td rowspan="3" class="custom-top-td acenter" width="8.25%"><p style="text-align:center">3</p></td> 
       <td class="custom-top-td acenter" width="11.15%"><p style="text-align:center">MAE</p></td> 
       <td class="custom-top-td acenter" width="9.13%"><p style="text-align:center">4.01</p></td> 
       <td class="custom-top-td acenter" width="9.13%"><p style="text-align:center">3.45</p></td> 
       <td class="custom-top-td acenter" width="12.51%"><p style="text-align:center"><u>2.29</u></p></td> 
       <td class="custom-top-td acenter" width="13.01%"><p style="text-align:center">2.37</p></td> 
       <td class="custom-top-td acenter" width="11.61%"><p style="text-align:center">2.88</p></td> 
       <td class="custom-top-td acenter" width="8.71%"><p style="text-align:center">2.28</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="11.15%"><p style="text-align:center">RMSE</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">7.20</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">5.74</p></td> 
       <td class="acenter" width="12.51%"><p style="text-align:center"><u>4.20</u></p></td> 
       <td class="acenter" width="13.01%"><p style="text-align:center">4.21</p></td> 
       <td class="acenter" width="11.61%"><p style="text-align:center">5.71</p></td> 
       <td class="acenter" width="8.71%"><p style="text-align:center">4.16</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="11.15%"><p style="text-align:center">MAPE</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">10.61</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">9.07</p></td> 
       <td class="acenter" width="12.51%"><p style="text-align:center"><u>5.04</u></p></td> 
       <td class="acenter" width="13.01%"><p style="text-align:center">5.54</p></td> 
       <td class="acenter" width="11.61%"><p style="text-align:center">7.25</p></td> 
       <td class="acenter" width="8.71%"><p style="text-align:center">3.93</p></td> 
      </tr> 
      <tr> 
       <td rowspan="2" class="acenter" width="8.25%"><p style="text-align:center">6</p></td> 
       <td class="acenter" width="11.15%"><p style="text-align:center">MAE</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">4.01</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">4.51</p></td> 
       <td class="acenter" width="12.51%"><p style="text-align:center">3.23</p></td> 
       <td class="acenter" width="13.01%"><p style="text-align:center">3.31</p></td> 
       <td class="acenter" width="11.61%"><p style="text-align:center">3.08</p></td> 
       <td class="acenter" width="8.71%"><p style="text-align:center"><u>3.11</u></p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="11.15%"><p style="text-align:center">RMSE</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">7.20</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">7.44</p></td> 
       <td class="acenter" width="12.51%"><p style="text-align:center"><u>5.74</u></p></td> 
       <td class="acenter" width="13.01%"><p style="text-align:center">5.96</p></td> 
       <td class="acenter" width="11.61%"><p style="text-align:center">6.17</p></td> 
       <td class="acenter" width="8.71%"><p style="text-align:center">5.72</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="8.25%"><p style="text-align:center"></p></td> 
       <td class="acenter" width="11.15%"><p style="text-align:center">MAPE</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">10.61</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">12.33</p></td> 
       <td class="acenter" width="12.51%"><p style="text-align:center"><u>7.23</u></p></td> 
       <td class="acenter" width="13.01%"><p style="text-align:center">8.06</p></td> 
       <td class="acenter" width="11.61%"><p style="text-align:center">7.77</p></td> 
       <td class="acenter" width="8.71%"><p style="text-align:center">5.37</p></td> 
      </tr> 
      <tr> 
       <td rowspan="3" class="acenter" width="8.25%"><p style="text-align:center">12</p></td> 
       <td class="acenter" width="11.15%"><p style="text-align:center">MAE</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">4.01</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">6.18</p></td> 
       <td class="acenter" width="12.51%"><p style="text-align:center">4.45</p></td> 
       <td class="acenter" width="13.01%"><p style="text-align:center">4.31</p></td> 
       <td class="acenter" width="11.61%"><p style="text-align:center">3.99</p></td> 
       <td class="acenter" width="8.71%"><p style="text-align:center"><u>4.03</u></p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="11.15%"><p style="text-align:center">RMSE</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">7.20</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">9.63</p></td> 
       <td class="acenter" width="12.51%"><p style="text-align:center">7.46</p></td> 
       <td class="acenter" width="13.01%"><p style="text-align:center"><u>7.43</u></p></td> 
       <td class="acenter" width="11.61%"><p style="text-align:center">7.90</p></td> 
       <td class="acenter" width="8.71%"><p style="text-align:center">7.29</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="11.15%"><p style="text-align:center">MAPE</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">10.61</p></td> 
       <td class="acenter" width="9.13%"><p style="text-align:center">17.61</p></td> 
       <td class="acenter" width="12.51%"><p style="text-align:center"><u>7.67</u></p></td> 
       <td class="acenter" width="13.01%"><p style="text-align:center">10.29</p></td> 
       <td class="acenter" width="11.61%"><p style="text-align:center">10.02</p></td> 
       <td class="acenter" width="8.71%"><p style="text-align:center">6.94</p></td> 
      </tr> 
     </table>
    </table-wrap>
    <p>We validate the effect of each component of the model on the prediction effect using three ablation experiments, where Model A indicates replacing the causal convolution with a normal two-dimensional convolution, and Model B indicates using the causal convolution and removing the temporal self-attention mechanism. Model C indicates using causal convolution and removing graph convolution. <xref ref-type="table" rid="table2">
      Table 2
     </xref> shows the performance comparison of the ablation experiments.</p>
    <p>According to <xref ref-type="table" rid="table2">
      Table 2
     </xref>, it can be seen that after replacing causal convolution with ordinary 2D convolution, the error metrics of multi-step prediction have increased, which indicates that compared with causal convolution, ordinary 2D convolution is unable to capture the temporal features of traffic flow. After Model B removes the temporal self-attention mechanism, the model is unable to identify important time points and subsequences in the traffic sequence, making the model prediction accuracy decrease. Graph convolution is more important to capture the spatial or structural dependence of the data, and the removal of graph convolution by Model C leads to a decrease in the model’s ability to extract local features, which in turn affects the prediction accuracy.</p>
    <table-wrap id="table2">
     <label>
      <xref ref-type="table" rid="table2">
       Table 2
      </xref></label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.144823-"></xref>Table 2. Results of ablation experiments.</title>
     </caption>
     <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
      <tr> 
       <td class="custom-bottom-td acenter" width="22.96%"><p style="text-align:center">Dataset</p></td> 
       <td class="custom-bottom-td acenter" width="11.43%"><p style="text-align:center">Step</p></td> 
       <td class="custom-bottom-td acenter" width="15.50%"><p style="text-align:center">Metric</p></td> 
       <td class="custom-bottom-td acenter" width="12.68%"><p style="text-align:center">A</p></td> 
       <td class="custom-bottom-td acenter" width="12.68%"><p style="text-align:center">B</p></td> 
       <td class="custom-bottom-td acenter" width="12.68%"><p style="text-align:center">C</p></td> 
       <td class="custom-bottom-td acenter" width="12.09%"><p style="text-align:center">Ours</p></td> 
      </tr> 
      <tr> 
       <td rowspan="9" class="custom-top-td acenter" width="22.96%"><p style="text-align:center">TrafficSH</p></td> 
       <td rowspan="3" class="custom-top-td acenter" width="11.43%"><p style="text-align:center">3</p></td> 
       <td class="custom-top-td acenter" width="15.50%"><p style="text-align:center">MAE</p></td> 
       <td class="custom-top-td acenter" width="12.68%"><p style="text-align:center">0.59</p></td> 
       <td class="custom-top-td acenter" width="12.68%"><p style="text-align:center">0.61</p></td> 
       <td class="custom-top-td acenter" width="12.68%"><p style="text-align:center">0.58</p></td> 
       <td class="custom-top-td acenter" width="12.09%"><p style="text-align:center">0.48</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="15.50%"><p style="text-align:center">RMSE</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">0.89</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">0.98</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">0.89</p></td> 
       <td class="acenter" width="12.09%"><p style="text-align:center">0.78</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="15.50%"><p style="text-align:center">MAPE</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">7.68</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">7.97</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">7.58</p></td> 
       <td class="acenter" width="12.09%"><p style="text-align:center">6.31</p></td> 
      </tr> 
      <tr> 
       <td rowspan="3" class="acenter" width="11.43%"><p style="text-align:center">6</p></td> 
       <td class="acenter" width="15.50%"><p style="text-align:center">MAE</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">0.68</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">0.77</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">0.76</p></td> 
       <td class="acenter" width="12.09%"><p style="text-align:center">0.60</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="15.50%"><p style="text-align:center">RMSE</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">1.07</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">1.18</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">1.12</p></td> 
       <td class="acenter" width="12.09%"><p style="text-align:center">0.90</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="15.50%"><p style="text-align:center">MAPE</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">8.94</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">10.15</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">9.97</p></td> 
       <td class="acenter" width="12.09%"><p style="text-align:center">7.86</p></td> 
      </tr> 
      <tr> 
       <td rowspan="3" class="acenter" width="11.43%"><p style="text-align:center">12</p></td> 
       <td class="acenter" width="15.50%"><p style="text-align:center">MAE</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">0.78</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">0.88</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">0.94</p></td> 
       <td class="acenter" width="12.09%"><p style="text-align:center">0.63</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="15.50%"><p style="text-align:center">RMSE</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">1.14</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">1.30</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">1.34</p></td> 
       <td class="acenter" width="12.09%"><p style="text-align:center">0.94</p></td> 
      </tr> 
      <tr> 
       <td class="custom-bottom-td acenter" width="15.50%"><p style="text-align:center">MAPE</p></td> 
       <td class="custom-bottom-td acenter" width="12.68%"><p style="text-align:center">10.22</p></td> 
       <td class="custom-bottom-td acenter" width="12.68%"><p style="text-align:center">11.54</p></td> 
       <td class="custom-bottom-td acenter" width="12.68%"><p style="text-align:center">12.33</p></td> 
       <td class="custom-bottom-td acenter" width="12.09%"><p style="text-align:center">8.30</p></td> 
      </tr> 
      <tr> 
       <td rowspan="9" class="custom-top-td acenter" width="22.96%"><p style="text-align:center">PEMSD7M</p></td> 
       <td rowspan="3" class="custom-top-td acenter" width="11.43%"><p style="text-align:center">3</p></td> 
       <td class="custom-top-td acenter" width="15.50%"><p style="text-align:center">MAE</p></td> 
       <td class="custom-top-td acenter" width="12.68%"><p style="text-align:center">2.30</p></td> 
       <td class="custom-top-td acenter" width="12.68%"><p style="text-align:center">2.39</p></td> 
       <td class="custom-top-td acenter" width="12.68%"><p style="text-align:center">2.44</p></td> 
       <td class="custom-top-td acenter" width="12.09%"><p style="text-align:center">2.28</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="15.50%"><p style="text-align:center">RMSE</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">4.19</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">4.37</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">4.30</p></td> 
       <td class="acenter" width="12.09%"><p style="text-align:center">4.16</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="15.50%"><p style="text-align:center">MAPE</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">3.97</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">4.12</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">4.19</p></td> 
       <td class="acenter" width="12.09%"><p style="text-align:center">3.93</p></td> 
      </tr> 
      <tr> 
       <td rowspan="3" class="acenter" width="11.43%"><p style="text-align:center">6</p></td> 
       <td class="acenter" width="15.50%"><p style="text-align:center">MAE</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">3.15</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">3.32</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">3.14</p></td> 
       <td class="acenter" width="12.09%"><p style="text-align:center">3.11</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="15.50%"><p style="text-align:center">RMSE</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">5.75</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">6.26</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">5.75</p></td> 
       <td class="acenter" width="12.09%"><p style="text-align:center">5.72</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="15.50%"><p style="text-align:center">MAPE</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">5.42</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">5.72</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">5.41</p></td> 
       <td class="acenter" width="12.09%"><p style="text-align:center">5.37</p></td> 
      </tr> 
      <tr> 
       <td rowspan="3" class="acenter" width="11.43%"><p style="text-align:center">12</p></td> 
       <td class="acenter" width="15.50%"><p style="text-align:center">MAE</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">4.15</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">4.72</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">4.10</p></td> 
       <td class="acenter" width="12.09%"><p style="text-align:center">4.03</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="15.50%"><p style="text-align:center">RMSE</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">7.34</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">8.45</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">7.31</p></td> 
       <td class="acenter" width="12.09%"><p style="text-align:center">7.29</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="15.50%"><p style="text-align:center">MAPE</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">7.14</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">8.12</p></td> 
       <td class="acenter" width="12.68%"><p style="text-align:center">7.06</p></td> 
       <td class="acenter" width="12.09%"><p style="text-align:center">6.94</p></td> 
      </tr> 
     </table>
    </table-wrap>
   </sec>
  </sec><sec id="s5">
   <title>5. Conclusion</title>
   <p>In this paper, a traffic flow prediction model based on the structure of autoencoder is proposed by combining CCN, GCN and MHSA. First, in the encoder, multiple 2D Causal Convolution modules are used to capture the core features of the traffic flow and pooling is employed to remove redundant information. Second, the attention weights are dynamically computed using a MHSA to identify important time points and sub-sequences in the traffic sequence, and the spatial features of the traffic flow captured by the GCN. Finally, when reconstructing the potential features in the decoder, the jump connection from the encoder is added, which makes the decoder reuse the shallow features extracted by the encoder in the feature reconstruction to get the prediction results. The experimental results show that compared with the baseline model, the model proposed in this paper is able to capture the spatio-temporal correlation of traffic speed data better in traffic flow prediction and has good prediction performance.</p>
   <p>As mentioned in the Introduction, accurate traffic flow prediction is crucial for the efficient operation of intelligent transportation systems. The improved accuracy of this model can bring numerous tangible benefits to traffic management systems: it can help traffic management departments grasp the changing trends of traffic flow more timely, conduct early dredge on easily congested road sections, and reduce vehicle detention time; it can provide a more reliable basis for the optimization of traffic signal timing, improving road traffic efficiency; it can also offer accurate references for the public’s travel route planning, enhancing travel experience.</p>
   <p>In the future, we should not only use more datasets to verify the model validity, but also make further improvements to the model components to reduce the model complexity and improve the prediction accuracy. For example, wavelet decomposition can be adopted in data preprocessing to make the original data have both time-domain and frequency-domain features, and the processed data may lead to better results when input into the model.</p>
  </sec><sec id="s6">
   <title>Acknowledgements</title>
   <p>This research is supported in part by National Natural Science Foundation of China (NSFC) (Grant No.72461030).</p>
  </sec>
 </body><back>
  <ref-list>
   <title>References</title>
   <ref id="scirp.144823-ref1">
    <label>1</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Okutani, I. and Stephanedes, Y.J. (1984) Dynamic Prediction of Traffic Volume through Kalman Filtering Theory. Transportation Research Part B: Methodological, 18, 1-11. &gt;https://doi.org/10.1016/0191-2615(84)90002-x
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref2">
    <label>2</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Liu, J. and Guan, W. (2004) A Summary of Traffic Flow Forecasting Methods. Journal of Highway and Transportation Research and Development, 21, 82-85.
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref3">
    <label>3</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Chorowski, J.K., Bahdanau, D. and Serdyuk, D. (2015) Attention-Based Models for Speech Recognition. Annual Conference on Neural Information Processing Systems 2015, Montreal, 7-12 December 2015, 424-432.
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref4">
    <label>4</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Williams, B.M. and Hoel, L.A. (2003) Modeling and Forecasting Vehicular Traffic Flow as a Seasonal ARIMA Process: Theoretical Basis and Empirical Results. Journal of Transportation Engineering, 129, 664-672. &gt;https://doi.org/10.1061/(asce)0733-947x(2003)129:6(664)
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref5">
    <label>5</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Cheng, S., Lu, F., Peng, P. and Wu, S. (2018) Short-Term Traffic Forecasting: An Adaptive ST-KNN Model That Considers Spatial Heterogeneity. Computers, Environment and Urban Systems, 71, 186-198. &gt;https://doi.org/10.1016/j.compenvurbsys.2018.05.009
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref6">
    <label>6</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Tang, J., Chen, X., Hu, Z., Zong, F., Han, C. and Li, L. (2019) Traffic Flow Prediction Based on Combination of Support Vector Machine and Data Denoising Schemes. Physica A: Statistical Mechanics and Its Applications, 534, Article ID: 120642. &gt;https://doi.org/10.1016/j.physa.2019.03.007
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref7">
    <label>7</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Liu, L., Chen, R., Zhao, Q. and Zhu, S. (2018) Applying a Multistage of Input Feature Combination to Random Forest for Improving MRT Passenger Flow Prediction. Journal of Ambient Intelligence and Humanized Computing, 10, 4515-4532. &gt;https://doi.org/10.1007/s12652-018-1135-2
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref8">
    <label>8</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Wang, Z. and Zhang, X.Q. (2010) Model of Road Traffic Accidents Prediction Based on ARIMA-FNN Optimal Weighted Combination. Journal of Transport Information and Safety, 28, 89-92.
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref9">
    <label>9</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Xie, P., Li, T., Liu, J., Du, S., Yang, X. and Zhang, J. (2020) Urban Flow Prediction from Spatiotemporal Data Using Machine Learning: A Survey. Information Fusion, 59, 1-12. &gt;https://doi.org/10.1016/j.inffus.2020.01.002
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref10">
    <label>10</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Chen, K., Liang, Y., Han, J., Feng, S., Zhu, M. and Yang, H. (2024) Semantic-Fused Multi-Granularity Cross-City Traffic Prediction. Transportation Research Part C: Emerging Technologies, 162, Article ID: 104604. &gt;https://doi.org/10.1016/j.trc.2024.104604
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref11">
    <label>11</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Gomes, B., Coelho, J. and Aidos, H. (2023) A Survey on Traffic Flow Prediction and Classification. Intelligent Systems with Applications, 20, Article ID: 200268. &gt;https://doi.org/10.1016/j.iswa.2023.200268
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref12">
    <label>12</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Cui, J.X., Yao, J. and Zhao, B.Y. (2024) Review on Short-Term Traffic Flow Prediction Methods Based on Deep Learning. Journal of Traffic and Transportation Engineering, 24, 50-64.
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref13">
    <label>13</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Li, Y., Gao, Y. and Yao, Z.X. (2025) Intelligent Traffic Flow Prediction for Data Scar-city Scenarios. Journal of Software, 36, 3787-3801.
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref14">
    <label>14</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Jiang, R., Wang, Z., Yong, J., Jeph, P., Chen, Q., Kobayashi, Y., et al. (2023) Spatio-Temporal Meta-Graph Learning for Traffic Forecasting. Proceedings of the AAAI Conference on Artificial Intelligence, 37, 8078-8086. &gt;https://doi.org/10.1609/aaai.v37i7.25976
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref15">
    <label>15</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Yin, L., Liu, P., Wu, Y., Shi, C., Wei, X. and He, Y. (2023) ST-VGBiGRU: A Hybrid Model for Traffic Flow Prediction with Spatio-Temporal Multimodality. IEEE Access, 11, 54968-54985. &gt;https://doi.org/10.1109/access.2023.3282323
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref16">
    <label>16</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Yu, B., Yin, H.T. and Zhu, Z.X. (2018) Spatio-Temporal Graph Convolutional Networks: A Deep Learning Framework for Traffic Forecasting. Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, Vol. 9, 3634-3640. &gt;https://doi.org/10.24963/ijcai.2018/505
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref17">
    <label>17</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Ji, J., Wang, J., Huang, C., Wu, J., Xu, B., Wu, Z., et al. (2023) Spatio-Temporal Self-Supervised Learning for Traffic Flow Prediction. Proceedings of the AAAI Conference on Artificial Intelligence, 37, 4356-4364. &gt;https://doi.org/10.1609/aaai.v37i4.25555
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref18">
    <label>18</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Qi, X., Yao, J., Wang, P., Shi, T., Zhang, Y. and Zhao, X. (2023) Combining Weather Factors to Predict Traffic Flow: A Spatial‐Temporal Fusion Graph Convolutional Network‐Based Deep Learning Approach. IET Intelligent Transport Systems, 18, 528-539. &gt;https://doi.org/10.1049/itr2.12401
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref19">
    <label>19</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Kong, W., Guo, Z. and Liu, Y. (2024) Spatio-Temporal Pivotal Graph Neural Networks for Traffic Flow Forecasting. Proceedings of the AAAI Conference on Artificial Intelligence, 38, 8627-8635. &gt;https://doi.org/10.1609/aaai.v38i8.28707
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref20">
    <label>20</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Jiang, J., Han, C., Zhao, W.X. and Wang, J. (2023) Pdformer: Propagation Delay-Aware Dynamic Long-Range Transformer for Traffic Flow Prediction. Proceedings of the AAAI Conference on Artificial Intelligence, 37, 4365-4373. &gt;https://doi.org/10.1609/aaai.v37i4.25556
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref21">
    <label>21</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Ma, J., Zhao, J. and Hou, Y. (2024) Spatial-Temporal Transformer Networks for Traffic Flow Forecasting Using a Pre-Trained Language Model. Sensors, 24, Article No. 5502. &gt;https://doi.org/10.3390/s24175502
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref22">
    <label>22</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Shi, X.W., Li, L.C. and Yu, Z.X. (2025) Traffic Flow Prediction Based on Transformer with Spatio-Temporal Feature. Journal of Chinese Computer Systems, 1-9. &gt;https://link.cnki.net/urlid/21.1106.TP.20250425.0858.004 
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref23">
    <label>23</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Moon, H. and Cho, S. (2025) Traffic Prediction by Graph Transformer Embedded with Subgraphs. Expert Systems with Applications, 272, Article ID: 126799. &gt;https://doi.org/10.1016/j.eswa.2025.126799
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref24">
    <label>24</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Li, Y.G., Yu, R. and Cyrus, S. (2018) Diffusion Convolutional Recurrent Neural Network: Data-Driven Traffic Forecasting. International Conference on Learning Representations 2018, Vancouver, 30 April-3 May 2018, 1-16.
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref25">
    <label>25</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Zheng, C., Fan, X., Wang, C. and Qi, J. (2020) GMAN: A Graph Multi-Attention Network for Traffic Prediction. Proceedings of the AAAI Conference on Artificial Intelligence, 34, 1234-1241. &gt;https://doi.org/10.1609/aaai.v34i01.5477
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref26">
    <label>26</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Hu, Y.H., Wu, Q.M. and Zhu, D.L. (2009) Topological Properties and Vulnerability Analysis of Spatial Urban Street Networks. Complex Systems and Complexity Science, 6, 69-76.
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref27">
    <label>27</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Vincent, P., Larochelle, H., Bengio, Y. and Manzagol, P. (2008) Extracting and Composing Robust Features with Denoising Autoencoders. Proceedings of the 25th International Conference on Machine Learning, Helsinki, 5-9 July 2008, 1096-1103. &gt;https://doi.org/10.1145/1390156.1390294
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref28">
    <label>28</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Bai, S., Kolter, J.Z. and Koltun, V. (2018) An Empirical Evaluation of Generic Convolutional and Recurrent Networks for Sequence Modeling. International Conference on Machine Learning, Stockholm, 10-15 July 2018, 1-14.&gt;https://arxiv.org/abs/1803.01271 
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref29">
    <label>29</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Zhang, S., Zhang, J., Yang, L., Yin, J. and Gao, Z. (2023) Spatiotemporal Attention Fusion Network for Short-Term Passenger Flow Prediction on New Year’s Day Holiday in Urban Rail Transit System. IEEE Intelligent Transportation Systems Magazine, 15, 59-77. &gt;https://doi.org/10.1109/mits.2023.3265808
    </mixed-citation>
   </ref>
   <ref id="scirp.144823-ref30">
    <label>30</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Zhou, H.Q., Shi, B.Z. and Song, L.Y. (2025) Survey on Complex Spatio-Temporal Data Mining Methods Based on Graph Neural Network. Journal of Software, 36, 1811-1843.
    </mixed-citation>
   </ref>
  </ref-list>
 </back>
</article>