Cross-Frequency Time Series Meta-Forecasting

Mike Van Ness, Huibin Shen, Hao Wang, Xiaoyong Jin, Danielle C. Maddix, Karthick GopalswamyarXiv 2023 · DOI

Introduction

Time series forecasting is a critical component of modern industrial operations, ranging from electricity demand prediction to inventory management. Recent advancements have seen the rise of "meta-forecasting," where large-scale models are trained on diverse datasets to enable "zero-shot" forecasting on novel series without retraining. However, a significant bottleneck remains: most current models are "frequency-locked." A model trained on hourly data typically fails when applied to monthly data because neural networks perceive seasonal patterns differently as sampling rates change. To address this, researchers from Stanford and AWS AI Labs have introduced the Continuous Frequency Adapter (CFA), a model designed for frequency generalization.

The Frequency-Lock Problem

In traditional meta-forecasting, practitioners must maintain separate models for every sampling frequency (hourly, daily, weekly, etc.). This is computationally expensive and prevents models from learning universal seasonal logic. The core challenge is that while the underlying physical or social process might have a consistent cycle, the number of discrete time steps representing that cycle varies wildly across frequencies. CFA aims to bridge this gap by focusing on frequency-invariant representations.

Methodology: Continuous Frequency Adapter (CFA)

The CFA architecture is built on the philosophy that while raw values depend on frequency, the phase relationships between time steps should remain invariant.

The CFA architecture utilizes a continuous discriminator to enforce frequency-invariant representations within the self-attention mechanism.

Key Technical Components

  • Self-Attention Backbone: The model employs an encoder-decoder structure with a self-attention mechanism.
  • Continuous Domain Adaptation: Rather than treating frequencies as discrete categories, CFA uses Continuous Domain Indices. It applies a Fast Fourier Transform (FFT) to input data to extract dominant period lengths, which serve as continuous labels.
  • Adversarial Training: This is the model's "secret sauce." A Continuous Discriminator attempts to guess the frequency (the FFT-derived period) from the attention keys and queries. The forecasting model is penalized if the discriminator succeeds, forcing it to scrub frequency-specific information from its internal representations. This ensures that the model learns where to look in the past (the phase) in a universal way.

Experimental Evaluation

The researchers evaluated CFA against standard benchmarks using both synthetic and real-world datasets:

  1. Synthetic Data: Sinusoidal waves with strictly controlled period lengths to test generalization (e.g., training on periods of 10–20 and testing on 30–40).
  2. Real-World Benchmarks: Diverse datasets including elec (hourly electricity), uber (daily trips), and tourism (monthly/quarterly economic data).

Results and Analysis

CFA demonstrated superior generalization capabilities compared to standard LSTMs and N-BEATS models. In synthetic tests, while LSTMs often predicted the wrong seasonality entirely when faced with unseen periods, CFA successfully adapted to the new scales.

Top: CFA accurately forecasts a target frequency unseen during training compared to LSTM. Bottom: t-SNE visualizations show that CFA keys are frequency-invariant (mixed colors) compared to LSTM hidden states which cluster by frequency.

On real-world data, CFA consistently achieved lower Normalized Deviation (ND) than LSTMs when applied to target frequencies not seen during training. For instance, when trained on hourly and quarterly data and tested on daily Uber data, CFA emerged as the top performer. A key insight from the t-SNE analysis (shown above) is that CFA's attention keys remain mixed across different frequencies, whereas standard LSTM hidden states cluster by frequency, indicating they are trapped by the sampling rate.

Conclusion and Future Work

CFA represents a significant step toward universal time series forecasting by enabling zero-shot adaptation across frequencies. While it currently faces a "multi-source penalty"—where a specialized model trained on the exact target frequency may still outperform it—the ability to generalize to entirely unseen scales is a major breakthrough. Future work will focus on extending this approach to non-seasonal and purely stochastic data, further closing the gap between universal and specialized forecasting models.

Summary updated

BibTeX
@misc{ness2023cross,
  author = {Mike Van Ness and Huibin Shen and Hao Wang and Xiaoyong Jin and Danielle C. Maddix and Karthick Gopalswamy},
  title = {{Cross-Frequency Time Series Meta-Forecasting}},
  year = {2023},
  eprint = {2302.02077},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2302.02077},
}
Figure