Learning Fast and Slow for Online Time Series Forecasting

Quang Pham, Chenghao Liu, Doyen Sahoo, Steven C. H. Hoi

Introduction

In real-world applications such as traffic management, electricity grid monitoring, and financial forecasting, data arrives in a continuous stream. Unlike static datasets used in standard batch learning, these environments are characterized by concept drift, where the underlying data distribution changes over time.

Standard deep learning models, such as Transformers or Temporal Convolutional Networks (TCNs), often struggle in these online settings for two primary reasons: slow adaptation to new patterns and catastrophic forgetting of old ones. When a previously seen pattern reappears (e.g., seasonal traffic behavior), these models typically have to relearn it from scratch. To address this, the Fast and Slow learning Network (FSNet) introduces a brain-inspired framework for robust online time series forecasting.

The FSNet Architecture

Inspired by the Complementary Learning Systems (CLS) theory in neuroscience, FSNet mimics the interaction between the hippocampus (responsible for fast learning and memory) and the neocortex (responsible for slow learning and generalization).

The FSNet architecture augments a TCN backbone with per-layer adapters for fast learning and an associative memory for long-term pattern recall.

As shown in the architecture diagram, FSNet augments a standard TCN backbone with two innovative components:

  1. Per-Layer Adapters (Fast Learning): Instead of relying solely on slow backpropagation, FSNet monitors the Gradient Exponential Moving Average (EMA) of each layer. This signal acts as a real-time sensor for distribution shifts, allowing the model to apply immediate, element-wise transformations to weights and features.
  2. Associative Memory (Slow Learning): The model maintains a memory bank of adaptation coefficients. When a significant change is detected via gradient interference, FSNet queries this memory. If a similar historical pattern is found, the model retrieves the corresponding "lessons" to jump-start the adaptation process.
  3. Sparse Interaction: To maintain efficiency and reduce noise, the memory is triggered only when the model detects a substantial representation change, rather than at every time step.

Experimental Performance

FSNet was evaluated against a variety of real-world datasets (ETT, ECL, Traffic, Weather) and synthetic benchmarks (S-Abrupt, S-Gradual) designed to test its resilience to sudden and slow distribution shifts.

MSE curves across different datasets show that FSNet (solid black line) consistently achieves lower error and recovers from concept drifts faster than competing continual learning methods.

Key Results

  • Superior Accuracy: FSNet consistently outperformed specialized continual learning strategies like Experience Replay (ER) and Maximally Interfered Retrieval (MIR). For instance, on the synthetic S-Abrupt dataset, FSNet achieved an MSE of 1.391, significantly lower than the 2.372 achieved by standard ER.
  • Rapid Convergence: As seen in the MSE curves, FSNet recovers from concept drifts much faster than baselines. While other models often "collapse" into high-error states immediately following a shift, FSNet's error curves demonstrate a much sharper return to accuracy.
  • Task-Free Adaptation: Unlike many continual learning models that require explicit "task" labels to know when a shift has occurred, FSNet is entirely task-free, discovering shifts and recurring events autonomously through its gradient-sensing mechanism.

Conclusion and Future Work

FSNet represents a significant step forward in making deep learning models viable for dynamic, streaming environments. By balancing fast adaptation with long-term associative memory, it effectively mitigates both slow learning and catastrophic forgetting.

Future research directions include improving memory scaling for extremely complex applications and developing more granular adaptation techniques for multivariate series where only a subset of dimensions may experience drift. Additionally, integrating adaptive normalization could further enhance the model's stability in non-stationary online settings.

Summary updated

BibTeX
@inproceedings{pham2023learning,
  author = {Quang Pham and Chenghao Liu and Doyen Sahoo and Steven C. H. Hoi},
  title = {{Learning Fast and Slow for Online Time Series Forecasting}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=q-PbpHD3EOk},
}
Figure