Large-Scale Traffic Data Imputation with Spatiotemporal Semantic Understanding

Kunpeng Zhang, Lan Wu, Liang Zheng, Na Xie, Zhengbing He

In the world of Intelligent Transportation Systems (ITS), data is king. However, that king often has a "Swiss cheese" problem: missing data. Whether it's a loop detector failing due to a power outage or a GPS probe entering a tunnel, gaps in traffic flow and speed data can cripple real-time monitoring and downstream applications.

A recent paper by Kunpeng Zhang and colleagues introduces GT-TDI (Graph Transformer for Traffic Data Imputation), a model that doesn't just look at the numbers—it tries to "understand" the road network's context to fill in the blanks.

TL;DR

GT-TDI is a novel deep learning framework that combines Graph Neural Networks (GNNs) and Transformers with rich "semantic descriptions" (like road ID and time of day) to impute missing traffic data. It significantly outperforms traditional tensor factorization and standard deep learning models, particularly in challenging "non-random" missing scenarios where sensors fail for hours or days.

What Problem Does This Paper Address?

Traffic data imputation isn't new, but existing methods face two major hurdles:

  1. Complex Missing Patterns: While "random missing" (RM) data is relatively easy to handle, "non-random missing" (NM) data—where a sensor goes dark for a long stretch—is much harder because the local temporal correlation is completely lost.
  2. Ignoring Context: Most models treat traffic data as raw numbers in a grid or graph. They ignore "semantic" information—the fact that it’s a Monday morning in January on a specific freeway—which provides vital clues about what the traffic should look like.

Methods

The authors propose the Graph Transformer for Traffic Data Imputation (GT-TDI), which consists of three main modules:

  • The Graph Module: This uses a Graph Transformer to capture spatial dependencies. Crucially, the graph isn't just based on physical distance; it uses "pattern edges" discovered via K-means clustering to connect sensors that behave similarly, even if they are miles apart.
  • The Semantic Module: This is the "secret sauce." The authors treat a day's worth of traffic as a "sentence" and divide it into "words" (time slices). Each slice is tagged with eight semantic labels: Road ID, Sensor ID, Position, Flow Direction, Month, Day, Day of Week, and Slice ID. These are embedded into a high-dimensional space using a Word2Vec-style approach.
  • The Transformer Module: A standard Transformer encoder takes the combined spatial and semantic features to perform the final imputation.

To train the model, they use a dual loss function: Mean Squared Error (MSE) for point-wise accuracy and Kullback-Leibler (KL) Divergence to ensure the probability distribution of the imputed data matches the real-world traffic patterns.

Datasets

The model was evaluated using the PeMS (Performance Measurement System) dataset, a gold standard in traffic research:

  • Source: Freeway data from California (District 7) collected in 2013.
  • Scale: 1,740 sensors over 100 days, aggregated at 10-minute intervals.
  • Scope: Both traffic flow and traffic speed were tested.
  • Setup: Data was split into 70% training, 10% validation, and 20% testing.

Key Insights and Ideas

  • Traffic as Language: By treating traffic sequences as "sentences" and time slices as "words," the researchers successfully ported powerful Natural Language Processing (NLP) techniques to the transportation domain.
  • Global vs. Local Context: Standard Transformers use positional encoding to understand where a data point sits in a sequence. GT-TDI replaces this with "Global Semantic Descriptions," giving the model a much broader understanding of the network-wide environment.
  • Functional Neighbors: The use of "pattern edges" acknowledges that two sensors near different shopping malls might have more in common than two sensors on the same highway that are separated by a major interchange.

Key Results

The GT-TDI model was tested against six baselines, including traditional methods (KNN, PPCA), tensor factorization (LSTC-Tubal, LRTC-TNN), and other deep learning models (DAE, GCN-GRU).

  • Superiority at Scale: GT-TDI achieved the best performance across all missing rates (10% to 90%).
  • The 90% Stress Test: In the extreme case where 90% of data was missing randomly, GT-TDI maintained a Mean Arctangent Absolute Percentage Error (MAAPE) of 6.52, while the next best deep learning model (GCN-GRU) lagged at 30.57.
  • Non-Random Resilience: In the difficult "non-random" missing scenario at a 90% missing rate, GT-TDI achieved an MAAPE of 7.18, vastly outperforming tensor factorization methods which essentially collapsed (LRTC-TNN hit 69.45).

Limitations and Future Work

While highly effective, the authors note a few areas for improvement:

  • Manual Granularity: The number of time "slices" per day (the authors found 4 to be optimal) currently requires manual selection. Future versions could use automated "masked slices" to find the best granularity dynamically.
  • Computational Efficiency: The model currently relies on a pre-processing step with Word2Vec. Integrating semantic retrieval directly into the end-to-end architecture could make it faster.
  • Broader Applications: The authors suggest this semantic approach could be extended beyond imputation to traffic demand prediction and crash risk analysis.

Code Availability: The authors have made their code available on GitHub at https://github.com/KP-Zhang/GT-TDI.

Summary updated

Abstract

Large-scale data missing is a challenging problem in Intelligent Transportation Systems (ITS). Many studies have been carried out to impute large-scale traffic data by considering their spatiotemporal correlations at a network level. In existing traffic data imputations, however, rich semantic information of a road network has been largely ignored when capturing network-wide spatiotemporal correlations. This study proposes a Graph Transformer for Traffic Data Imputation (GT-TDI) model to impute large-scale traffic data with spatiotemporal semantic understanding of a road network. Specifically, the proposed model introduces semantic descriptions consisting of network-wide spatial and temporal information of traffic data to help the GT-TDI model capture spatiotemporal correlations at a network level. The proposed model takes incomplete data, the social connectivity of sensors, and semantic descriptions as input to perform imputation tasks with the help of Graph Neural Networks (GNN) and Transformer. On the PeMS freeway dataset, extensive experiments are conducted to compare the proposed GT-TDI model with conventional methods, tensor factorization methods, and deep learning-based methods. The results show that the proposed GT-TDI outperforms existing methods in complex missing patterns and diverse missing rates. The code of the GT-TDI model will be available at https://github.com/KP-Zhang/GT-TDI.
BibTeX
@misc{zhang2023large,
  author = {Kunpeng Zhang and Lan Wu and Liang Zheng and Na Xie and Zhengbing He},
  title = {{Large-Scale Traffic Data Imputation with Spatiotemporal Semantic Understanding}},
  year = {2023},
  eprint = {2301.11691},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2301.11691},
}
Figure