Organizations: East China Normal University · Peking University · The Chinese University of Hong Kong · Shanghai Innovation Institute · Shanghai Artificial Intelligence Laboratory · University of the Chinese Academy of Sciences
Time-series foundation models (TSFMs) enable zero-shot forecasting through large-scale cross-domain pretraining, while retrieval augmentation further improves their performance by leveraging historical information. However, existing methods typically correct TSFM forecasts using the ground-truth futures of similar historical windows, which contain both predictive components already captured by the foundation model and sample-specific random fluctuation that is difficult to transfer. In contrast, recurring systematic model bias within prediction errors more directly characterizes the failure modes of a frozen TSFM and therefore provides more valuable correction signals. Effectively exploiting such model bias, however, poses two challenges: prediction errors at different numerical levels are difficult to compare due to scale differences, and the recurring bias must be extracted from prediction errors contaminated by random fluctuation. To address these challenges, we propose GRAM, a general retrieval-augmented framework for frozen TSFMs. GRAM first introduces an Amplitude Memory Module (AMM) that scales prediction errors by amplitude and aggregates them into retrievable prototypes. It then employs a Prototype Graph Module (PGM) to model relations among prototypes to aggregate consistent bias information while suppressing random fluctuation. During online forecasting, GRAM retrieves and expands prototypes relevant to the current query and generates per-horizon corrections to refine the original TSFM forecast. Experiments across multiple datasets and foundation models demonstrate consistent forecasting improvements.
Figures & tables
Figure 1: Overview of Gram . Phase 1 (Offline Memory Construction): clustering (A) groups window embeddings into prototypes, the amplitude memory (B) stores each prototype’s centroid, amplitude, spread, coherence and support, and the prototype graph (C) links them by bias and shape edges. Phase 2 (Online Forecasting): retrieval (D) grows the top- K prototypes into a subgraph and attaches the anchor node, and graph fusion (E), the only trainable module, outputs the error component added to the frozen forecast.
Models
Sundial
Chronos
TimesFM
Moirai
Ori
+ Gram (Ours)
Ori
+ Gram (Ours)
Ori
+ Gram (Ours)
Ori
+ Gram (Ours)
Metric
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
ETTh1
0.397
0.412
0.389
0.408
0.448
0.418
0.436
0.414
0.421
0.409
0.417
0.407
0.620
0.504
0.530
0.473
ETTh2
0.343
0.383
0.339
0.379
0.367
0.380
0.362
0.377
0.372
0.388
0.369
0.385
0.451
0.438
0.405
0.415
ETTm1
0.366
0.370
0.360
0.367
0.421
0.383
0.411
0.379
0.381
0.372
0.378
0.370
0.740
0.523
0.617
0.485
ETTm2
0.275
0.321
0.264
0.313
0.291
0.317
0.287
0.315
0.291
0.318
0.285
0.315
0.404
0.388
0.344
0.360
Table 1: Zero-shot forecasting comparison between frozen foundation models and the same models corrected by Gram across seven datasets. For each TSFM, Ori is the bare frozen model and + Gram the corrected forecast; MSE is compared with MSE and MAE with MAE, and red marks the better of the two. Results are averaged over horizons H∈{96,192,336,720} .
Models
Sundial
Chronos
TimesFM
Moirai
FT
+ Gram (Ours)
FT
+ Gram (Ours)
FT
+ Gram (Ours)
FT
+ Gram (Ours)
Metric
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
ETTh1
0.403
0.415
0.411
0.417
0.461
0.421
0.452
0.422
0.489
0.438
0.489
0.438
0.594
0.493
0.505
0.462
ETTh2
0.338
0.376
0.335
0.374
0.375
0.384
0.370
0.383
0.366
0.388
0.365
0.387
0.432
0.422
0.394
0.404
ETTm1
0.351
0.362
0.343
0.361
0.349
0.354
0.341
0.352
0.304
0.355
0.303
0.354
0.566
0.451
0.477
0.422
ETTm2
0.274
0.319
0.262
0.311
0.275
0.308
0.274
0.307
0.269
0.305
0.268
0.305
0.318
0.342
0.293
0.329
Table 2: Forecasting with LoRA fine-tuned TSFMs. For each TSFM, FT is the LoRA fine-tuned model and + Gram the same fine-tuned model corrected by Gram ; MSE and MAE are averaged over H∈{96,192,336,720} , and red marks the better of the two within each TSFM–metric pair. Lower is better.
Variants
ETTh1
ETTh2
ETTm1
ETTm2
Weather
Exchange
ECL
mse
mae
mse
mae
mse
mae
mse
mae
mse
mae
mse
mae
mse
mae
w/o shape relation
0.412
0.421
0.318
0.362
0.378
0.371
0.196
0.268
0.192
0.223
0.101
0.227
0.149
0.243
w/o bias relation
0.427
0.411
0.331
0.353
0.362
0.389
0.205
0.276
0.185
0.212
0.098
0.234
0.142
0.252
w/o anchor
0.403
0.432
0.324
0.341
0.387
0.365
0.191
0.258
0.201
0.225
0.104
0.218
0.153
0.237
amplitude → mean residuals
0.438
0.431
0.327
0.378
0.396
0.382
0.212
0.285
0.194
0.235
0.113
0.245
0.147
0.241
recent level → naive ratio
0.409
0.413
0.342
0.392
0.371
0.360
0.214
0.295
0.189
0.221
0.125
0.258
0.151
0.253
Table 3: Ablation at H=96 : absolute MSE / MAE, averaged over the four TSFMs and the seven datasets. The first three rows remove one module, the last two replace the stored quantity or the recent level; red marks the best average.
Figure 2: Diagnostics of the pattern-conditioned bias over all 112 settings. Panels (a)–(b) characterise the bias the memory stores, (c)–(e) the evidence retrieval returns and its link to the gain, and (f) the coverage across datasets and TSFMs.
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
Dataset
Domain
Frequency
Channels
Split (train/val/test)
ETTh1
Electricity transformer
Hourly
7
6:2:2
ETTh2
Electricity transformer
Hourly
7
6:2:2
ETTm1
Electricity transformer
15 minutes
7
6:2:2
ETTm2
Electricity transformer
15 minutes
7
6:2:2
Electricity
Household consumption
Hourly
321
7:1:2
Weather
Meteorology
10 minutes
21
7:1:2
Appendix
Table 4: Benchmark characteristics and splitting protocol. The proportions are train/validation/test, are the published ones and are chronological. The memory-construction and calibration portions are cut from the training portion, and the reported numbers are computed on the test portion.
Models
Sundial
Chronos
TimesFM
Moirai
Ori
+ Gram (Ours)
Ori
+ Gram (Ours)
Ori
+ Gram (Ours)
Ori
+ Gram (Ours)
Metric
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
ETTh1
96
0.356
0.383
0.352
0.381
0.385
0.380
0.376
0.378
0.384
0.382
0.380
0.381
0.426
0.411
0.416
0.408
192
0.390
0.406
0.384
0.403
0.442
0.412
0.427
0.409
0.428
0.408
0.421
0.406
0.467
0.433
0.454
0.429
336
0.403
0.416
0.400
0.415
0.481
0.433
0.467
0.430
0.446
0.419
0.441
0.418
0.478
0.446
0.463
0.443
720
0.438
0.444
0.420
0.433
0.483
0.449
0.475
0.439
0.428
0.427
0.428
0.423
1.112
0.725
0.787
0.612
Appendix
Table 5: Complete zero-shot results behind Table 1 , every dataset and horizon. For each TSFM, Ori is the bare frozen model and + Gram the corrected forecast; MSE is compared with MSE and MAE with MAE, and red marks the better of the two.
Figure 3: Four frozen models (one per row, named on the left: TimesFM, Moirai, Chronos, Sundial) on three datasets (one per column) at H=96 . Each panel is a single test window — the same window for the rows of a column — with the last 48 steps of the series before the dotted line and the 96 -step forecast after it; the two forecasts are drawn only inside the forecast window, and all values are standardised. The windows are chosen so that every model is clearly off before the correction (frozen RMSE between 18% and 55% of the panel’s own vertical range) and close after it (residual at most 42% of that range, +25% to +63% of the squared error); among the windows that qualify, the one drawn is the window whose worst-case residual is the smallest. The Moirai row is the jitteriest of the four, which is the model’s own behaviour on these series rather than the correction’s.
Models
Sundial
Chronos
TimesFM
Moirai
FT
+ Gram (Ours)
FT
+ Gram (Ours)
FT
+ Gram (Ours)
FT
+ Gram (Ours)
Metric
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
ETTh1
96
0.368
0.387
0.371
0.388
0.411
0.387
0.400
0.387
0.414
0.411
0.414
0.411
0.410
0.403
0.402
0.401
192
0.394
0.408
0.393
0.407
0.461
0.416
0.441
0.413
0.518
0.451
0.518
0.451
0.437
0.420
0.424
0.416
336
0.407
0.418
0.410
0.418
0.488
0.434
0.473
0.432
0.602
0.479
0.602
0.479
0.454
0.433
0.442
0.431
720
0.444
0.449
0.470
0.455
0.483
0.448
0.492
0.455
0.421
0.409
0.421
0.409
1.077
0.715
0.753
0.599
Appendix
Table 6: Complete results behind Table 2 , every dataset and horizon. For each TSFM, FT is the LoRA fine-tuned model and + Gram the same fine-tuned model corrected by Gram ; MSE is compared with MSE and MAE with MAE, and red marks the better of the two.
ETTh1
ETTh2
ETTm1
ETTm2
Weather
Exchange
ECL
TS-RAG
MSE
0.434
0.348
0.395
0.282
0.258
0.332
0.157
MAE
0.413
0.375
0.374
0.314
0.274
0.392
0.244
Gram (Ours)
MSE
0.394
0.341
0.360
0.264
0.236
0.439
0.147
MAE
0.411
0.380
0.369
0.313
0.269
0.440
0.242
Appendix
Table 7: Comparison with the retrieval-augmented method that reuses the ground-truth futures of similar historical windows, TS-RAG Ning et al. (2025) , the state of the art of that family. Every entry is the average over the four horizons of the dataset; the better of the two methods is red in each column.
H=96
H=192
H=336
H=720
read-out parameters (M)
0.26
0.32
0.40
0.63
prototype records (KB)
98
194
338
722
read-out cost ( μ s / window)
7.7
8.7
9.4
12.2
Appendix
Table 8: Efficiency of the correction, measured on an H200 with batches of 4096 windows. The read-out is the only trained part; the memory is what has to be stored next to the frozen backbone. Retrieval is a comparison against C=128 centroids and stays below 0.01μ s per window, so the read-out dominates the measured cost.
Time series forecasting predicts future values from ordered observations using statistical, neural, and probabilistic models to support decisions under uncertainty.