A Spatio-Temporal Graph Transformer with Edge Intelligence for Real-Time Traffic Congestion and Anomaly Prediction
Bedhapuri MamathaResearch Scholar, Department of Computer Science, Sri Padmavati Mahila Visvavidyalayam, Tirupati, Andra Pradesh, India. mamathabedhapuri@gmail.com0009-0007-5190-9037
M. Usha RaniProfessor, Department of Computer Science, Sri Padmavati Mahila Visvavidyalayam, Tirupati, Andra Pradesh, India. mur@spmvv.ac.in0000-0003-3808-840X
Traffic congestion and abnormal traffic situations present important problems for intelligent transport systems, especially where prediction has to be provided at low latencies. Traditional traffic prediction techniques might not be able to model spatial dependency and long-range temporal dependencies together; centralized computation can also cause delay in response and increase communication overhead. This paper tackles this problem through a unified approach for traffic congestion prediction and abnormality detection using edge-based inference. A Spatio-Temporal Graph Transformer with Edge Intelligence (STGT-EI) framework is designed to encode the representation of the road network graphically, identify the spatial dependencies between connected road segments, and learn evolving traffic patterns using Transformer-based temporal attention. Joint prediction is done for traffic congestion prediction and anomaly detection tasks, while edge-based inference provides localized computation and timely traffic prediction. The proposed model is tested based on traffic congestion prediction error, anomaly detection accuracy, inference latency, and robustness against missing values. Comparative and ablation studies are performed to evaluate the model's performance and the effect of its key components. With STGT-EI, the mean absolute error (MAE) was observed to be 2.54, while the root mean square error (RMSE) was found to be 5.31, indicating that both errors were reduced by 9.61% and 9.54%, respectively, compared with the Graph Transformer baseline. The anomaly detection F1-score of STGT-EI was observed to be 94.1%, which is 2.2% higher than the score for the Transformer-based anomaly detection system. Moreover, STGT-EI attained an inference latency of 18.7 ms, which is 47.18% less than the Graph Transformer. With 20% missing observations, the MAE for STGT-EI was observed to be 3.68, which is 0.5 less than the baseline. The results show the possibility of using graph-temporal learning, joint prediction, and edge intelligence for reliable traffic analysis.