Spectral Energy Allocation Enables Source-Free Domain Adaptation in Time Series Forecasting

Zhimin Mei, Gezheng Xu, Mohammad Hossein Moslemi, Ruiyi Fang, Nima Hosseini Dashtbayaz, Ziyan Wang, Jincheng Zhou, Haolin Jiang, Song Tang, Charles Ling, Boyu WangNeurIPS 2026

TL;DR

Deploying a pre-trained time series forecasting model into a new environment—without access to the original training data or new ground-truth labels—usually causes predictions to derail due to distribution shifts. The authors solve this by training a miniature, "local" model on sliced-up target inputs to accurately predict the immediate future, and then translating those short-term hints into long-term guidance using a clever frequency-domain bridge called Spectral Energy Allocation (SEA). It’s the first framework built specifically for source-free domain adaptation in time series forecasting, and it handily beats existing adaptation methods.

What Problem Does This Paper Address?

Imagine a hospital in a major city trains a deep learning model to forecast patient vital signs and anticipate seizures. They want to share this model with a rural clinic, which has different sensor equipment and patient demographics (a distribution shift). Because of strict medical privacy laws, the city hospital cannot share its patient data, and the rural clinic doesn't have annotated historical data to retrain the model from scratch.

This scenario requires Source-Free Domain Adaptation (SFDA): adapting a pre-trained "source" model to an unlabeled "target" domain without ever seeing the source data again.

Until now, SFDA has been almost exclusively designed for classification tasks. Classification methods rely on the neat trick that features of the same category naturally form distinct clusters in representation space. Time Series Forecasting (TSF) breaks this assumption completely: both inputs and outputs are continuous, ever-changing sequences with complex temporal dependencies. Apply standard classification SFDA to forecasting, and it falls flat.

Figure 1: Feasibility and limitations of SFDA in TSF. The black dashed line separates the accessible target input x from the inaccessible target label y. (a) We split x into history x(1) and future x(2) to train a target self-supervised model gT . (b) gT generates reliable short-horizon pseudo labels gT (x(2)). (c) Rolling gT for long-horizon prediction, e.g., gT (gT (x(2))), suffers from error accu- mulation and cannot provide effective supervision. (d) The long-horizon source model prediction fS(x) is inaccurate under distribution shift.

Methods

The authors observe a fundamental quirk of time series: the input history and the future target label are just consecutive slices of the exact same physical signal. This unlocks a neat two-stage pipeline:

  1. Stage 1: Self-Supervised Short-Term Forecasting. Even though the rural clinic's future labels are hidden, we still have the input windows (say, length $L$). The authors slice each unlabeled input window in half ($k = 0.5$) and train a brand-new auxiliary model ($g_T$) to predict the second half from the first. Because $g_T$ learns strictly on target data, it is immune to distribution shifts and generates crisp pseudo-labels for the immediate future ($L/2$). However, you can't just roll $g_T$ forward recursively to predict the full horizon $L$—prediction errors snowball rapidly (as seen in Figure 1c above). Thus, $g_T$ only provides local time-domain supervision for the first half of the source model's prediction.
  2. Stage 2: Spectral Energy Allocation (SEA) Alignment. How do we supervise the second half of the long-horizon forecast? In the time domain, you can't directly align a short sequence ($L/2$) with a long sequence ($L$). Turn to the frequency domain via a Fast Fourier Transform, however, and they share the same underlying spectral DNA—just at different resolutions. A long sequence has a denser frequency grid, meaning energy concentrated in a single frequency bin in a short sequence disperses across neighboring bins in a longer one.

The authors formalize this cross-resolution relationship as a SEA pattern: a matrix capturing the pairwise ratios of normalized spectral energy between a short and long sequence, weighted by a Gaussian kernel so neighboring frequencies interact more strongly than distant ones. Because a domain's SEA pattern remains remarkably consistent over time, the authors compute the SEA pattern between the target input's first half and full window, and force the SEA pattern of the pseudo-label pair (short prediction from $g_T$, long prediction from the source model $f_S$) to match it.

Datasets

The authors test their method across a wide variety of real-world and synthetic shifts:

  • Primary Benchmarks: Air Quality (cross-city pollution across 4 Chinese cities), PPG-DaLiA (cross-subject heart rate from 15 individuals), Bay Area Traffic (cross-season road occupancy from 862 sensors), and ETT (cross-station power transformer temperatures).
  • Non-Stationary Benchmarks: ILI (weekly influenza-like illness ratios) and Exchange (daily currency exchange rates), split chronologically to test adaptation across different time eras.
  • Synthetic Benchmark: Newly constructed sinusoidal datasets featuring stationary source signals and target domains with either gradual frequency drift or abrupt frequency jumps to stress-test spectral assumptions.

Key Insights and Ideas

  • Target inputs contain free, shift-free supervision—up to a point: Splitting target inputs gives you an effortless self-supervised playground immune to source-target shifts, but rolling predictions forward hits a wall of compounding error.
  • Align relationships, not raw spectra: You can't align the raw frequency spectrum of a source prediction to the target future because the target future is unknown. By defining SEA over a pair of short-and-long signals, the authors extract a label-free structural blueprint directly from the accessible input window.
  • Time and frequency losses are natural partners: Spectral energy (magnitude) completely ignores phase—meaning a model trained only on SEA could predict a wave with the right frequencies that is shifted backward or forward in time. Combining SEA with the short-horizon time-domain loss ($L_{\text{SSM-PL}}$) anchors the phase early on while letting spectral correspondence guide the long-range tail.

Key Results

  • Sweeping the Baselines: Across 16 cross-domain scenarios on the four primary datasets, the method outperforms 13 baselines—including 5 classification SFDA methods and 8 Unsupervised Domain Adaptation (UDA) methods that actually have access to the source data. Relative MSE and MAE drop by 1% to 22% compared to the strongest baselines, and by over 40% compared to the unadapted source model (e.g., Summer$\rightarrow$Winter traffic).
  • Architecture Agnostic: Plugging the framework into four distinct backbones (iTransformer, PatchTST, DLinear, and PhaseFormer) yields up to 41.0%–45.8% relative MSE improvements over zero-shot source models.
  • Longer Horizons = Bigger SEA Gains: Ablation studies show that while both losses help individually, combining them cuts average MSE by 19.8% over zero-shot. Furthermore, SEA's added value scales with horizon length, jumping from a 4.78% extra MSE reduction at horizon $H=24$ to 14.70% at $H=300$.
  • Resilience to Non-Stationarity: On chronologically split ILI and Exchange datasets, it reduces MSE by 11.2%–14.6% over zero-shot and 3.3%–7.2% over top baselines.

Limitations and Future Work

The method relies on the target input window containing clues about how frequencies behave. In synthetic stress tests, when a gradual frequency drift occurs across the whole sequence, the method slashes zero-shot MSE by 55.1%. However, when an abrupt regime shift happens exclusively inside the future forecasting window (completely unseen in the input history), MSE gains shrink to 5.9% (though notably avoiding negative transfer).

To tackle sudden, unobservable shifts, the authors suggest extending SEA into an online test-time adaptation setting where the model continuously updates as new timestamps stream in, as well as exploring whether SEA patterns generalize beyond forecasting to broader sequence learning tasks.

Summary updated

Abstract

Source-free domain adaptation (SFDA) adapts a pre-trained source model to an unlabeled target domain without access to source data. However, existing SFDA studies have predominantly focused on classification tasks, leaving time series forecasting (TSF), a fundamentally different problem with continuous outputs and complex temporal dependencies, largely unexplored. In this work, we identify unique characteristics and key challenges of SFDA in TSF: 1) forecasting labels correspond to future temporal segments of the same underlying signal, enabling us to split target input and construct a self-supervised learning task, thereby training an accurate short-term forecasting model to provide high-quality pseudo-labels; 2) however, such supervision remains inherently *local* rather than *global* for long-horizon source model adaptation. To fill this gap, we propose the notion of Spectral Energy Allocation (SEA) pattern, defined over a short-long signal pair. The SEA pattern provides a structured correspondence that bridges signals across different temporal horizons, enabling reliable short-horizon pseudo-labels to guide long-horizon adaptation. Extensive experiments demonstrate that our method substantially outperforms baselines across different forecasting backbones.
BibTeX
@inproceedings{mei2026spectral,
  author = {Zhimin Mei and Gezheng Xu and Mohammad Hossein Moslemi and Ruiyi Fang and Nima Hosseini Dashtbayaz and Ziyan Wang and Jincheng Zhou and Haolin Jiang and Song Tang and Charles Ling and Boyu Wang},
  title = {{Spectral Energy Allocation Enables Source-Free Domain Adaptation in Time Series Forecasting}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=9zd8FaFWpx},
}
Figure