IN-Flow: Instance Normalization Flow for Non-stationary Time Series Forecasting

Wei Fan, Shun Zheng, Pengyang Wang, Rui Xie, Kun Yi, Qi Zhang, Jiang Bian, Yanjie Fu

Abstract

Non-stationary time series forecasting remains a significant challenge due to the constant shift in data distributions over time. Traditional methods often rely on fixed statistics or architecture-specific modifications, which lack flexibility and generalizability. This paper introduces IN-Flow (Instance Normalization Flow), a model-agnostic framework that decouples non-stationarity removal from forecasting. By utilizing an invertible neural network and a bi-level optimization strategy, IN-Flow transforms raw data into a stable distribution for forecasting and maps predictions back to the original space. Experimental results demonstrate that IN-Flow significantly improves the performance of state-of-the-art models like PatchTST and iTransformer by up to 28.3%.

Introduction

Most deep learning models for time series forecasting rely on a stationarity assumption, assuming that statistical properties like mean and variance remain constant. However, real-world data—such as electricity consumption or weather patterns—frequently exhibit non-stationarity, where distributions shift over time.

Existing solutions typically fall into two categories: using fixed statistics (e.g., RevIN) which fail for complex shifts, or architecture-specific fixes (e.g., Non-stationary Transformer) which are not portable. The authors propose IN-Flow to provide a model-agnostic solution capable of handling complex, unknown distribution shifts without being tied to a specific forecasting backbone.

Methodology

The IN-Flow framework is built upon three core components:

  1. Decoupled Formulation: The process is separated into a Transformation Module (to stabilize the distribution) and a Forecasting Module. This bi-directional mapping allows raw input to be processed in a stationary space and then mapped back for final forecasting.
  2. Instance Normalization Flow (IN-Flow): This invertible neural network stacks Instance Normalization layers with Affine Coupling layers. Unlike traditional flows, it learns to map raw data to a "forecasting-friendly" distribution while preserving essential temporal patterns.
  3. Bi-level Optimization: To prevent "over-cleaning" the data, a bi-level approach is used. The inner loop trains the forecaster on training data, while the outer loop optimizes the transformation module based on validation error, ensuring better generalization.
The IN-Flow framework consists of a decoupled formulation and a bi-level optimization loop to handle non-stationary data.

Experimental Setup

The method was evaluated on several high-impact real-world datasets, including ETT (Electricity Transformer Temperature), Electricity, Weather, CAISO, and NordPool, alongside synthetic datasets with controlled distribution shifts. The framework was tested with four state-of-the-art forecasting backbones: PatchTST, iTransformer, Autoformer, and N-BEATS.

Key Results and Insights

IN-Flow demonstrated consistent superiority over existing normalization methods like RevIN and Dish-TS. Key findings include:

  • Significant Accuracy Gains: IN-Flow improved the performance of PatchTST by 28.3% and iTransformer by 21.3% on average across datasets.
  • Robustness: In synthetic tests with severe shifts where standard models saw a 10%+ performance drop, IN-Flow maintained high accuracy.
  • Higher-Order Modeling: By using Normalizing Flows, the framework captures complex, non-linear transformations that simple mean/std normalization misses.
Comparison of Mean Squared Error (MSE) across different models and normalization techniques, showing IN-Flow's superior performance.

Conclusion

IN-Flow provides a robust, plug-and-play solution for non-stationary time series forecasting. By decoupling the transformation from the prediction and using bi-level optimization, it allows existing models to operate in a stable latent space without losing critical information. Future work may explore more expressive flow architectures and adaptations for extremely long-term forecasting scenarios.

Summary updated

BibTeX
@inproceedings{fan2025flow,
  author = {Wei Fan and Shun Zheng and Pengyang Wang and Rui Xie and Kun Yi and Qi Zhang and Jiang Bian and Yanjie Fu},
  title = {{IN-Flow: Instance Normalization Flow for Non-stationary Time Series Forecasting}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2025},
  doi = {10.1145/3690624.3709260},
}
Figure