Abstract
Accurate traffic flow forecasting is essential for intelligent transportation systems but remains challenging due to the complex, non-linear dependencies across both space and time. Traditional models often decouple spatial and temporal processing, failing to capture direct cross-spatial-temporal relationships. This paper introduces the Adaptive Graph Spatial-Temporal Transformer Network (ASTTN), a novel architecture that employs local self-attention and learnable adaptive graphs to model these dependencies directly. By restricting the receptive field to local neighborhoods while stacking multiple layers, ASTTN achieves state-of-the-art accuracy and computational efficiency on large-scale road networks.
Introduction
Predicting traffic conditions is a cornerstone of modern urban planning and navigation. However, traffic data is characterized by intricate patterns where an event at one location—such as a collision or a sudden bottleneck—propagates through the network over time. Most existing methodologies, typically combining Graph Convolutional Networks (GCNs) for spatial features and Recurrent Neural Networks (RNNs) or Temporal Convolutional Networks (TCNs) for temporal features, treat these dimensions as separate entities.
This "decompositional" approach often misses the direct cross-spatial-temporal effect. For instance, a disruption at an intersection at time $t$ directly causes congestion at a downstream merging lane at time $t+1$. Standard models struggle to link these specific "diagonal" causal relationships. Furthermore, many models rely exclusively on static geographical distances, which may not reflect actual traffic correlations; two distant highway segments may exhibit identical rush-hour behaviors that a purely distance-based graph would ignore.
Methodology
The ASTTN architecture is designed to address these limitations through four primary components:
1. Local Spatial-Temporal Attention
Full self-attention in a transformer scales at $O(N^2 T^2)$, which is computationally prohibitive for large-scale urban networks. ASTTN mitigates this by limiting a node's receptive field. A node at time $t$ only attends to its 1-hop spatial neighbors across all time steps in the look-back window. This strategy maintains scalability at $O(ET^2)$, where $E$ represents the number of edges, allowing the model to handle city-wide data efficiently.
2. Adaptive Graph Construction
Recognizing that physical road maps are incomplete proxies for traffic flow, the model learns an adaptive adjacency matrix. Utilizing learnable node embeddings and a Gumbel-sigmoid mask, the network discovers hidden dependencies and maintains a sparse graph structure. This allows the model to account for long-range correlations that are not captured by geographical proximity.
3. ST-Attention Block
The model stacks multiple layers that process the original geographical graph and the learned adaptive graph in parallel. A gated mechanism fuses these results, enabling the model to dynamically weigh physical proximity against learned, latent correlations.
4. Spatial-Temporal Embeddings
To provide structural context to the position-agnostic Transformer, ASTTN incorporates Laplacian eigenvectors for spatial positioning. Temporal context is provided via a two-dimensional encoding representing the time-of-day and day-of-week, ensuring the model is aware of periodic traffic cycles.
Experimental Evaluation
Datasets
ASTTN was evaluated on four large-scale public traffic datasets: METR-LA (Los Angeles speed data), PEMS-BAY (Bay Area speed data), and PeMSD4/PeMSD7 (San Francisco flow data).
Performance and Efficiency
ASTTN consistently outperformed established baselines, including DCRNN, STGCN, Graph WaveNet, and GMAN. The performance gap was particularly notable in long-term forecasting (60–120 minutes ahead):
- Accuracy: On the METR-LA dataset for a 60-minute prediction, ASTTN achieved a Mean Absolute Error (MAE) of 3.13, significantly outperforming GMAN (4.03) and Graph WaveNet (3.53).
- Efficiency: The local attention strategy proved highly effective. ASTTN recorded a forward pass time of 206ms, compared to 936ms for a "Full ST-Attention" model, while simultaneously achieving higher accuracy by reducing overfitting.
Discussion
Joint Modeling vs. Decomposition
The success of ASTTN suggests that treating spatial-temporal neighbors as tokens in a single transformer block is superior to separate modules. This joint modeling allows the network to learn complex causalities that are otherwise invisible.
The Role of Sparsity
The research demonstrates that global attention is not a prerequisite for high performance. By restricting attention to 1-hop neighbors and stacking layers, information "flows" through the network, allowing the model to capture long-range propagation while maintaining a manageable computational footprint.
Conclusion and Future Work
ASTTN represents a significant step forward in traffic forecasting by directly modeling cross-spatial-temporal dependencies through adaptive, local attention. While the model excels at long-term horizons, the authors note that the performance gap narrows for short-term predictions (e.g., 15 minutes), where traffic states are more static. Future research will focus on dynamic topologies to account for real-time changes in road networks, such as temporary closures or construction, which the current static adaptive graph cannot yet accommodate.
Summary updated