[Paper Review] Interpretable Crowd Flow Prediction with Spatial-Temporal Self-Attention
This paper proposes STSAN, a spatial-temporal self-attention network that models full spatial-temporal dependencies in crowd flow prediction using an ST encoding gate and multi-aspect attention, achieving 16% and 8% lower RMSE on inflow and outflow predictions compared to SOTA baselines on the Taxi-NYC dataset, with explicit attention weights enabling model interpretation.
Crowd flow prediction has been increasingly investigated in intelligent urban computing field as a fundamental component of urban management system. The most challenging part of predicting crowd flow is to measure the complicated spatial-temporal dependencies. A prevalent solution employed in current methods is to divide and conquer the spatial and temporal information by various architectures (e.g., CNN/GCN, LSTM). However, this strategy has two disadvantages: (1) the sophisticated dependencies are also divided and therefore partially isolated; (2) the spatial-temporal features are transformed into latent representations when passing through different architectures, making it hard to interpret the predicted crowd flow. To address these issues, we propose a Spatial-Temporal Self-Attention Network (STSAN) with an ST encoding gate that calculates the entire spatial-temporal representation with positional and time encodings and therefore avoids dividing the dependencies. Furthermore, we develop a Multi-aspect attention mechanism that applies scaled dot-product attention over spatial-temporal information and measures the attention weights that explicitly indicate the dependencies. Experimental results on traffic and mobile data demonstrate that the proposed method reduces inflow and outflow RMSE by 16% and 8% on the Taxi-NYC dataset compared to the SOTA baselines.
Motivation & Objective
- To address the limitation of divide-and-conquer deep learning approaches in crowd flow prediction, which fragment spatial-temporal dependencies and obscure interpretability.
- To preserve complex spatial-temporal dependencies by representing the entire input in a unified feature space using positional and time encodings.
- To enable model interpretation by explicitly extracting attention weights that indicate which historical spatial-temporal positions most influence predictions.
- To improve prediction accuracy and efficiency by applying scaled dot-product attention over the full spatial-temporal representation without architectural division.
Proposed method
- Introduces an ST encoding gate that combines spatial and temporal positional encodings with time encodings to represent the entire spatial-temporal input in a single, unified feature space.
- Proposes a Multi-aspect attention mechanism that applies scaled dot-product attention across spatial and temporal dimensions simultaneously, with dedicated attention heads per spatial position.
- Employs a dual-stream architecture: Stream-T processes temporal dependencies via multi-head self-attention, while Stream-F learns spatial transitions through a transition matrix.
- Uses periodic shifting to select historical observations from the same time across the past 7 days, enhancing temporal modeling with context-aware input selection.
- Applies local input tailoring by restricting the spatial region to a B×B block around the target region to reduce noise and improve efficiency.
- Employs Adam optimizer with warm-up learning rate and applies dropout (rate 0.1) for regularization, trained on 8 GPUs with a batch size of 1024.
Experimental results
Research questions
- RQ1Can a unified attention mechanism effectively model full spatial-temporal dependencies in crowd flow prediction without dividing spatial and temporal processing?
- RQ2How does the inclusion of positional and time encodings in a unified representation improve prediction accuracy compared to separated spatial-temporal modeling?
- RQ3To what extent can attention weights from the proposed mechanism be used to interpret crowd flow predictions and identify key historical influences?
- RQ4Does the proposed STSAN model outperform existing SOTA methods in terms of both accuracy and interpretability on real-world crowd flow datasets?
Key findings
- STSAN reduces inflow RMSE by 16% and outflow RMSE by 8% compared to the best-performing SOTA baselines on the Taxi-NYC dataset.
- The ST encoding gate significantly improves performance over ablation variants without it, demonstrating the importance of unified spatial-temporal representation.
- The Multi-aspect attention mechanism enables explicit attention weight extraction, which visually highlights relevant historical timestamps and spatial regions.
- The attention weights show that the model correctly identifies the most relevant historical moments—particularly the same time on previous days—demonstrating temporal consistency.
- The model's interpretation capability allows urban managers to trace prediction sources, enhancing trust and practical deployability.
- Local input tailoring improves performance over global input feeding, reducing noise from distant regions and improving efficiency.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.