Source-linked AI summary
Deep Bidirectional and Unidirectional LSTM Recurrent Neural Network for Network-wide Traffic Speed Prediction
Zhiyong Cui, Ruimin Ke, Ziyuan Pu, Yinhai Wang
TL;DR
Traffic forecasting has not fully exploited deep architectures, network-wide spatial scale, and bidirectional temporal dependencies. The paper proposes SBU-LSTM, combining bidirectional and unidirectional LSTM layers for network-wide speed prediction, and reports superior accuracy and robustness across freeway and urban networks.
Problem
Traffic forecasting needs deeper models, broader network-wide coverage, and fuller use of forward and backward temporal dependencies.
Method
The paper proposes a stacked bidirectional and unidirectional LSTM architecture that uses bidirectional LSTM layers, masking, and network-wide traffic-speed inputs.
Results
2.426 mph MAE and 5.674% MAPE are achieved by the SBU-LSTM without a middle layer, outperforming the compared models across tested layer numbers.
Takeaways & Limitations
The SBU-LSTM is suitable for predicting traffic speed across different freeway and complex urban traffic networks.
Abstract
from arXiv · showhide
Short-term traffic forecasting based on deep learning methods, especially long short-term memory (LSTM) neural networks, has received much attention in recent years. However, the potential of deep learning methods in traffic forecasting has not yet fully been exploited in terms of the depth of the model architecture, the spatial scale of the prediction area, and the predictive power of spatial-temporal data. In this paper, a deep stacked bidirectional and unidirectional LSTM (SBU- LSTM) neural network architecture is proposed, which considers both forward and backward dependencies in time series data, to predict network-wide traffic speed. A bidirectional LSTM (BDLSM) layer is exploited to capture spatial features and bidirectional temporal dependencies from historical data. To the best of our knowledge, this is the first time that BDLSTMs have been applied as building blocks for a deep architecture model to measure the backward dependency of traffic data for prediction. The proposed model can handle missing values in input data by using a masking mechanism. Further, this scalable model can predict traffic speed for both freeway and complex urban traffic networks. Comparisons with other classical and state-of-the-art models indicate that the proposed SBU-LSTM neural network achieves superior prediction performance for the whole traffic network in both accuracy and robustness.
I. INTRODUCTION
Traffic forecasting research has not fully exploited deep architectures, network-wide spatial scale, and bidirectional temporal information. The paper proposes SBU-LSTM to address these gaps in network-wide speed prediction.
- Existing traffic forecasting studies commonly use classical statistical or computational-intelligence methods, while RNNs capture temporal evolution but can be difficult to train.RNN training is affected by vanishing or exploding gradients during backpropagation.
- LSTMs model long-term dependencies effectively, but their potential remains underused in traffic forecasting.Most existing LSTM-based models have relatively shallow structures.
- Large-scale network-wide prediction remains challenging because many studies focus on individual sensors or corridors and may require N models for N network nodes.The paper motivates learning complex spatial-temporal features with one model.
- Forward-only temporal processing may omit useful information, motivating bidirectional modeling for recurring traffic patterns.The paper notes that traffic conditions exhibit periodicity and regularity, making backward dependencies potentially informative.
- SBU-LSTM combines bidirectional and unidirectional LSTM components for network-wide speed prediction across freeway and complex urban traffic networks.The model also handles missing input values through masking and is evaluated on Seattle-area networks.
II. METHODOLOGY
The methodology represents network-wide traffic speed histories across multiple locations and time frames as model inputs. It extends single-location sequence inputs to capture spatial influences throughout the traffic network.
- Speed prediction uses historical traffic-speed sequences as inputs and predicts future speed values.The methodology defines speed prediction as predicting future speed from historical speed information.
- The methodology includes an unfolded recurrent representation with T time steps for processing temporal traffic data.Fig. 1 presents the standard RNN architecture and its unfolded structure.
- Network-wide inputs incorporate speed data from P locations rather than only a single detector or nearby locations.This design accounts for influences from locations that may be far away in the network.
- The speed matrix is rewritten as a vector whose elements contain speed values for all P locations at each historical time frame.This representation reflects the temporal attributes of the network-wide speed data.
B. RNNs
The RNN processes sequence data by updating a hidden state from the current input and previous hidden state, then mapping that state to an output. Its main limitation is difficulty learning long-term dependencies.
- An RNN uses internal memory and loops to process sequence data through a chain-like recurrent structure.The unfolded architecture shows processing across successive time steps.
- At each time step, the hidden state is computed from the current input and previous hidden state using learned weights, bias, and an activation function.The recurrence maintains and updates hidden representations over time.
- The output layer transforms the hidden state into an output, with the final output used as the next-step predicted speed.The output is generated from the hidden state through output-layer parameters and activation.
- Regular RNNs can suffer vanishing or exploding gradients during backpropagation and therefore struggle to learn from long time lags.This limitation motivates more sophisticated recurrent architectures such as LSTM.
C. LSTMs
LSTMs extend recurrent networks with gated cells that process sequence data and model long-term dependencies. In traffic prediction, the final output can represent the next time step’s predicted speed.
- LSTMs are recurrent architectures designed to address limitations of standard RNNs on sequence-based tasks with long-term dependencies.
- LSTM cells process sequence inputs while maintaining layer outputs and cell states across time iterations.The cell uses gated structure to update its states during training.
- A bidirectional LSTM architecture can be unfolded across consecutive time steps to represent its sequence-processing structure.
- For traffic speed prediction, the final element of the LSTM output vector is used as the predicted speed for the next time iteration.
D. BDLSTMs
BDLSTMs process traffic sequences in both forward and backward directions and combine the resulting outputs. Their masking mechanism enables processing of time series with missing values without substituting biased predefined values.
- A BDLSTM layer uses forward and backward LSTM layers to process the same sequence in opposite temporal directions.The forward sequence uses inputs from time T−n to T−1, while the backward sequence uses reversed inputs.
- BDLSTM outputs combine the forward and backward sequences, with the final output representing the next predicted traffic speed.Combination may use concatenation, summation, averaging, or multiplication.
- Sensor failures create missing traffic values, while replacing them with zero or another predefined value can bias training and testing results.
- The masking mechanism skips a training step when an input equals the predefined mask value and passes the previous cell state to the next step.The skipped step’s output is also treated as missing.
F. Stacked Bidirectional and Unidirectional LSTM Networks
The SBU-LSTM combines stacked bidirectional and unidirectional LSTM layers for network-wide traffic prediction. BDLSTM layers learn spatial-temporal features first, while a top LSTM layer captures forward dependencies for prediction.
- Stacked LSTM architectures feed each hidden layer’s output into the subsequent layer to build progressively higher-level sequence representations.
- SBU-LSTM architecture requires a BDLSTM first layer and an LSTM final layer, with additional middle layers optional.
- BDLSTMs learn spatial correlations and temporal dependencies from network data, while the top LSTM generates predictions along the forward direction.
- The SBU-LSTM accepts spatial time series as input and predicts future speed for one or multiple time steps.The experiments target prediction one time step ahead.
A. Dataset Description
The study evaluates two traffic-state datasets: station-based loop detector data and segment-based INRIX speed data. Together they cover freeway and urban networks in the Seattle area, including a downtown network with more than 1000 segments.
- Loop detector data aggregate quality-controlled speed, volume, and occupancy measurements from detectors connected into stations about every half mile.
- INRIX data measure traffic speeds on freeway and urban roadway segments using aggregated GPS probe data from vehicles, connected cars, and mobile apps.
- Loop detector stations on the Seattle freeway network are used to represent the station-based experimental data.
- The selected Seattle downtown INRIX network contains more than 1000 roadway segments and covers the full year of 2012 at 5-minute intervals.
B. Experiment Results Analysis and Comparison
Experiments evaluate SBU-LSTM against baseline and LSTM-based models, then examine depth, lag length, spatial ordering, auxiliary inputs, and missing-value robustness. The model performs strongly overall, but missing values substantially reduce accuracy.
- Experimental setup: The experiments use 323 loop-detector station speeds, 10 time lags, and MAE and MAPE to evaluate network-wide prediction.Input samples have dimensions [10, 323], and training, validation, and test sets use a 7:2:1 split.
- Comparison with classical models: SBU-LSTM is clearly superior to random forest, feed-forward NN, SVR, and GRU NN in the single-detector comparison.Random forest has MAE 2.64 and feed-forward NN has MAE 2.63, while the proposed model is reported as superior to all four methods.
- Influence of model depth: Two layers produce the best performance for all compared models, while MAE and MAPE increase as the number of layers rises from two to four.For SBU-LSTM specifically, the same increasing-error trend appears from zero through four layers.
- Comparison with LSTM-based models: 2.426 mph MAE and 5.674% MAPE are achieved by SBU-LSTM without a middle layer, outperforming the other compared architectures across layer numbers.Multilayer LSTM and bidirectional LSTM achieve best MAEs of 2.502 and 2.472, respectively, with two layers.
- Influence of time lags: With 5-minute steps, 8, 10, and 12 time lags yield MAEs around 2.4, whereas six lags produce substantially higher error and deviation.Six time steps were insufficient for accurate network-wide prediction in the studied traffic network.
- Spatial features and auxiliary inputs: Spatially ordered inputs produce highly similar true and predicted heatmap shapes, while volume and occupancy add at most a slight accuracy improvement below 5%.The heatmap comparison supports spatial feature learning; adding volume alone produces nearly no improvement.
- Model robustness: Prediction accuracy decreases as missing-value proportions increase, with MAE values nearly doubling relative to the no-missing-values case.The masking-enabled model can handle missing values acceptably, but the authors identify robustness as needing further improvement.
C. Model Scalability
The SBU-LSTM scales from freeway data to complex urban networks, maintaining prediction performance as network size changes and achieving low error on a network exceeding 1,000 roadway segments.
- The INRIX task is more challenging because it combines multiple roadway types with speed limits ranging from 20 mph to 60 mph.
- The SBU-LSTM predicts speed across INRIX networks containing more than 1,000 roadway segments, including freeways, arterials, urban streets, and ramps.
- 1.126 mph MAE and 4.212% MAPE were achieved on the INRIX traffic network.
- Prediction MAE increased only slightly as INRIX network size grew, while freeway network size had limited effect on performance.Figure 9 uses an exponentially scaled horizontal axis to display both datasets.
D. Visualization and Potential Applications
Visualizations compare predicted and true speeds across freeway and INRIX networks and at individual locations, showing similar trends and successful prediction of recurring peak-hour congestion.
- The predicted traffic networks and results were intended for implementation in an extended transportation data analytics platform.
- Predicted and true speed trends were very similar at randomly selected freeway and INRIX locations on weekdays.Figure 11 includes a freeway sensor station, an INRIX TMC, and an INRIX TMC with possible non-recurring congestion.
- Figure 10 visualizes predicted traffic speed for both freeway and INRIX traffic networks.
- Recurring congestion during morning and evening peak hours was successfully predicted by the proposed approach.
IV. CONCLUSION AND FUTURE WORK
The paper proposes a deep SBU-LSTM architecture for network-wide traffic speed prediction and finds that its two-layer structure efficiently learns spatial-temporal features across different traffic networks. Future work targets graph-based spatial learning and combining additional datasets for non-recurring congestion detection.
- The proposed SBU-LSTM expands traffic forecasting to whole freeway and urban networks while modeling forward and backward dependencies in network-wide data.
- The two-layer SBU-LSTM without middle layers was the best structure for network-wide traffic speed prediction in the experiments.
- Stacking bidirectional and unidirectional LSTM layers was more efficient for learning spatial-temporal features than LSTM, BDLSTM, and other LSTM-based methods.
- Additional information such as volume and occupancy did not significantly improve predictive performance, while insufficient historical lags could reduce performance.
- Future extensions include graph-based spatial learning and combining other datasets for potential non-recurring congestion detection.