StateFlow: Dual-State Recurrent Modeling for Long-Horizon Time Series Forecasting
2026-06-30 • Machine Learning
Machine Learning
AI summaryⓘ
The authors address challenges in predicting multiple time points far into the future from complex time series data. They improve a previously known model called VARNN to handle multi-step forecasting by creating StateFlow, which tracks both overall trends and local errors in the data separately. StateFlow uses a two-step training process to first learn short-term predictions and then make longer-term forecasts. Their experiments show that StateFlow performs well compared to other common forecasting methods, while keeping the model efficient and compact.
long-horizon forecastingmultivariate time seriesVARNNrecurrent neural networkresidual-memorytrend and seasonalitymulti-step forecastingchunk-based decodertwo-stage optimizationtemporal dynamics
Authors
Haroon Gharwi, Yue Dai, Kai Shu
Abstract
Long-horizon multivariate time series forecasting (LTSF) remains challenging due to non-stationarity, regime shifts, and error accumulation. The Variability-Aware Recursive Neural Network (VARNN) is designed to track such variability by maintaining a residual-memory state driven by one-step prediction errors. However, its original formulation is limited to one-step sequence regression and does not directly support multi-step forecasting. In this work, we extend VARNN to long-horizon forecasting and introduce StateFlow, a recurrent forecasting framework that uses VARNN as a dual-state recurrent backbone to capture two complementary signals from the lookback sequence: a hidden-state trajectory representing primary temporal dynamics, including trend, seasonality, level changes, and recurring patterns, and a residual-memory trajectory representing structured local prediction deviations, driven from a nonlinear recurrent transformation of errors between one-step base predictions and observed values. A chunk-based decoder separately summarizes these trajectories and maps them to the future horizon for direct multi-step forecasting. We further employ a two-stage optimization strategy that first trains the VARNN encoder through a one-step base prediction objective to optimize the internal representations over the lookback sequence, and then trains a horizon-specific decoder for direct multi-step forecasting. Experiments on standard LTSF benchmarks show that StateFlow achieves competitive performance against strong linear, recurrent, convolutional, and Transformer-based baselines while preserving linear recurrent encoding and a compact model design.