Xu, Y., & Hassani, M. (2025). Leveraging Contrastive Learning and Spatial Encoding for Prediction in Traffic Networks with Expanding Infrastructure. In SAC ’25: Proceedings of the 40th ACM/SIGAPP Symposium on Applied Computing (pp. 1590-1599). Association for Computing Machinery, Inc.. https://doi.org/10.1145/3672608.3707852
Abstract
In modern urban environments, accurate traffic prediction is vital for managing congestion and optimizing infrastructure. A significant challenge lies in predicting traffic for unseen sensors—newly installed or relocated sensors unfamiliar to existing models. This paper presents the Distance-Enhanced Spatial Pre-Training framework to enhance prediction accuracy for these sensors. The framework integrates spatial encoding to capture sensor dependencies based on routing distances and utilizes Contrastive Learning for pretraining the encoder. This enriches input data with historical sensor information and spatial context, enabling the model to generalize effectively to unseen sensors. Extensive experiments on METR-LA, PeMS-BAY, and an exclusive Hague dataset demonstrate the framework’s excellence, showing reductions in Mean Absolute Error by 3.38% on METR-LA, 3.68% on PeMS-BAY, and 9.17% on the Hague dataset.
