RG-TTA: Regime-Guided Meta-Control for Test-Time Adaptation in Streaming Time Series
Organizations: independent researchers
Abstract
Test-time adaptation (TTA) enables neural forecasters to adapt to distribution shifts in streaming time series, but existing methods apply the same adaptation intensity regardless of the nature of the shift. We propose Regime-Guided Test-Time Adaptation (RG-TTA), a meta-controller that continuously modulates adaptation intensity based on distributional similarity to previously-seen regimes. Using an ensemble of Kolmogorov-Smirnov, Wasserstein-1, feature-distance, and variance-ratio metrics, RG-TTA computes a similarity score for each incoming batch and uses it to (i) smoothly scale the learning rate -- more aggressive for novel distributions, conservative for familiar ones -- and (ii) control gradient effort via loss-driven early stopping rather than fixed budgets, allowing the system to allocate exactly the effort each batch requires. As a supplementary mechanism, RG-TTA gates checkpoint reuse from a regime memory, loading stored specialist models only when they demonstrably outperform the current model (loss improvement >= 30%). RG-TTA is model-agnostic and strategy-composable: it wraps any forecaster exposing train/predict/save/load interfaces and enhances any gradient-based TTA method. We demonstrate three compositions -- RG-TTA, RG-EWC, and RG-DynaTTA -- and evaluate 6 update policies (3 baselines + 3 regime-guided variants) across 4 compact architectures (GRU, iTransformer, PatchTST, DLinear), 14 datasets (6 real-world multivariate benchmarks + 8 synthetic regime scenarios), and 4 forecast horizons (96, 192, 336, 720) under a streaming evaluation protocol with 3 random seeds (672 experiments total). Regime-guided policies achieve the lowest MSE in 156 of 224 seed-averaged experiments (69.6%), with RG-EWC winning 30.4% and RG-TTA winning 29.0%. Overall, RG-TTA reduces MSE by 5.7% vs TTA while running 5.5% faster; RG-EWC reduces MSE by 14.1% vs standalone EWC.
Figures & tables
| Key | Architecture | Parameters | Family |
|---|---|---|---|
| gru_small | 2-layer GRU + MLP head | K | Recurrent |
| itransformer | iTransformer [ 18 ] | K | Attention |
| patchtst | PatchTST [ 19 ] | K | Attention |
| dlinear | DLinear [ 20 ] | K– M | Linear |
| # | Policy | Steps | LR | Regime mem. | Key mechanism |
|---|---|---|---|---|---|
| 1 | TTA | 20 (fixed) | No | Fixed-step gradient adaptation | |
| 2 | EWC | 15 (fixed) | No | Fisher-penalised adaptation | |
| 3 | DynaTTA | 20 (fixed) | Dynamic | No | Sigmoid LR from shift metrics |
| 4 | RG-TTA | 25 (early stop) | Sim-scaled | Yes | Continuous regime-guided TTA |
| 5 | RG-EWC | 25 (early stop) | Sim-scaled | Yes | + EWC regularisation ( =400) |
| 6 | RG-DynaTTA | 25 (early stop) | DynaTTA+RG | Yes | + DynaTTA sigmoid LR |
| Policy | Wins | Win Rate |
|---|---|---|
| TTA | 46 | 20.5% |
| EWC | 13 | 5.8% |
| DynaTTA | 9 | 4.0% |
| RG-TTA | 65 | 29.0% |
| RG-EWC | 68 | 30.4% |
| RG-DynaTTA | 23 | 10.3% |
| Baseline | RG-Variant | MSE (avg) | MSE (med.) | RG Wins | -value |
|---|---|---|---|---|---|
| TTA | RG-TTA | 150/224 (67.0%) | *** | ||
| EWC | RG-EWC | 169/224 (75.4%) | *** | ||
| DynaTTA | RG-DynaTTA | 139/224 (62.1%) | ** |
| Policy | GRU-S | iTransformer | PatchTST | DLinear |
|---|---|---|---|---|
| TTA | 15,458 | 21,075 | 717,298 | 17,855 |
| EWC | 16,794 | 24,141 | 813,314 | 18,258 |
| DynaTTA | 16,076 | 20,808 | 874,257 | 17,185 |
| RG-TTA | 14,092 | 19,202 | 718,642 | 18,782 |
| RG-EWC | 14,047 | 18,851 | 721,305 | 18,752 |
| RG-DynaTTA | 16,787 | 22,619 | 868,742 | 16,739 |
| Policy | ETTh1 | ETTh2 | ETTm1 | ETTm2 | Weather | Exchange |
|---|---|---|---|---|---|---|
| TTA | 56.15 | 92.54 | 20.88 | 40.53 | 138.99 | 0.01 |
| EWC | 63.80 | 102.21 | 23.40 | 42.89 | 147.67 | 0.01 |
| DynaTTA | 89.29 | 130.18 | 24.62 | 45.49 | 164.37 | 0.01 |
| RG-TTA | 53.74 | 78.99 | 18.05 | 37.69 | 145.21 | 0.01 |
| RG-EWC | 52.33 | 78.41 | 18.14 | 37.10 | 151.39 | 0.01 |
| RG-DynaTTA | 79.90 | 127.21 | 25.22 | 41.79 | 175.31 | 0.01 |
| Policy | ETT (4) | Weather+Exch. (2) | Synth-Recurring (3) | Synth-Shock (5) |
|---|---|---|---|---|
| TTA | 52.53 | 69.50 | 292,818 | 364,420 |
| EWC | 58.08 | 73.84 | 338,101 | 407,818 |
| DynaTTA | 72.40 | 82.19 | 366,484 | 429,847 |
| RG-TTA | 47.12 | 72.61 | 300,952 | 358,865 |
| RG-EWC | 46.50 | 75.70 | 303,245 | 359,054 |
| RG-DynaTTA | 68.53 | 87.66 | 357,825 | 432,636 |
| Policy | GRU-S | iTransf. | PatchTST | DLinear | Overall |
|---|---|---|---|---|---|
| TTA | 106.3 | 33.5 | 381.1 | 16.1 | 134.3 |
| EWC | 253.2 | 42.3 | 312.8 | 17.0 | 156.4 |
| DynaTTA | 121.9 | 34.7 | 411.8 | 17.2 | 146.4 |
| RG-TTA | 118.7 | 38.7 | 335.7 | 14.5 | 126.9 |
| RG-EWC | 286.7 | 55.0 | 360.2 | 19.1 | 180.3 |
| RG-DynaTTA | 129.0 | 36.9 | 421.2 | 17.0 | 151.0 |
| Sweep | Value | MSE | vs Default |
| LR scale (Eq. 7 ) | 0.0 (no modulation) | 16,068 | |
| 0.33 | 14,601 | ||
| 0.67 | 13,624 | — | |
| 1.0 | 12,881 | ||
| 1.5 | 11,966 | ||
| Early stopping | Fixed 20 steps | 15,515 |
| Similarity Method | Relative MSE vs Ensemble |
|---|---|
| Feature distance only (v0 design) | +8.3% |
| KS only | +2.1% |
| Wasserstein only | +1.8% |
| Variance ratio only | +5.7% |
| Ensemble (KS=0.3, W=0.3, F=0.2, V=0.2) | Baseline |
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
| Component | Parameter | Value |
| Data Pipeline | ||
| Sequence length | 96 | |
| Forecast horizons | 96, 192, 336, 720 | |
| Batch size (streaming) | 750 | |
| Initial training size | 720 | |
| Max batches | 10 | |
| Dataset | Source | Rows | Frequency | Season length |
|---|---|---|---|---|
| ETTh1, ETTh2 | [ 16 ] | 17,420 | Hourly | 24 |
| ETTm1, ETTm2 | [ 16 ] | 69,680 | 15-min | 96 |
| Weather | [ 17 ] | 52,696 | 10-min | 144 |
| Exchange | [ 35 ] | 7,588 | Daily | 5 |
| synth_* (8) | Generated | 10,000–25,200 | Synthetic | 50 |
| Policy | H=96 | H=192 | H=336 | H=720 |
|---|---|---|---|---|
| TTA | 176,830 | 187,295 | 193,082 | 214,479 |
| EWC | 203,296 | 211,448 | 218,073 | 239,690 |
| DynaTTA | 216,969 | 227,041 | 232,179 | 252,137 |
| RG-TTA | 170,795 | 184,887 | 191,360 | 223,676 |
| RG-EWC | 168,993 | 184,932 | 192,007 | 227,024 |
| RG-DynaTTA | 212,964 | 224,449 | 234,977 | 252,499 |
Test-Time Adaptation
Test-time adaptation updates or recalibrates pretrained models at inference to handle distribution shifts, often without target labels.
See all 322 papers