Skip to content
Open access

Traffic Flow Prediction System Based on Spatiotemporal Graph Neural Network

Jul 2026 · Computers and artificial intelligence · Vol 3, pp. 200-208 · 0 citations · 10 references

TL;DR

This framework introduces an adaptive graph learning module that dynamically infers meaningful connectivity relationships among traffic sensors—not relying on fixed geographic or distance-based assumptions—but instead leveraging real-time traffic correlations and node-level embeddings, enabling effective modeling of both localized spatial interactions and multi-scale temporal dependencies across varying prediction horizons.

Abstract

Urban traffic congestion poses a persistent challenge to sustainable mobility, demanding intelligent forecasting systems capable of capturing both the complex spatial layout of road networks and the dynamic evolution of traffic patterns over time. Traditional statistical and deep learning methods often fail to jointly model these interdependent spatiotemporal characteristics, particularly when road topology is incomplete, outdated, or oversimplified. To address this gap, we propose a novel spatiotemporal graph neural network architecture specifically designed for short-term traffic flow prediction. Our framework introduces an adaptive graph learning module that dynamically infers meaningful connectivity relationships among traffic sensors—not relying on fixed geographic or distance-based assumptions—but instead leveraging real-time traffic correlations and node-level embeddings. This learned structure is then integrated into a hierarchical encoder that combines spectral graph convolution with dilated causal temporal convolutions, enabling effective modeling of both localized spatial interactions and multi-scale temporal dependencies across varying prediction horizons. A lightweight, shared-weight decoder supports flexible multi-step forecasting without sacrificing accuracy or efficiency. We rigorously evaluate our approach on two large-scale, real-world traffic datasets—PeMSD4 and PeMSD8—covering diverse urban environments and sensor densities. Experimental results demonstrate consistent and statistically significant improvements over state-of-the-art baselines, achieving more than a twelve percent reduction in mean absolute error for fifteen-minute forecasts. Ablation studies confirm the critical role of adaptive graph construction and hierarchical temporal modeling, while visualization of learned graphs reveals interpretable, physically plausible connectivity patterns aligned with actual road infrastructure and traffic behavior. The system shows strong deployment potential, balancing predictive performance with practical considerations such as inference speed and compatibility with edge-computing platforms used in modern traffic management centers.

Read PDF

Similar papers

Preprint Aug 2026

Spatiotemporal Graph Transformer for Traffic Intelligence in Edge Computing

Accurate traffic forecasting is essential for proactive resource management in edge computing, where service demand evolves dynamically across both space and time. In practical cellular edge systems, traffic exhibits strong spatial correlations among neighboring service regions and long-range temporal dependencies driven by user mobility and application behavior. Existing recurrent forecasting approaches can capture short-term dynamics but often struggle to model long-horizon traffic evolution under non-stationary conditions. To address this challenge, we propose a spatiotemporal graph Transformer framework that jointly models spatial interactions and temporal dependencies for traffic forecasting in edge computing. The framework employs graph neural networks to capture spatial correlations among service regions and leverages Transformer-based self-attention to learn long-range temporal patterns from historical traffic observations. By decoupling spatial representation learning from temporal reasoning, the proposed approach provides an effective mechanism for large-scale spatiotemporal traffic modeling. Extensive experiments on a real-world cellular network dataset demonstrate that the proposed graph Transformer consistently outperforms recurrent graph-based baselines, including GCN-RNN, GCN-LSTM, and GCN-GRU models, across multiple forecasting horizons. The resulting forecasts enable more effective proactive resource provisioning and reduce overload risk compared with reactive management strategies. These results highlight the potential of graph-enhanced attention mechanisms for building intelligent and adaptive edge computing systems.

Laha Ale, Letian Lin, Na Cao et al. · 0 citations
Open access 2026

Enhanced Traffic Prediction Using Spatial–Temporal Graph Neural Networks

The ability to forecast traffic conditions in urban environments is essential for intelligent transport systems because it provides proactive congestion management, traffic control and informed urban mobility planning. However, due to the extreme spatial and temporal volatility of traffic flow patterns, conventional statistical, machine learning, and sequence-based deep learning approaches either fail to account for the spatial relationships between highway segments or fail to sufficiently model long-range temporal dynamics. To address these gaps, the present study uses a Spatial-Temporal Graph Neural Network (STGNN) framework that can learn a combination of spatial and temporal relationships in road networks and changing time-varying patterns in traffic flow. The model has a graph-based architecture where graph-convolutional layers are combined with gated recurrent units and transformer-based attention units, thus creating a hybrid architecture that is capable of multi-scale spatio-temporal dependencies. The METR-LA dataset was used in experiments, and it was observed that STGNN had smaller Mean Absolute Percentage Error(MAPE), Mean Absolute Error(MAE), and Root Mean Squared Error(RMSE) at 15, 30, and 60 minute horizons of prediction than the baseline and the implemented models: Sequence to Sequence (Seq2Seq) and Temporal Graph Convolutional Network (T-GCN). The model achieved the best results for the 15-minute interval with an MAE of 2.71, an RMSE of 5.17, and a MAPE of 7.08. The results imply that adaptive spatial learning, together with the temporal sequence modeling, can produce much better forecasting stability, which underlines the potential STGNN-based traffic prediction systems have to contribute to real-time traffic control.

Akarsh Kumar, Aishwarya Sinha, Yadvendra Pratap Singh · 0 citations
Open access Jul 2026

Tensor-evolving graph with temporal separation network for traffic flow forecasting

Traffic flow forecasting requires joint modeling of temporal nonstationarity and diverse evolution patterns of traffic states under non-Euclidean road network constraints. Although recent spatiotemporal graph forecasting methods incorporate dynamic graph learning to alleviate the limitations of static topology, their spatial structure evolution is still largely driven by feature similarity or latent variables. An explicit temporal-prior-modulated mechanism for structure generation remains absent. Temporal modeling and spatial structure learning are often conducted independently at different levels, limiting the ability to capture periodically driven evolution of spatiotemporal dependencies. To address these limitations, a Tensor-Evolving Graph with Temporal Separation Network (TEG-TSNet) for traffic flow forecasting is proposed, which constructs a unified spatial prior via graph Laplacian spectral embedding. A node-level gating mechanism is then applied to enable differentiable temporal decoupling between trend and seasonal components. Next, a tensor-evolving graph encoder embeds time, source nodes, and target nodes into a unified multilinear tensor representation. This design dynamically generates structure-aware adjacency relations for different time slices and models time-varying spatial dependencies via diffusion graph convolution. During decoding, spatiotemporal attention fusion and a sparse expert routing mechanism are employed to strengthen representations of multimodal traffic states. Unlike prior studies that loosely combine temporal modeling and dynamic graph learning, the proposed framework introduces a time-conditioned structure generation paradigm, where temporal priors explicitly govern the evolution of spatial dependencies through a unified tensor formulation. This establishes a tightly coupled spatiotemporal modeling mechanism rather than a simple component-level integration. Extensive experiments on multiple real-world traffic datasets demonstrate stable and competitive forecasting performance and validate effectiveness and generalization. Related codes are available at https://github.com/Haku-zx/TEG-TSNet.

Hongyan Wang, Linlong Chen · 0 citations
Preprint Aug 2026

Structure-Guided Spatiotemporal Attention Graph Neural Network for Traffic Flow Prediction

Deep spatiotemporal models integrating graph convolutions and attention mechanisms have demonstrated excellent performance in network-level traffic flow prediction, owing to their exceptional ability to capture complex spatiotemporal dependencies. Despite their predictive success, deployment of such models in safety-critical urban systems remains constrained by their inherent lack of transparency. Existing post-hoc diagnostic methods often struggle with spurious correlations and fail to unveil the intrinsic decision-making mechanisms governing traffic dynamics, resulting in suboptimal interpretability and limited operational trustworthiness. To address these challenges, this paper proposes the Structure-Guided Spatiotemporal Attention Graph Neural Network (SGSAN). Departing from traditional architectures that rely on unconstrained adaptive graphs, SGSAN explicitly learns a static Directed Dependency Graph (DDG) to identify the invariant macroscopic propagation paths of traffic states. We further introduce an InfoNCE-based soft-coupling mechanism that anchors the model's dynamic spatiotemporal attention to this structural prior, offering a mechanistic account of the model's decision-making process while ensuring robust forecasting by aligning attention-based reasoning with identified macroscopic dependencies and preventing over-reliance on ephemeral local noise. Furthermore, a decoupled two-stage optimization framework is developed to resolve the fundamental conflict between structural discovery and predictive error minimization. Extensive experiments on multiple real-world datasets demonstrate that SGSAN achieves state-of-the-art predictive accuracy while providing built-in interpretability that organically aligns with the physical logic of traffic networks.

Xuan He, Can Li, Wanjing Ma · 0 citations
Open access Jul 2026

Recurrent Graph Neural Network Hybrid Model for Spatio-Temporal Traffic Flow Prediction in Intelligent Transportation Systems

Traffic congestion is a growing challenge in urban environments, driven by increasing population and vehicle density, leading to significant economic and societal impacts. Accurate traffic forecasting is a key component of Cooperative Intelligent Transportation Systems (C-ITS), enabling proactive traffic management strategies such as adaptive signal control and dynamic routing. However, existing approaches often struggle to capture spatial dependencies in road networks and long-range temporal dynamics in traffic data. This paper proposes TETRA, a hybrid spatio-temporal traffic forecasting model that integrates Graph Convolutional Networks (GCNs) with Extended Long Short-Term Memory (xLSTM). By incorporating matrix-based memory and memory mixing, xLSTM enables the model to capture complex multi-timescale temporal patterns, including congestion propagation and delayed recovery dynamics, which are not well represented by conventional recurrent models. The proposed approach is evaluated on a real-world urban traffic dataset and the widely used METR-LA benchmark. Experimental results show that TETRA outperforms or matches established baseline models representative of the main spatio-temporal paradigms, with the most pronounced gains at medium- and long-term horizons, achieving up to 13.0% lower MAE, 20.0% lower RMSE, and 6.0% higher $$R^2$$ on a real-world dataset relative to the strongest investigated baseline at each horizon. Statistical analysis confirms that these improvements are robust across prediction horizons. Additional evaluations, including ablation and sensitivity analyses, demonstrate the effectiveness and scalability of the proposed model.

Norman Bereczki, Vilmos Simon · 0 citations
Open access Aug 2026

Building Urban Traffic Flow Prediction Model Using Spatio-Temporal Graph Convolutional Networks

The proposed position-aware spatio-temporal modeling strategy provides a practical reference for information fusion and dynamic state estimation in large-scale wireless sensing networks and electromagnetic signal-driven monitoring systems, supporting future intelligent perception and communication infrastructures.

J. Sun, Y. Liu, Y. Dou et al. · 0 citations