BorealisAI

PETSA: Adapt Time-Series Forecasters at Test Time

PETSA is a parameter-efficient test-time adaptation method for time-series forecasting. It updates small input and output calibration modules rather than the full model, targeting non-stationary data with lower adaptation costs.

Stars
21
Forks
3
Stars, last 10 days
+0

Our take

Health score

17/100

How it is scored
Activity
20
Community
4
Issues
21
Pull requests
21

+0 stars in the last 10 days

  • Fewer contributors than 92% of the projects we track

Overview

PETSA adapts pre-trained time-series forecasting models during inference to address distribution changes that can make forecasts less reliable. Rather than updating the full model, it adjusts compact calibration modules around the input and output, using low-rank adapters and dynamic gating.

The method is aimed at researchers and practitioners evaluating test-time adaptation for forecasting. Its experiments cover several forecasting backbones and benchmark datasets, with a custom objective that combines robust, frequency-domain, and patch-structure terms. The repository provides scripts and implementation based on the Time-Series-Library.

Key Features

  • Parameter-efficient adaptation that updates small calibration modules instead of the full forecaster.
  • Low-rank adapters and dynamic gating for adjusting representations at inference time.
  • A specialized loss combining robust, frequency-domain, and patch-wise structural components.
  • Support for iTransformer, PatchTST, DLinear, OLS, FreTS, and MICN.
  • Dataset setup and example scripts for ETTh1, ETTm1, ETTh2, ETTm2, exchange_rate, and weather.
  • Separate scripts for running PETSA and training models when checkpoints are unavailable.

Use Cases

  • Forecasting researchers comparing parameter-efficient test-time adaptation methods across model backbones.
  • Teams evaluating whether adapting a pre-trained forecaster can help when incoming time series are non-stationary.
  • Practitioners investigating lower-cost alternatives to updating an entire forecasting model during inference.
  • Developers reproducing experiments on the listed datasets and model configurations.

Getting Started

Install the listed dependencies and run an example script:

pip install -r requirements.txt
bash scripts/iTransformer/ETTh1_96/run_petsa.sh 3 16 0.2 0.02

Prepare datasets in the documented data/{dataset}/{dataset}.csv layout first. See the README for setup details and other run configurations.

Alternatives

  • multiresolution-time-series-transformer: MTST is a forecasting model that captures patterns across time resolutions, while PETSA adapts a pretrained forecaster at test time using calibration modules.
ProjectLanguageLicenseStarsStatus
PETSAShellOther21Not checked yet
multiresolution-time-series-transformerPython–2Inactive

Considerations

  • The repository describes a research method, not a general-purpose forecasting package. Reproducing results requires configuring datasets, model settings, and scripts.
  • The README specifies a particular dependency stack, including PyTorch 1.7.1. Compatibility with other environments is not established by the provided information.
  • Dataset files must be obtained separately from the Time-Series-Library.
  • The repository lists no asserted license, so usage and redistribution terms are unclear from the available metadata.

Found this useful?

Share it with someone who would like PETSA.

Comparisons