A Comparative Study of Loss Functions: Traffic Predictions in Regular
  and Congestion Scenarios
Yangxinyu Xie Tanwi Mallick
Spatiotemporal graph neural networks have achieved state-of-the-art
performance in traffic forecasting. However, they often struggle to forecast
congestion accurately due to the limitations of traditional loss functions.
While accurate forecasting of regular traffic conditions is crucial, a reliable
AI system must also accurately forecast congestion scenarios to maintain safe
and efficient transportation. In this paper, we explore various loss functions
inspired by heavy tail analysis and imbalanced classification problems to
address this issue. We evaluate the efficacy of these loss functions in
forecasting traffic speed, with an emphasis on congestion scenarios. Through
extensive experiments on real-world traffic datasets, we discovered that when
optimizing for Mean Absolute Error (MAE), the MAE-Focal Loss function stands
out as the most effective. When optimizing Mean Squared Error (MSE), Gumbel
Loss proves to be the superior choice. These choices effectively forecast
traffic congestion events without compromising the accuracy of regular traffic
speed forecasts. This research enhances deep learning models' capabilities in
forecasting sudden speed changes due to congestion and underscores the need for
more research in this direction. By elevating the accuracy of congestion
forecasting, we advocate for AI systems that are reliable, secure, and
resilient in practical traffic management scenarios.