TESTAM: A Time-Enhanced Spatio-Temporal Attention Model with Mixture of Experts
Hyunwook Lee, Sungahn Ko
TL;DR
This work tackles the challenge of accurate traffic forecasting under complex spatio-temporal dependencies and event-driven changes. It introduces TESTAM, a time-enhanced spatio-temporal attention model built as a Mixture-of-Experts with three spatially diverse experts and a memory-based gating mechanism to route contextually. Key innovations include Temporal Information Embedding via Time2Vec and Time-Enhanced Attention, enabling effective transfer from historical data to forecasts. Experiments on METR-LA, PEMS-BAY, and EXPY-TKY show state-of-the-art performance, especially for long-horizon and non-recurring events, with computational efficiency and interpretable routing behavior guiding expert selection.
Abstract
Accurate traffic forecasting is challenging due to the complex dependency on road networks, various types of roads, and the abrupt speed change due to the events. Recent works mainly focus on dynamic spatial modeling with adaptive graph embedding or graph attention having less consideration for temporal characteristics and in-situ modeling. In this paper, we propose a novel deep learning model named TESTAM, which individually models recurring and non-recurring traffic patterns by a mixture-of-experts model with three experts on temporal modeling, spatio-temporal modeling with static graph, and dynamic spatio-temporal dependency modeling with dynamic graph. By introducing different experts and properly routing them, TESTAM could better model various circumstances, including spatially isolated nodes, highly related nodes, and recurring and non-recurring events. For the proper routing, we reformulate a gating problem into a classification problem with pseudo labels. Experimental results on three public traffic network datasets, METR-LA, PEMS-BAY, and EXPY-TKY, demonstrate that TESTAM achieves a better indication and modeling of recurring and non-recurring traffic. We published the official code at https://github.com/HyunWookL/TESTAM
