Source-linked AI summary
STReasoner: Empowering LLMs for Spatio-Temporal Reasoning in Time Series via Spatial-Aware Reinforcement Learning
Juntong Ni, Shiyu Wang, Qi He, Ming Jin, Wei Jin
TL;DR
Spatio-temporal reasoning over time series remains underdeveloped because existing work emphasizes prediction and lacks explicit spatially grounded reasoning resources. The paper builds ST-Bench from an SDE-based multi-agent synthesis pipeline, introduces STReasoner and S-GRPO, and reports broad gains with low cost and robust real-world generalization. The authors also note that broader real-world data and more expressive architectures remain important for further assessment.
Problem
Existing approaches prioritize predictive accuracy, while models and datasets provide limited explicit reasoning over spatially dependent time series despite its importance for decision-making.
Method
The paper creates ST-Bench with four reasoning tasks, trains STReasoner to integrate time series, graphs, and text, and uses S-GRPO to reward gains attributable to spatial information.
Results
STReasoner achieves strong performance and robust zero-shot generalization, with clear gains in experiments and substantially lower cost than proprietary models.
Takeaways & Limitations
The results indicate that synthetic spatio-temporal data and spatial-aware training can link structured time-series information with natural-language reasoning.
Takeaways & Limitations
Broader and more diverse real-world datasets are still needed, and more expressive architectures or multimodal integration may be required for complex scenarios.
Abstract
from arXiv · showhide
Spatio-temporal reasoning in time series involves the explicit synthesis of temporal dynamics, spatial dependencies, and textual context. This capability is vital for high-stakes decision-making in systems such as traffic networks, power grids, and disease propagation. However, the field remains underdeveloped because most existing works prioritize predictive accuracy over reasoning. To address the gap, we introduce ST-Bench, a benchmark consisting of four core tasks, including etiological reasoning, entity identification, correlation reasoning, and in-context forecasting, developed via a network SDE-based multi-agent data synthesis pipeline. We then propose STReasoner, which empowers LLM to integrate time series, graph structure, and text for explicit reasoning. To promote spatially grounded logic, we introduce S-GRPO, a reinforcement learning algorithm that rewards performance gains specifically attributable to spatial information. Experiments show that STReasoner achieves average accuracy gains between 17% and 135% at only 0.004X the cost of proprietary models and generalizes robustly to real-world data.
1 Introduction
Spatio-temporal reasoning links temporal dynamics, spatial dependencies, and textual queries, but existing models and datasets provide limited support for this capability. The paper introduces synthesized data, ST-Bench, and STReasoner with spatial-aware reinforcement learning to address these gaps.
- Motivation: Spatio-temporal reasoning answers what happened, where, when, and why by linking observations across nodes and time through graph dependencies and temporal dynamics.Such reasoning supports decision-making in systems including traffic networks, disease propagation, power grids, and flood networks.
- Research gap: Existing approaches emphasize predictive accuracy, while language and vision-language models are not explicitly trained or evaluated for reasoning over spatially dependent time series.Time-series reasoning models commonly focus on univariate or multivariate series without spatial interactions.
- Research gap: Current resources lack paired textual descriptions, explicit graph interactions, and standardized multidimensional benchmarks that decompose spatio-temporal reasoning into distinct tasks.These gaps constrain systematic evaluation of spatial entities, dependencies, and temporal dynamics.
- Approach: ST-Bench organizes evaluation into etiological spatial reasoning, spatial entity identification, spatial correlation reasoning, and in-context forecasting.The benchmark also includes a real-world dataset for zero-shot evaluation.
- Approach: The paper proposes an SDE-based multi-agent pipeline that generates spatio-temporal data with controllable dependencies, temporal evolution, and aligned textual descriptions.The pipeline provides the basis for constructing an evaluation resource.
- Results: STReasoner combines a unified spatio-temporal reasoning model with a spatial-aware reinforcement-learning objective, achieving strong performance and robust zero-shot generalization at lower cost.The reported evaluation also finds that existing language models struggle with spatio-temporal reasoning.
2 Related Work
Related work extends language-model reasoning to non-text modalities and supports time-series question answering, but spatial dependencies remain largely unaddressed. Spatio-temporal reasoning instead combines numerical signals with graph-defined dependencies and induced temporal dynamics.
- Existing reasoning models: Recent language and vision-language models improve reasoning and extend it beyond text, while time-series reasoning models support question answering and multi-step reasoning.These developments motivate applying language-model reasoning to structured temporal data.
- Existing reasoning models: Most time-series language and reasoning models focus on univariate or multivariate series without modeling spatial dependency.This leaves graph-structured interactions outside their primary setting.
- Spatio-temporal reasoning: Spatio-temporal reasoning involves numerical signals on discrete entities, graph-defined spatial dependencies, and the temporal dynamics induced by those dependencies.This setting differs from reasoning over time series without explicit spatial structure.
3 Problem and Dataset Construction
The paper formalizes spatio-temporal reasoning as generating answers that explicitly analyze temporal dynamics and spatial dependencies, then constructs datasets and benchmarks to evaluate it. Its synthesis pipeline uses network SDEs and multiple agents to align simulated time series, graphs, and textual descriptions.
- 3.1 Problem Definition: Spatio-temporal reasoning maps a query, time series, and graph to an intermediate reasoning sequence and final answer.The formulation requires explicit reasoning over temporal dynamics and spatial dependencies.
- 3.2 Dataset Synthesis Pipeline: Network SDEs model node-specific temporal dynamics, stochastic diffusion, graph coupling, and propagation delays.The formulation samples discrete observations from latent continuous-time node states.
- 3.2 Dataset Synthesis Pipeline: The six-agent synthesis pipeline generates scenarios, parses structured specifications, validates them, instantiates SDE parameters, and assigns time-varying adjacency weights.The simulation module then integrates the instantiated SDE parameters to generate spatio-temporal time series.
- 3.2 Dataset Synthesis Pipeline: Semantic alignment is enforced through source and propagation node roles, restricted exogenous patterns, time-varying adjacency, and explicit lags.These design choices encode textual scenario constraints into structured specifications and simulated data.
- 3.2 Dataset Synthesis Pipeline: ST-Bench evaluates etiological spatial reasoning, spatial entity identification, spatial correlation reasoning, and in-context spatio-temporal forecasting.ST-Align instead supports alignment pretraining with basic temporal, spatial, and spatio-temporal questions.
- 3.3 Dataset Splits and Usage: 1,064 synthesized samples were retained after manual inspection, then split 80% for training and 20% for testing.The training set produced 153,700 ST-Align QA pairs, while ST-Bench was divided 6:2 into ST-SFT and ST-RL.
4 Our Solution: STReasoner
STReasoner integrates encoded time series with textual queries and graph structure, then trains through alignment pretraining, supervised reasoning initialization, and spatial-aware reinforcement learning. S-GRPO supplies a contrastive signal by comparing performance with and without spatial structure.
- 4.1 Model Architecture: STReasoner patchifies time series, encodes patches with a five-layer MLP, and interleaves the resulting embeddings with text tokens by node order.Textual inputs include the natural-language query and graph structure prompted in text.
- 4.2 Model Training: The model faces embedding misalignment, weak pretrained spatio-temporal priors, and risks relying on superficial temporal patterns.These challenges motivate alignment and reasoning-specific training stages.
- 4.2 Model Training: ST-Align provides large-scale alignment pretraining over temporal, spatial, and spatio-temporal attributes.The stage establishes an initial alignment between textual representations and time series embeddings.
- 4.2 Model Training: Rejection sampling retains candidate reasoning trajectories with correct final answers to construct ST-CoT for supervised fine-tuning.Five candidate responses are sampled for each ST-SFT question before selecting correct trajectories.
- 4.2 Model Training: S-GRPO compares responses to the same question with and without spatial structure and rewards gains attributable to spatial information.The positive spatial reward is granted only when the reasoning strategy relies on spatial information.
5 Experiment
Experiments show that STReasoner outperforms open-source and time-series baselines across four tasks, approaches proprietary forecasting performance at much lower cost, and generalizes zero-shot to real-world data. Ablations and training analyses attribute gains to spatial-aware reinforcement learning, staged training, and explicit time-series encoding.
- Main Results: STReasoner achieves the best overall performance among open-source and time-series models across all four tasks.
- Main Results: 2.6% difference separates STReasoner from proprietary models on T4: Forecasting, indicating comparable forecasting performance.
- Main Results: STReasoner significantly outperforms two large proprietary models in strict zero-shot evaluation on a real-world CausalRivers-based causal QA dataset.
- Ablation Study: 6.3% average improvement results from adding Align to SFT+S-GRPO, while skipping SFT produces significantly worse performance under sparse and unstable rewards.
- Ablation Study: 5.10% average improvement results when S-GRPO replaces GRPO after Align and SFT, supporting spatial-aware reinforcement learning.
- Ablation Study: STReasoner consistently outperforms Qwen3 baselines across 4B, 8B, and 14B scales, with STReasoner-8B surpassing Qwen3-14B on multiple tasks.
- Spatial Reward Analysis: The spatial-input accuracy gap grows from 0.5 at step 1 to 6.2 at step 51, while accuracy and spatial rewards increase during RL training.
6 Conclusion
STReasoner addresses the need for spatio-temporal reasoning by combining synthetic aligned data, multi-task evaluation, and staged training with spatially targeted reinforcement learning. Experiments show clear gains in linking spatio-temporal data with natural-language understanding.
- The paper defines spatio-temporal reasoning as a capability needed for real-world decision-making.
- An SDE-based synthesis method generates diverse spatio-temporal data with aligned textual descriptions.
- ST-Bench evaluates multiple spatio-temporal reasoning tasks.
- STReasoner is trained in three stages on synthetic data and uses S-GRPO to improve spatial reasoning.
- Experiments show clear gains, indicating improved links between spatio-temporal data and natural-language understanding.
7 Limitations
The authors identify two main limitations: the need for broader real-world data and the possible insufficiency of simple encoders for complex scenarios.
- Broader and more diverse real-world datasets remain necessary to fully assess and improve STReasoner.
- More expressive architectures and multimodal integration may be required for complex real-world scenarios.
- The simple MLP-based time series encoder is sufficient only for the structured signals considered in this work.
8 Potential Risks
The supplied discussion highlights environmental costs and the limited scope of existing language-based spatio-temporal reasoning methods. It also distinguishes these methods from numerical forecasting systems that lack natural-language reasoning outputs.
- Training and deploying large-scale models can consume substantial computation and energy, contributing to carbon emissions.
- Language-model reasoning for spatio-temporal time series remains underexplored despite advances in general reasoning.
- Existing spatio-temporal forecasting models use numerical inputs and outputs and do not support interpretable, long-form multi-step reasoning.
- Recent LM-integrated methods generally target numeric forecasting or short-form question answering rather than sustained graph-grounded reasoning.
- The paper’s synthesis pipeline uses controllable temporal dynamics, time-varying spatial dependencies, and propagation lags to model spatio-temporal data.
B.2 Spatio-Temporal Data and Textual Description Pair Validation
The validation process manually assesses alignment and coherence between synthesized spatio-temporal data and textual descriptions, retaining 1,064 high-quality pairs for dataset construction. These pairs support separate alignment and reasoning QA datasets with defined training and evaluation splits.
- Pair validation: Human evaluators jointly inspect each spatio-temporal sample and its textual description for alignment correctness and overall coherence.
- Pair validation: 1,064 pairs are labeled “High Quality,” while 136 are labeled “Low Quality,” and only the high-quality pairs are retained.
- Dataset characteristics: The retained samples span varied sequence lengths, sampling frequencies, temporal coverage, domains, and graph sizes.
- QA dataset construction: ST-Align supports alignment training, while ST-Bench supports spatio-temporal reasoning training and evaluation.
- QA dataset construction: ST-Bench is divided into ST-CoT, ST-RL, and ST-Test subsets using a 6:2:2 ratio.
- QA dataset construction: Spatio-temporal character questions query node types, edge delays, and time-varying edge modulation properties.
C Task-Grounded Reward Design
The reward design combines strict output formatting with task-specific correctness signals. Task rewards handle discrete labels and numeric sequences, including length alignment and bounded relative-error scoring.
- The format reward is 1 only when responses follow the <think>...</think><answer>...</answer> schema.The reward is defined as an indicator of valid output format.
- Task rewards assign discrete-label credit when the predicted choice matches the ground truth.The task reward is 1 for an exact match and 0 otherwise.
- For numeric sequences, predictions are extracted from the answer, padded or truncated to length T, and scored using relative error.If no valid numbers are produced, the task reward is 0.
- A 0.1 bonus rewards exact sequence length, while the final numeric score is clipped to [0, 1].The relative-error score uses ϵ = 10^-9.
- The per-sample reward combines format and task rewards through a weighted sum.The weighting is expressed using λ.
D Implementation Details
STReasoner uses Qwen3-8B and trains across alignment, supervised fine-tuning, and reinforcement-learning-related settings on eight A100 GPUs. Reported results cover all four benchmark tasks.
- The base model is Qwen3-8B, and experiments use 8 NVIDIA A100 80GB GPUs.
- Stage 1 alignment runs for 1,000 steps on ST-Align, while Stage 2 supervised fine-tuning runs for 400 steps on ST-CoT.Both stages use LlamaFactory.
- The rollout batch size is 128 and the learning rate is 1 × 10^-7.The rollout configuration uses a warm-up ratio of 0.2.
- 95.39±0.74 accuracy is reported for T1:Etiological, 75.78±0.49 for T2:Entity, and 87.20 ± 0.47 for T3:Correlation.For T4:Forecasting, the reported mean absolute error is 65.61 ± 0.06.
F Scaling Up RL Training
Extending reinforcement-learning training from one to two epochs improves early accuracy reward, but later gains saturate and become less stable under the same reward setting.
- Extending RL training from 1 to 2 epochs yields further early-stage improvements in accuracy reward.
- The gains gradually saturate and become less stable, suggesting diminishing returns from prolonged RL training.
G Synthesized Data Pair Showcase
Table 8 showcases synthesized spatio-temporal data paired with text descriptions.
- Table 8 presents examples of synthesized spatio-temporal data and corresponding text-description pairs.
H Reasoning Case Study
The case study illustrates how spatio-temporal reasoning combines graph structure with temporal patterns to explain system behavior. The examples cover etiological reasoning, entity identification, correlation reasoning, and in-context forecasting.
- The case study presents four ST-Bench reasoning tasks: etiological reasoning, entity identification, correlation reasoning, and in-context forecasting.
- Graph and temporal analysis together identify upstream sources, convergence points, downstream propagation, and delayed responses across nodes.The example describes Node 0 and Node 1 feeding Node 2, followed by propagation through Nodes 3 and 4.
- The etiological and entity-identification templates generate multiple-choice questions linking node identities with names, descriptions, roles, or locations.The templates require one correct node description and three plausible but incorrect distractors.
- Direct and multi-hop correlation templates ask models to identify causal influence, propagation paths, source and target nodes, and their time windows.The multi-hop template requires a logical sequence of overlapping or consecutive events and a synthesized system-level description.
- The forecasting template uses an observation window, prediction window, key events, and statistical hints to produce a structured forecast with a confidence level.Its output includes the target node, context description, summary, and prediction length.