A Framework for Imbalanced Time-Series Forecasting

Luis P. Silvestrin, Leonardos Pantiskas, Mark Hoogendoorn

Introduction

In many real-world applications, such as industrial maintenance or financial forecasting, the primary interest lies in rare, high-impact events rather than steady-state behavior. Standard machine learning models often fall into a "persistence trap," optimizing for average performance and failing to predict sudden spikes or drops. This paper addresses the challenge of imbalanced regression in time-series data by introducing a structured framework to force models to learn these underrepresented moments.

The Proposed Framework

The authors introduce a three-step iterative framework designed to improve the prediction of critical temporal patterns through specialized sampling and interpretability tools.

Overview of the three-step framework for imbalanced time-series forecasting.

1. Weight Function Selection

The first step involves defining a weight function $w_i$ to quantify the importance of each sample. For instance, in temperature forecasting, the weight might be defined as the absolute change in temperature over a specific forecast horizon ($|y(t + \Delta) - y(t)|$). High variation in the target variable corresponds to a higher weight, signaling a sample of interest.

2. Sampling Methods and Distribution Visualization

To address data imbalance, the framework employs under-sampling techniques to modify the training distribution, ensuring the model encounters enough high-importance samples.

Visualization of sampling methods (SUS, TUS, IHS) and their impact on data distribution.
  • Threshold Under-sampling (TUS): Removes all samples below a defined importance threshold.
  • Stochastic Under-sampling (SUS): Probabilistically samples data points based on their assigned weights, effectively creating a weighted lottery for inclusion.
  • Inverse Histogram Under-sampling (IHS): Automatically constructs a histogram of weights and samples the inverse frequency to create a uniform distribution of importance levels.

3. Model Training and Evaluation

Models are trained on both original and sampled datasets. Evaluation focuses not just on global error but specifically on performance during high-variation events. The authors utilize SHAP (Shapley Additive Explanations) and Attention mechanisms to verify that the model is learning meaningful temporal features rather than simply repeating the last observed value.

Experimental Results

The framework was validated on a large-scale industrial motor temperature dataset consisting of approximately 2 million samples. The goal was to forecast motor temperature 5 minutes into the future to prevent overheating.

  • Top Performer: The Temporal Convolutional Network (TCN) emerged as the most effective architecture across all evaluation sets.
  • Overcoming the Persistence Trap: Models trained on balanced data (via SUS or IHS) significantly reduced Root Mean Squared Error (RMSE) on high-variation events compared to models trained on raw, imbalanced data.
  • Attention as a Diagnostic: Using Temporal Attention Convolutional Networks (TACN), the authors found that sampling forced the model to engage more deeply with temporal features. The number of unique learned attention patterns increased from a mere 3 on unsampled data to between 30 and 50 on balanced data.

Conclusion

This framework provides a practical approach to imbalanced regression in time-series. While aggressive sampling can slightly increase error on steady-state data, it drastically improves the prediction of critical events. This allows practitioners to tune the balance between average accuracy and event-specific performance based on business costs and safety requirements.

Summary updated

BibTeX
@inproceedings{silvestrin2021framework,
  author = {Luis P. Silvestrin and Leonardos Pantiskas and Mark Hoogendoorn},
  title = {{A Framework for Imbalanced Time-Series Forecasting}},
  booktitle = {LOD},
  year = {2021},
  doi = {10.1007/978-3-030-95467-3\_19},
}
Figure