Correcting Forecasts with Multifactor Neural Attention.

Matthew Riemer, Aditya Vempaty, Flávio du Pin Calmon, Fenno F. Terry Heath Iii, Richard Hull, Elham KhabiriICML 2016

Abstract

Automatic forecasting of time series data is a challenging problem in many industries. Current forecast models adopted by businesses do not provide adequate means for including data representing external factors like weather, social media trends, and local events. This paper introduces a novel neural attention mechanism designed to "correct" traditional time series forecasts by incorporating these diverse external factors. By using a sparse, additive attention model, the researchers achieved a 23.9% improvement in retail demand forecasting while providing a "glass-box" level of interpretability that explains exactly which external factors drove a specific prediction.

Introduction

In industries like retail, accurate demand forecasting is critical for operational efficiency. Traditional univariate models, such as ARIMA or Holt-Winters, rely solely on historical sales data. However, real-world demand is frequently driven by external "shocks"—sudden weather changes, viral social media trends, or local community events.

While businesses often collect this external data, integrating it into forecasting workflows is difficult. Standard machine learning models often act as "black boxes," making it impossible for human analysts to understand the reasoning behind a forecast change. This often leads managers to manually adjust forecasts based on intuition, introducing human bias. This research proposes a middle ground: a model that combines the accuracy of deep neural networks with the interpretability of simple regression.

The Multifactor Neural Network Attention Model

The proposed architecture starts with a baseline univariate forecast and applies a series of additive corrections based on external factors.

The Multifactor Neural Network Attention Model architecture, showing the integration of time series modeling with external data groups through a neural attention modulator.

Key technical components include:

  • Independent Observation Model: Different factors (weather, social, events) are treated as independent groups rather than a single concatenated vector.
  • Soft Attention Mechanism: For every external observation, the model learns an Importance weight (how unusual the data point is in context) and a Directional Impact (whether it increases or decreases demand).
  • Sparse Attention (L1 Regularization): To handle noisy data, L1 regularization forces the model to ignore irrelevant signals, focusing only on the most impactful external factors.
  • Uncertainty Balancing: A mechanism balances the baseline forecast against the most recent actual sales, allowing the model to adapt when external factors do not fully explain variance.

Experimental Setup

The model was evaluated using a massive real-world dataset from a major American retailer, encompassing two years of sales for 20 commodity classes across 107 stores in Ohio. The external data sources included:

  • Weather: Historical records from 16 stations (temperature, wind, visibility, etc.).
  • Events: Over 300,000 local events from Eventful.com and 51 major national events.
  • Social Media: A 10% sample of Twitter data filtered for commodity-specific sentiment and chatter.

Results and Interpretability

The model achieved a 23.9% relative improvement in Mean Absolute Percent Error (MAPE) over the baseline univariate forecast. It also reduced "unpredicted anomalies"—cases where the forecast was off by 2x or more—by 28.3%. For the five most volatile commodities, the model improved MAPE from 50.76% to 34.87%, significantly outperforming traditional machine learning methods like Random Forests or SVR, which tended to overfit on these noisy categories.

Interpretability dashboard showing the causal strength of primary factors and specific weather impacts for a forecasted week.

A primary advantage of this additive approach is interpretability. As shown in the dashboard above, analysts can see exactly how much specific factors, such as "High Wind Speed" or "Twitter Sentiment," contributed to a predicted sales spike. This "glass-box" transparency allows for human-in-the-loop verification of automated forecasts.

Discussion and Future Work

Despite the inclusion of various external sources, approximately 54.7% of the forecast correction remained "unexplained," likely due to missing internal data such as store-specific promotions or price changes. Additionally, the local event data lacked turnout metrics, which limited its predictive utility. Future research will explore tighter end-to-end integration between the time-series modeler and the attention module, potentially using Gated Recurrent Units (GRUs) to further enhance predictive power.

Summary updated

BibTeX
@inproceedings{riemer2016correcting,
  author = {Matthew Riemer and Aditya Vempaty and Flávio du Pin Calmon and Fenno F. Terry Heath III and Richard Hull and Elham Khabiri},
  title = {{Correcting Forecasts with Multifactor Neural Attention.}},
  booktitle = {ICML},
  year = {2016},
  url = {https://openreview.net/forum?id=bBn_Ay6h_GIS},
}
Figure