## 1 Introduction
To tackle this challenge, Long Short-Term Memory (LSTM) and gated recurrent unit (GRU) introduce memory cells, a distinctive form of hidden states designed to retain additional information [22], achieving improved efficiency in traffic flow prediction tasks. Meanwhile, road networks and metro networks encapsulate traffic and passenger flow data, offering datasets rich in both temporal and spatial location information. Previous studies mainly focused on temporal dependencies, overlooking valuable spatial information, which led to an inadequate capture of essential spatial dependencies. Convolutional neural networks (CNN) and graph convolutional networks (GCN) play a pivotal role in modeling spatial dependencies. Ref. [23] transformed traffic velocity across the entire road network into a sequence of static images, utilizing deep convolutional neural networks (DCNN) to proficiently capture spatial correlations. Similarly, Ref. [24] represented public transit data as spatiotemporal image matrices, showcasing the efficacy of the CNN-LSTM model in sequence predictive tasks. However, it is noteworthy that CNNs are inherently designed for Euclidean domain data (regular grids, etc.) and may require enhancement when handling non-Euclidean domain data, such as topological structure. With the rise of graph neural networks, GCNs are increasingly adopted to replace CNNs, generalizing the applicable scope of traditional convolution from regular grid-based data to arbitrary graph-structured data. Ref. [25] embedded GCN into gated recurrent units (GRUs) and integrated graph convolutions into recurrent units to enhance dynamic correlation extraction. The message-passing paradigm of GCN models makes it challenging for them to have a global perspective on variations, and they are also insensitive to changes in the temporal dimension. Attention Mechanism is a general method that, by introducing learnable weights, allows the model to have a global perspective and dynamically adjust its focus based on the significance of different input parts. In recent years, the attention mechanism has recently been widely used in multivariate time series prediction. SAnD [26] and DSANet [27] have demonstrated the effectiveness of attention mechanisms in multivariate time series modeling. Furthermore,Ref. [28] integrated LSTM and attention mechanism, achieving excellent results in the tasks of predicting short-term passenger flow data in large-scale metro systems. Despite the excellent performance of the aforementioned deep learning methods in prediction tasks, further exploration is needed in capturing both local and global dependencies of metro passenger flow. In the spatial dimension, traditional graph neural network models primarily focus on local spatial dependencies of nodes, making it difficult to capture global spatial dependencies. Therefore, combining GCN with a global attention mechanism could further explore the balance between local and global information in the spatial dimension. In the temporal dimension, traditional attention mechanisms are often insensitive to the contextual relationships of observations at time points. Thus, integrating convolutional networks with attention mechanisms can enhance the utilization of local contextual information, while series decomposition can better capture the global characteristics of time series. This paper proposes a novel STGNN framework for multistep passenger flow prediction tasks. The primary contributions of this research can be summarized as follows:  
1. A novel spatiotemporal graph neural network (STGNN) is proposed for multistep passenger flow prediction in metro stations. 2. A spatial modeling module is proposed, which consists of a dynamic global attention network (DAGN) and graph convolution network (GCN). DAGN implicitly captures the dynamic influence of passenger flow variation between global node pairs, and GCN can integrate the structural information of the input graph. 3.