TL;DR
Real-world time series are notoriously non-stationary, causing pre-trained forecasting models to degrade over time. While Test-Time Adaptation (TTA) fixes this on the fly during inference, updating entire models is computationally heavy and slow. PETSA solves this by freezing the core model and updating only tiny, lightweight input/output calibration modules via low-rank adapters and dynamic gating, reducing trainable parameters by up to 33.6× while improving accuracy.
What Problem Does This Paper Address?
Deep learning models excel at time series forecasting, but they usually assume that the future will look statistically similar to the past (stationarity). In reality, real-world data drifts due to seasonality shifts, structural breaks, or evolving trends.
To combat this, researchers use Test-Time Adaptation (TTA), which updates the model online as new data arrives during inference. However, existing TTA methods typically fine-tune the entire forecasting model. This creates a massive computational bottleneck, high memory overhead, and risks overfitting because data at test-time is sparse. The challenge is: how can we adapt a forecaster to shifting data distributions instantly during inference without breaking the compute budget?
Methods
The authors introduce PETSA (Parameter-Efficient Time-Series Adaptation). Instead of modifying the core weights of a pre-trained forecaster, PETSA keeps the main model completely frozen.
As shown in Figure 2, PETSA introduces two lightweight calibration modules:
- Dynamic Input Calibration: Adjusts the test-time input features before they enter the forecaster.
- Dynamic Output Calibration: Refines the raw predictions generated by the model.
These modules use a Dynamic Gating Mechanism combined with low-rank adapters ($W = A \cdot B$). The gating parameter ($\alpha$) is learnable and operates element-wise, allowing the model to dynamically scale how much adaptation is needed based on the incoming test input.
Because the adaptation capacity is constrained to these small modules, standard Mean Squared Error (MSE) loss isn't enough to guide the updates effectively. To fix this, PETSA introduces a specialized, unified loss function combining three distinct terms:
- Huber Loss: Provides robustness against sudden anomalies and outliers.
- Frequency-Domain Loss ($L_{freq}$): Aligns the Fast Fourier Transform (FFT) spectra of the predictions and ground truth to preserve periodic/seasonal patterns.
- Patch-wise Structural Loss ($L_{pw}$): Enhances local structural alignment by capturing local correlations, means, and variances.
PETSA updates these calibration modules online using a mix of immediate partial ground truth (PT) and delayed full ground truth (T) as time progresses.
Datasets
The framework was benchmarked across six widely recognized multivariate time series forecasting datasets:
- ETTh1, ETTm1, ETTh2, ETTm2 (Electricity Transformer Temperature datasets)
- Exchange (Daily foreign exchange rates)
- Weather (Local climate measurements)
The authors evaluated PETSA across multiple look-back and forecast horizons against state-of-the-art backbones including iTransformer, PatchTST, DLinear, OLS, FreTS, and MICN.
Key Insights and Ideas
- Calibration Over Retraining: You don't need to touch the internal representations of deep forecasting backbones to adapt to distribution shifts. Calibrating the input space and correcting the output space is sufficient.
- The Power of Multi-Domain Loss: When working with highly restricted parameter spaces (like low-rank adapters), standard time-domain losses (MSE) drop crucial structural information. Forcing the model to optimize in both the frequency domain and via structural patches prevents the adapters from drifting or underfitting.
- Input-Conditioned Gating: The inclusion of the $\tanh$ dynamic gating mechanism ensures that the calibration scales appropriately with the input magnitude, preventing aggressive over-correction on stable series while allowing rapid adaptation during volatile shifts.
Key Results
PETSA consistently outperformed both unadapted models and the leading full-model TTA baseline, TAFAS.
- Superior Accuracy: Across all datasets and model backbones, PETSA achieved the highest number of best-MSE scores, racking up 127 wins compared to TAFAS's 88 wins.
- Massive Parameter Efficiency: As the forecast window scales up, full-model adaptation parameters explode. PETSA keeps parameter growth flat. For an iTransformer backbone on the ETTh1 dataset with a forecast window of 720, PETSA achieved better accuracy while utilizing 33.6× fewer trainable parameters (0.42 MB vs 14.00 MB).
Limitations and Future Work
While highly effective, the authors note that the frequency-domain loss component can occasionally hinder performance on specific datasets where noise dominates the frequency spectrum (e.g., ETTh1 using an OLS model required setting the frequency loss weight $\beta = 0$ for optimal results). Consequently, the weight of the loss components ($\beta$) requires careful hyperparameter tuning depending on the underlying dataset characteristics.
Future work could explore automating the balance of these loss terms dynamically or extending PETSA to zero-shot foundation models for time series.
Summary updated