Encoding Seasonal Climate Predictions for Demand Forecasting with
  Modular Neural Network
Current time-series forecasting problems use short-term weather attributes as
exogenous inputs. However, in specific time-series forecasting solutions (e.g.,
demand prediction in the supply chain), seasonal climate predictions are
crucial to improve its resilience. Representing mid to long-term seasonal
climate forecasts is challenging as seasonal climate predictions are uncertain,
and encoding spatio-temporal relationship of climate forecasts with demand is
complex.
  We propose a novel modeling framework that efficiently encodes seasonal
climate predictions to provide robust and reliable time-series forecasting for
supply chain functions. The encoding framework enables effective learning of
latent representations -- be it uncertain seasonal climate prediction or other
time-series data (e.g., buyer patterns) -- via a modular neural network
architecture. Our extensive experiments indicate that learning such
representations to model seasonal climate forecast results in an error
reduction of approximately 13\% to 17\% across multiple real-world data sets
compared to existing demand forecasting methods.
Smit Marvaniya, Jitendra Singh, Nicolas Galichet, Fred Ochieng Otieno, Geeth De Mel, Kommy Weldemariam
# Encoding Seasonal Climate Predictions for Demand Forecasting with Modular Neural Network

###### Abstract

Current time-series forecasting problems use short-term weather attributes as exogenous inputs. However, in specific time-series forecasting solutions (e.g., demand prediction in the supply chain), seasonal climate predictions are crucial to improve its resilience. Representing mid to long-term seasonal climate forecasts is challenging as seasonal climate predictions are uncertain, and encoding spatio-temporal relationship of climate forecasts with demand is complex. We propose a novel modeling framework that efficiently encodes seasonal climate predictions to provide robust and reliable time-series forecasting for supply chain functions. The encoding framework enables effective learning of latent representations--be it uncertain seasonal climate prediction or other time-series data (e.g., buyer patterns)--via a modular neural network architecture. Our extensive experiments indicate that learning such representations to model seasonal climate forecast results in an error reduction of approximately 13% to 17% across multiple real-world data sets compared to existing demand forecasting methods.

## Introduction

The significant disruption caused by climate variability--be it seasonal (e.g., warmer winters) or extreme events (e.g., heatwaves)--within a supply chain affects its resilience: from demand management to inventory planning [1], [2]. The literature on climate-aware forecasting has highlighted many impactful real-world applications: from creating option plans for pre-season planning [3], [4], energy and utility industries [5], [6], to the manufacturing industry [7].
Today, most retailers recognize the impact of weather in their demand forecast [8], [9] and use short-term weather forecasts (e.g., a week ahead) while predicting demand or employ de-weatherization techniques to understand weather-driven demand patterns [10]. In order to effectively perform demand management or inventory planning, decision-makers require accurate and reliable forecasting w.r.t. temporal and spatial coverage [8], [11]. This is especially critical when considering infusing seasonal-scale forecasting into decision-making workflow processes. In such situations, demand forecasting assesses the seasonal climate prediction [12] and uses them to predict demand for multiple steps in the future. However, climate-aware seasonal-scale demand forecasting is challenging for time-series machine learning since accurately encoding climate variability for demand forecasting is complex [13].

There are two key technical challenges in seasonal-scale climate-aware forecasting: (1) how to represent mid to long-term seasonal climate predictions with uncertainty, and (2) how to encode spatio-temporal relationship of climate forecasts with demand. Fig. 1 illustrates these challenges using a real-world scenario in which the goal is to predict the sales of a set of products across spatial domain using seasonal-scale climate predictions. While Figs. 1(a) and (b) highlight how product sales are spread across locations and times, the seasonal-scale climate predictions have implicit uncertainty with complex spatio-temporal dependency as shown in Fig. 1(c). Modern deep learning techniques can be adapted to address these challenges up to some extent, for example, by treating weather and climate forecasts as an added exogenous variable in the demand prediction stack [14], [15]. Based on our first-hand practical experiences in an industrial setting, due to the high degree of uncertainty embedded in climate prediction ensembles, simply considering such data as exogenous variables at the input layer makes demand predictions erroneous and unreliable for decision-making purposes. Therefore, we need robust models that account for local behaviour across spatial domains and uncertain seasonal-scale predictions.

In this paper, we present a novel modeling framework to address the challenge of encoding noisy seasonal-scale climate forecasts for demand prediction tasks. It features a compact representation of uncertain seasonal climate forecasts such that it

Figure 1: Dimensions of the spatio-temporal seasonal-scale climate-aware forecasting problem. (a) Geography, (b) Product sales across stores, and (c) Uncertain climate predictions.
helps, e.g., in enabling climate resilience in the supply chain by improving demand management, inventory planning, and so forth. As a first step, we extract a set of derived use case-inspired climate features that capture future seasonal climate conditions and the uncertainty associated with these forecasts. We then learn a set of temporal encoders to represent these uncertain climate forecasts with a compact latent representation that captures their uncertainties. We accomplish this by jointly learning a time-series forecasting model and a latent representation using a set of temporal encoders. We summarize our contributions as below:

* We design a modular neural network structure that accommodates different feature types, uncertainty associated with seasonal climate forecasts, and variable-length temporal window sizes based on the availability of the data (e.g. three months of temperature forecast at weekly frequency, one month of precipitation at daily frequency, and so forth).
* We propose a novel technique that learns the latent representations of uncertain seasonal climate forecasts, historical observations, and known inputs (e.g., holidays) for seasonal-scale climate-aware forecasting.
* We show the effectiveness of the climate-aware demand predictions using two different types of climate encoding techniques (Sec. and Sec. ) on real-world datasets from the supply chain domain: a public retail dataset and two large-scale retail industry datasets.

## Motivation and Related Work

Seasonal retail demand is affected by many factors: climate conditions (e.g., temperature, precipitation, humidity), promotional schemes, seasonal events, and so forth. In climate, a range of forecasts for each climate variable is produced by varying initial conditions of climate models that perform multiple simulations, making predictions uncertain. For example, seasonal-scale forecasts from The European Centre for Medium-Range Weather Forecasts (ECMWF) [16] contain 50 ensembles for each climate attribute up to six months in the future, which gets updated every month.

The complexity of climate data can be reduced by conceptualizing the data into trend and noise components [17]. However, modeling such climate data in time-series forecasting is challenging as latent representations need to deal with different types of noise present in seasonal-scale climate predictions. Several approaches have been considered in the past for time-series forecasting in the presence of noise. These approaches can be broadly classified into two categories: classical time-series forecasting and deep learning-based time-series forecasting.

**Classical Time-series Forecasting:** This consists of more classical approaches for modeling time series by including components for modeling level, trend and seasonality. Example of these classical approaches are support vector regression [18], ensemble models [19, 20, 21], exponential smoothing [22], and the Box-Jenkins family of ARIMA [23, 24, 22]. These perform the prediction by using a weighted linear sum of recent historical lags or observations. There are methods such as [25, 26] which
decompose time-series data into a seasonal, trend, and noise components and model them separately to improve forecast accuracy. However, these traditional approaches do not specifically investigate the latent representation learning of seasonal climate predictions for climate-aware forecasting, nor are they suitable for encoding ensemble data representing different levels of uncertainty.

**Deep Learning (DL) based Time-series Forecasting:** In the recent past, DL based approaches have dominated those traditional approaches by providing superiority in terms of modeling complex structures and interdependence between groups of series [27]. Recent works have focused on various deep neural networks such as Convolutional Neural Network (CNN) and Recurrent Neural Network (RNN) for multivariate time-series forecasting [28], [29], including temporal attention [30, 31, 32], dilated CNNs [33], [34], temporal CNNs [35, 36], multivariate attention LSTM-FCN [36, 37], and transformer models [38, 14, 39].

Lim et al. [14] proposed a sequence to sequence temporal fusion technique for representing historical data and known input into a latent space and combining them with static covariate encoders and variable selection networks to identify the relevant features for multi-horizon forecasting. In [30] a temporal attention technique is used to extract time-invariant temporal patterns using CNN for multivariate time-series forecasting. DeepAR [15] performs probabilistic forecasting by training an auto-regressive recurrent neural network model that incorporates negative binomial likelihood to deal with significant variation in time-series data. Ekambaram et al. [40] propose an attention-based multi-modal encoder-decoder model for retail time-series forecasting. In [41] a multifactor attention model is considered for capturing external factors such as short-term historical weather, social media trends, and so forth for predicting retail demand. However, none of these approaches provides a systematic way to model uncertainty associated (due to noise and spatio-temporal variability) with seasonal-scale climate predictions.

While some DL techniques (e.g., [14, 15]) and classical statistical methods (such as [18, 26]) can be repurposed to model seasonal-scale climate forecasts as added exogenous features in the demand prediction stack, we did not come across any work that focuses on learning latent representations based on these features with their associated uncertainties.

## Appendix A Framework for Climate-aware Forecasting

In this section, we describe the proposed framework for encoding multiple different types of geospatial-temporal data such as seasonal climate predictions, historical observation data, prediction of extreme events, etc. for demand forecasting. Our goal is to develop compact representations of uncertain seasonal climate predictions along with other data sources which may have different availability of the data such as three months of temperature forecast at daily frequency, one month of precipitation at weekly frequency, etc. and use them in time series forecasting. Fig. 2 (a) shows the high-level overview of the proposed framework that models various types of time-series data such as historical observations, seasonal climate predictions, non-climate exogenous data, etc. for climate-aware demand forecasting. A set of different temporal encoders are shown in Fig. 2 (b)
that learns the latent representation from each individual time-series data which may require varying model complexity levels.

The problem of seasonal-scale time-series forecasting is defined in terms of a cost function that minimizes the error in the multi-horizon forecasts at each _product_ (\(\mathrm{p_{m}}\)) and store combination. In this paper, _store_ (\(\mathrm{s_{n}}\)) designates any node in a supply chain; for instance, it can be a warehouse or distribution center. The model's forecast is given by:

\[\begin{split}\hat{\mathbf{y}}_{\mathrm{t+\tau}}(\mathrm{s_{n}}, \mathrm{p_{m}},\mathrm{t},\tau,q)=\\ \mathbf{f}^{\mathrm{pred}}(q,\mathbf{y}_{\mathrm{t-k:t}},\mathbf{ X}_{\mathrm{i,t-k:t}}^{\mathrm{o}},\mathbf{X}_{\mathrm{i,t-k:t+\tau}}^{\mathrm{k}}, \mathbf{X}_{\mathrm{i,t-k:t+\tau}}^{\mathrm{c}})\end{split} \tag{1}\]

where \(\mathbf{X}_{\mathrm{i}}^{\mathrm{o}}\) is a set of historical observations (e.g. sales data), \(\mathbf{X}_{\mathrm{i}}^{\mathrm{k}}\) is a set of known inputs (e.g. holidays), \(\mathbf{X}_{\mathrm{i}}^{\mathrm{c}}\) is a set of climate predictions (e.g., min, avg, max temperature), q is the quantile, and \(\hat{\mathbf{y}}_{\mathrm{t+\tau}}(\mathrm{s_{n}},\mathrm{p_{m}},\mathrm{t},\tau)\) is the prediction of \(\tau\)-step ahead forecast at time \(\mathrm{t}\).

Importantly, in Eq. 1, time series data for historical, known and climate data are treated differently. Historical data are only available up to time step \(\mathrm{t}\), but up to \(\mathrm{t+\tau}\) for known and climate forecast data. \(\mathbf{f}^{\mathrm{pred}}\) is a prediction model that includes a set of climate and non-climatic encoders for learning the latent representations. We introduce two such prediction models each associated with a specific latent representation for climatic and non-climatic time series. Next, we present these two prediction models: sub-neural network latent representation and a transformer-based latent representation.

Figure 2: (a) The overall diagram of the proposed climate-aware demand forecasting framework. (b) An example of different types of temporal encoders to deal with different types of input features.
### Latent representation learning using sub-neural networks (LRL-SNN)

We consider a set of time series defined by \(\mathbf{X}=[\mathbf{X}^{\mathrm{o}},\mathbf{X}^{\mathrm{c}},\mathbf{X}^{\mathrm{k}}]\) with \(\mathrm{o}\) being the time series of historical observations, \(\mathrm{c}\) the time series of climate predictions and \(\mathrm{k}\) the known time series. For \(l\in\{\mathrm{o},\mathrm{c},\mathrm{k}\}\), we denote \(\mathbf{I}^{\mathrm{l}}\) the index set such that \(\mathbf{X}^{\mathrm{l}}=\bigcup_{i\in I^{\mathrm{l}}}\mathbf{X}^{\mathrm{l}}_ {\mathrm{i}}\). Finally, we define for each \(l\in\{\mathrm{o},\mathrm{c},\mathrm{k}\}\), an offset \(\tau_{l}\in\mathbb{N}^{\star}\).

At time \(t\) and for label \(l\in\{\mathrm{o},\mathrm{c},\mathrm{k}\}\), we define for \(i\in\mathbf{I}^{\mathrm{l}}\) the window \(w^{l}_{i}(t)\) as:

\[\mathrm{w}^{l}_{i}(t)=(x^{l}_{i,1},x^{l}_{i,2},...,x^{l}_{i,t+\tau_{l}}) \tag{2}\]

with \(\mathbf{X}^{l}_{i}=\{x^{l}_{i,1},\ldots,x^{l}_{i,T}\}\)

For historical observations, climate and known data, \(\mathbf{I}^{\mathrm{l}}\) index a time series of interest--e.g., for historical time series, \(\mathbf{I}^{\mathrm{o}}\) = \(\{\mathbf{P}_{\mathrm{sales}}\), \(\mathbf{P}_{\mathrm{price}}\}\) represents the historical sales or product prices. For climate windows, \(i\) can be included in \(\mathbf{I}^{\mathrm{c}}=\{\mathbf{T}_{\mathrm{min}}\), \(\mathbf{T}_{\mathrm{avg}}\), \(\mathbf{T}_{\mathrm{max}}\), \(\sigma(\mathbf{T}_{\mathrm{min}})\), \(\sigma(\mathbf{T}_{\mathrm{avg}})\ldots\}\) with the times series representing minimum, average or maximum temperatures or their standard deviation respectively over a given ensemble climate time window. Finally, for known input, \(\mathbf{I}^{\mathrm{k}}\) can be \(\{\mathbf{W}_{\mathrm{nbr}},\mathbf{M}_{\mathrm{nbr}}\}\) and represents the week and month numbers, respectively.

We introduce Differencing and Normalizing layers to efficiently represent numerical features such as seasonal-scale temperature (min, max, avg) forecasts to enable transfer across time series. The Differencing layer captures relative trend within a time-series window, whereas the Normalizing layer helps transform each data point such that it window-normalized, so each input window is of comparable scale across multiple inputs. This way of transforming each time-series data helps in improving the learnability of the forecasting model such that it deals with weather variation across stores within geography. However, this step is optional for a certain type of time-series data that captures the uncertainty of the seasonal forecasts such as standard deviation of temperature min.

**Differencing Layer** For all time window \(\mathrm{w}=(x_{1},\ldots,x_{n})\), differenciated window \(\mathbf{w}_{\mathrm{diff}}\) is defined as \(\mathbf{w}_{\mathrm{diff}}=(x_{2}-x_{1},\ldots,x_{i}-x_{i-1},\ldots,x_{n}-x_{ n-1})\). The procedure can easily be inverted by saving \(x_{1}\).

**Normalizing Layer** For all time window \(\mathbf{w}=(x_{1},\ldots,x_{n})\), we denote \(\mu_{w}\) (resp. \(\sigma_{w}\)) its empirical average (resp. its empirical standard deviation, without Bessel's correction). The normalized window \(\mathbf{w}_{\mathrm{norm}}\) is defined \(\mathbf{w}_{\mathrm{norm}}=\{\frac{x_{1}-\mu_{w}}{\sigma_{w}},\ldots,\frac{x_ {i}-\mu_{w}}{\sigma_{w}},\ldots,\frac{x_{n}-\mu_{w}}{\sigma_{w}}\}\). Normalization can be inverted by transmitting \(\mu_{w}\) and \(\sigma_{w}\).

For all temporal data window \(\mathbf{w}(\mathrm{l},\mathrm{i},\tau_{l})\), we have the following successions, from time series data to prediction:

\[\forall l\in\{\mathrm{o},\mathrm{c},\mathrm{k}\},\forall i\in \mathbf{I}^{\mathrm{l}},\mathrm{d}(\mathrm{l},\mathrm{i},\tau_{l}) = \mathbf{w}_{\mathrm{diff}}(\mathbf{w}(\mathrm{l},\mathrm{i},\tau_{ l}))\] (3) \[\forall l\in\{\mathrm{o},\mathrm{c},\mathrm{k}\},\forall i\in \mathbf{I}^{\mathrm{l}},\mathbf{V}(\mathrm{l},\mathrm{i},\tau_{l}) = \mathbf{w}_{\mathrm{norm}}(\mathrm{d}(\mathrm{l},\mathrm{i},\tau_{ }))\] (4) \[\forall l\in\{\mathrm{o},\mathrm{c},\mathrm{k}\},\forall i\in \mathbf{I}^{\mathrm{l}},\mathbf{h}^{\mathrm{l}}_{\mathrm{i}} = \mathbf{TE}^{\mathrm{l}}_{\mathrm{i}}(\mathbf{V}(\mathrm{l},\mathrm{i },\tau_{l}))\] (5) \[\mathbf{H} = \underset{i\in\mathbf{I}^{\mathrm{o}}}{\overset{\mathrm{l}}{ \underset{i\in\mathbf{I}^{\mathrm{o}}}{\underset{i\in\mathbf{I}^{\mathrm{c}}}{ \underset{i\in\mathbf{I}^{\mathrm{c}}}{
with \(\rm{\mbox{$+\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!
for seasonal-scale forecasting. The variable section network and temporal attention mechanism help in modeling the noise present in seasonal-scale climate prediction. Compared to TFT, however, LRL-SNN dedicates a separate temporal encoder for each type of time series (historical, climate, and known). This adds a degree of flexibility in the design of the encoders (e.g., configuration of neural networks) such that it supports different feature types and uncertainty associated with them.

## Experiments

This section first demonstrates the effectiveness of seasonal-scale climate-aware demand forecast using a publicly available grocery retail dataset and two large-scale proprietary retail datasets. We then discuss the ablation study to evaluate the effectiveness of our proposed model. Below we provide a brief description of the datasets used.

**Favorita Grocery Retail Dataset (Ecuador)**: The Corporcion Favorita is a retail chain with stores located throughout Ecuador. This publicly available dataset consists primarily of grocery items and various (non-apparel) consumer goods such as automotive and household accessories [43]. Most of the dataset consists of perishable food items strongly affected by temperature (and humidity).

**Gear Apparel Retail Dataset (USA)**: The outdoor gear and apparel retail (Gear Apparel Retail) dataset consists of a chain of stores and distribution centers (DCs) distributed across the USA. Between 50% - 70% of the dataset contains apparel items with a strong seasonal dependence in the USA. Both the chain of stores and DCs also served as order fulfillment nodes for online purchases.

**Apparel Retail Dataset (India)**: The apparel retail dataset consists of daily sales data from a chain of stores distributed across India. Similar to the Gear Apparel Retail dataset, a sizeable portion of products are seasonal--i.e., over 30% of the products in the dataset consist of items that have demand cycles that have a substantial variance with seasonal changes in India.

Table 1 shows the different characteristics of the datasets such as geography, feature attributes, availability of data period, and so forth. In our experiments, the task is a time-series forecasting task and requires predicting future sales of a product for a given region/store weekly. We use features that are aggregated at a week level while forecasting

\begin{table}
\begin{tabular}{|l|c|c|c|} \cline{2-4} \multicolumn{1}{c|}{} & **Gear Apparel Retail** & **Apparel Retail** & **Favorita Grocery Retail** \\ \hline
**Target** & Unit Sales & Unit Sales & \(\log\)( Unit Sales ) \\ \hline
**Geography** & USA & India & Ecuador \\ \hline
**\#Features** & 6 & 14 & 23 \\ \hline
**\#Unique Time-series** & 180 & 594 & 645 \\ \hline
**\#Train Samples** & \(\sim\)18k & \(\sim\)52k & \(\sim\)79k \\ \hline
**\#Dev Samples** & \(\sim\)4.5k & \(\sim\)12k & \(\sim\)19k \\ \hline
**\#Test Samples** & \(\sim\)14k & \(\sim\)42k & \(\sim\)61k \\ \hline
**Temperature max (\(\lx@math@degree C\))** & \(\mu=18.4\), \(\sigma=8.3\) & \(\mu=33.4\), \(\sigma=8.2\) & \(\mu=21.0\), \(\sigma=5.3\) \\ \hline
**Temperature avg (\(\lx@math@degree C\))** & \(\mu=13.7\), \(\sigma=7.7\) & \(\mu=27.8\), \(\sigma=7.6\) & \(\mu=17.8\), \(\sigma=5.9\) \\ \hline
**Temperature min (\(\lx@math@degree C\))** & \(\mu=8.8\), \(\sigma=7.5\) & \(\mu=22.3\), \(\sigma=7.6\) & \(\mu=14.6\), \(\sigma=6.6\) \\ \hline
**Time Period** & Sept-2016 to April-2020 & Jan-2017 to May-2020 & Jan-2014 to Aug-2017 \\ \hline \end{tabular}
\end{table}
Table 1: Characteristics of large-scale retail datasets.
demand for 12 weeks. In our experiments, we use seasonal climate predictions from ECMWF S5 seasonal forecast system that contains 50 ensembles for each climate attribute such as temperature (min, max, avg.) and precipitation up to six months in the future [16].

The results are reported in terms of average mean absolute percentage error (MAPE), and average root mean squared error (RMSE). Results are generated on 12-week prediction intervals. The error metrics are computed at a finer granularity of 4 weeks and on the whole 12-week prediction intervals. Decomposing the error analysis helps with understanding the influence of the seasonal-scale climate predictions. While reporting comparative results for these three datasets, we show experiments with (1) latent representation learning using sub-neural networks (LRL-SNN), and (2) Temporal Fusion Transformer [14] with and without climate predictions.

**Experimental Settings:** Table 2 shows model parameters and algorithm settings for TFT and LRL-SNN used in our experiments. As mentioned above, ECMWF provides, for each location, 50 measures: temperatures (min, max, and average) and precipitation. For each of these ensembles, we extract a set of derived features such as mean and standard deviation to represent the uncertainty. For LRL-SNN, the last layers of the climate encoders for mean (\(\mu_{d}\)) and standard deviation (\(\sigma_{d}\)) differ depending on the dataset. For Favorita, the values of \(\mu_{d}\) are [32, 16, 16, 16] for \(\mathbf{T}_{\mathrm{avg}}\), \(\mathbf{T}_{\mathrm{min}}\), \(\mathbf{T}_{\mathrm{max}}\) and \(\mathbf{P}_{\mathrm{avg}}\) (precipitation) respectively. Values of \(\sigma_{d}\) are [16, 8, 8, 8] for \(\sigma(\mathbf{T}_{\mathrm{avg}})\), \(\sigma(\mathbf{T}_{\mathrm{min}})\), \(\sigma(\mathbf{T}_{\mathrm{max}})\) and \(\sigma(\mathbf{P}_{\mathrm{avg}})\). Similarly, for Apparel Retail dataset, values of \(\mu_{d}\) are [32, 16, 16] for \(\mathbf{T}_{\mathrm{avg}}\), \(\mathbf{T}_{\mathrm{min}}\), \(\mathbf{T}_{\mathrm{max}}\) and \(\sigma_{d}\) are [16, 8, 8] for \(\sigma(\mathbf{T}_{\mathrm{avg}})\), \(\sigma(\mathbf{T}_{\mathrm{min}})\), \(\sigma(\mathbf{T}_{\mathrm{max}})\). Finally, for Agar Apparel retail dataset, values of \(\mu_{d}\) are [250, 100, 100] for \(\mathbf{T}_{\mathrm{avg}}\), \(\mathbf{T}_{\mathrm{min}}\), \(\mathbf{T}_{\mathrm{max}}\).

### Favorita Grocery Retail Dataset

We evaluate our models and compare them against one of the state-of-the-art approaches--Temporal Fusion Transformer (TFT) [14]. The comparative results are reported in Table 3. We use log-transformed of sales quantity (cf. Table 1) as a target variable similar to [14]. Irrespective of the models, we see a substantial improvement when we incorporate seasonal climate predictions for retail demand forecasting. We show overall error reduction of 12.85% and 6.47% in MAPE for (LRL-SNN + Climate) and (TFT + Climate) over the non-climate models respectively. Furthermore, compared to TFT, our

\begin{table}
\begin{tabular}{|l|c|c|c|c|c|c|} \hline \multirow{2}{*}{**Parameters**} & \multicolumn{2}{c|}{**Favorita Grocery Retail**} & \multicolumn{2}{c|}{**Apparel Retail**} & \multicolumn{2}{c|}{**Gear Apparel Retail**} \\ \cline{2-7}  & **TFT** & **LRL-SNN** & **TFT** & **LRL-SNN** & **TFT** & **LRL-SNN** \\ \hline \hline
**Dropout Rate** & 0.1 & 0.2 & 0.1 & 0.2 & 0.1 & 0.2 \\ \hline
**Concatenated FFN** & [240] & [200, 1000] & [160] & [2000, 1000] & [160] & [2000, 1000] \\
**TSFN** & - & [2000, 1000, 240] & - & [2000, 1000, 200] & - & [5000, 2500, 1000, 500] \\
**Climate Encoder (mean)** & - & [512, 256, 128, 64, X] & - & [512, 256, 128, 64, X] & - & [5000, 2500, 1000, X] \\
**Climate Encoder (std)** & - & [512, 256, 128, 64, Y] & - & [512, 256, 128, 64, Y] & - & - \\ \hline
**Millbatch Size** & 128 & 32 & 64 & 16 & 64 & 16 \\ \hline
**Learning Rate** & 0.001 & 0.001 & 0.001 & 0.001 & 0.001 & 0.01 \\ \hline
**Window size (\(k\))** & 12 & 12 & 12 & 12 & 12 & 12 \\ \hline
**Prediction interval (\(\tau\))** & 12 & 12 & 12 & 12 & 12 & 12 \\ \hline
**Number of epochs** & 100 & 100 & 100 & 100 & 100 & 100 \\ \hline \end{tabular}
\end{table}
Table 2: Model Configuration Parameters. X and Y denote the last layer size of Temporal Encoders
proposed approach (LRL-SNN + Climate) provides a significant improvement over both the error metrics such as averaged RMSE and averaged MAPE. We can infer from these experimental results that learning a set of temporal encoders based on the levels of data difficulty can consistently outperform transformer-based climate encoding architectures such as TFT.

### Large-scale Industry Datasets (India and USA)

We next evaluate our approach of seasonal-scale climate encoding using temporal encoders by performing a set of experiments on first-of-its-kind large-scale retail industry datasets--i.e., Apparel Retail and Gear Apparel Retail datasets from India and USA, respectively. These datasets have a wide range of retail stores distributed across the geographies with high spatio-temporal climate variability.

#### Apparel Retail Dataset (India)

The Apparel Retail dataset contains mostly retail products such as jacket, sweater, jeans, and so forth across multiple cities in India. Table 4 compares climate-aware demand forecasting error metrics with those of TFT. As can be seen, incorporating climate forecasts as a part of latent representation improves the results significantly for both the error metrics and for TFT and LRL-SNN. Results for LRL-SNN remain competitive, and the use of climate brings the errors lower than the level achieved by TFT. Moreover, the TFT architecture appears to be able to model spatio-temporal climate variability better with the help of LSTM-based encoder-decoder architecture and temporal attention mechanism; such a foreknowledge can especially be helpful in contexts (e.g., India) where the wide variability in time and space occur.

The Gear Apparel Retail dataset includes a large portion of items used for seasonal outdoor sports (e.g., winter jackets and ruggedized bottles for hiking) which are sold across the United States of America (including Alaska). As such, there are significant climate variability from region to region. The goal is to determine if encoded forecast

\begin{table}
\begin{tabular}{|l|c|c|c|c|c|c||c|c|} \hline \multirow{2}{*}{**Algorithms**} & \multicolumn{2}{c|}{**week 1-4**} & \multicolumn{2}{c|}{**week 5-8**} & \multicolumn{2}{c||}{**week 9-12**} & \multicolumn{2}{c|}{**Overall**} \\ \cline{2-9}  & **RMSE** & **MAPE** & **RMSE** & **MAPE** & **RMSE** & **MAPE** & **RMSE** & **MAPE** \\ \hline \hline
**TFT** & 18.40 & 1.44 & 21.93 & 4.39 & 24.36 & 6.57 & 23.82 & 4.01 \\ \hline
**TFT + Climate** & **17.00** & 1.29 & **20.07** & **4.05** & **22.24** & **6.04** & **21.70** & **3.69** \\ \hline
**LRL-SNN** & 20.28 & 1.26 & 31.55 & 4.56 & 39.17 & 8.37 & 33.17 & 4.58 \\ \hline
**LRL-SNN + Climate** & 17.15 & **1.11** & 25.37 & 4.09 & 30.87 & 6.66 & 26.62 & 3.83 \\ \hline \end{tabular}
\end{table}
Table 4: Results on large-scale retail industry dataset - Apparel Retail.

\begin{table}
\begin{tabular}{|l|c|c|c|c|c|c||c|c|} \hline \multirow{2}{*}{**Algorithms**} & \multicolumn{2}{c|}{**week 1-4**} & \multicolumn{2}{c|}{**week 5-8**} & \multicolumn{2}{c||}{**week 9-12**} & \multicolumn{2}{c|}{**Overall**} \\ \cline{2-9}  & **RMSE** & **MAPE** & **RMSE** & **MAPE** & **RMSE** & **MAPE** & **RMSE** & **MAPE** \\ \hline \hline
**TFT** & 0.98 & 0.35 & 1.03 & 0.18 & 0.89 & 0.17 & 1.07 & 0.25 \\ \hline
**TFT + Climate** & 0.87 & 0.32 & 0.92 & **0.17** & **0.74** & **0.16** & 0.93 & 0.23 \\ \hline
**LRL-SNN** & 0.70 & 0.22 & 0.91 & 0.19 & 0.89 & 0.21 & 0.89 & 0.22 \\ \hline
**LRL-SNN + Climate** & **0.64** & **0.19** & **0.87** & **0.17** & 0.85 & 0.18 & **0.85** & **0.19** \\ \hline \end{tabular}
\end{table}
Table 3: Results of the proposed approach on Grocery retail dataset - Favorita.
data in demand models are able to capture the impacts that climate has on sales-impacts like early winters, a late summer, or an extended autumn period. Tables 5, 6 and 7 show the comparative error metrics for distribution centers (DC), stores and both combined respectively across all of the regions in the USA. Overall, climate-aware models such as TFT + Climate and LRL-SNN + Climate tend to have lower errors than climate-agnostic models across DCs and stores. Climate-encoding using LRL-SNN shows significant improvements compared to TFT and TFT + Climate for store-level retail demand forecasting. Whereas TFT + Climate outperforms as compared to other models for DCs.

### Ablation Study

In any climate-aware demand forecasting, we believe that efficiently encoding seasonal climate prediction can further reduce errors. In Table 8, we show that adding seasonal climate predictions in TFT [14] and LRL-SNN helps in reducing, on average, MAPE by about 17% to 21% and RMSE by about 8% and 14%. One can note that Mean Absolute Error (MAE) for Gear Apparel Retail (Store and Combined) has a negative percentage reduction for TFT + Climate. However, this is expected as gear apparel sales are affected by seasonality, and MAE is significantly affected by low numbers. Thus, in this context, RMSE would be the appropriate error metric. This observation evidenced across three geographically distinct datasets attest that explicitly encoding forecasted seasonal climate leads to improved predictions for regional store purchases.

Furthermore, we compare quantitative and qualitative metrics on the Favorita dataset to show the effectiveness of climate-aware forecasting. Fig. 4(a) compares the quantitative errors product-category wise obtained by our framework, with those of [14]

\begin{table}
\begin{tabular}{|l|c|c|c|c|c|c||c|c|} \hline \multirow{2}{*}{**Algorithms**} & \multicolumn{2}{c|}{**week 1-4**} & \multicolumn{2}{c|}{**week 5-8**} & \multicolumn{2}{c||}{**week 9-12**} & \multicolumn{2}{c|}{**Overall**} \\ \cline{2-9}  & **RMSE** & **MAPE** & **RMSE** & **MAPE** & **RMSE** & **MAPE** & **RMSE** & **MAPE** \\ \hline \hline
**TFT** & 6.51 & 1.09 & 7.77 & 1.49 & 8.68 & 1.91 & 9.10 & 1.48 \\ \hline
**TFT + Climate** & 6.99 & 1.02 & 7.36 & 1.19 & **7.48** & **1.30** & 7.93 & 1.16 \\ \hline
**LRL-SNN** & **5.41** & **0.68** & **6.95** & 1.06 & 8.07 & 1.43 & 7.63 & 1.04 \\ \hline
**LRL-SNN + Climate** & 5.55 & **0.68** & 6.97 & **1.02** & 7.86 & 1.34 & **7.61** & **1.00** \\ \hline \end{tabular}
\end{table}
Table 6: Results on Gear Apparel Retail dataset for Stores.

\begin{table}
\begin{tabular}{|l|c|c|c|c|c|c||c|c|} \hline \multirow{2}{*}{**Algorithms**} & \multicolumn{2}{c|}{**week 1-4**} & \multicolumn{2}{c|}{**week 5-8**} & \multicolumn{2}{c||}{**week 9-12**} & \multicolumn{2}{c|}{**Overall**} \\ \cline{2-9}  & **RMSE** & **MAPE** & **RMSE** & **MAPE** & **RMSE** & **MAPE** & **RMSE** & **MAPE** \\ \hline \hline
**TFT** & 15.39 & 1.13 & 16.02 & 1.55 & 16.80 & 2.01 & 20.89 & 1.55 \\ \hline
**TFT + Climate** & 15.28 & 1.02 & **15.38** & 1.23 & **15.63** & **1.37** & **19.50** & 1.20 \\ \hline
**LRL-SNN** & 14.58 & 0.78 & 17.88 & 1.59 & 19.93 & 2.22 & 21.62 & 1.50 \\ \hline
**LRL-SNN + Climate** & **14.71** & **0.76** & 16.51 & **1.20** & 17.75 & 1.62 & 20.68 & **1.18** \\ \hline \end{tabular}
\end{table}
Table 7: Results on Gear Apparel Retail dataset for stores and DCs both combined.

\begin{table}
\begin{tabular}{|l|c|c|c|c|c|c||c|c|} \hline \multirow{2}{*}{**Algorithms**} & \multicolumn{2}{c|}{**week 1-4**} & \multicolumn{2}{c|}{**week 5-8**} & \multicolumn{2}{c||}{**week 9-12**} & \multicolumn{2}{c|}{**Overall**} \\ \cline{2-9}  & **RMSE** & **MAPE** & **RMSE** & **MAPE** & **RMSE** & **MAPE** & **RMSE** & **MAPE** \\ \hline \hline
**TFT** & 94.19 & 1.43 & 89.20 & 2.12 & 88.87 & 2.89 & 125.56 & 2.12 \\ \hline
**TFT + Climate** & **88.88** & **1.05** & **86.52** & **1.59** & **87.94** & **2.01** & **122.12** & **1.52** \\ \hline
**LRL-SNN** & 95.91 & 1.63 & 114.82 & 6.32 & 125.12 & 9.30 & 145.71 & 5.62 \\ \hline
**LRL-SNN + Climate** & 95.94 & 1.52 & 101.14 & 2.79 & 105.53 & 4.11 & 136.63 & 2.74 \\ \hline \end{tabular}
\end{table}
Table 5: Results on Gear Apparel Retail dataset for DCs.
whereas Fig. 4 qualitatively compares the product-category wise effectiveness of climate-aware forecasting with seasonal climate prediction as compared to non-climate model using LRL-SNN. The qualitative metric measures the percentage of scenarios (i.e., product and region combinations) in which the climate-aware model performs better or equal to the climate-agnostic one. We label _Tie_ to show that the climate-aware model outperforms for one error metric but not the other.

## Conclusion

Demand forecasting is a well-studied problem in the time-series domain. In climate-aware demand forecasting scenarios, existing methods do not consider the seasonal climate predictions due to the complexities such as noise, time-series data with different temporal frequencies, and spatio-temporal correlations associated with the climate predictions. In this work, we addressed the problem of seasonal climate-aware demand forecasting by effectively learning joint latent representations of climate predictions, historical observations (e.g., sales figures), and known inputs (e.g., holidays) using a sub-neural network architecture. This way of modeling different types of time-series

Figure 4: (a) Comparative quantitative evaluation (MAPE) on Favorita dataset. (b) Qualitative analysis using LRL-SSN (refer to Sec. ) for details.

\begin{table}
\begin{tabular}{|l|c|c|c|c|c|c|} \hline \multirow{2}{*}{**Datasets**} & \multicolumn{2}{c|}{**LRL-SNN + Climate**} & \multicolumn{2}{c|}{**TFT + Climate**} \\ \cline{2-7}  & **MAPE** & **RMSE** & **MAE** & **MAPE** & **RMSE** & **MAE** \\ \hline \hline
**Grocery Retail - Favorita** & 12.85 & 4.71 & 7.04 & 6.47 & 13.34 & 12.00 \\ \hline
**Apparel Retail** & 16.54 & 19.76 & 20.01 & 8.07 & 8.91 & 9.01 \\ \hline
**Gear Apparel Retail - Store** & 4.03 & 0.24 & 0.33 & 21.5 & 12.81 & -3.5 \\ \hline
**Gear Apparel Retail - DC** & 51.14 & 6.23 & 12.97 & 28.14 & 2.74 & 1.91 \\ \hline
**Gear Apparel Retail - Combined** & 21.86 & 4.33 & 8.25 & 22.42 & 6.68 & -0.57 \\ \hline \end{tabular}
\end{table}
Table 8: Comparative error reduction (%) using climate-aware models.
data and learning joint latent representation enables a higher degree of flexibility in climate-aware demand prediction tasks. The extensive experiments we have performed indicate that the latent representation of seasonal climate predictions leads to enhanced demand forecasting, thus paving the way for improvement in pre-season planning and demand management for supply chain functions.

Given that we have only considered seasonal climate predictions in our current work, we aim to enrich relevant data sources for predictions in our future work; such sources will include incorporating high-impact lag and derived climate forecast features. Moreover, we will design methods to propagate uncertainty from ensemble forecasts to demand predictions and quantify the associated uncertainty at various granularities.
