Abstract
Predicting citywide traffic flow is a fundamental task for intelligent transportation systems, yet it remains challenging due to complex spatial-temporal dependencies and dynamic variations. This paper presents the Attentive Traffic Flow Machine (ATFM), a novel deep learning model designed to learn dynamic spatial-temporal representations. By employing a dual-ConvLSTM architecture coupled with a spatial attention mechanism, ATFM can focus on the most relevant urban regions at any given time. This module is embedded within a Sequential-Periodic Network (SPN) that accounts for both short-term trends and long-term periodicities. Experimental results on real-world datasets from Beijing and New York City show that the proposed framework significantly outperforms existing state-of-the-art models.
Introduction
Predicting traffic flow is a "wicked problem" in Intelligent Transportation Systems (ITS). It requires modeling complex spatial-temporal interactions that are often non-stationary. Previous models, such as ST-ResNet or standard LSTMs, often struggle with three primary hurdles:
- Dynamic Variations: Traffic patterns shift throughout the day; a residential area may be a hotspot during morning commutes but quiet late at night.
- Non-Stationary Spatial Dependencies: The relationship between different neighborhoods changes based on time or unexpected events like accidents.
- External Influences: Weather conditions and holidays drastically alter periodic patterns, causing simple historical average models to fail.
Most existing deep learning approaches utilize standard convolutions that treat every part of a city grid with uniform importance, failing to adapt to the shifting context of urban movement.
Methodology
The Attentive Traffic Flow Machine (ATFM)
The core innovation of this work is the Attentive Traffic Flow Machine (ATFM). Unlike traditional single-pass models, ATFM utilizes two progressive Convolutional Long Short-Term Memory (ConvLSTM) units to refine its predictions.
The first ConvLSTM unit ingests historical traffic features to generate a hidden state encoding the "evolutionary trend." This state, combined with the current traffic map, is used to infer a Spatial Attention Map. This map assigns weights to different regions, directing the model to focus on areas currently driving the trend. Finally, a second ConvLSTM unit processes these weighted features to learn a robust representation for prediction.
Sequential-Periodic Network (SPN)
The ATFM module is integrated into a larger framework known as the Sequential-Periodic Network (SPN). This framework is designed to capture multiple temporal scales and external factors.
The SPN consists of four main components:
- Normal Feature Extraction (NFE): Employs a customized ResNet to embed traffic maps and external factors like weather and holidays.
- Sequential Representation Learning (SRL): Captures immediate, short-term trends using a sequence of ATFM modules.
- Periodic Representation Learning (PRL): Captures daily and weekly cycles.
- Temporally-Varying Fusion (TVF): A gating mechanism that dynamically decides the relative importance of short-term versus periodic data at any given moment.
Experimental Evaluation
The model was evaluated on two benchmark datasets: TaxiBJ (GPS trajectories from 34,000+ taxicabs in Beijing) and BikeNYC (bike rental data from New York City). Additionally, the model's generalization was tested on passenger demand data in Manhattan.
Key Results
The ATFM-based SPN consistently outperformed ten baseline methods, including ARIMA, ST-ResNet, and PredRNN.
- Accuracy: On the TaxiBJ dataset, the model achieved an RMSE of 15.31, representing a 6.3% relative improvement over PredRNN.
- Long-Term Forecasting: In multi-step forecasting (up to 2 hours ahead), the SPN-LONG variant maintained superior accuracy, outperforming PredRNN by 8.2% at the furthest interval.
- Efficiency: The model remains computationally efficient, with an inference time of approximately 7.17 ms on a standard GPU.
Discussion and Insights
Visualizing the attention maps revealed that spatial dependencies are indeed dynamic. The model learns to ignore "noisy" regions and focus on areas where flow evolves predictably. Furthermore, the Temporally-Varying Fusion (TVF) weights showed that the model relies more heavily on sequential data during peak hours and periodic data during the "wee hours" when traffic is highly regular.
External factors proved critical; removing weather and holiday data resulted in a 10% performance drop, highlighting the need for environmental context in deep learning models for ITS.
Limitations and Future Work
While effective, the current approach relies on regular grid partitions, which may not perfectly align with irregular urban geography defined by rivers and road networks. Future work may involve moving toward Graph Convolutional Networks (GCN) to treat the city as a network of nodes. Additionally, incorporating Point of Interest (POI) data could help the model better predict "bursty" traffic events associated with specific locations like stadiums or malls.
Summary updated