Efficient Traffic Prediction Through Spatio-Temporal Distillation

Qianru Zhang, Xinyi Gao, Haixin Wang, Siu Ming Yiu, Hongzhi Yin

Introduction

Intelligent transportation systems (ITS) rely on accurate traffic flow prediction to optimize urban mobility. Graph Neural Networks (GNNs) have become the dominant architecture for this task due to their ability to model complex spatial dependencies and temporal dynamics. However, deep GNNs face significant deployment challenges: high computational costs during inference due to recursive message passing and performance degradation from "over-smoothing," where node representations become indistinguishable.

To address these hurdles, this paper introduces LightST, a novel knowledge distillation framework. LightST transfers the rich spatio-temporal knowledge from a high-capacity GNN "teacher" to a lightweight, graph-less Multilayer Perceptron (MLP) "student," achieving state-of-the-art accuracy with massive gains in inference speed.

The LightST Framework

The core innovation of LightST is its dual-level distillation paradigm, which enables a simple MLP to outperform complex GNNs without requiring a graph structure during inference.

Overview of the LightST framework, illustrating the distillation from a GNN teacher to an MLP student.

Teacher and Student Models

The Teacher Model is a sophisticated GNN designed to capture deep traffic patterns. It utilizes Graph Convolutional Networks (GCNs) for spatial message passing and Temporal Convolutional Networks (TCNs) for temporal encoding. TCNs were chosen over LSTMs as they better capture long-range dependencies necessary for effective distillation.

The Student Model is a pure MLP. By operating without a graph structure, it bypasses the computational bottleneck of recursive message passing, making it ideal for real-time applications.

Dual-Level Distillation

LightST employs two distinct distillation strategies:

  1. Prediction-Level Distillation: The student mimics the teacher's final output distributions using Mean Squared Error (MSE) and Kullback-Leibler (KL) divergence losses.
  2. Embedding-Level Distillation (Distribution Alignment): This novel component aligns intermediate spatial and temporal embeddings. Crucially, it uses an adaptive weighting scheme based on cosine similarity. This prevents the student from inheriting the teacher's over-smoothed features, effectively acting as a structural denoiser.

Experimental Evaluation

The authors evaluated LightST on five standard real-world traffic flow datasets from California (PeMS3, PeMS4, PeMS7, PeMS8, and PeMS-Bay), with data aggregated into 5-minute intervals.

Performance and Efficiency

LightST consistently outperformed 18 baseline models, including heavyweights like ASTGCN and DSTAGNN, across all metrics (MAE, RMSE, and MAPE). More importantly, it achieved a 5x to 40x speedup in inference time.

Performance comparison of LightST (Ours) against state-of-the-art models on PeMSD4 and PeMSD7 datasets.

As shown in the figure above, LightST (marked as "Ours") occupies the optimal bottom-left region of the plots, indicating both the lowest error rates and the fastest inference times compared to recent SOTA methods. For instance, on the PeMSD7 dataset, LightST completed inference in 2.51 seconds, compared to 110.06 seconds for DSTAGNN—a 43.8x improvement.

Key Insights

  • Graph-less Inference is Viable: The results prove that a graph structure is not strictly necessary during inference if spatial and temporal knowledge is effectively distilled into an MLP.
  • Adaptive Distillation Mitigates Over-smoothing: By dynamically weighting the loss based on region similarity, the student learns meaningful structural relationships without the homogenization typical of deep GNNs.
  • Ablation Results: Removing embedding-level distillation significantly degrades performance, highlighting that matching final predictions alone is insufficient for capturing complex traffic dynamics.

Conclusion and Future Work

LightST demonstrates that knowledge distillation can bridge the gap between the high accuracy of GNNs and the efficiency required for real-time urban sensing. While the training phase remains computationally intensive due to the KL divergence component, the inference speed gains are transformative for practical deployment. Future research will explore integrating causal inference to better account for external factors like weather and accidents, further enhancing model robustness.

Summary updated

BibTeX
@inproceedings{zhang2025efficient,
  author = {Qianru Zhang and Xinyi Gao and Haixin Wang and Siu Ming Yiu and Hongzhi Yin},
  title = {{Efficient Traffic Prediction Through Spatio-Temporal Distillation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i1.32096},
}
Figure