VaryST: Generalizable Spatio-Temporal Forecasting Beyond the Closed-World Setting

Shengnan Guo, Jinjun Cheng, Xiaowei Mao, Jianhao Zhang, Haochen Lv, Yang Jiang, YiHeng Huang, Yan Lin, Youfang Lin, Huaiyu WanarXiv 2026

TL;DR

VaryST is a novel spatio-temporal forecasting framework that breaks away from the "closed-world" assumption where sensor networks and data patterns are expected to remain static. By ditching fixed node identities and static graphs in favor of dynamically constructed predictive contexts from long-term history, VaryST achieves remarkable generalization across new cities, evolving time periods, and severe sensor failures.

What Problem Does This Paper Address?

Most current spatio-temporal (ST) forecasting models—used for everything from traffic management to energy grid monitoring—are "brittle." They are typically designed for a closed-world setting: they assume the sensors (nodes) they were trained on are the only ones they will ever see, and that the relationships between those sensors (the spatial graph) and the data distributions (temporal patterns) won't change.

In the real world, things change. Cities expand, sensors break, and seasonal trends shift. Traditional models fail in these scenarios because they rely on node-specific embeddings (learning a unique "ID" for every sensor) and fixed adjacency matrices. If you move a model trained in Beijing to Shanghai, or if 30% of your sensors go offline, these models often become useless.

The authors identify this "training-environment coupling" as the core bottleneck and propose a model that builds its understanding of the world on the fly.

Figure 1: ST models in varying deployment environments

Methods

VaryST (Varying Spatio-Temporal) introduces a compact architecture designed to be "open-world" from the ground up. Its core innovation is Dynamic Predictive Context Construction.

  1. Long-Term Observation-Derived Representations: Instead of learning who a node is (an ID), VaryST learns how a node behaves. It takes a long history of observations, applies linear interpolation to handle missing values, and uses a lightweight causal Transformer to encode this history into a dynamic representation. This allows the model to characterize unseen nodes immediately upon deployment.
  2. Dynamic Functional Support Node Retrieval: Rather than relying on a fixed physical map, VaryST uses RBF (Radial Basis Function) similarity to find "functional neighbors"—nodes that are behaving similarly to the target node right now, regardless of their physical distance.
  3. Target-Centric Hierarchical Contextual Decoding: A Transformer decoder organizes evidence across multiple scales: a global system token, tokens from functional neighbors, and both recent and long-term tokens for the target node itself. It also uses "hop-aware" relative structural encoding to maintain a sense of physical topology without being enslaved by it.
  4. Importance-Guided Observation Perturbation (IGOP): To ensure robustness against missing data, the authors use a clever training trick. Instead of random masking, IGOP identifies which parts of the historical data the model is relying on most and deliberately masks them. This forces the model to learn alternative spatial and temporal dependencies.
Figure 2: The architecture of VaryST. It contains Long-term Observation-derived Representations, Dynamic Functional Support Node Retrieval, and Target-centric Hierarchical Contextual Decoding.

Datasets

The model was evaluated on six real-world datasets to test different facets of generalization:

  • PEMS03, 04, 07, 08: Standard California highway traffic benchmarks for in-domain and cross-network (spatial) transfer.
  • PM2.5: An air quality dataset used to test generalization to non-traffic domains.
  • PEMSD3-Stream: A unique 7-year dataset (2011–2017) where the sensor network grows every year, specifically used to test temporal distribution shifts and expanding networks.
Table 1: Dataset statistics.

Key Insights and Ideas

  • Behavior Over Identity: The most significant "aha" moment is that node IDs are a liability for generalization. By deriving representations purely from observations, the model treats every node as a set of behaviors rather than a fixed entity.
  • Functional Proximity vs. Physical Proximity: In complex systems like traffic, a node 10 miles away on a similar arterial road might be more predictive than a node 100 feet away on a side street. Dynamic retrieval captures these shifting functional relationships.
  • History as Characterization: Long-term history (e.g., 2016 steps) isn't just about finding long-range dependencies; it's about providing enough "contextual surface area" to identify which regime a node is currently operating in.
  • Adversarial Robustness: IGOP shows that "hard" masking—targeting the most informative patches—is far more effective for building resilient models than simple random dropout or masking.

Key Results

VaryST was compared against 17 baselines, including state-of-the-art Large Language Model (LLM)-based forecasters.

  • Superior Generalization: In zero-shot spatial transfer (training on one city, testing on another), VaryST's performance dropped by only ~5% MAE. In contrast, the strongest baseline (STD-PLM) saw its error skyrocket by over 60%.
  • Temporal Resilience: On the 7-year PEMSD3-Stream dataset, VaryST consistently outperformed STOP (a baseline specifically designed for temporal shifts), reducing MAE by up to 21.97%.
  • Robustness to Missing Data: Even when 70% of observations were missing at test time, VaryST remained highly effective, significantly outperforming models like FaST and BiST.
  • Efficiency: Despite using long-term history, VaryST is highly efficient. It achieves lower error than competitors with a smaller memory footprint and faster inference times because it compresses history into a compact set of tokens for the decoder.
Performance comparison

Limitations and Future Work

While VaryST excels at handling shifts in existing types of data, the authors note that it still relies on certain structural priors (like Laplacian embeddings) that are calculated per graph. Future work could explore making these structural priors even more domain-agnostic. Additionally, while the model is compact, scaling the "functional retrieval" step to millions of nodes would require more advanced approximate nearest neighbor search techniques to maintain its efficiency advantage.

Summary updated

BibTeX
@misc{guo2026varyst,
  author = {Shengnan Guo and Jinjun Cheng and Xiaowei Mao and Jianhao Zhang and Haochen Lv and Yang Jiang and YiHeng Huang and Yan Lin and Youfang Lin and Huaiyu Wan},
  title = {{VaryST: Generalizable Spatio-Temporal Forecasting Beyond the Closed-World Setting}},
  year = {2026},
  eprint = {2610.19813},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.19813},
}
Figure