Deep Adaptive Input Normalization for Time Series Forecasting

Nikolaos Passalis, Anastasios Tefas, Juho Kanniainen, Moncef Gabbouj, Alexandros IosifidisarXiv 2019

TL;DR

The authors introduce Deep Adaptive Input Normalization (DAIN), a novel, fully trainable neural network layer that dynamically normalizes time series data based on its local distribution. Unlike traditional fixed normalization methods like z-score scaling, DAIN learns optimal normalization parameters end-to-end via backpropagation, significantly boosting forecasting accuracy for highly non-stationary and multimodal data.

What Problem Does This Paper Address?

Deep learning models excel at time series forecasting, but their performance degrades rapidly if the input data isn't properly normalized. This challenge is particularly acute in financial forecasting (e.g., limit order books), where data is inherently non-stationary and multimodal.

Standard normalization techniques, such as global z-score scaling, rely on fixed global statistics computed beforehand. This fails when the data drifts over time or contains distinct modes—for instance, trying to use the same model to forecast a $1 stock and a $100 stock. While deep learning practitioners often use internal normalization layers like Batch Normalization or Instance Normalization, these are not designed to handle raw input data normalization and simply compute statistics during inference rather than learning how to optimize the normalization process for a specific task.

Methods

To overcome these limitations, the authors propose the DAIN layer, which can be placed at the very front of any deep learning architecture to process raw time series data. As shown in the architecture diagram below, DAIN divides the normalization process into three distinct, adaptive sublayers:

Fig. 1. Architecture of the proposed Deep Adaptive Input Normalization Layer (DAIN)
  1. Adaptive Shifting (Centering): Shifts the data into an appropriate region of the feature space by applying a linear transformation ($W_a$) to the average feature vector of the current time series window.
  2. Adaptive Scaling (Standardization): Linearly scales the shifted data using a second weight matrix ($W_b$) to adjust feature variance based on the sample's local standard deviation.
  3. Adaptive Gating: Uses a non-linear gating mechanism (a sigmoid function parameterized by $W_c$ and bias $d$) to suppress features that are irrelevant or harmful to the downstream forecasting task.

Because the gradients across these three sublayers vary drastically, the authors utilize separate learning rates ($\eta_a, \eta_b, \eta_c$) during optimization to ensure smooth convergence.

Datasets

The proposed method was evaluated on two distinct time series tasks:

  • FI-2010: A massive, challenging benchmark dataset containing 4.5 million limit order book entries from five Finnish companies traded on the Helsinki Exchange. The raw data was processed into 453,975 144-dimensional feature vectors.
  • Household Power Consumption: A load forecasting dataset from the UCI Machine Learning Repository used to predict whether a household's average power consumption will increase or decrease over the next 10 minutes.

Key Insights and Ideas

  • Learning to Normalize vs. Fixed Rules: DAIN shifts the paradigm from heuristic, fixed data preprocessing to task-driven, learned preprocessing. The network dynamically decides how to scale and shift data based on the specific context of the input window.
  • Handling Raw Data Directly: Because the first two sublayers are strictly linear and carefully initialized, DAIN can safely receive completely unnormalized, raw data without suffering from early activation function saturation or training instability.
  • Architecture-Dependent Gating Benefits: The adaptive gating sublayer provides a noticeable performance boost for simpler architectures like MLPs and CNNs. However, it provides little to no benefit for RNNs using Gated Recurrent Units (GRUs), as GRUs already possess internal gating mechanisms capable of filtering out irrelevant features.

Key Results

The authors conducted an extensive ablation study on the FI-2010 dataset to evaluate the impact of each sublayer across Multilayer Perceptrons (MLPs), Convolutional Neural Networks (CNNs), and Recurrent Neural Networks (RNNs).

Ablation study results on the FI-2010 dataset

As demonstrated in Table I, omitting normalization entirely ("No norm.") leads to model failure (Cohen's $\kappa \approx 0$). DAIN consistently outperforms standard z-score, Batch Normalization, and Instance Normalization across all architectures.

When evaluated on the full dataset across multiple forecasting horizons (10 and 20 time steps), DAIN maintained its substantial performance edge:

Full evaluation results on the FI-2010 dataset

On the Household Power Consumption dataset, DAIN achieved the highest overall accuracy, notably elevating the performance of a simple MLP to match that of a more complex RNN:

Evaluation results on the Household Power Consumption dataset

Robustness to Distribution Shifts: In a stress-test experiment where evaluation data was artificially shifted by adding three times its average value, a standard z-score normalized MLP saw its accuracy plummet from 75.39% to 56.56%. In contrast, the DAIN-equipped model was virtually unaffected, with accuracy dropping by less than 0.5% (from 78.59% to 78.21%).

Limitations and Future Work

A primary practical limitation of DAIN is its sensitivity to hyper-parameters; users must carefully fine-tune separate learning rates for each sublayer to prevent training instability.

For future work, the authors suggest exploring alternative optimization strategies like multiplicative weight updates to alleviate learning rate sensitivity. They also propose integrating more advanced summary aggregation methods (such as the Bag-of-Features model) and exploring ways to retain "mode information" that might otherwise be discarded during the adaptive shifting process.

Summary updated

BibTeX
@misc{passalis2019deep,
  author = {Nikolaos Passalis and Anastasios Tefas and Juho Kanniainen and Moncef Gabbouj and Alexandros Iosifidis},
  title = {{Deep Adaptive Input Normalization for Time Series Forecasting}},
  year = {2019},
  eprint = {1902.07892},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1902.07892},
}
Figure