Abstract
Spatio-Temporal (ST) Foundation Models (STFMs) promise cross-dataset generalization, yet joint ST pretraining is computationally expensive and grapples with the heterogeneity of domain-specific spatial patterns. Substantially extending our preliminary conference version, we present FactoST-v2, an enhanced factorized framework redesigned for full weight transfer and arbitrary-length generalization. FactoST-v2 decouples universal temporal learning from domain-specific spatial adaptation. The first stage pretrains a minimalist encoder-only backbone using randomized sequence masking to capture invariant temporal dynamics, enabling probabilistic quantile prediction across variable horizons. The second stage employs a streamlined adapter to rapidly inject spatial awareness via meta adaptive learning and prompting. Comprehensive evaluations across diverse domains demonstrate that FactoST-v2 achieves state-of-the-art accuracy with linear efficiency - significantly outperforming existing foundation models in zero-shot and few-shot scenarios while rivaling domain-specific expert baselines. This factorized paradigm offers a practical, scalable path toward truly universal STFMs.
Problem Formulation and Motivation
Modeling spatio-temporal (ST) data, such as city-wide traffic flows or regional weather patterns, is notoriously difficult due to the interplay of two distinct dynamics. Temporal patterns, including trends and seasonality, often exhibit universal characteristics across different domains. Conversely, spatial patterns—the specific layout of a road network versus a power grid—are highly heterogeneous and domain-specific.
Previous attempts to develop "Foundation Models" for this field have encountered two primary obstacles:
- Pattern Mismatch: Monolithic models that attempt to learn space and time simultaneously often suffer from "negative transfer." The unique spatial layout of one dataset can confuse the model when applied to another with a different topology.
- The Scalability Wall: Most joint ST models rely on architectures with quadratic complexity ($O(N^2)$). As the number of sensors ($N$) or the time horizon increases, computational costs explode, making them impractical for large-scale real-world networks.
The FactoST-v2 Paradigm
To overcome these challenges, FactoST-v2 introduces a two-stage Factorized Paradigm that decouples universal temporal laws from specific spatial structures.
Stage I: Universal Temporal Pretraining (UTP)
The model first pretrains a minimalist, encoder-only backbone on a massive, cross-domain corpus. This stage is graph-agnostic, treating every sensor as an independent time series to distill universal temporal dynamics. Key innovations include:
- Randomized Sequence Masking: Enables the model to generalize to arbitrary input lengths.
- Partial Rotary Positional Embeddings (p-RoPE): Maintains the physical meaning of signals while allowing for flexible horizons.
- Probabilistic Quantile Prediction: Instead of simple point estimates, the model predicts confidence intervals, effectively capturing aleatoric uncertainty.
Stage II: Spatio-Temporal Adaptation (STA)
To adapt to a specific downstream task, a lightweight adapter is integrated. This module "injects" spatial awareness into the pretrained temporal backbone without requiring a full retrain. It utilizes Spatio-Temporal Metadata Fusion (STMF) to incorporate coordinates and time-of-day information, alongside Domain-Specific Prompt Alignment (DSPA) to align the universal features with the target domain's unique characteristics.
Experimental Evaluation
Datasets and Benchmarks
The authors curated a massive pretraining corpus spanning 8 diverse domains (Energy, Transport, Economics, etc.) totaling over 11 billion time points. This includes KernelSynth, a novel synthetic dataset designed to bridge the gap between finite real-world data and infinite possible temporal dynamics. Evaluation was conducted on 8 standard ST benchmarks, including PEMS traffic series, METR-LA, Electricity (ECL), and Weather.
Key Results
- Zero-Shot Performance: FactoST-v2 significantly outperformed existing foundation models like OpenCity and UniST in zero-shot scenarios, demonstrating that its factorized knowledge is more transferable across domains.
- Linear Scalability: By processing nodes independently in the backbone and using a lightweight adapter, the model achieves $O(N)$ complexity. This efficiency allows it to handle massive sensor networks where $O(N^2)$ models fail due to memory limits.
- Fast Adaptation: Results show that with only 10% of labeled data in a new domain, the adapter can reach performance levels comparable to models trained on full datasets, indicating the pretrained backbone handles the majority of the predictive heavy lifting.
Discussion and Future Work
FactoST-v2 represents a significant step toward universal STFMs by proving that decoupling space and time is more efficient than joint modeling. However, limitations remain. The current model is "semi-inductive," relying on learned embeddings for specific nodes. Future iterations aim for a "fully inductive" approach to handle dynamic topologies where nodes are added or removed on the fly. Additionally, integrating exogenous factors (e.g., weather alerts or social events) and leveraging Large Language Models (LLMs) to align textual metadata with spatial adapters are promising avenues for future research.
Summary updated