Scaling Real-Time Traffic Forecasting with a Graph-Aware Transformer

This post details the engineering decisions behind DeepETT, Uber's new real-time traffic forecasting system powered by deep learning. It introduces a graph-aware transformer model that improves long-trip arrival time accuracy by 6% and forecast variance explained by 19%. Key engineering decisions include decoupling the forecasting model from the routing engine to de-risk the project and using a fixed-size input based on pre-aggregated observations instead of a dynamic graph to maintain predictable inference latency and throughput at scale. The system defines contracts for segment-level and trip-level forecasts, measuring accuracy via MSE and MAE respectively, and analyzes the trade-offs between resolution and calibration. The model design leverages local receptive fields and spatiotemporal views for data aggregation, and the pipeline is designed for high throughput, serving 2 million forecasts per second.