Source-linked AI summary
Learning Traffic as Images: A Deep Convolutional Neural Network for Large-Scale Transportation Network Speed Prediction
Xiaolei Ma, Zhuang Dai, Zhengbing He, Jihui Na, Yong Wang, Yunpeng Wang
TL;DR
Large-scale traffic prediction needs to represent network-wide temporal and spatial relations rather than relying mainly on location-specific temporal sequences. This paper converts traffic into time-space images and applies a CNN for feature extraction and network-wide speed prediction, outperforming the compared algorithms with a 42.91% average accuracy improvement while training within a reasonable time.
Problem
Existing traffic-prediction models often focus on smaller regions or temporal correlations at single locations, limiting large-scale network-wide prediction.
Method
The method converts network traffic’s time and space dimensions into images, then uses CNN convolutional and pooling layers to extract features before predicting network-wide traffic speed.
Results
42.91% average accuracy improvement was achieved over other algorithms on testing data, with the CNN remaining the most accurate across the reported circumstances.
Takeaways & Limitations
The CNN can train within a reasonable time while providing accurate predictions for large-scale transportation networks.
Takeaways & Limitations
The paper identifies combining CNN feature extraction with LSTM prediction as a possible extension for improving prediction accuracy.
Abstract
from arXiv · showhide
This paper proposes a convolutional neural network (CNN)-based method that learns traffic as images and predicts large-scale, network-wide traffic speed with a high accuracy. Spatiotemporal traffic dynamics are converted to images describing the time and space relations of traffic flow via a two-dimensional time-space matrix. A CNN is applied to the image following two consecutive steps: abstract traffic feature extraction and network-wide traffic speed prediction. The effectiveness of the proposed method is evaluated by taking two real-world transportation networks, the second ring road and north-east transportation network in Beijing, as examples, and comparing the method with four prevailing algorithms, namely, ordinary least squares, k-nearest neighbors, artificial neural network, and random forest, and three deep learning architectures, namely, stacked autoencoder, recurrent neural network, and long-short-term memory network. The results show that the proposed method outperforms other algorithms by an average accuracy improvement of 42.91% within an acceptable execution time. The CNN can train the model in a reasonable time and, thus, is suitable for large-scale transportation networks.
1. Introduction
Large-scale, network-wide traffic prediction requires models that capture both temporal evolution and spatial dependencies, which existing approaches often miss. The paper addresses this gap by converting network traffic into images and using a CNN to extract spatiotemporal features for accurate, trainable prediction.
- Motivation: Large-scale prediction must handle network topology, spatial correlations, and longer-term congestion propagation, while traditional sequential models face computational-complexity limits.These limitations may cause existing models to fail when predicting network-wide traffic evolution.
- Related work: Existing traffic-forecasting research is dominated by statistical methods and neural networks, including KNN, SVM variants, hybrid models, and ANNs.The reviewed methods target traffic prediction using statistical relationships, multidimensional inputs, or forecasting architectures.
- Research gap: Most prior models focus on a road section or small region and primarily model temporal correlations at individual locations rather than network-wide spatial relations.This limitation applies across conventional and deep-learning traffic-prediction attempts.
- Proposed approach: The proposed method represents network traffic as images and uses a CNN to extract spatiotemporal traffic features automatically.CNN local connections are suited to spatially correlated problems, while pooling reduces model parameters.
- Contributions: The method jointly considers temporal evolutions and spatial dependencies, while convolutional and pooling layers preserve trainability for large-scale traffic-speed prediction.The paper presents automatic feature extraction, high prediction accuracy, and generalization to large-scale problems as contributions.
2. Methods
The method converts traffic speeds across time and road sections into a two-dimensional image, then processes that image through CNN feature extraction and prediction layers. Spatial ordering, local convolutions, pooling, activation, flattening, and a final fully connected layer together produce network-wide traffic-speed outputs.
- 2.1. Converting Network Traffic to Images: Traffic variables are arranged in a time-space matrix whose axes represent time and road-section space, with each matrix element becoming an image pixel.The image dimensions correspond to the matrix dimensions, allowing time and space to be jointly represented.
- 2.1. Converting Network Traffic to Images: Floating-car trajectories provide vehicle speed and position information that are aggregated by road segment and integrated into the time-space matrix.The resulting matrix serves as a time-space image channel.
- 2.1. Converting Network Traffic to Images: Time intervals are selected according to GPS sampling resolution, while road-section sequences are spatially ordered to form the image’s space dimension.The spatial representation groups trajectory points into sections before ordering them along the selected road direction.
- 2.2. CNN Characteristics: The CNN input is a transportation-network image containing spatiotemporal traffic information and a specified history of input time intervals.The input is indexed by samples and uses column vectors representing network-wide road speeds within each time unit.
- 2.2.2. CNN Characteristics: Two-dimensional convolutional and pooling layers extract learned spatiotemporal features from local image regions and transform the input into deep features.Pooling is part of the core feature-extraction stage, and the CNN can learn many features through successive layers.
- 2.2.2. CNN Characteristics: The extracted features are flattened into a dense vector and passed through a fully connected layer to generate the predicted network-wide traffic output.The dense vector concatenates high-level features from the CNN’s final layers before prediction.
- 2.2.2. CNN Characteristics: Activation functions scale layer outputs and allow stacked layers to approximate complex nonlinear functions relevant to transportation networks.The paper presents these functions as supporting model training and CNN expressiveness.
- 2.2.3. Convolutional Layers and Pooling Layers: CNN convolutional layers use local connections and filters rather than fully connecting every input neuron to every output neuron.This design builds higher-level features compositionally from local lower-level features.
3. Empirical Study
The empirical study evaluates CNN traffic-speed prediction on two Beijing networks using varied prediction tasks, image representations, CNN configurations, and algorithmic baselines. Across testing conditions, CNN achieves the strongest accuracy while retaining reasonable training time.
- 3.1. Data Description: The study uses 37 days of Beijing taxi GPS data, aggregated into two-minute intervals after remedying less than 2.9% missing data.The data include positions, recording times, directions, and speeds.
- 3.1. Data Description: The two test networks contain 236 one-way road sections and 352 road sections with two-way roads and crossroads, respectively.Their differing sizes and topologies support evaluation across network structures.
- 3.1. Data Description: Four tasks predict either 10- or 20-minute traffic speeds from the preceding 30 or 40 minutes, and performance is evaluated using MSE.The tasks vary prediction horizon and input information.
- 3.2. Time-Space Image Generation: The method converts network traffic into two-dimensional time-space images, but Network 2 requires segmented straight lines because its complete spatial relations cannot be linearized directly.The resulting images encode road sections across time and expose congestion regions and propagation patterns.
- 3.3. Tuning Up CNN Parameters: CNN tuning varies convolutional and pooling settings and network depth; deeper configurations extract spatiotemporal features before prediction, unlike the depth-1 fully connected model.The depth experiments use 40 minutes of history to predict the following 10 minutes, with 21,600 training and 5,040 validation samples.
- 3.4. Results and Comparison: The CNN outperforms OLS, KNN, RF, ANN, SAE, RNN, and LSTM on testing data in all four tasks, with an average accuracy improvement of 42.91%.CNN is also reported to perform best for long-term predictions and to train within a reasonable time.
4. Conclusion
The paper presents an image-based CNN method that automatically learns spatiotemporal traffic relations for network-wide speed prediction. It also identifies CNN–LSTM integration as a possible extension for improving prediction accuracy.
- The image-based CNN approach is designed to learn abstract spatiotemporal traffic features and relations directly from network traffic.
- The method converts transportation-network time and space dimensions into images, preserving spatiotemporal information through road-section adjacency.
- A CNN automatically extracts spatiotemporal features, avoids manual feature selection, and uses high-level network-wide information for speed prediction.
- Combining CNN-based feature extraction with LSTM-based prediction is proposed as a possible extension to enhance prediction accuracy.