# Encoding Seasonal Climate Predictions for Demand Forecasting with Modular
Neural Network

Smit Marvaniya111At the time of this work, Smit was with IBM Research - India.
Linkedin  Jitendra Singh  IBM Research  Nicolas Galichet  IBM Research  Fred
Ochieng Otieno  IBM Research  Geeth De Mel  IBM Research  Kommy Weldemariam
IBM Research

###### 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.

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.

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 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. Latent representation
learning using sub-neural networks (LRL-SNN) and Sec. Transformer-based
climate encoding) 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, 22, 24]. 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, 39, 14].

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.

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.

## 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}_{\mathrm{m}}$) and store combination. In this paper,
store ($\mathrm{s}_{\mathrm{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}_{\mathrm{n}},\mathrm{p}_{\mathrm{m}},\mathrm{t},\tau,{q})=&\\\
\mathbf{f}^{\mathrm{pred}}({q},\mathbf{y}_{\mathrm{t-k}:\mathrm{t}},\mathbf{X}^{\mathrm{o}}_{\mathrm{i},\mathrm{t-k}:\mathrm{t}},\mathbf{X}^{\mathrm{k}}_{\mathrm{i},\mathrm{t-k}:\mathrm{t}+\tau},\mathbf{X}^{\mathrm{c}}_{\mathrm{i},\mathrm{t-k}:\mathrm{t}+\tau})\end{split}$
(1)

where $\mathbf{X}^{\mathrm{o}}_{\mathrm{i}}$ is a set of historical
observations (e.g. sales data), $\mathbf{X}^{\mathrm{k}}_{\mathrm{i}}$ is a
set of known inputs (e.g. holidays), $\mathbf{X}^{\mathrm{c}}_{\mathrm{i}}$ 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}_{\mathrm{n}},\mathrm{p}_{\mathrm{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.

### 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}})$ (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_{\mathrm{l}})$, we have the following
successions, from time series data to prediction:

$\displaystyle\forall l\in\\{\mathrm{o},\mathrm{c},\mathrm{k}\\},\forall
i\in\mathbf{I}^{l},\mathrm{d}(\mathrm{l},\mathrm{i},\tau_{\mathrm{l}})$
$\displaystyle=$
$\displaystyle\mathbf{w}_{\mathrm{diff}}(\mathrm{w}(\mathrm{l},\mathrm{i},\tau_{l}))$
(3) $\displaystyle\forall l\in\\{\mathrm{o},\mathrm{c},\mathrm{k}\\},\forall
i\in\mathbf{I}^{\mathrm{l}},\mathbf{V}(\mathrm{l},\mathrm{i},\tau_{\mathrm{l}})$
$\displaystyle=$
$\displaystyle\mathbf{w}_{\mathrm{norm}}(\mathrm{d}(\mathrm{l},\mathrm{i},\tau_{\mathrm{l}}))$
(4) $\displaystyle\forall l\in\\{\mathrm{o},\mathrm{c},\mathrm{k}\\},\forall
i\in\mathbf{I}^{l},\mathbf{h}_{\mathrm{i}}^{\mathrm{l}}$ $\displaystyle=$
$\displaystyle\mathbf{TE}^{\mathrm{l}}_{\mathrm{i}}(\mathbf{V}(\mathbf{l},\mathbf{i},\mathbf{\tau}_{\mathrm{l}}))$
(5) $\displaystyle\mathbf{H}$ $\displaystyle=$
$\displaystyle\bigplus_{i\in\mathbf{I}^{\mathrm{o}}}\mathbf{h}_{i}^{\mathrm{o}}+\bigplus_{i\in\mathbf{I}^{\mathrm{c}}}\mathbf{h}_{i}^{\mathrm{c}}+\bigplus_{i\in\mathbf{I}^{\mathrm{k}}}\mathbf{h}_{i}^{\mathrm{k}}$
(6) $\displaystyle\mathbf{P}$ $\displaystyle=$
$\displaystyle\mathbf{Dense}(\mathbf{H})$ (7) $\displaystyle\mathbf{Q}$
$\displaystyle=$ $\displaystyle\mathbf{InvNorm}(\mathbf{P})$ (8)
$\displaystyle\hat{\mathbf{y}}$ $\displaystyle=$
$\displaystyle\mathbf{InvDiff}(\mathbf{Q})$ (9)

with $\bigplus$ being the concatenation of vectors,
$\mathbf{TE}^{\mathrm{l}}_{\mathrm{i}}$ the temporal encoders and
$\mathbf{Dense}$ the activation function of the last layer of the shared
feedforward neural network (cf. Fig 3). The temporal encoders (TE) as shown in
Fig. 2 (b) are each associated with a specified feature and could be neural
networks (feedforward, convolutional or recursive) or simple concatenations.
The architecture design allows for significant flexibility in the choice of
the TE and their learning capabilities. In contrast to other methods from the
literature, a different TE could be used for each feature, which enables the
use of, for instance, climate predictions with different temporal frequencies,
variable window sizes and time horizon—e.g., frequencies related to extreme
events would be shorter than for regular climate predictions, one feature
could be placed in 3 or 6 month ahead windows, and a data source could cover
one month and another one a year.

Such a modular neural network can deal with different noise levels in the
input by learning compact latent representations using multiple temporal
encoders from the seasonal-scale climate predictions such as temperature (min,
max, avg) and precipitation. It is important to note that the differences in
data sets, feature types, and data quality require varying model complexity
levels (e.g., difficulty can differ with data size).

Figure 3: An illustration our proposed uncertainty-aware latent representation
learning using sub-neural networks (left) and Climate Encoders (right).

### Transformer-based climate encoding

Recently, transformer-based approaches [14, 38] have gained significant
interest from the time-series forecasting community as they leverage different
attention mechanisms such as self-attention, temporal attention, and so forth
to efficiently model sequence data. We use the state-of-the-art Temporal
Fusion Transformer (TFT) [14] technique for time series forecasting (e.g.
sales) with the addition of climatic ($\mathbf{X}^{\mathrm{c}}_{\mathrm{i}}$)
and non-climatic data ($\mathbf{X}^{\mathrm{k}}_{\mathrm{i}}$). The TFT
architecture is an attention-based deep neural network architecture that
captures short-term and long-term temporal relationships. These time-dependent
inputs are learnt using LSTM based encoder-decoder architecture. The global
architecture (cf. [14] for details) notably include variable selection
networks ($\mathbf{f}^{\mathrm{vsn}}$) for selecting relevant features, LSTM-
based encoder for historical time series data, LSTM-based decoder for known
inputs (e.g. climate forecasts, day of the week, and so forth), and finally a
multi-head attention layer (termed transformer [42],
$\mathbf{T}^{\mathrm{att}}$) to learn relevant time relationships across
historical and known time series. Formally (see [14] for Gated Residual
Network (GRN)), and reusing notations from Sec. Latent representation learning
using sub-neural networks (LRL-SNN), we have for TFT [14]:

$\displaystyle\mathbf{h}^{\mathrm{o}}_{\mathrm{i}}$ $\displaystyle=$
$\displaystyle\mathbf{LSTM}^{\mathrm{encoder}}(\mathbf{f}^{\mathrm{vsn}}(\mathbf{X}^{\mathbf{o}}_{\mathrm{i}}))$
(10) $\displaystyle\mathbf{h}^{\mathrm{kc}}_{\mathrm{i}}$ $\displaystyle=$
$\displaystyle\mathbf{LSTM}^{\mathrm{decoder}}(\mathbf{h}^{\mathrm{o}}_{\mathrm{i}},\mathbf{f}^{vsn}(\mathbf{X}^{\mathrm{k}}_{\mathrm{i}},\mathbf{X}^{\mathrm{c}}_{\mathrm{i}}))$
(11) $\displaystyle\hat{\mathbf{y}}$ $\displaystyle=$
$\displaystyle\mathbf{\mathbf{Dense}}(\mathbf{T}^{\mathrm{att}}(\mathbf{GRN}(\mathbf{h}^{\mathrm{o}}_{\mathrm{i}}),\mathbf{GRN}(\mathbf{h}^{\mathrm{kc}}_{\mathrm{i}})))$
(12)

In Eq. 11, and contrary to LRL-SNN, known and climate inputs are considered
equally and their representation is learned through a shared LSTM-based
decoder. This way of learning latent representation helps in capturing short-
term and long-term dependencies 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 Corporción 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: Characteristics of large-scale retail datasets.

|  | Gear Apparel Retail
---
| Apparel Retail
---
| Favorita Grocery Retail
---
Target | Unit Sales | Unit Sales |  $\log($ Unit Sales $)$
Geography | USA | India | Ecuador
#Features | 6 | 14 | 23
#Unique Time-series | 180 | 594 | 645
#Train Samples |  $\sim$18k |  $\sim$52k |  $\sim$79k
#Dev Samples |  $\sim$4.5k |  $\sim$12k |  $\sim$19k
#Test Samples |  $\sim$14k |  $\sim$42k |  $\sim$61k
Temperature max (${}^{\circ}C$) |  |  $\mu=18.4$, $\sigma=8.3$
---
|  $\mu=33.4$, $\sigma=8.2$
---
|  $\mu=21.0$, $\sigma=5.3$
---
Temperature avg (${}^{\circ}C$) |  |  $\mu=13.7$, $\sigma=7.7$
---
|  $\mu=27.8$, $\sigma=7.6$
---
|  $\mu=17.8$, $\sigma=5.9$
---
Temperature min (${}^{\circ}C$) |  |  $\mu=8.8$, $\sigma=7.5$
---
|  $\mu=22.3$, $\sigma=7.6$
---
|  $\mu=14.6$, $\sigma=6.6$
---
Time Period |  | Sept-2016 to April-2020
---
| Jan-2017 to May-2020
---
| Jan-2014 to Aug-2017
---

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 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 Gear Apparel retail dataset,
values of $\mu_{d}$ are [250, 100, 100] for $\mathbf{T}_{\mathrm{avg}}$,
$\mathbf{T}_{\mathrm{min}}$, $\mathbf{T}_{\mathrm{max}}$.

Table 2: Model Configuration Parameters. X and Y denote the last layer size of
Temporal Encoders

Parameters | Favorita Grocery Retail | Apparel Retail | Gear Apparel Retail
---|---|---|---
TFT | LRL-SNN | TFT | LRL-SNN | TFT | LRL-SNN
Dropout Rate | 0.1 | 0.2 | 0.1 | 0.2 | 0.1 | 0.2
Concatenated FFN | [240] | [2000, 1000] | [160] | [2000, 1000] | [160] | [2000, 1000]
TS FFN | - | [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] | - | -
Minibatch Size | 128 | 32 | 64 | 16 | 64 | 16
Learning Rate | 0.001 | 0.001 | 0.001 | 0.01 | 0.001 | 0.01
Window size ($k$) | 12 | 12 | 12 | 12 | 12 | 12
Prediction interval ($\tau$) | 12 | 12 | 12 | 12 | 12 | 12
Number of epochs | 100 | 100 | 100 | 100 | 100 | 100

### 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 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.

Table 3: Results of the proposed approach on Grocery retail dataset -
Favorita.

Algorithms | week 1-4 | week 5-8 | week 9-12 | Overall
---|---|---|---|---
RMSE | MAPE | RMSE | MAPE | RMSE | MAPE | RMSE | MAPE
TFT | 0.98 | 0.35 | 1.03 | 0.18 | 0.89 | 0.17 | 1.07 | 0.25
TFT + Climate | 0.87 | 0.32 | 0.92 | 0.17 | 0.74 | 0.16 | 0.93 | 0.23
LRL-SNN | 0.70 | 0.22 | 0.91 | 0.19 | 0.89 | 0.21 | 0.89 | 0.22
LRL-SNN + Climate | 0.64 | 0.19 | 0.87 | 0.17 | 0.85 | 0.18 | 0.85 | 0.19

### 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.

Table 4: Results on large-scale retail industry dataset - Apparel Retail.

Algorithms | week 1-4 | week 5-8 | week 9-12 | Overall
---|---|---|---|---
RMSE | MAPE | RMSE | MAPE | RMSE | MAPE | RMSE | MAPE
TFT | 18.40 | 1.44 | 21.93 | 4.39 | 24.36 | 6.57 | 23.82 | 4.01
TFT + Climate | 17.00 | 1.29 | 20.07 | 4.05 | 22.24 | 6.04 | 21.70 | 3.69
LRL-SNN | 20.28 | 1.26 | 31.55 | 4.56 | 39.17 | 8.37 | 33.17 | 4.58
LRL-SNN + Climate | 17.15 | 1.11 | 25.37 | 4.09 | 30.87 | 6.66 | 26.62 | 3.83

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 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.

Table 5: Results on Gear Apparel Retail dataset for DCs.

Algorithms | week 1-4 | week 5-8 | week 9-12 | Overall
---|---|---|---|---
RMSE | MAPE | RMSE | MAPE | RMSE | MAPE | RMSE | MAPE
TFT | 94.19 | 1.43 | 89.20 | 2.12 | 88.87 | 2.89 | 125.56 | 2.12
TFT + Climate | 88.88 | 1.05 | 86.52 | 1.59 | 87.94 | 2.01 | 122.12 | 1.52
LRL-SNN | 95.91 | 1.63 | 114.82 | 6.32 | 125.12 | 9.30 | 145.71 | 5.62
LRL-SNN + Climate | 95.94 | 1.52 | 101.14 | 2.79 | 105.53 | 4.11 | 136.63 | 2.74

Table 6: Results on Gear Apparel Retail dataset for Stores.

Algorithms | week 1-4 | week 5-8 | week 9-12 | Overall
---|---|---|---|---
RMSE | MAPE | RMSE | MAPE | RMSE | MAPE | RMSE | MAPE
TFT | 6.51 | 1.09 | 7.77 | 1.49 | 8.68 | 1.91 | 9.10 | 1.48
TFT + Climate | 6.99 | 1.02 | 7.36 | 1.19 | 7.48 | 1.30 | 7.93 | 1.16
LRL-SNN | 5.41 | 0.68 | 6.95 | 1.06 | 8.07 | 1.43 | 7.63 | 1.04
LRL-SNN + Climate | 5.55 | 0.68 | 6.97 | 1.02 | 7.86 | 1.34 | 7.61 | 1.00

Table 7: Results on Gear Apparel Retail dataset for stores and DCs both
combined.

Algorithms | week 1-4 | week 5-8 | week 9-12 | Overall
---|---|---|---|---
RMSE | MAPE | RMSE | MAPE | RMSE | MAPE | RMSE | MAPE
TFT | 15.39 | 1.13 | 16.02 | 1.55 | 16.80 | 2.01 | 20.89 | 1.55
TFT + Climate | 15.28 | 1.02 | 15.38 | 1.23 | 15.63 | 1.37 | 19.50 | 1.20
LRL-SNN | 14.58 | 0.78 | 17.88 | 1.59 | 19.93 | 2.22 | 21.62 | 1.50
LRL-SNN + Climate | 14.71 | 0.76 | 16.51 | 1.20 | 17.75 | 1.62 | 20.68 | 1.18

### 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.

Table 8: Comparative error reduction (%) using climate-aware models.

Datasets | LRL-SNN + Climate | TFT + Climate
---|---|---
MAPE | RMSE | MAE | MAPE | RMSE | MAE
Grocery Retail - Favorita | 12.85 | 4.71 | 7.04 | 6.47 | 13.34 | 12.00
Apparel Retail | 16.54 | 19.76 | 20.01 | 8.07 | 8.91 | 9.01
Gear Apparel Retail - Store | 4.03 | 0.24 | 0.33 | 21.5 | 12.81 | -3.5
Gear Apparel Retail - DC | 51.14 | 6.23 | 12.97 | 28.14 | 2.74 | 1.91
Gear Apparel Retail - Combined | 21.86 | 4.33 | 8.25 | 22.42 | 6.68 | -0.57

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

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] whereas Fig. 4(b) 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 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.

## References

  * [1] Thanos Papadopoulos et al.  “The role of Big Data in explaining disaster resilience in supply chains for sustainability”  In _Journal of Cleaner Production_ Elsevier, 2017
  * [2] Zhaohui Wu and Mark Pagell  “Balancing priorities: Decision-making in sustainable supply chain management”  In _Journal of operations management_ Elsevier, 2011
  * [3] Joos-Hendrik Böse et al.  “Probabilistic demand forecasting at scale”  In _Proceedings of the VLDB Endowment_ VLDB Endowment, 2017
  * [4] Tsan-Ming Choi  “Pre-season stocking and pricing decisions for fashion retailers with multiple information updating”  In _International journal of production economics_ Elsevier, 2007
  * [5] Tanveer Ahmad and Huanxin Chen  “Utility companies strategy for short-term energy demand forecasting using machine learning based models”  In _Sustainable cities and society_ Elsevier, 2018
  * [6] Huaizhi Wang et al.  “A review of deep learning for renewable energy forecasting”  In _Energy Conversion and Management_ Elsevier, 2019
  * [7] Chen-Fu Chien, Runliang Dou and Wenhan Fu  “Strategic capacity planning for smart production: Decision modeling under demand uncertainty”  In _Applied Soft Computing_ Elsevier, 2018
  * [8] Gylian Verstraete, El-Houssaine Aghezzaf and Bram Desmet  “A data-driven framework for predicting weather impact on high-volume low-margin retail products”  In _Journal of Retailing and Consumer Services_ Elsevier, 2019
  * [9] Florian Badorf and Kai Hoberg  “The impact of daily weather on retail sales: An empirical study in brick-and-mortar stores”  In _Journal of Retailing and Consumer Services_ , 2020
  * [10] NRF National Retail Federation  “RETAIL CASE STUDY”, https://nrf.com/sites/default/files/2018-10/Weather%20Myths%20Report.pdf
  * [11] Sebastian Steinker, Kai Hoberg and Ulrich W Thonemann  “The value of weather information for e-commerce operations”  In _Production and Operations Management_ Wiley Online Library, 2017
  * [12] Alberto Troccoli  “Seasonal climate forecasting”  In _Meteorological Applications_ 17.3 Wiley Online Library, 2010, pp. 251–268
  * [13] Adam A Scaife and Doug Smith  “A signal-to-noise paradox in climate science”  In _Climate and Atmospheric Science_ , 2018
  * [14] Bryan Lim, Nicolas Loeff, Sercan Arik and Tomas Pfister  “Temporal fusion transformers for interpretable multi-horizon time series forecasting”  In _International Journal of Forecasting_ , 2021
  * [15] David Salinas, Valentin Flunkert, Jan Gasthaus and Tim Januschowski  “DeepAR: Probabilistic forecasting with autoregressive recurrent networks”  In _International Journal of Forecasting_ Elsevier, 2020
  * [16] Franco Molteni, Roberto Buizza, Tim N Palmer and Thomas Petroliagis  “The ECMWF ensemble prediction system: Methodology and validation”  In _Quarterly journal of the royal meteorological society_ Wiley Online Library, 1996
  * [17] Manfred Mudelsee  “Trend analysis of climate time series: A review of methods”  In _Earth-Science Reviews_ , 2019
  * [18] Kyoung-jae Kim  “Financial time series forecasting using support vector machines”  In _Neurocomputing_ , 2003
  * [19] Mariana Oliveira and Luis Torgo  “Ensembles for Time Series Forecasting”  In _Proceedings of the Asian Conference on Machine Learning_ , 2015
  * [20] Vı́tor Cerqueira, Luı́s Torgo, Fábio Pinto and Carlos Soares  “Arbitrated ensemble for time series forecasting”  In _Machine Learning and Knowledge Discovery in Databases_ , 2017
  * [21] Wen Shen, Vahan Babushkin, Zeyar Aung and Wei Lee Woon  “An ensemble model for day-ahead electricity demand time series forecasting”  In _Proceedings of the International Conference on Future Energy Systems_ , 2013
  * [22] Rob J Hyndman, Anne Koehler, Keith Ord and Ralph Snyder  “Forecasting with exponential smoothing”  Springer-Verlag Berlin Heidelberg, 2008
  * [23] G… Box and G.. Jenkins  “Some Recent Advances in Forecasting and Control”  In _Journal of the Royal Statistical Society Series C_ , 1968
  * [24] Ayodele Ariyo Adebiyi, Aderemi Oluyinka Adewumi and Charles Korede Ayo  “Comparison of ARIMA and artificial neural networks models for stock price prediction”  In _Journal of Applied Mathematics_ Hindawi, 2014
  * [25] Tao Xiong, Chongguang Li and Yukun Bao  “Seasonal forecasting of agricultural commodity price using a hybrid STL and ELM method: Evidence from the vegetable market in China”  In _Neurocomputing_ , 2018
  * [26] Sean J Taylor and Benjamin Letham  “Forecasting at scale”  In _The American Statistician_ , 2018
  * [27] Bryan Lim and Stefan Zohren  “Time-series forecasting with deep learning: a survey”  In _Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences_ The Royal Society, 2021
  * [28] David Salinas et al.  “High-Dimensional Multivariate Forecasting with Low-Rank Gaussian Copula Processes”  In _Advances in neural information processing systems_ , 2019, pp. 7796–7805
  * [29] Nam Nguyen and Brian Quanz  “Temporal Latent Auto-Encoder: A Method for Probabilistic Multivariate Time Series Forecasting”  In _Proceedings of the AAAI Conference on Artificial Intelligence (AAAI)_ , 2021
  * [30] Shun-Yao Shih, Fan-Keng Sun and Hung-yi Lee  “Temporal pattern attention for multivariate time series forecasting”  In _Machine Learning_ Springer, 2019
  * [31] Youru Li et al.  “EA-LSTM: Evolutionary attention-based LSTM for time series prediction”  In _Knowledge-Based Systems_ Elsevier, 2019
  * [32] Shengdong Du, Tianrui Li, Yan Yang and Shi-Jinn Horng  “Multivariate time series forecasting via attention-based encoder–decoder framework”  In _Neurocomputing_ Elsevier, 2020
  * [33] Anastasia Borovykh, Sander Bohte and Cornelis W Oosterlee  “Conditional time series forecasting with convolutional neural networks”  In _arXiv preprint arXiv:1703.04691_ , 2017
  * [34] Anastasia Borovykh, Sander Bohte and Cornelis Oosterlee  “Dilated convolutional neural networks for time series forecasting”  In _Journal of Computational Finance, Forthcoming_ , 2018
  * [35] Shaojie Bai, J Zico Kolter and Vladlen Koltun  “An empirical evaluation of generic convolutional and recurrent networks for sequence modeling”  In _arXiv preprint arXiv:1803.01271_ , 2018
  * [36] Renzhuo Wan et al.  “Multivariate temporal convolutional network: A deep neural networks approach for multivariate time series forecasting”  In _Electronics_ Multidisciplinary Digital Publishing Institute, 2019
  * [37] Fazle Karim, Somshubra Majumdar, Houshang Darabi and Samuel Harford  “Multivariate LSTM-FCNs for time series classification”  In _Neural Networks_ Elsevier, 2019
  * [38] Neo Wu, Bradley Green, Xue Ben and Shawn O’Banion  “Deep transformer models for time series forecasting: The influenza prevalence case”  In _arXiv preprint arXiv:2001.08317_ , 2020
  * [39] Sifan Wu et al.  “Adversarial Sparse Transformer for Time Series Forecasting”  In _Advances in Neural Information Processing Systems_ , 2020  URL: https://proceedings.neurips.cc/paper/2020/file/c6b8c8d762da15fa8dbbdfb6baf9e260-Paper.pdf
  * [40] Vijay Ekambaram et al.  “Attention based Multi-Modal New Product Sales Time-series Forecasting”  In _Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery & Data Mining_, 2020
  * [41] Matthew Riemer et al.  “Correcting forecasts with multifactor neural attention”  In _Proceedings of the International Conference on Machine Learning_ , 2016
  * [42] Shiyang Li et al.  “Enhancing the Locality and Breaking the Memory Bottleneck of Transformer on Time Series Forecasting”  In _Advances in Neural Information Processing Systems_ , 2019
  * [43] Kaggle  “Corporación Favorita Grocery Sales Forecasting”, https://www.kaggle.com/c/Favorita-grocery-sales-forecasting/overview


* [4] G. Moore and N. Read, “Nonabelions in the fractional quantum hall effect,” Nuclear Physics B 360 no. 2-3, (1991) 362 – 396.
  * [5] Z. Wang, Topological Quantum Computation.  American Mathematical Society, 2008.
  * [6] M. Barkeshli and X.-G. Wen, “$u(1)\times u(1)\rtimes\mathbb{Z}_{2}$ chern-simons theory and $\mathbb{Z}_{4}$ parafermion fractional quantum hall states,” Physical Review B 81 no. 4, (2010) 045323, arXiv:0909.4882.
  * [7] H. Bombin, “Topological order with a twist: Ising anyons from an abelian model,” Phys. Rev. Lett. 105 (Jul, 2010) 030403, arXiv:1004.1838.
  * [8] A. Kitaev and L. Kong, “Models for gapped boundaries and domain walls,” Comm. Math. Phys. 313 no. 2, (2012) 351–373, arXiv:1104.5047.
  * [9] M. Barkeshli and X.-L. Qi, “Topological nematic states and non-abelian lattice dislocations,” Phys. Rev. X 2 (Aug, 2012) 031013, arXiv:1112.3311.
  * [10] D. J. Clarke, J. Alicea, and K. Shtengel, “Exotic non-abelian anyons from conventional fractional quantum hall states,” Nature Comm. 4 (2013) 1348, arXiv:1204.5479.
  * [11] M. Barkeshli, C.-M. Jian, and X.-L. Qi, “Twist defects and projective non-abelian braiding statistics,” Phys. Rev. B 87 (Jan, 2013) 045130, arXiv:1208.4834. https://link.aps.org/doi/10.1103/PhysRevB.87.045130.
  * [12] N. H. Lindner, E. Berg, G. Refael, and A. Stern, “Fractionalizing majorana fermions: Non-abelian statistics on the edges of abelian quantum hall states,” Phys. Rev. X 2 (Oct, 2012) 041002, arXiv:1204.5733.
  * [13] M. Cheng, “Superconducting proximity effect on the edge of fractional topological insulators,” Phys. Rev. B 86 (Nov, 2012) 195126, arXiv:1204.6084.
  * [14] Y.-Z. You and X.-G. Wen, “Projective non-abelian statistics of dislocation defects in a ${\mathbb{z}}_{N}$ rotor model,” Phys. Rev. B 86 (Oct, 2012) 161107.
  * [15] M. Barkeshli, C.-M. Jian, and X.-L. Qi, “Classification of topological defects in abelian topological states,” Phys. Rev. B 88 (Dec, 2013) 241103(R).
  * [16] M. Barkeshli, C.-M. Jian, and X.-L. Qi, “Theory of defects in abelian topological states,” Physical Review B 88 no. 23, (Dec, 2013) , arXiv:1305.7203.
  * [17] M. Barkeshli, P. Bonderson, M. Cheng, and Z. Wang, “Symmetry fractionalization, defects, and gauging of topological phases,” Phys. Rev. B 100 (Sep, 2019) 115147, arXiv:1410.4540.
  * [18] D. Barter, J. C. Bridgeman, and C. Jones, “Domain walls in topological phases and the brauer–picard ring for$\backslash$rm vec (z/p z) vec (z/p z),” Communications in Mathematical Physics 369 (2019) 1167–1185.
  * [19] A. Kapustin, “Topological field theory, higher categories, and their applications,” Proceedings of the International Congress of Mathematicians, Hyderabad, India (2010) , arXiv:1004.2307.
  * [20] C. L. Douglas and D. J. Reutter, “Fusion 2-categories and a state-sum invariant for 4-manifolds,” arXiv:1812.11933 [math.QA].
  * [21] D. Gaiotto, A. Kapustin, N. Seiberg, and B. Willett, “Generalized global symmetries,” arXiv:1412.5148.
  * [22] C. Cordova, T. T. Dumitrescu, K. Intriligator, and S.-H. Shao, “Snowmass white paper: Generalized symmetries in quantum field theory and beyond,” arXiv:2205.09545.
  * [23] X.-G. Wen, “Emergent anomalous higher symmetries from topological order and from dynamical electromagnetic field in condensed matter systems,” Phys. Rev. B 99 no. 20, (2019) 205139, arXiv:1812.02517 [cond-mat.str-el].
  * [24] J. McGreevy, “Generalized Symmetries in Condensed Matter,” arXiv:2204.03045 [cond-mat.str-el].
  * [25] P. Etingof, D. Nikshych, and V. Ostrik, “Fusion categories and homotopy theory,” Quantum Topology 1 (2010) 209–273, arXiv:0909.3140.
  * [26] L. Fidkowski, A. Vishwanath, and M. A. Metlitski, “Surface topological order and a new ’t hooft anomaly of interaction enabled 3+1d fermion spts,” arXiv:1804.08628 [cond-mat.str-el].
  * [27] M. Barkeshli and M. Cheng, “Time-reversal and spatial-reflection symmetry localization anomalies in (2+1)-dimensional topological phases of matter,” Phys. Rev. B 98 (Sep, 2018) 115129.
  * [28] A. Kapustin and R. Thorngren, “Higher symmetry and gapped phases of gauge theories,” arXiv:1309.4721 [hep-th].
  * [29] Y. Tachikawa, “On gauging finite subgroups,” SciPost Phys. 8 no. 1, (2020) 015, arXiv:1712.09542 [hep-th].
  * [30] C. Córdova, T. T. Dumitrescu, and K. Intriligator, “Exploring 2-Group Global Symmetries,” JHEP 02 (2019) 184, arXiv:1802.04790 [hep-th].
  * [31] F. Benini, C. Córdova, and P.-S. Hsin, “On 2-Group Global Symmetries and their Anomalies,” JHEP 03 (2019) 118, arXiv:1803.09336 [hep-th].
  * [32] P.-S. Hsin and A. Turzillo, “Symmetry-enriched quantum spin liquids in (3 + 1)$d$,” JHEP 09 (2020) 022, arXiv:1904.11550 [cond-mat.str-el].
  * [33] M. Barkeshli, Y.-A. Chen, S.-J. Huang, R. Kobayashi, N. Tantivasadakarn, and G. Zhu, “Codimension-2 defects and higher symmetries in (3+1)d topological phases,” SciPost Physics 14 no. 4, (2023) 065, arXiv:2208.07367.
  * [34] T. D. Brennan and C. Cordova, “Axions, higher-groups, and emergent symmetry,” JHEP 02 (2022) 145, arXiv:2011.09600 [hep-th].
  * [35] P.-S. Hsin and H. T. Lam, “Discrete theta angles, symmetries and anomalies,” SciPost Phys. 10 no. 2, (2021) 032, arXiv:2007.05915 [hep-th].
  * [36] P.-S. Hsin, W. Ji, and C.-M. Jian, “Exotic invertible phases with higher-group symmetries,” SciPost Phys. 12 no. 2, (2022) 052, arXiv:2105.09454 [cond-mat.str-el].
  * [37] F. Apruzzi, S. Schafer-Nameki, L. Bhardwaj, and J. Oh, “The Global Form of Flavor Symmetries and 2-Group Symmetries in 5d SCFTs,” SciPost Phys. 13 no. 2, (2022) 024, arXiv:2105.08724 [hep-th].
  * [38] F. Apruzzi, L. Bhardwaj, D. S. W. Gould, and S. Schafer-Nameki, “2-Group symmetries and their classification in 6d,” SciPost Phys. 12 no. 3, (2022) 098, arXiv:2110.14647 [hep-th].
  * [39] T. Bartsch, M. Bullimore, and A. Grigoletto, “Higher representations for extended operators,” arXiv:2304.03789 [hep-th].
  * [40] M. Barkeshli, Y.-A. Chen, P.-S. Hsin, and R. Kobayashi, “Higher-group symmetry in finite gauge theory and stabilizer codes,” arXiv:2211.11764 [cond-mat.str-el].
  * [41] L. Fidkowski and A. Kitaev, “Topological phases of fermions in one dimension,” Physical Review B 83 no. 7, (Feb, 2011) , arXiv:1008.4138. https://doi.org/10.1103%2Fphysrevb.83.075103.
  * [42] X. Chen, Z.-C. Gu, Z.-X. Liu, and X.-G. Wen, “Symmetry protected topological orders and the group cohomology of their symmetry group,” Phys. Rev. B 87 (Apr, 2013) 155114. https://link.aps.org/doi/10.1103/PhysRevB.87.155114.
  * [43] A. Kapustin, “Symmetry protected topological phases, anomalies, and cobordisms: Beyond group cohomology,” arXiv:1403.1467 [cond-mat.str-el].
  * [44] A. Kapustin, R. Thorngren, A. Turzillo, and Z. Wang, “Fermionic Symmetry Protected Topological Phases and Cobordisms,” JHEP 12 (2015) 052, arXiv:1406.7329 [cond-mat.str-el].
  * [45] T. Senthil, “Symmetry-protected topological phases of quantum matter,” Annual Review of Condensed Matter Physics 6 (2015) 299–324.
  * [46] Q.-R. Wang and Z.-C. Gu, “Construction and classification of symmetry-protected topological phases in interacting fermion systems,” Phys. Rev. X 10 (Sep, 2020) 031055. https://link.aps.org/doi/10.1103/PhysRevX.10.031055.
  * [47] M. Barkeshli, Y.-A. Chen, P.-S. Hsin, and N. Manjunath, “Classification of $(2+1)$d invertible fermionic topological phases with symmetry,” Phys. Rev. B 105 (Jun, 2022) 235143. https://link.aps.org/doi/10.1103/PhysRevB.105.235143.
  * [48] D. Aasen, P. Bonderson, and C. Knapp, “Characterization and classification of fermionic symmetry enriched topological phases,” arXiv:2109.10911 [cond-mat.str-el].
  * [49] C. Jones, D. Penneys, and D. Reutter, “A 3-categorical perspective on g-crossed braided categories,” arXiv:2009.00405.
  * [50] A. Y. Kitaev, “Fault tolerant quantum computation by anyons,” Annals Phys. 303 (2003) 2–30, arXiv:quant-ph/9707021.
  * [51] M. H. Freedman, “P/NP, and the quantum field computer,” Proc Natl Acad Sci U S A 95 no. 1, (Jan., 1998) 98–101.
  * [52] M. H. Freedman, A. Kitaev, M. J. Larsen, and Z. Wang, “Topological quantum computation,”. https://arxiv.org/abs/quant-ph/0101025.
  * [53] E. Dennis, A. Kitaev, A. Landahl, and J. Preskill, “Topological quantum memory,” J. Math. Phys. 43 (2002) 4452–4505, arXiv:quant-ph/0110143.
  * [54] M. H. Freedman and D. A. Meyer, “Projective plane and planar quantum codes,” Foundations of Computational Mathematics 1 no. 3, (2001) 325–332.
  * [55] B. M. Terhal, “Quantum error correction for quantum memories,” Reviews of Modern Physics 87 no. 2, (2015) 307.
  * [56] E. T. Campbell, B. M. Terhal, and C. Vuillot, “Roads towards fault-tolerant universal quantum computation,” Nature 549 no. 7671, (2017) 172–179.
  * [57] M. Freedman and M. Hastings, “Building manifolds from quantum codes,” Geometric and Functional Analysis 31 no. 4, (2021) 855–894, arXiv:2012.02249.
  * [58] B. Yoshida, “Topological color code and symmetry-protected topological phases,” Phys. Rev. B 91 (Jun, 2015) 245131. https://link.aps.org/doi/10.1103/PhysRevB.91.245131.
  * [59] B. Yoshida, “Gapped boundaries, group cohomology and fault-tolerant logical gates,” Annals of Physics 377 (2017) 387–413. https://www.sciencedirect.com/science/article/pii/S0003491616302858.
  * [60] P. Webster and S. D. Bartlett, “Locality-preserving logical operators in topological stabilizer codes,” Phys. Rev. A 97 (Jan, 2018) 012330. https://link.aps.org/doi/10.1103/PhysRevA.97.012330.
  * [61] P. Webster and S. D. Bartlett, “Fault-tolerant quantum gates with defects in topological stabilizer codes,” Phys. Rev. A 102 (Aug, 2020) 022403. https://link.aps.org/doi/10.1103/PhysRevA.102.022403.
  * [62] R. Kobayashi and G. Zhu, “Fault-tolerant logical gates via constant depth circuits and emergent symmetries on non-orientable topological stabilizer and Floquet codes,” arXiv:2310.06917 [quant-ph].
  * [63] F. J. Burnell, X. Chen, L. Fidkowski, and A. Vishwanath, “Exactly soluble model of a three-dimensional symmetry-protected topological phase of bosons with surface topological order,” Physical Review B 90 no. 24, (Dec, 2014) . https://doi.org/10.1103%2Fphysrevb.90.245122.
  * [64] L. Fidkowski, J. Haah, and M. B. Hastings, “Gravitational anomaly of $(3+1)$-dimensional $z_{2}$ toric code with fermionic charges and fermionic loop self-statistics,” Phys. Rev. B 106 (Oct, 2022) 165135. https://link.aps.org/doi/10.1103/PhysRevB.106.165135.
  * [65] Y.-A. Chen and P.-S. Hsin, “Exactly solvable lattice Hamiltonians and gravitational anomalies,” SciPost Phys. 14 no. 5, (2023) 089, arXiv:2110.14644 [cond-mat.str-el].
  * [66] T. Hansson, V. Oganesyan, and S. Sondhi, “Superconductors are topologically ordered,” Annals of Physics 313 no. 2, (Oct, 2004) 497–538. https://doi.org/10.1016%2Fj.aop.2004.05.006.
  * [67] T. Dumitrescu and P.-S. Hsin. To appear, 2023.
  * [68] A. Y. Kitaev, “Unpaired majorana fermions in quantum wires,” Physics-Uspekhi 44 no. 10S, (Oct, 2001) 131–136. https://doi.org/10.1070%2F1063-7869%2F44%2F10s%2Fs29.
  * [69] L. Fidkowski and M. B. Hastings, “Pumping chirality in three dimensions,” arXiv:2309.15903 [cond-mat.str-el].
  * [70] M. Levin and X.-G. Wen, “Quantum ether: photons and electrons from a rotor model,” Phys. Rev. B 73 (2006) 035122, arXiv:hep-th/0507118.
  * [71] N. Read and D. Green, “Paired states of fermions in two dimensions with breaking of parity and time-reversal symmetries and the fractional quantum hall effect,” Phys. Rev. B 61 no. 15, (Apr, 2000) 10267–10297.
  * [72] A. Kitaev, “Anyons in an exactly solved model and beyond,” Annals Phys. 321 no. 1, (2006) 2–111, arXiv:cond-mat/0506438.
  * [73] P. Bruillard, C. Galindo, T. Hagge, S.-H. Ng, J. Y. Plavnik, E. C. Rowell, and Z. Wang, “Fermionic modular categories and the 16-fold way,” Journal of Mathematical Physics 58 no. 4, (Apr, 2017) 041704. http://dx.doi.org/10.1063/1.4982048.
  * [74] L. Fidkowski and A. Kitaev, “Effects of interactions on the topological classification of free fermion systems,” Physical Review B 81 no. 13, (2010) 134509.
  * [75] N. Seiberg, T. Senthil, C. Wang, and E. Witten, “A Duality Web in 2+1 Dimensions and Condensed Matter Physics,” Annals Phys. 374 (2016) 395–433, arXiv:1606.01989 [hep-th].
  * [76] C. Cordova, P.-S. Hsin, and N. Seiberg, “Global Symmetries, Counterterms, and Duality in Chern-Simons Matter Theories with Orthogonal Gauge Groups,” SciPost Phys. 4 no. 4, (2018) 021, arXiv:1711.10008 [hep-th].
  * [77] W.-T. Wu, “On Pontrjagin classes III,” Acta Math. Sinica 4 (1954) 323–347.
  * [78] P.-S. Hsin and S.-H. Shao, “Lorentz Symmetry Fractionalization and Dualities in (2+1)d,” SciPost Phys. 8 (2020) 018, arXiv:1909.07383 [cond-mat.str-el].
  * [79] T. Johnson-Freyd, “(3+1)D topological orders with only a $\mathbb{Z}_{2}$-charged particle,” arXiv:2011.11165 [math.QA].
  * [80] X. Yang and M. Cheng, “Gapped boundary of (4+1)d beyond-cohomology bosonic spt phase,” arXiv:2303.00719 [cond-mat.str-el].
  * [81] E. H. Brown, “Generalizations of the Kervaire Invariant,” Annals of Mathematics 95 no. 2, (1972) 368–383. http://www.jstor.org/stable/1970804.
  * [82] R. Kobayashi, “Pin TQFT and Grassmann integral,” Journal of High Energy Physics 12 no. 14, (2019) 014, arXiv:1905.05902.
  * [83] D. S. Freed and C. Teleman, “Topological dualities in the Ising model,” Geom. Topol. 26 (2022) 1907–1984, arXiv:1806.00008 [math.AT].
  * [84] C. Zhang and C. Córdova, “Anomalies of $(1+1)D$ categorical symmetries,” arXiv:2304.01262 [cond-mat.str-el].
  * [85] J. Kaidi, K. Ohmori, and Y. Zheng, “Symmetry TFTs for Non-Invertible Defects,” arXiv:2209.11062 [hep-th].
  * [86] C. Cordova, P.-S. Hsin, and C. Zhang, “Anomalies of Non-Invertible Symmetries in (3+1)d,” arXiv:2308.11706 [hep-th].
  * [87] C. Córdova, K. Ohmori, S.-H. Shao, and F. Yan, “Decorated $\mathbb{Z}_{2}$ symmetry defects and their time-reversal anomalies,” Phys. Rev. D 102 no. 4, (2020) 045019, arXiv:1910.14046 [hep-th].
  * [88] A. Kapustin and R. Thorngren, “Fermionic SPT phases in higher dimensions and bosonization,” JHEP 10 (2017) 080, arXiv:1701.08264 [cond-mat.str-el].
  * [89] P.-S. Hsin and N. Seiberg, “Level/rank Duality and Chern-Simons-Matter Theories,” JHEP 09 (2016) 095, arXiv:1607.07457 [hep-th].
  * [90] R. Thorngren and D. V. Else, “Gauging spatial symmetries and the classification of topological crystalline phases,” Phys. Rev. X 8 (Mar, 2018) 011040. https://link.aps.org/doi/10.1103/PhysRevX.8.011040.
  * [91] N. Manjunath, V. Calvera, and M. Barkeshli, “Nonperturbative constraints from symmetry and chirality on majorana zero modes and defect quantum numbers in (2+1) dimensions,” Phys. Rev. B 107 (Apr, 2023) 165126. https://link.aps.org/doi/10.1103/PhysRevB.107.165126.
  * [92] D. Delmastro, D. Gaiotto, and J. Gomis, “Global anomalies on the hilbert space,” Journal of High Energy Physics 2021 no. 11, (Nov, 2021) .
  * [93] K. Shiozaki, H. Shapourian, and S. Ryu, “Many-body topological invariants in fermionic symmetry-protected topological phases: Cases of point group symmetries,” Physical Review B 95 no. 20, (May, 2017) , arXiv:1609.05970 [cond-mat.str-el].
  * [94] Y. Zhang, N. Manjunath, R. Kobayashi, and M. Barkeshli, “Complete crystalline topological invariants from partial rotations in (2+1)d invertible fermionic states and hofstadter’s butterfly,” Physical Review Letters 131 no. 17, (Oct, 2023) .
  * [95] Y. Zhang, N. Manjunath, G. Nambiar, and M. Barkeshli, “Fractional disclination charge and discrete shift in the hofstadter butterfly,” Phys. Rev. Lett. 129 (Dec, 2022) 275301. https://link.aps.org/doi/10.1103/PhysRevLett.129.275301.
  * [96] Y. Zhang, N. Manjunath, G. Nambiar, and M. Barkeshli, “Quantized charge polarization as a many-body invariant in $(2+1)\mathrm{D}$ crystalline topological states and hofstadter butterflies,” Phys. Rev. X 13 (Jul, 2023) 031005. https://link.aps.org/doi/10.1103/PhysRevX.13.031005.
  * [97] R. Kirby and L. Taylor, “Pin Structure on Low-dimensional Manifolds,” Geometry of low-dimensional manifolds no. 4, (1989) 177–242. https://www3.nd.edu/~taylor/papers/PSKT.pdf.
  * [98] J. Wang, K. Ohmori, P. Putrov, Y. Zheng, Z. Wan, M. Guo, H. Lin, P. Gao, and S. T. Yau, “Tunneling topological vacua via extended operators: (Spin-)TQFT spectra and boundary deconfinement in various dimensions,” Progress of Theoretical and Experimental Physics 2018 no. 5, (2018) 0–59, arXiv:1801.05416v3.
  * [99] L. Tsui and X.-G. Wen, “Lattice models that realize $\mathbb{Z}_{n}$-1 symmetry-protected topological states for even $n$,” Phys. Rev. B 101 no. 3, (2020) 035101, arXiv:1908.02613 [cond-mat.str-el].
  * [100] X.-L. Qi, H. Katsura, and A. W. W. Ludwig, “General relationship between the entanglement spectrum and the edge state spectrum of topological quantum states,” Physical Review Letters 108 no. 19, (May, 2012) , arXiv:1103.5437 [cond-mat.mes-hall].
  * [101] H. Li and F. D. M. Haldane, “Entanglement spectrum as a generalization of entanglement entropy: Identification of topological order in non-abelian fractional quantum hall effect states,” Phys. Rev. Lett. 101 (Jul, 2008) 010504. https://link.aps.org/doi/10.1103/PhysRevLett.101.010504.
  * [102] R. Kobayashi, T. Wang, T. Soejima, R. S. K. Mong, and S. Ryu, “Extracting higher central charge from a single wave function,” arXiv:2303.04822 [cond-mat.str-el].
  * [103] F. D. M. Haldane, “Model for a quantum hall effect without landau levels: Condensed-matter realization of the ”parity anomaly”,” Phys. Rev. Lett. 61 (Oct, 1988) 2015–2018. https://link.aps.org/doi/10.1103/PhysRevLett.61.2015.


enhancements of the abelian coverings are $1$ and hence the same is true for
the $\hat{\ell}$-factor in the corollary.
Let $\Delta_{i,j}^{p,q}$ denote the slanted cherry with points $i,j$ on bottom level and points $p,q$ on middle level.
Together with Corollary <ref> and Corollary <ref>
we obtain

\[
[D^\cQ_{\Gamma_i,j}]^2 \= \frac{-1}{k} \zeta^\top - c_1(\cL^\top)
\= -\frac{\kappa_{i,j}^2}{k^2} \int_{\ol\cM_{0,4}} \psi_{1} - \sum_{\substack{p < q,\,
a_p+a_q < k \\ p,q \notin \{i,j\}}} [D_{\Delta_{i,j}^{p,q}}^\cQ].
\]

The degree of the slanted cherry is

\begin{equation} \label{eq:stackfactor}
\int_{\ol\cQ} [D_{\Delta_{i,j}^{p,q}}^\cQ] \= \frac{\kappa_{i,j} \kappa_{p,q}}{k^2}
\end{equation}

by applying the second formula in <ref> and <ref>.
The other numbers are obtained similarly.

§.§ The contracted spaces

We want to construct the compactified ball quotient candidate $\ol\frakB$ from $\ol\cQ$ by
contracting the all the divisors $D_{\mathrm{L}}^\cQ$ and $D_{\Lambda}^\cQ$.
This is in fact possible:

The divisors $D_{\mathrm{L}}^\cQ$ and $D_{\Lambda}^\cQ$ of $\ol\cQ$ are contractible.
The DM-stack $\ol\frakB$ obtained from $\ol\cQ$ by contracting those divisors is smooth.
If  $D_{\wt{\mathrm{L}}}^\frakB$ and $D_{\wt\Lambda}^\frakB$ denote
the points in $\frakB$ obtained by contracting the corresponding divisors in $\cQ$

\[	\int_{\ol\frakB} [D_{\wt{\mathrm{L}}}^{\frakB}] \= \frac{\kappa_{i,j}^2}{k^2} \quad
\text{and} \quad
\int_{\ol\frakB} [D_{\wt\Lambda}^{\frakB}] = \frac{\kappa_{i,j}\kappa_{p,q}}{k^2}.
\]

For each of the two types of boundary divisors $D_\mathrm{L}^\cQ$ and $D_\Lambda^\cQ$,
we will write a neighborhood $U$ as quotient stack $[\wt{U}/G]$ with $\wt{U}$ smooth,
and show that
the preimage of the boundary divisor in $\wt{U}$ is a $\bP^1$ with self-intersection
number $-1$. Castelnuovo's criterion then implies that this curve is smoothly
contractible. The order of $G$ will be $\tfrac{k^2}{\kappa_{i,j}^2}$ for $D_\mathrm{L}^\cQ$
and $\tfrac{k^2}{\kappa_{i,j}\kappa_{p,q}}$ for $D_\Lambda^\cQ$. 	After contracting
the covering $\bP^1$, the quotient is a point with isotropy group $G$ and the claim
on the degrees follows.
We first consider a cherry divisor $D_\Lambda^\cQ$. Let $D_\Lambda^{\cH_k^\pmarked}$ denote
its preimage in $\cH_k^\pmarked$. As all the abelian enhancements of the cover
of $\cherry$ are one, the divisor $D_\Lambda^{\cH_k^\pmarked}$ is irreducible, in fact
isomorphic to $\bP^1$ with coordinates the scales of the differential forms on
the cherries.
We compute the order of the automorphism group of any point $(\wh X, \wh \omega)$
in $D_\Lambda^{\cH_k^\pmarked}$. Suppose first that $(\wh X, \wh \omega)$ is generic.
The irreducible components of $\wh X$ group into three $\tau$-orbits: The components $\wh X^\top$ corresponding to the top-level vertex of $\cherry$, the components $\wh X^\bot_{i,j}$ corresponding to the vertex with marked points $i,j$, and the components $\wh X^\bot_{p,q}$ corresponding to the vertex with marked points $p,q$.
Observe that there are $\kappa_{i,j}$ edges between $\wh X^\top$ and $\wh X^\bot_{i,j}$ and $\kappa_{p,q}$ edges between $\wh X^\top$ and $\wh X^\bot_{p,q}$.
The restriction of $\tau$ to each of the three (not necessarily connected) curves $\wh X^\top$, $\wh X^\bot_{i,j}$, $\wh X^\bot_{p,q}$ has order $k$.
Given an automorphism of the complete curve $\wh X$ its restrictions to $\wh X^\top$
and $\wh X^\bot_{i,j}$ need to agree on the $\kappa_{i,j}$ nodes, and the analogue
argument applies to $\wh X^\bot_{p,q}$.
Hence after fixing the automorphism on the top-level curve $\wh X^\top$, there are $\tfrac{k^2}{\kappa_{i,j}\kappa_{p,q}}$ possible choices for the automorphism on the two bottom-level curves left.
Together with the $k$ choices for the top-level automorphism, we obtain

\[
|\Aut(\wh X, \wh \omega)| \= \frac{k^3}{\kappa_{i,j}\kappa_{p,q}}.
\]

As the non-representable map $\cH_k^\pmarked \to \cQ$ has degree $\tfrac{1}{k}$, this
yields that the generic point of $D_\Lambda^\cQ$ has an isotropy group of size
$r := \frac{k^2}{\kappa_{i,j}\kappa_{p,q}}$. Exactly the same argument also applies to the
two boundary points of $D_\Lambda^\cQ$ corresponding to the slanted cherries.
The automorphism group is thus generated by multiplying the transversal $t$-parameter
(compare <ref>) by an $r$-th root of unity in local charts
covering all of $\cherry$. We may thus take for $U$ any tubular neighborhood
of $D_\Lambda^\cQ$ and take
a global cover $\wt{U}$ of degree $\frac{k^2}{\kappa_{i,j}\kappa_{p,q}}$. Comparing with
the degree of the normal bundle in <ref> shows that
preimage of $D_\Lambda^\cQ$ in $\wt{U}$ is a $(-1)$-curve.
We now consider a dumbbell divisor $D_\mathrm{L}^\cQ$. As above one checks that the
isotropy group at the generic point of $D_\mathrm{L}^\cQ$ is of
order $\tfrac{k}{|\kappa_{i,j}|}$ and that the isotropy groups of the boundary points
of the divisor have a quotient group of that order. Consider a tubular neighborhood
of $D_\mathrm{L}^\cQ$ and a degree $\tfrac{k}{|\kappa_{i,j}|}$ cover that trivializes
the isotropy group at the generic point. Let $\wt D_\mathrm{L}^\cQ$ be the preimage
of the boundary divisor in this cover.
Let $p,q,r$ denote the three marked points on the bottom level of a point in
$\mathrm{L}_{i,j}$. By applying the above line of arguments again, the three boundary
points of $\wt D_\mathrm{L}^\cQ$ have cyclic isotropy groups of sizes
$\tfrac{k}{\kappa_{p,q}}$, $\tfrac{k}{\kappa_{p,r}}$ and $\tfrac{k}{\kappa_{q,r}}$
respectively. The triangle group $T = T(\tfrac{k}{\kappa_{p,q}}, \tfrac{k}{\kappa_{p,r}},
\tfrac{k}{\kappa_{q,r}})$ is always spherical, because $a_i + a_j > k$ implies
$a_p + a_q + a_r < k$ and hence

\[
2-(1-\frac{\kappa_{p,q}}{k}) - (1-\frac{\kappa_{p,r}}{k}) - (1-\frac{\kappa_{q,r}}{k}) = 2-2\frac{a_p + a_q + a_r}{k} > 0.
\]

This implies that the $T$-cover  of $\wt D_\mathrm{L}^\cQ$ ramified to order
${k}/{\kappa_{p,q}}$ along the divisor where $\{p,q\}$ have come together etc,
trivializes the isotropy groups on the boundary divisor $\wt D_\mathrm{L}^\cQ$ and
the preimage of $\wt D_\mathrm{L}^\cQ$ is a $\bP^1$. More precisely, the isotropy
groups of order ${k}/{\kappa_{p,q}}$ do not fix isolated points on the boundary
divisor but have one-dimensional stabilizer, the boundary divisors
intersecting $\wt D_\mathrm{L}^\cQ$. This implies that the above $T$-cover actually
provides a chart of a full tubular neighborhood.
It remains to show that $|T| = {k}/{|\kappa_{i,j}|}$ in order to conclude with
the normal bundle degree from <ref> that this $\bP^1$
is a $(-1)$-curve. To show this, recall that as $T$ is spherical, there are only
the cases $(\tfrac{k}{\kappa_{p,q}}, \tfrac{k}{\kappa_{p,r}},\tfrac{k}{\kappa_{q,r}}) = (2,2,n)$ for $n \in \bN_{\geq 2}$ and $(\tfrac{k}{\kappa_{p,q}}, \tfrac{k}{\kappa_{p,r}},\tfrac{k}{\kappa_{q,r}}) = (2,3,n)$ for $n \in \{3,4,5\}$ to consider.
In the first case the order of $T(2,2,n)$ is $2n$, and assuming that $\tfrac{k}{\kappa_{p,q}} = \tfrac{k}{\kappa_{p,r}} = 2$, one easily checks that $2\tfrac{k}{\kappa_{q,r}} = \tfrac{k}{|\kappa_{i,j}|}$ by using $\sum_i a_i = 2k$.
In the second case the order of $T(2,3,n)$ is $2\lcm(6,n)$, and the claimed equality follows with a similar argument.

We will now compute the Chern classes of $\ol\frakB$. Let $c : \ol \cQ \to
\ol\frakB$ denote the contraction map. Let

\[
\mathbf{\Gamma} := \{(i,j) \;:\; i<j, a_i+a_j<k\} \quad \text{and} \quad
\mathbf{L} := \{(i,j) \;:\; i<j, a_i+a_j>k\}
\]

be the pairs of integers appearing as indices of the $\Gamma_{i,j}$ and $L_{i,j}$.
Let $\mathrm{I} = \mathrm{I}^{pq}_{ij}$ denote the common degeneration of $\Gamma_{ij}$
and $\mathrm{L}_{pq}$, i.e. the three-level graph with points $p, q$ on bottom level,
$i,j$ on top level and the remaining point on the middle level. Accordingly, we write

\begin{align*}
\mathbf{\Lambda} &:= \{(i,j,p,q) \;:\; i<j, i<p<q, j\notin\{p,q\}, a_i+a_j<k, a_p+a_q<k\} \quad \text{and} \\
\mathbf{I} &:= \{(i,j,p,q) \;:\; i<j, i<p<q, j\notin\{p,q\}, a_i+a_j>k, a_p+a_q<k\}
\end{align*}

for the quadruples of possible indices. Recall that $D_{\hor}$ is the union of all
boundary divisors $D_{H_{ij}}$ whose level graph has a horizontal edge, i.e.corresponding to pairs $(i,j)$ with $a_i + a_j = k$.
We write

\[
\mathbf{H} := \{(i,j) \;:\; i<j, a_i+a_j=k\}.
\]

We summarize the intersections of the boundary divisors: The cherry $D^\cQ_{\cherry}$
intersects precisely $D^\cQ_{\Gamma_{ij}}$ and $\Gamma^\cQ_{pq}$. The divisor
$D_{L_{ij}}$ intersects precisely the three divisors $D^\cQ_{\Gamma_{ab}}$ for any
pair $(a,b)$ disjoint from $\{i,j\}$. For the divisor $D^\cQ_{\Gamma_{ij}}$ consider
any pair $(p,q)$ of the three remaining points as $\{p,q,r\}$. This gives an
intersection with a cherry if $a_p + a_q < k$, with a horizontal divisor if $a_p + a_q = k$
and with an $L$-divisor if $a_p + a_q > k$.
Consequently, the divisor
$D^\cQ_{H_{ij}}$ intersects precisely the three divisors $D^\cQ_{\Gamma_{ab}}$ for any
pair $(a,b)$ disjoint from $\{i,j\}$.

The self-intersection numbers of the boundary divisors of $\ol\frakB$ are
[D^_Γ_i,j]^2 -̄κ_i,j^2/k^2 + ∑_p < q,
a_p+a_q > k
p,q ∉{i,j}
and     [D^_H_i,j]^2 -̄1.
The mutual intersection numbers are for $\{i,j\}\cap\{p,q\} = \emptyset$ given by
[D^_Γ_i,j] ·[D^_Γ_p,q] %̄s̄/̄%̄s̄κ_i,jκ_p,qk^2
and     [D^_Γ_i,j] ·[D^_H_p,q] %̄s̄/̄%̄s̄κ_i,jk
and for $|\{i,j,p\}| = 3$ by

[D^_Γ_i,j] ·[D^_Γ_i,p]    dcases*
κ_i,jκ_i,p/k^2     if $a_i+a_j+a_p < k$

0     otherwise.

We claim that the pull back of $[D_{\Gamma_{i,j}}^\frakB]$ is given by
c^* [D_Γ_i,j^] [̄D_Γ_i,j^] + ∑_p<q, a_p+a_q>k
p,q∉{i,j} κ_i,j/|κ_p,q| [D_L_p,q^] + ∑_p<q, a_p+a_q<k
p,q∉{i,j} [D_^].
To determine the coefficients in the above expression, one may intersect the equation $c^* [D_{\Gamma_{i,j}}^\frakB] = [D_{\Gamma_{i,j}}^\cQ] + \sum_{p,q} l_{p,q} [D_{L_{p,q}}^\cQ] + \sum_{p,q} \lambda_{p,q} [D_{\cherry}^\cQ]$ with unknown coefficients with each of the divisors $[D_{L_{p,q}}^\cQ]$ and $[D_{\cherry}^\cQ]$ in turn.
The left hand side vanishes by push-pull, and the intersection numbers on the right hand side are given by <ref>.
The claimed intersection numbers involving only $\Gamma$-divisors follow again by <ref>.
The pull back of the horizontal divisor is given by $c^*[D_{H_{i,j}}^\frakB] = [D_{H_{i,j}}^\cQ]$.
The intersection number $[D^\frakB_{\Gamma_{i,j}}] \cdot [D^\frakB_{H_{p,q}}]= [D^\cQ_{\Gamma_{i,j}}] \cdot [D^\cQ_{H_{p,q}}]$ follows from <ref> and <ref>.
Finally by <ref> and (<ref>), the normal bundle
of $[D_{H_{i,j}}^\cQ]$ is given by $-\psi_e$ in $\CH(D_{H_{i,j}}^\cQ)$, where
$\psi_e$ is the $\psi$-class supported on the half edge of $H_{i,j}$ that
is adjacent to the vertex with three adjacent marked points.

The log canonical bundle on $\ol\frakB$ has
first Chern class

∑̄_i,j ∈Γ (k/2κ_i,j - 1)
[D_Γ_i,j^] + 1/2 [D_^]     in _1()
Its square and the second Chern class are given

c_1(Ω^1_(logD_))^2 6̄ - 3∑_i,j ∈Γ κ_i,j/k
+ 3∑_i,j ∈𝐋 κ_i,j^2/k^2
+ 3∑_i,j,p,q ∈Λ κ_i,jκ_p,q/k^2

c_2(Ω^1_(logD_)) 2̄ - ∑_i,j ∈Γ κ_i,j/k
+ ∑_i,j ∈𝐋 κ_i,j^2/k^2
+ ∑_i,j,p,q ∈Λ κ_i,jκ_p,q/k^2.

To derive (<ref>) from <ref> we insert into
c_1(Ω^1_(logD_)) %̄s̄/̄%̄s̄3k ·ζ+
∑_L [D_L^] + ∑_Λ [D_Λ^]
that $5\xi - \sum (m_i+k) \psi_i$ is a sum of boundary terms by the
relation (<ref>). Consider Keel's relation
ψ_i %̄s̄/̄%̄s̄16 ∑_c <d i ∉{c,d}  Δ_cd + 1/2
∑_a ≠i Δ_ia ,
where $\Delta_{ij}$ is the boundary divisor in $\barmoduli[0,5]$ where the
points $(i,j)$ have come together. We pull back this relation via the forgetful map
$\pi: \bP\kLMS[\mu][0,5] \to \barmoduli[0,5]$. Since this map is a root-stack
construction  and the isotropy groups of the divisors were computed in th
proof of <ref>, we obtain
π^* Δ_ab cases
1/|κ_ab| [D_L_ab^]     if $a+b < -k$

[D_H_ab]      if $a+b = -k$

1/κ_ab [D_Γ_ab^] + ∑_i<j, a_i+a_j < k
i,j∉{a,b} 1/κ_ab
[D_[i,j][a,b]^]     if $a+b > -k$.

Putting everything together we find in $\CH_1(\cQ)$ that

c_1(Ω^1_(logD_))    ∑̄_i,j ∈Γ (k/2κ_i,j - 1) [D_Γ_i,j^] + ∑_i,j ∈𝐋 (k/2|κ_i,j| - 1) [D_L_i,j^]

+ ∑_i,j,p,q ∈Λ (k/2κ_i,j + k/2κ_p,q - 1) [D_^] + 1/2 [D_^]
and since the divisors $D_{\mathrm{L}_{i,j}}^{\cQ}$ and $D_{\cherry}^{\cQ}$ are smoothly
contractible we deduce (<ref>).

To derive (<ref>) we first note that
$-\tfrac{1}{4}|\mathbf{\Gamma}| + \tfrac{1}{2}|\mathbf{\Lambda}| + \tfrac{5}{4}|\mathbf{H}| + \tfrac{5}{4}|\mathbf{L}| = 5$
and that for $(i,j) \in \mathbf{L}$ the relation
1 + ∑_p ∈{1,…,5}∖{i,j}
{q,r} = {1,…,5}∖{i,j,p} ( -κ_p,q+κ_p,r/k + 2κ_p,qκ_p,r/k^2 + κ_q,r^2/k^2 ) = 4κ_i,j^2/k^2
holds because of $\sum_i a_i = 2k$.
Using those relations and the intersection numbers in <ref> squaring (<ref>) yields
c_1(Ω^1_(logD_))^2 5̄
-∑_i,j ∈Γ (2κ_i,j/k + κ_i,j^2/k^2)
+2∑_i,j,p,q ∈Λ κ_i,jκ_p,q/k^2

+4∑_i,j∈𝐋 κ_i,j^2/k^2
and (<ref>) follows because $\sum_i a_i = 2k$ implies

1+∑_i,j ∈Γ (-κ_i,j/k + κ_i,j^2/k^2)
+∑_i,j,p,q ∈Λ κ_i,jκ_p,q/k^2

-∑_i,j∈𝐋 κ_i,j^2/k^2 0̄ .

The second Chern class can be computed as

\[
c_2(\Omega^1_{\ol\frakB}(\log D_{\hor})) \= \chi(\cM_{0,5}) + \sum_{i,j \in \mathbf{\Gamma}} \chi(D_{\Gamma_{i,j}}^{\frakB,\circ})
+ \sum_{i,j \in \mathbf{L}} \chi(D_{\wt L_{i,j}}^{\frakB})
+ \sum_{i,j,p,q \in \mathbf{\Lambda}} \chi(D_{{}_{i,j} \wt \Lambda_{p,q}}^{\frakB}),
\]

where $\chi(D_{\Gamma_{i,j}}^{\frakB,\circ}) = \chi(D_{\Gamma_{i,j}}^{\cQ,\circ}) = \frac{\kappa_{i,j}}{k}$ be <ref> and <ref> and the Euler characteristics of the points are given in <ref>.

§.§ The ball quotient certificate

We can finally put together the previous intersection numbers and use our ball quotient criterion to show that the contracted spaces are ball quotients.

We apply <ref> and check that first that the only log-exceptional
curves for $c_1(\Omega^1_{\ol\frakB}(\log D_{\hor}))$ are the components of $D_{\hor}$.
In fact since the expression (<ref>) is an effective divisor and since
$\ol{\frakB} \setminus \cD \cong \moduli[0,5]$ is affine, we only have to check
positivity of $c_1^2$ and the intersection with $D_{H_{ab}}$ and
$D_{\Gamma_{i,j}}^{\frakB}$. For the $D_{\Gamma_{i,j}}^{\frakB}$-intersections this follows
from the intersection numbers in <ref>.
In fact, the self-intersection number of $D_{\Gamma_{i,j}}^{\frakB}$ is negative
only if $a_p + a_q \leq k$ for any pair $\{p,q\}$ disjoint from $\{i,j\}$.
Using <ref> we compute in this case that
[D_Γ_i,j^] ·c_1(Ω^1_(logD_)) %̄s̄/̄%̄s̄κ_ijk (2a_p + 2a_q + 2a_r - a_i - a_j/k -1) ,
where $\{a_1,a_2,a_3,a_4,a_5\} = \{a_i,a_j,a_p,a_q,a_q\}$. Since $a_i+a_j <k$,
this expression is positive. Moreover, one directly computes
[D_H_a,b] ·c_1(Ω^1_(logD_)) 0̄ .
That $c_1(\Omega^1_{\ol\frakB}(\log D_{\hor}))^2 > 0$ is a consequence of the above, as $c_1(\Omega^1_{\ol\frakB}(\log D_{\hor}))$ is by Equation (<ref>) a linear combination of the divisors $D_{\Gamma_{i,j}}^\frakB$ and $D^\frakB_{\hor}$ with positive coefficients.

Missing 'biblatex' package
The bibliography requires the 'biblatex' package.

Mathematical Sciences Publishers

titleEuler characteristics of Teichmüller curves in genus two
journaltitleGeometry & Topology

* Invalid format of field 'month'

titleCompactification of strata of Abelian differentials
journaltitleDuke Math. J.

titleStrata of $k$-differentials
journaltitleAlgebr. Geom.

titleThe moduli space of multi-scale differentials

titleEquations of linear subvarieties of strata of differentials
journaltitleGeom. Topol.

titleThe boundary of linear subvarieties

titlePixton’s formula and Abel-Jacobi theory on the Picard

titleVeech surfaces and complete periodicity in genus two
journaltitleJ. Amer. Math. Soc.

titleOn the Kodaira dimension of moduli spaces of Abelian

titleA tale of two moduli spaces: logarithmic and multi-scale

noteWith an appendix by G. Borot, A. Giacchetto and D. Lewanski
pubstateto appear in: Duke Math J.
titleMasur-Veech volumes and intersection theory: the principal
strata of quadratic differentials

pubstateto appear in: Ann. Inst. Fourier
titleThe area is a good enough metric

titlediffstrata – a Sage package for calculations in the
tautological ring of the moduli space of Abelian differentials

pagesPaper No. e16, 55
titleThe Chern classes and Euler characteristic of the moduli
spaces of Abelian differentials
journaltitleForum Math. Pi

titleOn the Bogomolov-Miyaoka-Yau inequality for stacky
journaltitleTaiwanese J. Math.

titleA new nonarithmetic lattice in ${\rm PU}(3,1)$
journaltitleAlgebr. Geom. Topol.

titleMonodromy of hypergeometric functions and nonlattice integral
journaltitleInst. Hautes Études Sci. Publ. Math.

titleNew non-arithmetic complex hyperbolic lattices
journaltitleInvent. Math.

titleadmcycles—a Sage package for calculations in the
tautological ring of the moduli space of stable curves
journaltitleJ. Softw. Algebra Geom.

titleInvariant and stationary measures for the ${\rm SL}(2,\Bbb
R)$ action on moduli space
journaltitlePubl. Math. Inst. Hautes Études Sci.

issn0003-486X; 1939-8980/e
titleIsolation, equidistribution, and orbit closures for the
$\mathrm{SL}(2,\mathbb{R})$ action on moduli space.
journaltitleAnn. Math. (2)

titleBilliards, quadrilaterals, and Moduli spaces
journaltitleJ. Amer. Math. Soc.

Princeton University

issn0003-486X; 1939-8980/e
titleSplitting mixed Hodge structures over affine invariant
journaltitleAnn. Math. (2)

titleTranslation surfaces: Dynamics and Hodge theory

Springer-Verlag, Berlin

seriesErgebnisse der Mathematik und ihrer Grenzgebiete (3)
[Results in Mathematics and Related Areas (3)]
titleHilbert modular surfaces

titleThe Miyaoka-Yau inequality and uniformisation of
canonical models
journaltitleAnn. Sci. Éc. Norm. Supér. (4)

titleVolumes of strata of moduli spaces of quadratic
differentials: getting explicit values
journaltitleAnn. Inst. Fourier (Grenoble)

titleConstructions of nontautological classes on moduli spaces of
journaltitleMichigan Math. J.

titleModuli spaces of flat tori with prescribed holonomy
journaltitleGeom. Funct. Anal.

titleModuli spaces of flat tori and elliptic hypergeometric
journaltitleMém. Soc. Math. Fr. (N.S.)

titleOrbifold stability and Miyaoka-Yau inequality for minimal
journaltitleGeom. Topol.

titleLog canonical models for the moduli space of curves: the
first divisorial contraction
journaltitleTrans. Amer. Math. Soc.

titleInfinitesimal structure of the pluricanonical double
ramification locus
journaltitleCompos. Math.

Springer-Verlag, Berlin-New York

seriesLecture Notes in Mathematics, Vol. 339
titleToroidal embeddings. I

titleLyapunov spectrum of ball quotients with applications to
commensurability questions
journaltitleDuke Math. J.

Cambridge University Press, Cambridge

noteWith the collaboration of C. H. Clemens and A. Corti,
Translated from the 1998 Japanese original
seriesCambridge Tracts in Mathematics
titleBirational geometry of algebraic varieties

titleComplex hyperbolic volume and intersection of boundary
divisors in moduli spaces of pointed genus zero curves
journaltitleAnn. Sci. Éc. Norm. Supér. (4)

titleA numerical characterization of ball quotients for normal
surfaces with branch loci
journaltitleProc. Japan Acad. Ser. A Math. Sci.

titleBilliards and Teichmüller curves on Hilbert modular
journaltitleJ. Amer. Math. Soc.

titleFoliations of Hilbert modular surfaces
journaltitleAmer. J. Math.

titleThe Gauss-Bonnet theorem for cone manifolds and volumes of
moduli spaces
journaltitleAmer. J. Math.

titleCubic curves and totally geodesic subvarieties of moduli
journaltitleAnn. of Math. (2)

titleGeneralized Picard lattices arising from half-integral
journaltitleInst. Hautes Études Sci. Publ. Math.

titleOn discontinuous action of monodromy groups on the complex
journaltitleJ. Amer. Math. Soc.

titleHirzebruch's proportionality theorem in the noncompact case
journaltitleInvent. Math.

titleModular embeddings of Teichmüller curves
journaltitleCompos. Math.

titleVolumes and Siegel–Veech constants of
$\mathcal{H}(2{g}-2)$ and Hodge integrals
journaltitleGeom. Funct. Anal.

titleVolumes of moduli spaces of flat surfaces

titleThe volume of the fundamental domain for some infinite
journaltitleTrans. Amer. Math. Soc.

titleIntersections of loci of admissible covers with tautological
journaltitleSel. Math. New Ser.

Geom. Topol. Publ., Coventry

booktitleThe Epstein birthday schrift
pages511549 (electronic)
seriesGeom. Topol. Monogr.
titleShapes of polyhedra and triangulations of the sphere

titleFlat surfaces
journaltitleAmer. J. Math.

booktitleFrontiers in Number Theory, Physics and Geometry. Volume
1: On random matrices, zeta functions and dynamical systems
titleFlat surfaces