## 1 Introduction
Furthermore, there are advanced deep learning approaches like attention mechanism-based methods and semi-supervised deep learning methods [22; 23; 24]. [PERSON] et al. innovatively built a spatial-temporal dynamic graph relationship learning model [25], and [PERSON] et al. introduced a spatial-temporal graph GAN for accurate short-term passenger flow forecasting [26]. However, these studies lack sufficient consideration at the semantic level of the demand for subway travel. The spatial correlation modeling did not consider the impact of metro flow patterns and similar regional functions of adjacent stations ahead of the examined station. Furthermore, the long-term dependency features of the incorporated data were not taken into account when modeling time correlation. In summary, the key to accurately predicting metro flow lies in modeling the spatial-temporal and semantic information of the metro flow data. Therefore, this paper proposes a novel deep learning method to model the spatiotemporal correlations of the incorporated data considering semantic information. The contributions of this study are as follows: (1) This paper models the spatial correlation of metro flow data considering the flow of related stations ahead of the examined station. Firstly, from a location perspective, there may be a correlation between the metro flow of related stations ahead of the examined station. Thus, this paper selects the metro flow data of strongly correlated stations using mutual information as the incorporated data. Compared to Pearson's coefficient, mutual information methods are more suitable for nonlinear flow data. Secondly, from a semantic perspective, stations with similar urban functions (point of interest) may have similar metro flows. Thus, this paper explains the experimental results from the perspective of urban functions. (2) Besides the urban function factor, there are other external factors that may affect the metro flow of stations, such as meteorological factors. Thus, this paper incorporates external data. (3) According to the previous two steps, the incorporated data includes the metro flow data of the examined station, the metro data of the selected stations, and various external data. To model the temporal correlation of the incorporated data, the transformer neural network is adopted to capture the time dependence between multidimensional data. The self-attention mechanism in the network can perform parallel computation and overcome information attenuation in long-term sequence prediction. In addition, the self-attention mechanism can enable deep neural networks to focus on features that are important for improving prediction accuracy when training the network. Compared with neural networks without self-attention mechanisms, the predicted results are more explanatory. (4) Finally, sufficient experiments are conducted on real metro flow data set collected from Xi'an subway to verify the effectiveness of the proposed method. Moreover, this study analyzes the prediction results, visualizes the feature weights learned from the network at different times, analyzes the important features and moments captured by the network, and evaluates the prediction results.