Learning to Factorize Spatio-Temporal Foundation Models

Siru Zhong, Junjie Qiu, Yangyu Wu, Xingchen Zou, Zhongwen Rao, Bin Yang, Chenjuan Guo, Hao Xu, Yuxuan LiangNeurIPS 2025

TL;DR

FactoST is a novel Spatio-Temporal Foundation Model (STFM) that achieves state-of-the-art forecasting performance by "factorizing" the learning process. Instead of training a massive model to learn spatial and temporal patterns simultaneously, it decouples them into two stages: universal temporal pretraining and lightweight spatio-temporal adaptation. This approach reduces Mean Absolute Error (MAE) by up to 46.4% compared to existing foundation models while being significantly faster and more parameter-efficient.

The Challenge of Spatio-Temporal Modeling

Spatio-temporal (ST) data—such as traffic flow on a city grid, air quality across sensors, or electricity load on a power network—is notoriously difficult to model. Traditionally, researchers used Spatio-Temporal Graph Neural Networks (STGNNs) tailored to specific datasets. Recently, the field has moved toward Foundation Models (STFMs) that aim to "pretrain once, adapt everywhere."

However, current STFMs face two major hurdles:

  1. Spatial Inconsistency: Spatial correlations are highly domain-specific. The "neighborhood" logic of a power grid is fundamentally different from that of a road network, making it hard for a single monolithic model to generalize across domains.
  2. Computational Cost: Jointly learning spatial and temporal dependencies for thousands of locations is extremely expensive. Memory and time requirements often grow quadratically with the number of locations or sequence length.
The evolution of ST modeling from traditional GNNs and standard STFMs to the factorized FactoST paradigm.

The FactoST Approach: Divide and Conquer

The authors introduce FactoST, which addresses these issues by splitting the problem into two distinct, lightweight stages. By explicitly decoupling the temporal and spatial learning phases, the model avoids the noise of domain-specific spatial structures during its initial pretraining.

Stage 1: Universal Temporal Pretraining (UTP)

The goal of the first stage is to learn general temporal "laws" (like periodicity and trends) that apply across all domains. This stage is graph-agnostic, meaning it ignores spatial connections entirely to remain scalable and general.

  • Multi-Frequency Augmentation: Uses Fast Fourier Transforms (FFT) to isolate different frequency bands, forcing the model to align patterns across different scales.
  • Multi-Domain Prompting: A learnable "codebook" provides contextual cues for different types of data (e.g., energy vs. traffic) without needing explicit spatial graphs.
  • Multi-Task Pretraining: Employs both self-supervised recovery and supervised prediction heads to build a robust temporal backbone.
Detailed architecture of the Universal Temporal Pretraining stage, featuring multi-frequency augmentation and multi-domain prompting.

Stage 2: Spatio-Temporal Adaptation (STA)

Once the temporal backbone is trained, a lightweight adapter is attached to inject spatial awareness for a specific target dataset.

  • ST Metadata Fusion: Injects static information like geographic coordinates and calendar data.
  • Spatio-Temporal Filtering: Uses low-rank affinities to model how locations interact over time, capturing "time-lagged" effects (e.g., traffic congestion at one intersection affecting another five minutes later).
  • Continual Memory Replay: Uses a small buffer of historical data to prevent "catastrophic forgetting" during the adaptation phase.

Datasets and Evaluation

  • Pretraining: The model was trained on the Monash Time Series Archive, encompassing 13 million time points across 15 datasets in 5 domains (energy, nature, transport, web, and economics).
  • Evaluation: FactoST was tested on 8 established ST benchmarks, including traffic datasets (PEMS03/04/07/08, PEMS-BAY, METR-LA), energy (Electricity, ETTh2), and climate (Weather).

Key Insights

  • Factorization is a Feature, Not a Bug: Explicitly baking spatial modeling into the pretraining stage actually hurts zero-shot generalization. Because spatial structures are so domain-specific, they act as "noise" when trying to transfer knowledge to a new domain.
  • Temporal Patterns are Universal: 1D temporal structures (seasonality, trends) are remarkably consistent across domains. By focusing pretraining purely on time, the model learns a much more robust "temporal brain."
  • Architecture Agnostic: The adaptation module (STA) isn't just for FactoST; the authors showed it could be plugged into other non-graph models like PatchTST to give them spatial reasoning capabilities.

Impressive Results

  • Superior Accuracy: In few-shot settings (using only 10% of training data), FactoST reduced Mean Absolute Error (MAE) by up to 46.4% compared to UniST.
  • Efficiency Gains: Compared to OpenCity, FactoST uses 46.2% fewer parameters and achieves 68% faster inference.
  • Zero-Shot Performance: Even without fine-tuning on a specific dataset, FactoST (using only its temporal backbone) often outperformed specialized foundation models that were jointly trained on space and time.

Limitations and Future Work

While highly effective, the authors acknowledge several areas for improvement:

  • Zero-Shot Spatial Reasoning: While temporal transfer is strong, "zero-shot" spatial generalization (adapting to entirely new, unseen graph structures without any training) remains a significant challenge.
  • Exogenous Variables: The current framework does not explicitly incorporate external factors like weather events or holidays, which are critical for real-world forecasting.
  • Fine-tuning Protocols: More advanced parameter-efficient fine-tuning (PEFT) strategies, like selective layer retraining, could further improve how the model preserves its pretrained knowledge.

Summary updated

BibTeX
@inproceedings{zhong2025learning,
  author = {Siru Zhong and Junjie Qiu and Yangyu Wu and Xingchen Zou and Zhongwen Rao and Bin Yang and Chenjuan Guo and Hao Xu and Yuxuan Liang},
  title = {{Learning to Factorize Spatio-Temporal Foundation Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=d4CZoiaXeC},
}
Figure