Most long-term time-series forecasting models map the look-back window directly to the full horizon in a single pass. While efficient, this design does not explicitly identify which historical states are most relevant to different future segments or exploit what followed those states. Analog forecasting addresses this by retrieving past states similar to the present and using their observed continuations, but single nearest matches can be unreliable and overlapping patches may produce redundant candidates. We propose DuoTS, a Dual-Context Time Series forecasting model that uses retrieved evidence without relying on it exclusively. DuoTS first produces a base forecast with a parallel patch encoder and linear prediction head, then progressively refines it one future patch at a time. Each refinement combines two views: a current context that attends to recent tokens and captures the latest dynamics, and a detail context that provides distinct retrieved analogs together with their subsequent trajectories. Patch-wise refinement allows the model to balance these views across the forecast horizon and associate each future segment with evidence appropriate to its temporal distance from the present. Experiments on multiple real-world datasets show that DuoTS achieves state-of-the-art performance, while ablations confirm the contribution of each context. The refinement mechanism is also model-agnostic, requiring only an encoded look-back window and the future-patch position, and can therefore be integrated into existing forecasting models.
Figures & tables
Figure 1: Forecast, retrieve, revise. (a) One-shot forecasting predicts the full horizon directly. (b) DuoTS revises each future patch using current and retrieved-detail evidence with learned view weights.
Figure 2: Overview of the DuoTS architecture.
Figure 3: Overview of the dual-context correction. Each future-patch query combines recent tokens with retrieved analogs and their observed successors to produce an additive correction.
DuoTS (Ours)
SRSNet
TimeKAN
Amplifier
iTransformer
TimeMixer
PatchTST
Dataset
Horizon
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
ETTh1
96
0.363 ±0.0008
0.388 ±0.0003
0.366
0.394
0.370
0.396
0.373
0.399
0.386
0.405
0.372
0.401
0.377
0.397
192
0.400 ±0.0050
0.413 ±0.0033
0.400
0.415
0.403
0.417
0.414
0.420
0.430
0.435
0.413
0.430
0.409
0.425
336
0.401 ±0.0002
0.430 ±0.0004
0.424
0.430
0.420
0.432
0.442
0.446
0.450
0.452
0.438
0.450
0.431
0.444
720
0.441 ±0.0023
0.457 ±0.0016
0.426
0.455
0.442
0.465
0.455
0.467
0.495
0.487
0.483
0.483
0.457
0.477
Avg
0.401
0.422
0.404
0.423
0.408
0.427
0.421
0.433
0.440
0.444
0.426
0.441
0.418
0.435
Table 1: Long-term forecasting results for DuoTS at the horizons H∈{96,192,336,720} with the horizon average of each dataset in the rows marked Avg . The best MSE and MAE per row are in bold and the second best are underlined .
Case
ETTh2
ETTm2
Weather
Electricity
MSE
MAE
MSE
MAE
MSE
MAE
MSE
MAE
DuoTS
0.318
0.375
0.257
0.316
0.219
0.259
0.160
0.254
w/o second-order dynamics
0.319
0.374
0.259
0.318
0.227
0.265
0.160
0.253
w/o channel mixing
0.319
0.375
0.256
0.314
0.227
0.265
0.166
0.260
w/o intra-patch mixer
0.322
0.376
0.263
0.319
0.224
0.262
0.164
0.258
w/o patch-axis MLP
0.330
0.383
0.263
0.318
0.224
0.263
0.158
0.252
Table 2: Component ablation results averaged over the four forecasting horizons for each dataset. Each variant was tuned separately for this ablation study. The best MSE and MAE in each column are in bold and the second best are underlined . The DuoTS row exactly reproduces the corresponding Avg rows of Table 1 .
Component
ETTm2
Solar
Weather
w/o Current context
+5.25
+8.64
+13.82
w/o Detail context
+5.89
+4.20
+11.77
w/o Both
+5.37
+9.46
+18.85
Table 3: Context-component ablation on representative datasets. Entries are Δ MSE ( ×10−3 ), averaged over four horizons. Positive values mean that removing the indicated component hurts.
Figure 4: Full patch-wise view-weight profiles. Mean weight ωf,2 assigned to the retrieved-detail view at future patch f for Weather and Solar. The current view receives 1−ωf,2 . Curves correspond to forecast horizons.
Original → +Dual-Context Correction from DuoTS
Dataset
H
SRSNet
TimeKAN
PatchTST
Full DuoTS
ETTh2
96
0.271 → 0.270
0.280 → 0.267
0.274 → 0.275
0.263
720
0.391 → 0.382
0.420 → 0.409
0.406 → 0.393
0.383
Weather
96
0.147 → 0.145
0.151 → 0.141
0.150 → 0.143
0.142
720
0.325 → 0.314
0.317 → 0.315
0.312 → 0.315
0.312
Electricity
96
0.131 → 0.130
0.135 → 0.135
0.143 → 0.129
0.127
Table 4: Correction transfer. Within each arrow, the lower endpoint is bold. The DuoTS column is from Table 1 and is bold when it is lower than all three correction-equipped backbones. The second-lowest value among the three correction-equipped endpoints and Full DuoTS is underlined.
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
Benchmark
Recorded quantity
C
T
Interval
Train / val / test
ETTh1 ( Zhou et al., 2021 )
Transformer load and oil temperature
7
17,420
1 h
8,640 / 2,880 / 2,880
ETTh2 ( Zhou et al., 2021 )
Transformer load and oil temperature
7
17,420
1 h
8,640 / 2,880 / 2,880
ETTm1 ( Zhou et al., 2021 )
Transformer load and oil temperature
7
69,680
15 min
34,560 / 11,520 / 11,520
ETTm2 ( Zhou et al., 2021 )
Transformer load and oil temperature
7
69,680
15 min
34,560 / 11,520 / 11,520
Weather ( Max Planck Institute for Biogeochemistry, 2024 )
Meteorological indicators
21
52,696
10 min
36,887 / 5,270 / 10,539
Electricity ( Trindade, 2015 )
Client-level power demand
321
26,304
1 h
18,412 / 2,632 / 5,260
Appendix
Table 5: Statistics of the eight long-term forecasting benchmarks. C is the number of channels and T is the number of observations. Dataset partitions follow chronological order.
Coordinate
Symbol
Range, cap, or fixed value
Sampled
Learning rate
η
log-uniform, [2×10−5,3×10−3]
Path width
d
{32,64,128,256,384,512}
Mixer hidden width
dff
{16,32,64,128,256,512,1024}
Structured-path layers
Λ
{1,2,3}
Dropout
uniform, [0,0.40]
Appendix
Table 6: Unified hyperparameter search space for DuoTS. Derived values are computed from the sampled coordinates, and retrieval ranges are capped by the available patch grid.
Benchmark
H
L
P
S
d
dff
Λ
Dropout
η
B
ETTh1
96
336
16
8
512
256
2
0.274
2.585×10−4
32
ETTh1
192
512
32
10
384
64
2
0.200
1.601×10−4
32
ETTh1
336
512
112
56
384
256
2
0.050
9.300×10−5
32
ETTh1
720
336
16
8
128
128
2
0.256
2.443×10−4
32
ETTh2
96
512
48
14
256
256
1
0.200
2.324×10−3
256
ETTh2
192
512
24
7
32
32
1
0.300
2.299×10−4
256
Appendix
Table 7: Backbone settings of the reported DuoTS models. The look-back length L is chosen per cell from {96,336,512} , P and S are the patch length and stride, d is the shared path width, dff the hidden width of the mixer MLPs, and Λ the number of structured-path layers. Dropout is shared by the backbone MLPs, the channel mixer, and the correction attention. η is the Adam learning rate and B the batch size.
Benchmark
H
Bblk
Kcur
Ksuc
Kblk
Kdet
ρ
κch
dg
β
Gate init
Corr. init
Patch init
ETTh1
96
3
4
4
1
1
0
0
4
1.27
3.03×10−3
0.000
0.100
ETTh1
192
4
4
3
2
1
0
0
8
2.23
8.08×10−4
0.000
0.200
ETTh1
336
4
2
1
1
2
1
1
8
2.64
2.35×10−3
0.000
0.200
ETTh1
720
6
3
3
2
1
0
0
4
3.01
4.90×10−3
0.000
0.100
ETTh2
96
4
6
3
1
1
0
2
4
1.71
8.45×10−4
0.010
0.050
ETTh2
192
4
2
3
2
1
0
4
4
2.29
6.25×10−4
0.000
0.100
Appendix
Table 8: Correction and channel settings of the reported DuoTS models. Bblk is the journey block width, Kcur the number of newest tokens read by the current context, Ksuc the successor span of a retrieved analog, Kblk and Kdet the block and patch retrieval budgets, and ρ the exclusion radius, which is inactive whenever Kdet=1 . The channel columns give the neighbourhood size κch , the graph width dg , the initial self logit β , and the initial channel gate. The final two columns give the initial correction gate and the initial patch-axis gate.
DuoTS
RAFT
SARAF
Dataset
H
MSE
MAE
MSE
MAE
MSE
MAE
ETTh1
96
0.363
0.388
0.367
0.397
0.371
0.399
192
0.400
0.413
0.411
0.427
0.404
0.420
336
0.401
0.430
0.436
0.442
0.435
0.447
720
0.441
0.457
0.467
0.478
0.451
0.473
Avg
0.401
0.422
0.420
0.436
0.415
0.435
Appendix
Table 9: Reported full-horizon comparison with retrieval-augmented forecasters (lower is better). DuoTS uses the per-cell look-back selected from {96,336,512} . RAFT and SARAF use L=720 . RAFT values are from Tables 16–17 of Han et al. (2025) , and SARAF values are from Table 4 of Zhou et al. (2026) . These are cross-paper reported values rather than a controlled rerun. Within the three displayed methods, the best value is bold and the second-best is underlined.
Dataset
H
Default
Random eligible
Bottom- K
Nearest only
Successor shuffle
ETTh1
96
0.3634
0.3666
0.3690
0.3634
0.3632
192
0.4009
0.4027
0.4080
0.4009
0.3989
336
0.4017
0.4017
0.4015
0.4017
0.4015
720
0.4412
0.4416
0.4416
0.4412
0.4413
ETTh2
96
0.2632
0.2632
0.2632
0.2632
0.2634
192
0.3125
0.3125
0.3125
0.3125
0.3125
Appendix
Table 10: Detail-retrieval perturbations that change candidate selection or successor pairing. Bold marks the lowest MSE in each row.
Dataset
Δ MSE
Steps hurt (%)
Channels hurt (%)
Solar
-9.45
24.5
0.2
Traffic
-1.25
12.9
12.4
Weather
-17.50
0.0
16.7
Appendix
Table 11: Correction decomposition averaged over four horizons. Δ MSE is corrected minus base ( ×10−3 ). The last columns report where the correction has larger squared error.
Dataset
Model
Params
FLOPs
FLOPs/ C
Epoch
Latency
Memory
(M)
(G)
(G/ch.)
(s)
(ms/sample)
(MB)
ETTh2 ( C=7 , batch size 32)
DLinear
0.10
0.001
0.0001
0.59
0.003
21
TimeKAN
0.05
0.035
0.0050
8.54
0.410
554
iTransformer
0.95
0.021
0.0030
1.53
0.021
47
PatchTST
7.40
1.971
0.2816
10.96
0.348
573
Appendix
Table 12: Computational cost with L=512 and H=96 on one RTX 4060 Laptop GPU. ETT uses batch size 32, Electricity uses batch size 4, and Weather uses batch size 16. Smaller values are better.
Long-term forecasting models commonly process all patches in a look-back window using the same fixed stack. Older contextual patches and recent evidence therefore receive the same computational depth. Yet the information closest to the forecast and the more distant context do not contribute equally. Uniform processing leaves this distinction unexpressed in the architecture. We propose MARO, a Most-Recent Anchoring with Recurrent Ordering model that processes the look-back window from the most recent patch to the oldest. The most recent patch serves as the anchor. It initializes the latent state and conditions each subsequent step, so older patches are folded into a representation that remains centered on recent evidence. A single shared module is reused at every step, so extending the scan further into the past introduces no additional parameters. Intermediate states retained during the scan allow the forecast head to weigh short and long portions of the history separately. This expresses recency through the order of recurrent refinement. Extensive experiments across multiple real-world time series datasets show that MARO achieves state-of-the-art performance on both long-term and short-term forecasting tasks.Ablation studies examine the contribution of the main architectural components.
Jung Min Choi, Ngoc Son Le, Ibram Abdelmalak +2
VWFS Data Analytics Research Center (VWFS-DARC), Hildesheim, Germany
Time Series Foundation Models (TSFMs) have borrowed the long context paradigm from natural language processing under the premise that feeding more history into the model improves forecast quality. But in stochastic domains, distant history is often just high-frequency noise, not signal. Hence, the proposed work tests whether this premise actually holds by running continuous context architectures (PatchTST included) through the ETTh1 benchmark. The obtained results contradict the premise: an inverse scaling law shows up clearly, with forecasting error rising as context gets longer. A 3,000-step window causes performance to drop by over 68%, evidence that attention mechanisms are poor at ignoring irrelevant historical volatility. Retrieval-Augmented Forecasting (RAFT) is evaluated as an alternative. RAFT achieves a mean squared error (MSE) of 0.379 with a fixed 720-step window and selective retrieval, outperforming both long-context configurations and zero-shot foundation models (Chronos, Moirai) despite requiring far less computation. In addition, the retrieval step injects only the most relevant historical segments as dynamic exogenous variables, which gives the model a context-informed inductive bias it cannot build on its own from raw sequences. Therefore, foundation models going forward need to shift architecturally toward selective retrieval.
Rishi Ahuja, Kumar Prateek, Simranjit Singh +1
Department of Information Technology, Dr. B.R. Ambedkar National Institute of Technology Jalandhar, Punjab, 144008, India.
Time series forecasting has witnessed significant progress with deep learning. While prevailing approaches enhance forecasting performance by modifying architectures or introducing novel enhancement strategies, they often fail to dynamically disentangle and leverage the complex, intertwined temporal patterns inherent in time series, thus resulting in the learning of static, averaged representations that lack context-aware capabilities. To address this, we propose the Dual-Prototype Adaptive Disentanglement framework (DPAD), a model-agnostic auxiliary method that equips forecasting models with the ability of pattern disentanglement and context-aware adaptation. Specifically, we construct a Dynamic Dual-Prototype bank (DDP), comprising a common pattern bank with strong temporal priors to capture prevailing trend or seasonal patterns, and a rare pattern bank dynamically memorizing critical yet infrequent events, and then an Dual-Path Context-aware routing (DPC) mechanism is proposed to enhance outputs with selectively retrieved context-specific pattern representations from the DDP. Additionally, we introduce a Disentanglement-Guided Loss (DGLoss) to ensure that each prototype bank specializes in its designated role while maintaining comprehensive coverage. Comprehensive experiments demonstrate that DPAD consistently improves forecasting performance and reliability of state-of-the-art models across diverse real-world benchmarks.
Haonan Yang, Jianchao Tang, Zhuo Li
National University of Defense Technology, Changsha, Hunan, China