Introduction
Spatial-temporal (ST) data, such as urban traffic flow or sensor network readings, presents unique challenges for predictive modeling. Traditional approaches often struggle with three core issues: task specialization (models are typically built for either forecasting or imputation, but not both), data scarcity in new regions, and "structural blindness"—the inability of general-purpose models to inherently grasp geographic topology and temporal periodicity.
STD-PLM addresses these gaps by adapting Pre-trained Language Models (PLMs) into a unified framework capable of both forecasting and imputation. By translating raw ST data into a structured format that respects physical constraints, STD-PLM achieves state-of-the-art performance and demonstrates powerful zero-shot transfer capabilities.
Methodology
The architecture of STD-PLM is designed to bridge the gap between the reasoning capabilities of PLMs and the structural requirements of spatial-temporal physics.
Spatial-Temporal Embeddings
To provide the model with context, the framework utilizes Topology-aware node embeddings derived from the Laplacian matrix of the graph and Periodic-aware time embeddings that capture cyclical patterns like time-of-day and day-of-week. This ensures the model understands both the "where" and the "when" of the data.
Dual Tokenizers and Sandglass Attention
The system employs two specialized tokenizers:
- Spatial Tokenizer: Captures node-level details, distinguishing between static intrinsic states and dynamic microscopic variations.
- Temporal Tokenizer: Aggregates data across nodes to identify global system trends using a patching technique.
To manage the computational cost of standard PLMs, the authors introduced Sandglass Attention (SGA). This module uses a Precoder to aggregate node-level tokens into a smaller set of "region-level" tokens before processing by the PLM, and a Decoder to expand them back. This bottleneck approach significantly reduces the token count without sacrificing performance.
Efficient Fine-tuning and Loss Functions
Instead of full retraining, the model uses LoRA (Low-Rank Adaptation) to update only a fraction of the PLM parameters. A structure-aware loss function ($L_G$) and a regularization term ($L_R$) are employed to ensure the learned region tokens respect the physical graph and prevent overfitting.
Experimental Setup
The model was evaluated on four standard traffic benchmarks: PEMS03, PEMS04, PEMS07, and PEMS08. For the imputation task, the researchers tested the model against a grueling 70% missing data rate under two patterns: Random Missing (RM) and Spatial-Temporal Continuity Missing (CM).
Key Results and Insights
Forecasting Performance
STD-PLM consistently outperformed nine representative baselines, including both specialized ST models (like AGCRN) and other PLM-based models (like STLLM), across all tested datasets.
Imputation and Few-Shot Capabilities
In high-sparsity scenarios (70% missing data), STD-PLM achieved a Mean Absolute Error (MAE) of 14.36, a significant improvement over the next best baseline, mTAN (21.23). Furthermore, the model demonstrated remarkable data efficiency; when trained on only 5% of the data, it matched the performance of a standard LSTM trained on 100% of the data.
Efficiency and Transferability
The Sandglass Attention module proved highly effective, reducing inference time on the PEMS07 dataset from 52.82 seconds to just 9.15 seconds while nearly halving GPU memory usage. Additionally, by using normalized Laplacian eigenvectors, the model learns general concepts of connectivity, enabling successful zero-shot transfer to entirely new cities.
Conclusion
STD-PLM demonstrates that PLMs possess latent logic suitable for spatial-temporal reasoning if the data is appropriately formatted. While currently focused on traffic data, the framework's success suggests potential for expansion into other domains like climate modeling or energy distribution. Future work may explore more complex "region" definitions based on physical administrative boundaries and the impact of scaling to even larger language models.
Summary updated