Accurate time series forecasting (TSF) is essential for Web applications, such as traffic monitoring and online resource management. Recent advances in leveraging pre-trained large language models (LLMs) have shown promising performance in TSF. However, existing LLM-based TSF methods largely optimize the overall forecasting objective while overlooking temporal pattern imbalance (TPI), where different temporal patterns occur at highly unequal frequencies. Our empirical analysis reveals that TPI is prevalent across widely used TSF benchmarks, with substantially higher forecasting errors on less frequent patterns. To address this issue, we propose IMRouter (Imbalance-aware Temporal Pattern Routing), a novel framework that mitigates TPI-induced biases in both temporal representation learning and cross-modal alignment. Specifically, IMRouter introduces Pattern-Adaptive Temporal Representation Learning (PATR), which leverages gradient conflict and local gradient density to guide expert specialization. By penalizing incompatible expert assignments with density-aware weighting, PATR reduces the dominance of frequent optimization signals in router training. Furthermore, Routing-Guided Semantic Alignment (RGSA) transfers the pattern-specific knowledge learned by the router to cross-modal alignment through mutual information maximization, preserving distinctive temporal information across different patterns. Extensive experiments on benchmark datasets demonstrate the effectiveness of IMRouter, particularly in improving forecasting performance on less frequent temporal patterns.
Figures & tables
Figure 1. Illustration of temporal pattern diversity in a time series. Frequently recurring peak-shaped patterns coexist with less frequent, smoother local patterns (highlighted by red dashed boxes), demonstrating the heterogeneity of temporal dynamics. Enjoying the baseball game from the third-base seats. Ichiro Suzuki preparing to bat.
Figure 2. (a) Frequency distribution of temporal pattern clusters identified from a representative channel in the Traffic dataset, ranked by cluster size in descending order. (b) Cluster-wise forecasting errors (MSE) of three existing methods on the same clusters, showing generally higher errors for less frequent patterns. (c) Dataset-level TPI statistics across Electricity, Weather, and Traffic. Gini measures the inequality of cluster sizes, while Top-20 % Coverage denotes the proportion of samples covered by the largest 20 % of clusters. Enjoying the baseball game from the third-base seats. Ichiro Suzuki preparing to bat.
Figure 3. Illustration of IMRouter Enjoying the baseball game from the third-base seats. Ichiro Suzuki preparing to bat.
Models
IMRouter
TimeSup
FSCA
CALF
Time-LLM
GPT4TS
PatchTST
iTransformer
TimesNet
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
ETTm1
0.389
0.389
0.402
0.407
0.473
0.437
0.393
0.391
0.410
0.409
0.389
0.397
0.388
0.402
0.407
0.411
0.410
0.418
ETTm2
0.279
0.321
0.284
0.329
0.282
0.326
0.282
0.322
0.285
0.331
0.258
0.331
0.290
0.333
0.291
0.334
0.295
0.332
ETTh1
0.442
0.437
0.464
0.450
0.429
0.436
0.411
0.439
0.460
0.449
0.447
0.436
0.448
0.447
0.464
0.455
0.460
0.455
ETTh2
0.372
0.397
0.402
0.419
0.372
0.401
0.376
0.404
0.389
0.408
0.381
0.408
0.384
0.413
0.383
0.407
0.407
0.421
Weather
0.250
0.269
0.259
0.279
0.260
0.280
0.246
0.271
0.274
0.290
0.264
0.284
0.258
0.280
0.260
0.281
0.259
0.285
Table 1. Long-term forecasting results averaged over four prediction horizons on seven benchmarks. The best and second-best results are shown in bold and underlined, respectively.
Models
IMRouter
FSCA
Time-LLM
GPT4TS
PatchTST
iTransformer
TimesNet
Average
SMAPE
11.77
11.828
12.494
12.365
12.059
12.142
12.880
MASE
1.568
1.580
1.731
1.767
1.623
1.632
1.836
OWA
0.844
0.850
0.913
0.918
0.869
0.874
0.955
Table 2. Average short-term forecasting performance on the M4 dataset. The results are averaged across the Yearly, Quarterly, Monthly, and Other subsets. The best results are shown in bold, and the second-best results are underlined.
Dataset
IMRouter
FSCA
CALF
Time-LLM
GPT4TS
PatchTST
iTransformer
TimesNet
DLinear
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
ETTm1
0.498
0.457
0.602
0.503
0.504
0.462
0.565
0.491
0.607
0.498
0.619
0.496
0.580
0.497
0.674
0.535
0.568
0.500
ETTm2
0.292
0.330
0.302
0.339
0.302
0.330
0.303
0.341
0.303
0.337
0.302
0.342
0.306
0.344
0.322
0.355
0.329
0.383
ETTh1
0.643
0.541
0.695
0.553
0.644
0.541
0.616
0.530
0.688
0.554
0.623
0.532
0.748
0.587
0.864
0.625
0.647
0.552
ETTh2
0.419
0.425
0.403
0.416
0.419
0.427
0.497
0.465
0.574
0.495
0.490
0.459
0.443
0.443
0.487
0.468
0.446
0.461
Table 3. Few-shot forecasting performance on four ETT datasets. Results are averaged over the available prediction horizons. Lower MSE and MAE indicate better performance. The best results are highlighted in bold, and the second-best results are underlined.
Variants
ECL
Traffic
MSE
MAE
MSE
MAE
CALF
0.193
0.278
0.459
0.303
MLP
0.201
0.288
0.459
0.306
Vanilla MoE
0.186
0.279
0.443
0.292
PATR
0.179
0.268
0.433
0.291
Vanilla MoE + RGSA
0.180
0.272
0.430
0.291
Table 4. Ablation results of IMRouter on ECL and Traffic. Lower MSE and MAE indicate better performance.
Figure 4. Pattern-wise forecasting performance of IMRouter and three baseline methods on the Traffic dataset. Enjoying the baseball game from the third-base seats. Ichiro Suzuki preparing to bat.
Figure 5. Hyperparameter sensitivity results on the number of top-k experts and the dimension of experts. Enjoying the baseball game from the third-base seats. Ichiro Suzuki preparing to bat.
Time series forecasting predicts future values from ordered observations using statistical, neural, and probabilistic models to support decisions under uncertainty.
Large Language Models (LLMs) have shown strong potential in multivariate time series forecasting and anomaly detection. Existing studies predominantly inject temporal information into LLMs via direct numerical tokenization or heuristic textual descriptions. However, LLMs still face difficulty in perceiving the underlying structural patterns of numerical time series, particularly the seasonal and trend components obscured by discrete numerical tokens. To bridge this gap, we propose FreSia, a frequency-aware framework that establishes an effective alignment between the semantic space of LLMs and the frequency space of time series. Specifically, FGPrompt, a Frequency-Guided Prompt mechanism within FreSia, distills the frequency-domain structures of time series and projects them into prompts tailored to the semantic space of LLMs. Furthermore, we introduce a Global-driven Context Learning (GCL) component, which uses a global CLS-driven probe to generate global context to bridge the time-frequency domain gap and fuse the multi-modal information. Experiments on eight forecasting benchmarks show that FreSia achieves average improvements of 13.48% and 8.06% in MSE and MAE, respectively.
Yubo Wang, Hui He, Hezhe Qiao +2
School of Computer Science and Technology, Beijing Institute of Technology, No.5 Zhongguancun South Street, Beijing, 100081, China · School of Computing and Information Systems, Singapore Management University, 80 Stamford Road, 178902, Singapore
Adapting pretrained Large Language Models (LLMs) for time series forecasting primarily relies on token-level linguistic-temporal alignment, leading to the stacking of logically disjointed tokens as input. While empirically effective, these methods overlook a fundamental capability of LLMs: modeling linguistic logic and structure, rather than merely processing token features. To address this limitation, we propose the Markovian-Guided Structure-Aware Alignment (MGSAA). Our core contribution is a framework that transcends pointwise feature matching to achieve global structural isomorphism between the linguistic and temporal domains. Specifically, MGSAA distills latent evolutionary patterns of language within LLMs into a Markovian state transition graph, which is transferred as a structural prior to the time series domain. Under this prior, time series patches are decoded into latent states and then aligned via state-constrained cross-attention. Ultimately, MGSAA generates a token sequence topologically isomorphic to the LLM's inherent mental structure, reactivating its reasoning capabilities for forecasting. Comprehensive evaluations across multiple benchmarks demonstrate that MGSAA achieves state-of-the-art performance, providing an innovative solution for cross-modal alignment in LLM for time series forecasting. Code is available at https://github.com/sunzju/MGSAA.
Recent advances in Large Language Models (LLMs) have spurred cross-modal solutions for time-series forecasting. However, existing methods rely heavily on textual prompts for modality alignment-introducing nontrivial computational overhead and failing to leverage the rich spectral dynamics inherent in time-series data. To enable prompt-free, frequency-aware adaptation of frozen LLMs, we propose FM-LLM (Frequency-Enhanced Mixture-of-Experts for adapting LLMs to Time Series Forecasting), an autoregressive framework grounded in constrained asymmetric coupling. A Fourier Analysis Network (FAN)-based spectral token aligner injects structured harmonic representations directly into the frozen LLM with numerical compatibility. An asymmetric Mixture-of-Experts (MoE) decoder enforces role separation: shared experts with lightweight FAN layers reconstruct the global periodic backbone, while routed experts-restricted to standard FFNs-specialize in modeling non-periodic residual dynamics. A time-frequency hybrid loss function jointly optimizes temporal accuracy and spectral consistency, mitigating error accumulation during long-horizon autoregressive rollouts. Evaluated across eleven public benchmarks, FM-LLM achieves state-of-the-art performance on 59 out of 78 evaluation metrics. Compared to the strongest autoregressive LLM-based baseline, it delivers average improvements of 5.3% in MSE and 5.6% in MAE, with maximum gains reaching 8.0% for MSE and 8.4% for MAE. FM-LLM also demonstrates robust transferability, maintaining superior performance in 10% few-shot and zero-shot forecasting scenarios.
Rentao Gu, Yihang Ding, Junjie Li +5
Beijing University of Posts and Telecommunications, Beijing, 100876, China · China Telecom Research Institute, Beijing, 100032, China