Gated attention unit and mask attention network for traffic flow forecasting
摘要
Short-term traffic prediction plays a pivotal role in urban traffic management. However, the complexity and nonlinearity of traffic flow pose challenges to traditional methods. Fortunately, the research on short-term traffic prediction using deep learning neural networks has seen rapid growth. In this study, I propose a deep learning framework called GAMAN, which combines masked attention and Gate Attention Unit (GAU). Unlike traditional convolutional kernels that can only capture features from nearby time points, GAU can be divided into two parallel modules. The Gated Linear Units (GLU) module utilizes one-dimensional convolution to extract relationships between closely spaced time points. This compact convolutional kernel aids in parameter efficiency and enhances training speed. On the other hand, the primary function of the GAU module is to establish relationships between distant time points. Consequently, GAU comprehensively and intricately constructs temporal feature relationships at different scales without the need for deep layers as in traditional convolutions or sacrificing parallelism as in RNNs. Masked attention is employed to handle the aggregation of spatial information, introducing actual spatial information from adjacency matrices on top of the existing global attention mechanism. Extensive experiments on two real-world public transportation datasets demonstrate that GAMAN exhibits high performance and competitive computational efficiency. Furthermore, the attention mechanism in both the temporal and spatial modules enhances interpretability. The project page is https://github.com/hybridIce/GAMAN.git.