TL;DR
TSROUTER is a novel graph-based dynamic routing framework that optimizes both modality (text vs. vision) and model selection for time series reasoning tasks. By modeling tasks, queries, modalities, and models as a heterogeneous graph, it achieves a 16% to 46% relative performance improvement over traditional routing baselines. Crucially, it allows users to dynamically balance accuracy against inference costs while demonstrating robust, zero-shot generalization to completely unseen models and tasks.
What Problem Does This Paper Address?
Time series data is critical in high-stakes domains like education tracking, financial forecasting, and scientific discovery. Recently, both Large Language Models (LLMs) and Vision-Language Models (VLMs) have been applied to time series reasoning, but they possess fundamentally complementary strengths:
- LLMs treat time series as raw text sequences, preserving exact numerical precision but struggling with global patterns and suffering from context-length bottlenecks.
- VLMs process time series as visual plots, efficiently capturing global trends and structural shapes but losing fine-grained numerical details due to image resolution limits.
Furthermore, models vary wildly in their task-specific expertise and API costs. Existing routing methods focus exclusively on choosing the best model under a fixed modality. They fail to jointly optimize both the modality and the model, and they miss the rich contextual signals present in the interactions between specific queries, task requirements, and model capabilities.
Methods
The authors introduce TSROUTER, a framework that transforms the routing problem into a candidate scoring task on a heterogeneous graph.
- Heterogeneous Graph Construction: TSROUTER builds a graph containing four distinct node types: Tasks, Queries, Modalities, and Models. Edges connect these nodes to represent relationships (e.g., which models support which modalities, and which queries belong to which tasks). It also connects queries to their $k$-nearest neighbors based on semantic similarity.
- Text-Driven Initialization: To achieve zero-shot generalization, nodes are initialized using natural language profiles (detailing task requirements, model architectures, parameter scales, and token costs) generated by an LLM and encoded via a pretrained text embedding model. Query nodes combine the question text with a textual statistical summary of the time series (e.g., trend direction, mean, variance).
- Graph Representation Learning: A Heterogeneous Graph Transformer (HGT) propagates messages across the graph, allowing the system to learn how query characteristics interact with model and modality attributes.
- Cost-Aware Candidate Scoring: A two-layer MLP scores valid modality-model pairs. The optimization function uses a user-defined preference coefficient ($\alpha$) to dynamically balance accuracy maximization against token cost penalties.
Datasets
The framework was evaluated on several diverse benchmarks:
- TSRBench: A comprehensive testbed covering 4 fundamental time series tasks (Perception, Reasoning, Prediction, Decision-Making) across 15 distinct subtasks (e.g., anomaly detection, causal discovery, forecasting).
- TSQA (Time Series Imputation): Used as an unseen test set to evaluate generalization performance on predicting missing values.
- MTBench (Correlation Prediction): Used as a second unseen test set requiring models to correlate financial news sentiment with stock price trends.
Key Insights and Ideas
- Modality Preferences are Task-Dependent: Visual plots dominate Perception tasks because they cleanly map structural shapes, whereas textual sequences dominate Prediction tasks where exact numerical values are paramount for extrapolation.
- Bigger Isn't Always Better: The authors discovered that larger models do not strictly subsume smaller ones; nearly half of the queries answered correctly by smaller models were missed by the largest models, motivating the need for query-level routing rather than always defaulting to the most expensive model.
- Relational Context Over Isolation: Traditional routers evaluate queries in isolation. TSROUTER succeeds because its graph structure allows similar queries to share information and explicitly maps out how model capabilities align with modality constraints.
Key Results
- Superior Accuracy: TSROUTER achieved an overall accuracy of 51.33%, substantially outperforming all ten baseline methods.
- Plug-and-Play Generalization: When evaluated on newly released, unseen models (Qwen3.5-397B and Kimi-K2.5), TSROUTER achieved the highest performance gain (improving from 51.3% to 53.5%) without any additional fine-tuning.
- High Efficiency: TSROUTER boasts a per-query routing latency of just 3.21 ms, making it roughly 6x faster than RouterDC and 284x faster than CausalLM, while maintaining a remarkably low memory footprint of 576 MiB.
Limitations and Future Work
While TSROUTER demonstrates strong data efficiency and robustness, the authors note a few areas for improvement:
- Query Node Summaries: Currently, query nodes rely on basic textual statistical summaries (mean, standard deviation, trend) rather than raw time-series features. Integrating a lightweight, native time-series encoder could provide richer data characteristics to the router.
- API Dependency: The framework's evaluation relies heavily on commercial API availability and pricing structures, which can fluctuate and alter the cost-aware optimization dynamics over time.
Summary updated