Spatiotemporal forecasting is the prediction of future values observed at many locations, where the model exploits dependence across both space and time rather than treating each location as an isolated series. Within time series & forecasting in artificial intelligence, it covers problems such as traffic speed on road networks, rainfall over a radar grid, electricity demand across substations and air quality across a city.
The defining assumption is that nearby or connected locations influence each other, often with a delay. A traffic jam propagates upstream, a storm cell drifts with the wind and a heat wave spreads across a region. Spatiotemporal forecasting, also written spatio-temporal forecasting, encodes these interactions explicitly so that each forecast benefits from information observed elsewhere.
How spatiotemporal forecasting represents data
The input is usually a tensor of shape time by location by feature, and the way locations are organized determines the model family. Three spatial structures dominate practice, and each calls for a different inductive bias.
| Spatial structure | Typical data | Suitable architectures |
|---|---|---|
| Regular grid | Radar rainfall, satellite imagery, gridded weather | ConvLSTM, U-Net, vision transformers |
| Graph of sensors | Traffic detectors, power grids, river gauges | Spatiotemporal graph neural networks |
| Irregular points | Weather stations, mobile sensors | Gaussian processes, attention over coordinates |
| Spherical mesh | Global atmospheric reanalysis | Mesh-based graph networks |
For graphs, an adjacency matrix encodes which locations interact, built from road distances, pipe connections or correlation of historical signals. Some models learn an adaptive adjacency matrix from data, which helps when the physical network is unknown or incomplete.
Exogenous covariates are attached to each location as extra features. Typical examples include calendar indicators, holidays, weather observations and planned events such as road closures or concerts. Static attributes, for instance the number of lanes, land use or elevation, describe how a location tends to respond to the same input. Combining these inputs with the shared graph lets a single model serve thousands of locations while still capturing local behavior that differs between sites.
Model architectures and their mechanisms
Modern spatiotemporal forecasters combine a spatial module that mixes information between locations with a temporal module that captures dynamics over time. The order and coupling of these modules distinguish the main architectures.
Classical statistics offers space-time ARIMA and kriging-based models, which remain strong baselines for small networks with smooth fields. Deep learning dominates large problems, where nonlinear propagation and many locations make hand-specified covariance structures impractical.
| Model | Spatial component | Temporal component |
|---|---|---|
| ConvLSTM | Convolution inside recurrent gates | LSTM recurrence |
| DCRNN | Diffusion convolution on a directed graph | Sequence-to-sequence GRU |
| STGCN | Spectral graph convolution | Gated temporal convolution |
| Graph WaveNet | Graph convolution with adaptive adjacency | Dilated causal convolution |
| GMAN | Spatial attention | Temporal attention with transform layer |
| GraphCast-style models | Message passing on a multi-scale mesh | Autoregressive rollout |
Most deep models produce multi-step forecasts directly, emitting all horizons in one pass to limit error accumulation. Weather models instead use autoregressive rollout, feeding each prediction back as input, and are trained over several steps to keep long rollouts stable.
How it differs from related forecasting tasks
Spatiotemporal forecasting is a special case of multivariate forecasting in which the variables are tied to positions and their relationships have geometric or network meaning. That structure is what separates it from neighboring tasks in the Topic.
| Task | What is predicted | Use of spatial structure |
|---|---|---|
| Univariate time series forecasting | One series | None |
| Multivariate forecasting | Several related series | Implicit, learned correlations |
| Global forecasting model | Many independent series with shared weights | Usually none |
| Spatiotemporal forecasting | Values at many located points | Explicit graph, grid or coordinates |
| Nowcasting | The current or next-hour state | Often grid-based, very short horizon |
A global forecasting model shares parameters across series but still predicts each one from its own history. A spatiotemporal model goes further by letting the forecast at one location read the recent state of its neighbors, which is decisive when disturbances travel through the network.
Evaluation and benchmark practice
Evaluation reports errors per horizon and averaged over locations, because accuracy decays as lead time grows. Traffic studies on benchmarks such as METR-LA and PEMS-BAY report MAE, RMSE and MAPE at 15, 30 and 60 minutes, while weather models use RMSE and anomaly correlation per variable and pressure level.
Splits must respect chronological order to avoid leakage, and missing sensor readings, often recorded as zeros, must be masked out of the loss and the metrics. Probabilistic variants are scored with the continuous ranked probability score or pinball loss across quantiles.
Limitations and common mistakes
Spatiotemporal models are powerful but sensitive to data quality and graph design. The most frequent problems and their remedies are summarized below.
| Symptom | Likely cause | Remedy |
|---|---|---|
| Optimistic test scores | Random split leaking future data | Chronological or rolling-origin evaluation |
| Poor results on new sensors | Model tied to fixed node identities | Inductive graph layers, node features |
| Blurry long-range forecasts | Mean squared error averaging outcomes | Probabilistic or ensemble training |
| Degraded accuracy after network change | Stale adjacency matrix | Rebuild or learn the graph periodically |
| Slow training on large networks | Dense attention over all nodes | Neighbor sampling, sparse attention |
A further caution concerns strong simple baselines. Historical averages and per-sensor seasonal naive forecasts are hard to beat at long horizons, so any claimed gain should be measured against such baselines before deployment.
The simple explanation
Some things change over time and over places at once. Traffic, rain and air pollution are good examples. Spatiotemporal forecasting predicts these changes for many places together.
The key idea is that places affect their neighbors. A jam on one road soon slows the road behind it. A rain cloud moves to the next town. A good model watches the whole map, not just one spot. That is why it often sees trouble coming earlier than a forecast for a single location.
How it is used in practice
A city traffic management center operates about 400 loop detectors on its highway network, each reporting average speed every five minutes. The team builds a road graph in which detectors are connected when they are within a few kilometers of driving distance, and it trains a diffusion-convolution recurrent model on two years of data.
The model reads the last hour of speeds across the entire network and predicts the next hour at every detector. When an incident slows traffic at one interchange, the forecast shows the slowdown propagating upstream about 20 minutes before it arrives at the next junctions.
Operators use these predictions to adjust ramp metering and variable message signs in advance. Compared with a per-sensor seasonal baseline, the graph model cuts the 30-minute mean absolute error by roughly a quarter during peak hours, which gives the center more time to divert traffic.