## 1 Introduction  
Urban rail transit is an important means of transportation in modern times. Due to the high cost of opening a new line [1], analysis of passenger flow is helpful to make full use of existing urban rail transit and to improve route planning, so as to improve its efficiency. Therefore, it is particularly important to analyze its passenger flow and predict it. The main factors affecting the passenger demand include space, time, and semantic factors [2]. From the perspective of space, urban areas can be divided into residential areas, commercial areas, industrial areas, scenic areas, and other functional areas. In different urban functional areas, the distribution of subway stations and the demand for taking subways are different. Passenger demand between areas with similar urban functions is related [3]. In addition, passenger demand between adjacent stations is correlated. If the passenger demand of the first few stations is large, there is a high probability of high passenger demand at the next station [1]. From the perspective of time, subway passenger demand between different stations may change over time. Aside from time and space factors, whether residents choose to take the subway is also subject to a variety of semantic factors, including meteorological factors, traffic control for holidays and special activities, and other factors [4], such as location conditions and textual semantic information [5, 6]. Therefore, the difficulty and key point of accurately predicting subway passenger demand is to fuse semantic-rich nonlinear features and dynamically model the spatial-temporal correlation of data. There are three main types of methods to predict metro flow: statistical methods, traditional machine learning methods, and deep learning methods. To predict metro flow, traditional methods like the simple moving average (MA) [7], autoregressive moving average (ARMA) [7; 8], autoregressive integrated moving average (ARIMA), and their variants [7; 8; 9] are used. For example, [PERSON] et al. used the ARIMA method in terms of varying features, forecasting steps, and forecasting horizons [9]. Nevertheless, metro flow data is usually nonlinear. This means that the linear assumption of these models limits their prediction accuracy. To understand nonlinear dependencies in metro flow data, researchers have studied machine learning approaches like multilinear regression (MLR) [10], support vector regression (SVR) [9], Logistic regression (LR) [11], support vector machines (SVMs) [12; 13], decision trees (DTs) [14], the hidden Markov model (HMM) [15], and back propagation neural networks [16]. These methods overcome the limitations of the linear assumption of data. Nevertheless, the traditional machine learning methods often rely on feature extraction and selection, and they can only capture shallow nonlinear dependencies. Predicting traffic accurately is very difficult because we cannot capture detailed patterns in big datasets. This limits the use of accurate metro flow prediction. Deep learning is a powerful machine learning technique. It has great potential for predicting metro flow [17]. Deep learning can automatically model complex relationships between stations and time intervals. For instance, [PERSON] et al. proposed a real-time metro flow prediction model using a convolutional neural network (CNN) to predict an urban rail transit passenger flow time series and spatial-temporal series [18]. Recurrent neural networks (RNNs) have emerged as the preferred neural network for temporal dependencies [19]. Nevertheless, traditional RNNs have the problem of gradient disappearance and gradient explosion in long-term prediction. LSTM and GRU networks are special versions of RNNs that solve the gradient problem effectively [20]. GRUs can capture long-term dependencies in sequential data and train the model faster [21]. [PERSON] et al. used a fully connected neural network with short-term memory to predict metro flow [21]. The network was trained using historical metro flow data and meteorological data.