# STUaNet: Understanding uncertainty in spatiotemporal collective human
mobility

Zhengyang Zhou  University of Science and Technology of ChinaHefeiChina
<EMAIL_ADDRESS>,  Yang Wang  University of Science and Technology of
ChinaHefeiChina<EMAIL_ADDRESS>,  Xike Xie  University of Science and
Technology of ChinaHefeiChina<EMAIL_ADDRESS>,  Lei Qiao  Beijing Institute
of Control EngineeringBeijingChina<EMAIL_ADDRESS>and  Yuantao Li
University of Science and Technology of ChinaHefeiChina
<EMAIL_ADDRESS>
(2021)

###### Abstract.

The high dynamics and heterogeneous interactions in the complicated urban
systems have raised the issue of uncertainty quantification in spatiotemporal
human mobility, to support critical decision-makings in risk-aware web
applications such as urban event prediction where fluctuations are of
significant interests. Given the fact that uncertainty quantifies the
potential variations around prediction results, traditional learning schemes
always lack uncertainty labels, and conventional uncertainty quantification
approaches mostly rely upon statistical estimations with Bayesian Neural
Networks or ensemble methods. However, they have never involved any
spatiotemporal evolution of uncertainties under various contexts, and also
have kept suffering from the poor efficiency of statistical uncertainty
estimation while training models with multiple times. To provide high-quality
uncertainty quantification for spatiotemporal forecasting, we propose an
uncertainty learning mechanism to simultaneously estimate internal data
quality and quantify external uncertainty regarding various contextual
interactions. To address the issue of lacking labels of uncertainty, we
propose a hierarchical data turbulence scheme where we can actively inject
controllable uncertainty for guidance, and hence provide insights to both
uncertainty quantification and weak supervised learning. Finally, we re-
calibrate and boost the prediction performance by devising a gated-based
bridge to adaptively leverage the learned uncertainty into predictions.
Extensive experiments on three real-world spatiotemporal mobility sets have
corroborated the superiority of our proposed model in terms of both
forecasting and uncertainty quantification.

Uncertainty quantification, human mobility, spatiotemporal data mining, web of
things

††journalyear: 2021††conference: Proceedings of the Web Conference 2021; April
19–23, 2021; Ljubljana, Slovenia††booktitle: Proceedings of the Web Conference
2021 (WWW ’21), April 19–23, 2021, Ljubljana, Slovenia††ccs: Information
systems Web applications††ccs: Information systems Web mining††ccs:
Information systems Spatial-temporal systems

##  1\. Introduction

Understanding human mobility is crucial for intelligent web applications.
Although many researches have delved into the predictions of human mobility
including both individual trajectories and collective activities, few works
have made the efforts to quantify the spatiotemporal uncertainty for human
mobility. However, uncertainty quantification, which quantifies the potential
variations in prediction results, is important for those applications such as
epidemic forecasting, crowd management and commercial promotions where
extremes are of significant interests. For instance, given the unprecedented
volumes of crowds gathering in Chen Yi Square on the new year eve of 2015, the
crowd monitoring system of Shanghai failed to accurately predict the abnormal
variations, and hence led to a disastrous stampede which killed 36 people
(Zhang et al., 2017). In this occasional and challenging scenario, inaccurate
prediction and negligent urban management have ignored the potential
uncertainty and risks which were caused by random human behaviors and
complicated context influences.

A surge of works have focused on investigating the regularities and variations
in individual mobility. They explore the limits of predictability in human
dynamics by measuring different types of entropy for individual trajectories
(Song et al., 2010; Lu et al., 2013; Ikanovic and Mollgaard, 2017; Wang et
al., 2020). However, due to the inherent randomness and sparsity in individual
trajectories, it is more meaningful to emphasize the uncertainty in
spatiotemporal collective human mobility, which benefits location-based
applications, ranging from dynamic public resource allocations and crowd-based
public safety predictions to epistemic controlling. Recently, deep learning-
based methods for addressing collective human mobility predictions have been
widely studied (Zhang et al., 2017; Ye et al., 2019; Chen et al., 2020),
however, all of them are incapable of capturing such uncertainties.

Regarding uncertainties, it can be further categorized into two categories,
epistemic and aleatoric (Der Kiureghian and Ditlevsen, 2009; Kendall and Gal,
2017; Kong et al., 2020). Epistemic uncertainty, which can be explained with
sufficient training data (Postels et al., 2019), estimates the uncertainty in
model parameters, while aleatoric uncertainty captures intrinsic randomness in
data observations. To support uncertainty quantification in deep learning
frameworks, dropout-based Bayesian Neural Networks (BNN) impose a probability
distribution over learnable model parameters, and the variations on model
parameters can be viewed as uncertainties (Vandal et al., 2018; Liu et al.,
2020; Gal and Ghahramani, 2016; Gal et al., 2017; Kendall and Gal, 2017).
Inspired by model ensembles and physical random systems, few pioneering non-
Bayesian methods such as ensemble-based (Lakshminarayanan et al., 2017) and
Brownian Motion-based methods (Kong et al., 2020) were proposed to model the
randomness of learning process in vision-related tasks. Nevertheless, existing
works in this aspect mostly passively learn the uncertainties from statistical
estimation of testing results, which fail to internalize uncertainty
extractions into the model and haven’t considered the evolution of uncertainty
over time and contexts.

Differing from existing efforts, we here focus on spatiotemporal uncertainty
quantification to achieve the comprehensive understanding of potential
predictive fluctuations in collective human mobility, by internalizing active
uncertainty extraction into our framework. Specifically, we discover that
spatiotemporal tendency of human mobility can be decomposed into two parts,
i.e., long-term periodicity and irregular instantaneous fluctuations. A case
study of mobility distributions in Suzhou Industry Park (SIP) is illustrated
in Figure 1(a)-(b) to reveal this observation. As highlighted, the local
drifts and fluctuations in different degrees may prohibit accurately future
mobility predictions, therefore there exists an urgent demand on quantifying
spatiotemporal fluctuations. However, this is an intractable task because the
correlations between uncertainties and spatiotemporal context factors are
highly implicit and ambiguous. For instance, even the same contexts can have
spatially heterogeneous influences on regions with different local
functionalities, as all factors will have complex interactions with each
other. Moreover, we consider the absolute error as an uncertainty indicator,
and compare the spatial heatmaps of both predictions and uncertainty
quantification in Figure 1(c)-(d). From these figures, we discover an obvious
task-related spatial misalignment between predictions and uncertainty
quantification, and this kind of misalignment may consequently bring
unexpected inefficiency to those methods which share the same feature
extractors in both prediction and uncertainty learning stages (Kendall and
Gal, 2017; Lakshminarayanan et al., 2017; Wang et al., 2019).

Figure 1. Examples of uncertainty in human mobility distribution. Subfigures
(a)-(b) reveal the temporal periodicities and spatial correlations in traffic
flows of SIP. The circles highlight different degrees of local drifts and
fluctuations of flows. Subfigures (c)-(d) illustrate the spatial heatmaps of
both predictions and uncertainty quantification.

In this paper, we propose a SpatioTemporal Uncertainty-aware prediction
Network (STUaNet), to address the spatial misalignment issue between
uncertainty learning and mobility prediction tasks. Specifically, our STUaNet
consists of two modules, a spatiotemporal mobility prediction module to
capture temporal dependencies with a graph-based sequential learning structure
and a Content-Context Uncertainty Quantification module (C2UQ) to quantify
uncertainties considering both spatiotemporal dependencies and heterogenous
context influences. To actively extract uncertainty from multi-source
spatiotemporal observations in a learnable manner, we first classify the
uncertainty sources of spatiotemporal data into internal content and external
context, and then resolve the problem of uncertainty quantification with three
main techniques of C2UQ. (i) Neural data quality estimation. Given the reason
that data quality can significantly influence the uncertainty of predictions,
we devise a similarity-based time-series quality estimation method to measure
internal content consistencies and detect instaneous pattern variations in
spatiotemporal data. (ii) Context interaction learning. To capture complicated
interactions between multiple contextual factors and human mobility
uncertainties, we propose a Factorization Machine-Graph Convolution Network
(FM-GCN) to learn mapping functions from different contextual factors to
region-level uncertainty where context-level interactions and spatial
dependencies are captured by FM and GCN, respectively. (iii) Active
uncertainty learning. To address the issue of lacking uncertainty labels,
during the training phase, we propose two weak supervised indicators and
impose different spatiotemporal turbulences to imitate the Out-Of-Distribution
(OOD) and random noises which correspondingly refer to epistemic and aleatoric
uncertainties, and eventually enable an active weak supervised uncertainty
learning. Further, we design a Gated Mobility-uncertainty Re-calibrate bridge
(GMuR) to leverage the associated uncertainty, and finally boost both
uncertainty learning and task-specific predictions. In summary, the main
contributions of this paper are as follows.

  * •

To our best knowledge, we are the first to focus on the quantification of
spatiotemporal uncertainty with internalized uncertainty extraction. We
further innovatively re-calibrate predictions by taking advantage of
uncertainty quantification, and this is an initial step on investigating how
to make better use of uncertainty in optimizing predictions.

  * •

By proposing two novel uncertainty indicators, our active hierarchical
uncertainty learning enables implicit but quantifiable pseudo labels to guide
unlabelled learning, and this provides prominent insights for novel indicator
designs with regard to weak supervised information and active guided training
schemes for consciously learning specific characteristics.

##  2\. Literature review

Human mobility prediction. Recent years have witnessed a surge research
focusing on human mobility predictions which can be divided into two
categories, the predictions of collective mobility and individual-level
trajectories. Regarding the prediction of collective human mobility including
traffic flows (Zhang et al., 2017; Guo et al., 2019) as well as taxicab pick-
ups and drop-offs (Ye et al., 2019), this issue is traditionally resolved by
extracting spatiotemporal correlations with advanced variants of Convolution
Neural Network (CNN) encoders. Further, by taking advantage of constructing
grids into urban graph, graph-based deep learning method was introduced to
forecast spatiotemporal mobility by employing full convolution blocks (Yu et
al., 2018). Based on (Yu et al., 2018), Bai et, al. subsequently devised a
graph sequence-based learning scheme to iteratively predict passenger demands
(Bai et al., 2019). Regarding individual trajectory predictions, given sparse
and long-range trajectory sequences, (Liao et al., 2018) and (Feng et al.,
2020) were both proposed to jointly predict the human activity and location by
carefully involving sequential patterns. Besides, (Sun et al., 2020) and (Zhao
et al., 2020) investigated individual human mobility regularities, and model
personalized sequential patterns of users for next POI recommendation with
Long Short-Term Memory (LSTM) network and spatiotemporal gated network,
respectively. Nevertheless, none of them predict the results associated with
uncertainty.

Predictability and uncertainty in human mobility. Previous works have been
confined to the predictability and uncertainty of individual mobility based on
entropy. (Song et al., 2010) explored the limits of predictability by studying
the mobility patterns of anonymous mobile phone users, and they also
identified a potential 93% average predictability in user mobility based on
three types of entropy. These kinds of entropy respectively characterized
spatial location randomness, heterogeneity of user visitation patterns and
spatiotemporal order presented in personal mobility pattern. Their follow-up
work (Lu et al., 2013) derived the maximum predictability of 88%, by
considering both stationary and non-stationary trajectories. Different from
above works, (Ikanovic and Mollgaard, 2017) discovered that the low
uncertainty in above works was highly dependent on the selected spatiotemporal
scales as people didn’t move in very short period. In this way, they predicted
human mobility from two aspects, next location and stay time, and found an
upper limit on predictability of 71% by using natural length scale. Recently,
(Chen et al., 2013) tried to incorporate exogenous factors as uncertain
factors to estimate shared mobility availability but they didn’t exactly
perform uncertainty quantification. Subsequently, (Geng and Yang, 2017)
observed remarkable heterogeneity in individual views and further uncovered an
underlying consistency between spatial and temporal human mobility in the
collective spatiotemporal view, which maybe inherently related to the nature
of human behavior. These emerging researches only derived a time-invariant
predictability and cannot be directly used to address the challenges that we
are facing. However, these preliminary efforts motivated us to explore the
potential variations of collective human mobility under different contexts.

Uncertainty quantification in deep learning.  Emerging deep uncertainty
quantification methods can be categorized into Bayesian and non-Bayesian
lines. Bayesian methods quantify the uncertainty by imposing a probability
distribution over model parameters and approximate the posterior distribution
(Kong et al., 2020). To infer Bayesian posterior for multi-layer perceptions,
an easy-implemented variational approach was proposed by employing dropout and
Monte-Carlo sampling (Gal and Ghahramani, 2016; Gal et al., 2017). Going after
above works, (Kendall and Gal, 2017) comprehensively analyzed how to model
epistemic and aleatoric uncertainty, successfully quantified the uncertainty
of image-level classification and detection based on BNN, and eventually
improved the prediction reliability of risk-sensitive vision-related tasks. On
the other hand, the representative Non-Bayesian methods (Lakshminarayanan et
al., 2017) were proposed to train multiple neural networks with different
initialization and quantify uncertainty based on the statistics of prediction
results. In addition, another state-of-the-art Stochastic Differential
Equation (SDE) model imitated the system diffusion and captured both epistemic
and aleatoric uncertainty by involving the Brownian motion (Kong et al.,
2020). Specifically, for spatiotemporal uncertainty, (Tossebro and Nygård,
2002) first proposed the concept of uncertainty in spatiotemporal databases,
and then researchers have started to explore the uncertainties in large-scale
climate datasets (McDermott and Wikle, 2019; Vandal et al., 2018), as well as
uncertainty in numerical weather forecasting (Wang et al., 2019; Liu et al.,
2019) with BNN methods. These works were the beginning where uncertainty
quantification was introduced into spatiotemporal data mining, but they failed
to capture the spatial dependency and temporal evolution of uncertainties.
These above-mentioned uncertainty learning methods are also limited in
addressing our spatiotemporal uncertainty quantification due to the following
limitations, (i) incapability of capturing the spatiotemporal uncertainty
evolution, (ii) failing to map the various context influences on
uncertainties, and (iii) inefficiency of multiple times of training.

In summary, even though extensive efforts have been achieved in enhancing the
prediction performances and understanding the nature of human mobility, the
uncertainty issue in human mobility prediction has never been systematically
considered due to lacking awareness of spatiotemporal evolutions and context
interactions. Therefore, in this paper, we will tackle this issue with a
systematic perspective.

##  3\. Preliminaries and definitions

###### Definition 1 (Urban graph and Urban regions).

The study area can be defined as an undirected graph, called Urban Graph.
Following previous works (He and Shin, 2020; Yao et al., 2019), the whole city
is discretized into a set of $N$ urban regions (e.g., POI locations, pick-
up/drop-off locations and road intersections) and can be constructed as an
urban graph $G(\mathcal{V},\mathcal{E})$. Here, the urban regions are composed
of the vertex set $\mathcal{V}=\\{{r_{1}},{r_{2}},\cdots,{r_{N}}\\}$. Given
two urban regions $r_{i}$ and $r_{j}$, the edge ${e_{ij}}\in\mathcal{E}$
within these two urban regions can be instantiated as the geographical
proximity and the potential mobility transitions.

###### Definition 2 (Region human mobility intensity).

To describe the dynamic urban mobility intensity, we discretize time domain
into equal intervals (e.g. 30 min). For region $r_{i}$, the human mobility
intensity $H_{i}^{t}$ represents the number of active persons in region
$r_{i}$ at the interval $t$.

###### Problem 1 (Collective human mobility prediction with uncertainty
quantification).

Given historical collective human mobility observations of region $i$,
$H_{i}^{1},...,H_{i}^{T}$ where $i=1,2...,N$, we aim to simultaneously perform
the point estimation of human mobility and the associated uncertainty
quantification $(\widehat{H_{i}^{T+1}},\widehat{\sigma_{i}^{T+1}})$ in the
next interval $T+1$, where the numerical uncertainty
$\widehat{\sigma_{i}^{T+1}}$ quantifies the potential variations around the
prediction results. Namely, we aim to minimize the predicted uncertainty
$\widehat{\sigma_{i}^{T+1}}$ while optimize tAhe prediction interval
considering variations
$[\widehat{H_{i}^{T+1}}-\widehat{\sigma_{i}^{T+1}},\widehat{H_{i}^{T+1}}+\widehat{\sigma_{i}^{T+1}}]$
to maximumly cover the ground truth.

##  4\. Methodology

###  4.1. Framework Overview

The proposed uncertainty-aware spatiotemporal prediction framework STUaNet is
illustrated in Figure 2. To disentangle task-related spatial misalignments, we
design a double-head network which consists of three components, a
spatiotemporal prediction module, a content-context uncertainty quantification
module, and a gated mobility-uncertainty re-calibration bridge. To actively
learn the uncertainty, we propose a three-layer training architecture, which
imitates the pure data, noisy data and OOD data by imposing different
quantifiable spatiotemporal turbulences to training samples. We will elaborate
each module in the following sections.

Figure 2. Framework overview of STUaNet

###  4.2. Spatiotemporal collective human mobility prediction

This component serves as a spatiotemporal predictor which predicts the
mobility intensity jointly in all regions in the next time interval based on
historical mobility observations. As spatiotemporal forecasting has been well
investigated (Bai et al., 2019; Yu et al., 2018; Zhang et al., 2019), we here
leverage a widely applied spatiotemporal model with a slight modification. We
modify it by introducing the mobility transition proximity into adjacent
matrix to adapt the collective mobility prediction. This predictor combines
graph convolution module and an LSTM as the backbone, to extract the spatial
and temporal dependencies, respectively. According to the closeness and multi-
level periodicity in human mobility sequences, we first construct the time
period as $p$ consecutive intervals, and then retrieve a series of historical
periods in the database for next-interval predictions. The selected periods
are layered in three scales, i.e., the closeness period $\mathcal{P}_{c}$
consisting of nearest $p$ intervals, the period of daily periodicity
$\mathcal{P}_{d}$ consisting of the same intervals as $\mathcal{P}_{c}$ in
most recent $q$ days, and the period for summarized long-term weekly pattern
$\mathcal{P}_{l}$ obtained by averaging the mobility intensity of the same
intervals as $\mathcal{P}_{c}$ in each day of last week. Then we have $q+2$
groups of periods and $(q+2)*p$ intervals. To characterize the transition
patterns in urban human mobility and thus better capture the dynamic spatial
dependencies, we borrow the idea of cross-city migration model based on
gravity systems, for their transition pattern similarities between urban
mobility flows and city-wise migrations (Zipf, 1946). This migration model
demonstrates the fact that transitions between two specific regions are
proportional to current flows in each region and inversely correlated with
their spatial distances. Concisely, given time interval $t$, we instantiate
the edges of urban graph as a time-sensitive mobility-involved adjacent matrix
$\bm{A}^{t}$, where we simultaneously consider the potential transition
pattern and the geographical proximity. Each element $A_{ij}^{t}$ in this
adjacent matrix can be formally given by,

(1)
$A_{i,j}^{t}={e^{-dist({r_{i}},{r_{j}})}}+\rho\times\log(\frac{{H_{i}^{t}\times
H_{j}^{t}}}{{dist({r_{i}},{r_{j}})}})$

where $dist(r_{i},r_{j})$ is the Euclidean distance and $H_{i}^{t}$,
$H_{j}^{t}$ are the mobility intensities in $r_{i}$ and $r_{j}$, in the
corresponding interval of $t$. The scalar factor $\rho$ adjusts the proportion
of region-wise transitions in overall adjacent matrix.

In what follows, we respectively summarize daily periodicity $\mathcal{P}_{d}$
and long-term pattern $\mathcal{P}_{l}$ into one interval by average, yielding
totally $p+2$ intervals for sequence learning. We employ $p+2$ GCN blocks to
parallelly extract the spatial correlations and noted here we share the same
adjacent matrix $\bm{A}^{t*}$ in each GCN block for the same period by
averaging the adjacent matrix of all intervals in the corresponding period. To
learn the temporal dependencies, we feed the feature map sequences along with
the corresponding context factors (e.g. timestamps and weather) into a
mobility LSTM and finally obtain the citywide mobility intensity in the $T+1$
interval. We formulate the prediction task as,

(2) $\widehat{\bm{H}^{T{\rm{+}}1}}{\rm{=}}\bm{{\rm LSTM}}{\rm{(}}\bm{{\rm
GC}}(\bm{A}^{t*},\bm{H}^{{\mathcal{P}_{c}}},\bm{H}^{{\mathcal{P}_{d}}},\bm{H}^{{\mathcal{P}_{l}}};\;{\bm{\theta}_{{gc}}});{\bm{\theta}_{L}})$

where $\bm{H}^{{\mathcal{P}_{c}}}$, $\bm{H}^{{\mathcal{P}_{d}}}$,
$\bm{H}^{{\mathcal{P}_{l}}}$ are well-organized citywide human mobility
sequences during corresponding periods. And note that $\bm{{\rm GC}}$ is the
graph convolution neural network parameterized by learnable
$\bm{\theta}_{gc}$, and the mobility $\bm{{\rm LSTM}}$ neural network is
parameterized by learnable $\bm{\theta}_{L}$. Here we take one of the GCN
blocks to demonstrate the graph convolution GC by denoting the $k$-th hidden
layer of GCN as $\bm{H}_{G}^{k}$,

(3) $\bm{H}_{G}^{k}={\rm
ReLU}(\tilde{\bm{D}_{A}^{t*}}^{-1/2}{\widetilde{\bm{A}}^{t*}}\tilde{\bm{D}_{A}^{t*}}^{-1/2}{\bm{H}_{G}^{k-1}}{\bm{W}_{gc}^{k-1})}$

where ${\widetilde{\bm{A}}^{t*}}={\bm{A}^{t*}}+{\bm{I}_{N}}$ and
$\tilde{\bm{D}}_{A}^{t*}$ is the degree matrix for
${\widetilde{\bm{A}}^{t*}}$. We respectively initialize $\bm{H}_{G}^{0}$ as
$\bm{H}^{{\mathcal{P}_{c}}}$, $\bm{H}^{{\mathcal{P}_{d}}}$
$\bm{H}^{{\mathcal{P}_{l}}}$ in each GCN block. $\bm{W}_{gc}^{k}$ are a series
of learnable parameters that constitute the $\bm{\theta}_{gc}$ and we utilize
ReLU as the non-linear activation function.

###  4.3. Content-Context Uncertainty Quantification

We propose a brand-new Content-Context Uncertainty Quantification network
(C2UQ), which is tailored for spatiotemporal uncertainty learning. The C2UQ
shares the same inputs with the prediction component but has a different
structure for uncertainty learning. Intuitively, spatiotemporal uncertainty
can arise from two scenarios, the internal data noise which suffers from two
aspects, collections and measurements, and the complicated and heterogeneous
uncertainties produced by various external contexts, e.g. temporal evolution,
weathers and urban events. The proposed C2UQ consists of two dedicated
designed modules, neural data quality estimation and context interaction
learning where these two modules are responsible for extracting uncertainties
from internal data noise and external factor influences, respectively.

####  4.3.1. Neural data-quality estimation

Data quality estimation is a non-trivial task as it doesn’t have explicit
quantifiable noise labels. In our research, we find that spatiotemporal data
enjoys the nice property of periodicity and closeness, and human mobility
sequences usually reveal the multi-level periodicity in both long-term and
short-term (Feng et al., 2018). This intuition provides us the opportunity to
detect the internal data noises and sequence pattern variations from the
content perspective, by computing period-wise sequence similarities where we
reuse the concept of period in Section 4.2.

To this end, we propose the multi-scale similarity-based neural data quality
estimation which is illustrated in Figure 3. The neural data quality
estimation is specified to each individual region to capture the internal
consistency of data observations. We implement this data quality estimation as
follows. Firstly, we organize $q+2$ periods as a human mobility sequence for
each region, i.e. closeness period $\mathcal{P}_{c}$, daily periodicity
$\mathcal{P}_{d_{i}}(i\in{1,2,...,q})$ and long-term weekly pattern
$\mathcal{P}_{l}$. For region $r_{i}$, we denote the selected $q+2$ historical
periods of its human mobility intensity set $\mathcal{H}_{i}^{O}$ as,

(4)
$\mathcal{H}_{i}^{O}=\\{\;\bm{h}_{i}^{l}\;,\;\bm{h}_{i}^{{d_{1}}}\;,...,\;\bm{h}_{i}^{{d_{q}}},\bm{h}_{i}^{c},\;\\}$

and we correspondingly redefine the superscript of $\bm{h}_{i}^{*}$ in
$\mathcal{H}_{i}^{O}$ as $\\{0,1,2,...,q+1\\}$ for simplicity. We then develop
our model in a period-level and each period still consists of $p$ intervals.

Figure 3. Structure of neural data quality estimation

Second, we embed the context factors of respective periods and add them into
the period sequence. A neural network (e.g. fully-connected layers) is then
imposed to each period sequence for learning period-level deep
representations. The context encapsulated mobility intensity $\bm{I}_{i}^{j}$
during period $j$ is formulated by

(5)
$\bm{I}_{i}^{j}=\bm{W}_{i}^{j}(({\bm{W}_{ex_{i}}^{j}}\bm{ex}_{i}^{j})\oplus\bm{h}_{i}^{j})+\bm{b}_{i}^{j}$

where $\bm{ex}_{i}^{j}$ denotes the concatenated $L_{c}$-dimensional
contextual factors of $j$-th period at the region $i$,
${\bm{W}_{ex_{i}}^{j}}\in{\mathbb{R}^{N\times{L_{c}}}}$ is the weight of
mapping function for aligning the dimensions of external factors to the same
as $\bm{h}_{i}^{j}$. Here, $\bm{W}_{i}^{j}\in{\mathbb{R}^{{L_{e}}\times N}}$
and $\bm{b}_{i}^{j}\in{\mathbb{R}^{{L_{e}}\times 1}}$ are learnable weight and
bias for period embedding, where $L_{e}$ denotes embedded period dimension.
Noted that $\oplus$ is the element-wise addition operation.

Subsequently, we compute the period-wise similarities among all periods, and
for period $m$ we have,

(6) ${{s}_{i}^{m}}=\frac{1}{{q+1}}\sum\limits_{j=1(j\neq
m)}^{q+2}{{\rm{sim}}(\bm{I}_{i}^{m},\bm{I}_{i}^{j})}$

where ${s}_{i}^{m}$ is the $i$-th element in vector $\bm{s}^{m}$, and the
similarity is measured by the Hadamard product between $\bm{I}_{i}^{m}$ and
$\bm{I}_{i}^{j}$,

(7)
${\rm{sim}}(\bm{I}_{i}^{m},\bm{I}_{i}^{j})=\bm{I}_{i}^{m}\cdot\bm{I}_{i}^{j}$

As data noise and uncertainty of observations are inversely correlated with
the period-wise similarity, we can obtain uncertainty in internal content view
by imposing a negative exponential function and linear transformations to
$s_{i}^{m}$ where $\bm{W}_{I}^{m}\in\mathbb{R}^{N\times N}$,
$\bm{b}_{I}^{m}\in\mathbb{R}^{N\times 1}$ are parameters in the learnable
transformation. The citywide internal content uncertainty $\bm{U}_{I}^{m}$ of
period $m$ is learned by,

(8)
$\bm{U}_{\mathit{I}}^{m}=\bm{W}_{{\mathit{I}}}^{m}{e^{-{\bm{s}^{m}}}}+\bm{b}_{\mathit{I}}^{m}$

It is worth noting that the weekly period $\bm{I}_{i}^{0}$ (corresponding to
$\bm{h}_{i}^{l}$) is the high-level summarized mobility pattern during the
same period of different days, which can be viewed as a multi-scale temporal
pattern, along with consecutive mobility intensities from $\bm{I}_{i}^{{1}}$
to $\bm{I}_{i}^{{q}}$.

####  4.3.2. Context interaction modeling

As pointed earlier, external contextual factors tend to interact with each
other and contribute to the prediction uncertainty. For instance, mobilitIES
in regions of different functionalities are with various sensitivity to
extreme weather. And the mobility volumes become difficult to quantify when
there exist urban events such as concerts and accidents, because urban
travelers will randomly select unhindered segments heading for their
destinations. This can lead to spatially increasing mobility uncertainty. With
these intuitions, we propose a deep Factorization Machine-based Graph
Convolutional Network (FM-GCN) to quantify context influences on uncertainty
by simultaneously modeling context interactions and spatial dependencies
between various external contextual factors.

Technically, deep factorization machine was proposed in (Lian et al., 2018) to
extract the field-wise interactions by performing vector-level multiplication
and learning feature interactions implicitly in recommendation system. In our
work, we take advantage of this vector-level interaction modeling in FM and
the spatially uncertainty propagation learning in GCN, and then seamlessly
combine the FM and GCN to achieve the mappings from context interactions to
spatiotemporal uncertainties. To be detailed, as Figure 4 shown, given the
period $m$ and region $i$, we first embed the $Q$ categories of context
factors into $Q$ vectors $\bm{e}_{i}^{m,c_{u}}(u=1,2,...,Q)$ with the fixed-
length of $L_{ce}$ as different fields in our FM, where $c_{u}$ represents the
$u$-th category of the context factor.

Given period $m$ and region $i$, we formulate the field-wise interaction
learning as,

(9)
$\bm{e}_{i}^{m,({c_{u}},{c_{v}})}=(\bm{e}_{i}^{m,{c_{u}}}\cdot\bm{e}_{i}^{m,{c_{v}}})\bm{W}_{{E_{i}}}^{({c_{u}},{c_{v}})}$

where $\bm{W}_{{E_{i}}}^{({c_{u}},{c_{v}})}\in\mathbb{R}^{{L_{ce}}\times
L_{\mathit{ie}}}$ is the learnable weight that implements the interaction
learning between $u$-th and $v$-th factors and maps the interaction embeddings
into $L_{\mathit{ie}}$ dimensions. By concatenating embeddings of all fields
and their counterpart interactions together, we obtain the region-wise period-
level context interactions
$\bm{E}_{i}^{m}\in\mathbb{R}^{1\times{(Q\times{L_{ce}}+\frac{{Q(Q-1)}}{2}\times{L_{\mathit{ie}}})}}$.

Figure 4. Details of FM-GCN

Motivated by the capacity of non-Euclidean spatial propagation in GCN, we
hereby employ the GCN blocks to carry out the spatial influence aggregation
with our mobility-involved adjacent matrix. By defining the compressed context
interactions $\bm{E}_{i}^{m}$ as features of node $i$ in urban graph where
$\bm{E}_{i}^{m}$ is the element in citywide context interaction tensor
$\bm{E}^{m}$, We can perform spatial aggregation by Eq.3. The citywide
uncertainty regarding external context interactions $\bm{U}_{E}^{m}$ can be
learned by,

(10) ${\bm{U}_{E}^{m}}=\bm{{\rm
GC}}(\bm{A}^{m},{\bm{E}^{m}};{\bm{\theta}_{F_{gc}}})$

where $\bm{A}^{m}$ denotes the average of adjacent matrices at all intervals
during period $m$, and $\bm{\theta}_{F_{gc}}$ is the graph convolution kernels
to perform spatial context aggregation. The proposed FM-GCN jointly extracts
the context interactions and aggregates spatial influences, thus the graph
convolution structure enjoys the flexible kernel numbers to further generate
feature interactions, and ultimately squeeze them to $N$-dimension vector
which represents region-wise uncertainty.

####  4.3.3. Internal and external uncertainty aggregation

We have described the period-level internal content uncertainty and
spatiotemporal external context uncertainty in previous sections, where
${\bm{U}_{I}^{(m,i)}}$ and ${\bm{U}_{E}^{(m,i)}}$ are elements in two
respective tensors ${\bm{U}_{I}}$ and ${\bm{U}_{E}}$, referring to two sources
of uncertainties in region $i$ at period $m$. In this section, to jointly
optimize these two kinds of uncertainties and incorporate temporal uncertainty
evolutions, we propose a period-wise LSTM. We realize this process in two
steps, 1) combining the two kinds of uncertainties into period-wise overall
uncertainty $\bm{U}_{o}^{m}$ with an aggregation function
$\bm{{\rm{aggr}}(\cdot)}$ , 2) capturing temporal evolution patterns of
uncertainties among different periods with Content-Context uncertainty LSTM
(C2-LSTM). The citywide unified uncertainty of the $T+1$ interval
${\bm{U}^{T+1}}$ can be predicted by,

(11) $\bm{U}_{o}^{m}=\bm{{\rm{{aggr}}}}(\bm{U}_{I}^{m},\bm{U}_{E}^{m})$ (12)
${\bm{U}^{T+1}}=\bm{{\rm{{C2-LSTM}}}}(\bm{U}_{o}^{m};{\bm{\theta}_{CL}}{\rm{)}}$

where $\bm{\theta}_{CL}$ denotes parameters in the C2-LSTM, and
$\bm{{\rm{aggr}}(\cdot)}$ can be instantiated as concatenation or matrix-based
fusion.

####  4.3.4. Active hierarchical uncertainty learning

Epistemic uncertainty can be explained as distribution differences between the
samples input and samples have been trained, while aleatoric uncertainty is
explained as the inherent noise and random influences that cannot be explained
explicitly. Based on that, instead of passively learning uncertainties with
multiple times of training, we design a hierarchical data turbulence scheme to
imitate the OOD samples, slightly noisy samples for actively learning
epistemic and aleatoric uncertainty. This data turbulence mechanism is
implemented through adding different degrees of Gaussian noises into existing
samples with a noise injection function $\textbf{Noise}(\cdot)$. The noise
injections can perform drastic turbulence and tiny drift to simulate OOD and
noisy samples, respectively. For a specific region $r_{i}$ at the interval
$\Delta t$, the corrupted observation value $H_{{C_{i}}}^{\Delta t}$ can be
derived by,

(13) $H_{{C_{i}}}^{\Delta t}={\textbf{Noise}}(H_{i}^{\Delta t})$

Even though, the core challenge of lacking definite labels in uncertainty
quantification still remains unresolved. To guide the uncertainty learning, we
regard this task as weak supervised learning and subsequently propose two
indicators of both data quality and unified spatiotemporal uncertainty, then
we can actively quantify the uncertainty in cooperation with above data
turbulence scheme.

Firstly, based on above analysis of the active hierarchical sample turbulence,
our neural data-quality estimation is analogous to epistemic uncertainty
modeling, thus data-quality estimation can not only serve to quantify random
noise in aleatoric perspective, but has another role of detecting the OOD
samples in epistemic perspective. The quantified degree of region-wise noise
is directly measured by the absolute error between original samples and noisy
samples, and consequently can be viewed as the weak supervised information in
our data quality estimation. Formally, we present the weak supervised data
quality indicator in interval $\Delta t$ as,

(14) $\sigma_{qua}^{(i,\Delta t)}=|H_{i}^{\Delta t}-H_{{C_{i}}}^{\Delta t}|$

For period-level uncertainty quantification, we also need to average the
interval-level data quality into period-level, e.g $\sigma_{qua}^{(i,m)}$ at
the $m$-th period.

Secondly, to achieve final predicted uncertainty, we need to find an
informative indicator of unified period-level uncertainty. Here we refer to
variance, which is a statistic for dispersion measurement and can be seen as
the potential variations and uncertainty in regression tasks (Postels et al.,
2019; Hafner et al., 2020). Inspired by the spatial proximity, temporal
periodicity and closeness in spatiotemporal data, we hereby propose a
spatiotemporal variance as a weak supervised loss to learn the uncertainty
mapping functions from historical observations. We first define ${\rm
stdv}({\mathcal{V}^{*}})$ as the function for computing the standard deviation
for a set of values in $\mathcal{V}^{*}$. Specifically, for region $r_{i}$ at
period $m$, the proposed spatiotemporal variance is determined by three views.
1) Spatial view: Associated with the adjacent matrix $\bm{A}^{t}$, we select a
set of neighboring observations of $r_{i}$ and calculate the standard
deviation of the observations for each interval111Here we select the top-5%
most spatially nearest regions as its neighbors., and take the average value
of the deviations of all intervals into period-level as ${var}_{s}^{(m,i)}$.
2) Inter-period view: We retrieve observations of the same intervals in each
$q+2$ period, measure the observation deviations for these intervals, and
compress these deviations into a period-level variance
${var}_{\mathit{ep}}^{(\cdot,i)}$. 3) Intra-period view: We calculate the
interval-wise standard deviations of observations for each period as the
intra-period variance ${var}_{\mathit{ip}}^{(m,i)}$. By denoting the
observation in $j$-th interval of period $m$ at region $r_{i}$ as
$\widetilde{H_{{r_{i}}}^{j}}(m)$, we formally have,

(15) ${\mathop{var}}_{S}^{(m,i)}=\frac{1}{p}\sum\limits_{j=1}^{p}{\mathop{{\rm
stdv}}\limits_{{r_{k}}\in\mathcal{N}({r_{i}})}(\widetilde{H_{{r_{k}}}^{j}}(m))}$
(16)
${\mathop{var}}_{ep}^{(\cdot,i)}=\frac{1}{p}\sum\limits_{j=1}^{p}{\mathop{{\rm
stdv}}\limits_{b\in\\{0,...,q+1\\}}(\widetilde{H_{{r_{i}}}^{j}}(b))}$ (17)
${\mathop{var}}_{ip}^{(m,i)}=\mathop{{\rm
stdv}}\limits_{j\in\\{1,2,..,p\\}}(\widetilde{H_{{r_{i}}}^{j}}(m))$

where $\mathcal{N}(r_{i})$ is the neighboring region set of $r_{i}$. For
simplicity, we average the three types of variances as the spatiotemporal
variance indicator ${var}_{ST}$ in the specific spatiotemporal domain, which
is written as,

(18) ${{{var}_{ST}}^{(m,i)}}={\rm
Avg}({\mathop{var}}_{S}^{(m,i)},{\mathop{var}}_{ep}^{(m.i)},{\mathop{var}}_{ip}^{(m,i)})$

where ${\rm Avg}$ is the average aggregation function. Then these data quality
and spatiotemporal uncertainty indicators will correspondingly change with the
data turbulences for uncertainty quantification.

###  4.4. Gated Mobility-uncertainty Re-calibration bridge

The objective of our uncertainty quantification can be generally summarized as
two aspects, to learn what the model does not know, and to maximumly boost the
prediction performance. Hence, it is of great significance to further capture
the reciprocity and interactions between the uncertainty and predicted
results. We argue that uncertainties can be decomposed into irreducible
variation which can be seen as the inherent randomness, and the complementary
parts to prediction results, which may be reducible and helpful to prediction
task. Based on this intuition, we propose a Gated Mobility-uncertainty Re-
calibration (GMuR) bridge to proactively learn the complementary parts and
interactions between point estimation and uncertainty quantification,
cooperatively benefiting both tasks from each other. The idea of GMuR is to
learn how uncertainty variations impact prediction results and subsequently
reduce the uncertainty itself. Formally, we denote the Gate as $f_{gate}$,
then the calibrated mobility intensity and uncertainty can be written as:

(19)
${f_{gate}}=\tanh({\bm{W}_{gate}}(\widehat{{\bm{U}^{T+1}}}\circ\widehat{{\bm{H}^{T+1}}}))$

(20)
$\widehat{{\bm{H}^{T+1}}}=\widehat{{\bm{H}^{T+1}}}+\widehat{{\bm{U}^{T+1}}}\cdot{f_{gate}}$

(21)
$\widehat{{\bm{\sigma}^{T+1}}}=\widehat{{\bm{U}^{T+1}}}-\widehat{{\bm{U}^{T+1}}}\cdot{f_{gate}}$

where $\circ$ is the concatenation operation, and
$\bm{W}_{gate}\in{\mathbb{R}^{N\times 2N}}$ is the learnable weight to map the
concatenation of learned uncertainty and predicted results to an $N$-dimension
gate. Here we select tanh as the activation function to allow both positive
and negative variations to transfer into predictions.

###  4.5. Loss function and optimization

With two weak indicators, GMuR bridge, and the hierarchical data turbulence,
we can finally perform the active hierarchical uncertainty quantification, as
it is briefly illustrated in Figure 5. To take advantage of these uncertainty
indicators, we accommodate the data quality and spatiotemporal variance for
period-wise guidance, and followed by a last-interval forecasting. Thus, we
are expected to minimize the following loss in Eq 22, in which we capture
uncertainty evolution on aggregated period-levels with the former two terms,
as well as predict mobility intensity and quantify uncertain fluctuations in
last interval with the latter two terms.

(22)
$\small\begin{split}Loss(\Theta)=\sum\limits_{m=0}^{q+1}{\sum\limits_{i=0}^{N-1}{({{(U_{I}^{(m,i)}-\sigma_{qua}^{(m,i)})}^{2}}+{{(U_{o}^{(m,i)}-{\mathop{var}}_{ST}^{(m,i)})}^{2}})+}}\\\
\sum\limits_{i=0}^{N-1}{({{(\widehat{{{\sigma}_{i}^{T+1}}}-{\mathop{var}}_{ST}^{(T+1,i)})}^{2}}+{{(\widehat{H_{i}^{T+1}}-H_{i}^{T+1})}^{2}})}+{\left\|{\bm{\sigma}^{T+1}}\right\|^{2}}\end{split}$

where $\Theta$ denotes the set of learnable parameters including all
$\bm{\theta}_{*}$ and $\bm{W}_{*}$, and ${\left\|\cdot\right\|^{2}}$ denotes
L2-norm for regularizing uncertainties from explosion. The item
$\sigma_{qua}^{(m,i)}$ is enabled when data turbulence is utilized, and we
will directly learn the inherent randomness in existing observations if
turbulence is not utilized. For optimizing the algorithm, we introduce Adam
optimizer to train our STUaNet (Kingma and Ba, 2015).

Figure 5. Illustration of active and hierarchical uncertainty learning in C2UQ

##  5\. Empirical studies

###  5.1. Data description

We use three real-world datasets to verify the effectiveness of uncertainty
quantification, and the statistics of these datasets are listed in Table
LABEL:tab:dataset.

NYC Taxi. This dataset consists of approximate 7.5 million taxicab trip
records including both pick-up and drop-off events from Jan 1st 2017 to May
31th 2017 in online ride-hailing services. It can typically be an indicator of
human mobility where pick-ups and drop-offs stand for departures and arrivals
in a specific region222Here we utilize pick-up events for evaluation..

SIP Surveillance. This dataset contains traffic volumes at 108 interactions in
intelligent transportation system, covering the urban area of 45.5 ${km}^{2}$
in Suzhou Industrial Park. We here utilize dataset from Jan 1st 2017 to March
31st 2017.

California Check-ins in Gowalla. It is a widely used Location-Based Social
Network dataset, and contains a total of 736 k check-in records over the
period from Feb 1st, 2009 to Oct 31st, 2010 333
http://snap.stanford.edu/data/loc-gowalla.html. We choose the state-wide
check-ins of California (Carlifo), by filtering longitude and latitude, and
then cluster these POIs into 1,200 disjointed regions.

Even though the predictions and uncertainty quantification are correlated with
the spatiotemporal scales, the solution evaluations are orthogonal to the
generalities of our proposals, based on common urban division settings and
fair comparison mechanisms (Zhang et al., 2017). For simplicity, we fix the
time interval as 30 minutes except 1 hour for California check-ins.

Table 1. Dataset statistics Dataset |  | Categroy
---
of datasets
| # of
---
records
| Granularity of
---
region division
| # of
---
regions
NYC | Taxi trips | 7.5 million |  1.5 $\times$1.5 $km^{2}$ | 354
SIP | Surveillance | 2.7 million |  0.5 $\times$ 0.5 $km^{2}$ | 108
Carlifo | Check-ins | 736 k | Cluster-based | 1200

###  5.2. Performance Comparison

####  5.2.1. Implementation details

We organize our datasets into training samples and divide the samples into
60%, 30% and 10% for training, testing and validation. The initial learning
rate is set to 0.001 with an 0.98 attenuation rate every 10 epochs. All
methods are implemented in Tensorflow 1.15.0 and trained with 2 Tesla v100
GPUs. We stack 2 GCN layers and 2 LSTM layers in each spatial and sequential
learning block, and instantiate $\rho=0.6,p=6,q=3$444All these hyperparameters
are set according to references (Bai et al., 2019; Zhang et al., 2017) and
also fine-tuned carefully, we omit the process due to limited space in this
paper..

####  5.2.2. Evaluation metrics

Given the predicted point estimation ${\widehat{H_{i}^{t}}}$, uncertainty
quantification ${\widehat{\sigma_{i}^{t}}}$, and ground truth ${H_{i}^{t}}$ at
the region $i$ during interval $t$, we evaluate the effectiveness of our model
from aspects of both prediction accuracy and uncertainty quantification
quality. Regarding prediction accuracy, we employ RMSE and MAPE for
evaluation. To evaluate uncertainty learning quality and verify whether the
predicted intervals considering uncertainty can accurately capture the ground
truth, we introduce the the prediction interval coverage probability (PICP)
metric according to (Wang et al., 2019), which is defined as

(23) ${\mathit{PICP}}=\frac{{{C_{obj}}}}{{NT}}$ (24)
${C_{obj}}=\sum\limits_{t=0}^{T-1}{\sum\limits_{i=1}^{N}{{\rm{II}}(\widehat{H_{i}^{t}}-\widehat{\sigma_{i}^{t}}<H_{i}^{t}<\widehat{H_{i}^{t}}+\widehat{\sigma_{i}^{t}})}}$

where ${{\rm{II(\cdot)}}}$ is an indicator function.

####  5.2.3. Effectiveness of collective human mobility forecasting

In terms of forecasting tasks, we compare our STUaNet against some
representative spatiotemporal prediction methods. (1) STG2Seq: It uses a
hierarchical graph convolution model to capture both spatial and temporal
dependencies for passenger demand forecasting. (2) STGCN: This work designs a
novel complete convolution structure for comprehensive spatiotemporal
correlation modeling in human mobility. (3) MDL: It is a state-of-the-art
collective human mobility forecasting method which inherited from ST-ResNet
and simultaneously models nodes and edges with multiple deep learning tasks.

The upper half of Table 2 illustrates the forecasting comparison results. By
carefully considering uncertainty quantification and gravity model-based
mobility transitions, our method can consistently outperform three baselines
on all datasets. More excitingly, STUaNet surpasses the best baseline DCRNN,
STGCN, STG2Seq 13.11%, 26.59% and 47.21% on the metric of MAPE in SIP, NYC and
Califor, respectively. We also replace the dynamic adjacent matrix with a
static distance-based matrix in our STUaNet for an ablative evaluation, and
the performance decreases on STUaNet-Static $\bm{A}$ can prove the necessity
of mobility transitions. These promising results on all three datasets verify
that our uncertainty quantification is solid based on this forecasting
framework.

####  5.2.4. Effectiveness of uncertainty quantification

Next, we evaluate the capacities of uncertainty estimation and prediction
calibration in different uncertainty learning baselines. We here employ four
popular uncertainty quantification mechanisms as baselines. (1) NLL loss: The
negative log likelihood (NLL) loss is utilized to perform station-level
Numerical Weather Forecasting (NWF) and the associated uncertainty
quantification (Wang et al., 2019). (2) Dropout-based BNN: We realize this BNN
method with dropout (Gal and Ghahramani, 2016; Gal et al., 2017), and this
mechanism is widely applied in uncertainty quantification for numerous risk-
sensitive tasks, ranging from computer vision (Kendall and Gal, 2017; Leibig
et al., 2017) to NWF (Vandal et al., 2018; Liu et al., 2020). (3)
DeepEnsembles: We perform the uncertainty learning with the ensemble method
which trains a series of neural networks with different initializations
(Lakshminarayanan et al., 2017)555The number of ensembled networks is set as
5, according to (Lakshminarayanan et al., 2017). . (4) SDE method: This is a
state-of-the-art uncertainty learning model with injections of noise and OOD
samples, and we reproduce this method by referring (Kong et al., 2020).

All numerical results on uncertainty quantification are reported in the bottom
half of Table 2. Overall, the proposed STUaNet with C2UQ achieves best
performance on almost all metrics over three datasets regarding both
forecasting and uncertainty learning. Integrated with C2QU, STUaNet improves
the PICP in SIP from 68.83% of DeepEnsembles to 80.74%, increasing 17.30%, and
can also obtain comparable accuracy with DeepEnsembles in both NYC and
Califor. The slight decrease of PICP in NYC may be attributed to its
imbalanced distribution of mobility. In addition, almost all uncertainty-aware
forecasting can perform better than non-uncertainty-equipped methods on MAPE
metric, which demonstrates the necessity and superiority of spatiotemporal
uncertainty quantification. And the higher prediction accuracy of our C2UQ can
boil down to GMuR bridge with prediction re-calibrations.

For a detailed analysis, SDE surpasses all other baselines on forecasting
metrics. Its core idea can be viewed as a denoise autoencoder mechanism where
noisy and pure observations are trained alternately. The superior results
illustrate the effectiveness of alternate training between in-distribution,
noisy and OOD samples. However, it has a relatively lower PICP due to lacking
uncertainty labels for exact quantified uncertainty learning. The uncertainty
quantification with only negative log likelihood performs worse than other
methods on predictions and shows an instable learning process. This further
provides evidence for the intuition of separating learning uncertainty and
prediction values. The relatively higher PICPs of NLL and DeepEnsembles are
mostly because NLL and ensembles usually derive a larger uncertainty without
any guidance. Monte-Carlo Dropout-based BNN and DeepEnsembles illustrate a
stable training process and can achieve favorable performances, which benefits
from the ensembled mechanisms where statistical moment estimations are
employed for uncertainty quantification.

In summary, we argue that these methods are less effective than ours on
uncertainty learning in two aspects. First, they are not tailored for
spatiotemporal modeling, whichs fail to extract spatiotemporal evolutions and
content-context interactions. Second, ensembles usually require multiple times
of training which cost much memory and computation while our C2QU enjoys the
efficiency of one-time training. Finally, we also integrate the well-performed
STG2Seq with our C2UQ for uncertainty quantification and the results
demonstrate the scalability and generality of C2UQ.

Table 2. Performance comparisons on three datasets | Methods | SIP | NYC | California
---|---|---|---|---
| RMSE |  | MAPE
---
| PICP
---
RMSE |  | MAPE
---
| PICP
---
RMSE |  | MAPE
---
| PICP
---
Baseline for spatiotemporal prediction | STG2Seq | 3.905 | 31.66% | - | 2.623 | 17.61% | - | 2.545 | 30.50% | -
STGCN | 4.509 | 35.84% | - | 2.102 | 16.47% | - | 2.621 | 32.48% | -
MDL | 2.967 | 34.45% | - | 2.984 | 18.62% | - | 1.917 | 35.39% | -
DCRNN | 4.750 | 20.21% | - | 3.185 | 37.45% | - | 4.120 | 40.02% | -
|  STUaNet-Static$\bm{A}$ | 3.358 | 19.35% | - | 1.644 | 12.90% | - | 2.276 | 22.36% | -
Baseline for uncertainty learning | NLL | 5.040 | 48.76% | 66.53% | 1.930 | 27.83% | 70.17% | 2.719 | 74.19% | 72.90%
DeepEnsembles | 4.299 | 29.36% | 68.83% | 1.247 | 23.84% | 74.25% | 2.667 | 30.98% | 42.66%
Dropout-based BNN | 4.086 | 22.97% | 61.86% | 2.697 | 13.09% | 74.32% | 2.668 | 26.78% | 67.50%
SDE | 3.086 | 20.32% | 60.96% | 2.065 | 11.87% | 67.97% | 2.332 | 18.27% | 87.67%
STUaNet(Ours) | 2.942 | 17.56% | 80.74% | 1.624 | 11.79% | 72.14% | 2.586 | 16.10% | 88.46%
STG2Seq+C2UQ | 3.528 | 22.41% | 78.64% | 2.320 | 12.96% | 70.12% | 2.548 | 22.52% | 78.80%

####  5.2.5. Quality of uncertainty learning in different intervals.

To provide an intuitive visualization of our uncertainty quantification
quality, we choose one typical region in each dataset to illustrate the
interval-level prediction and uncertainty results in Figure 6. By focusing on
the microscopic perspective of our results, we find that the predicted
uncertainties are mostly consistent with the prediction errors. As observed,
the prediction interval doesn’t become wider or fluctuate heavily over time,
and instead, it presents that the widths during nights are mostly narrower
than daylights. The main reason lies in that the mobilities are more stable at
nights. The circled inaccurate predictions and large uncertainty fluctuations
are evening and morning peak hours in SIP and NYC where both suffer rains. We
can infer that the concurrent contextual scenarios like rains occur less
frequently in training sets and thus increase the uncertainty on out-of-
distribution observations. Thanks to uncertainty prediction, these
uncertainties in predicted results can be effectively exhibited for a more
reliable decision, thus citizens and administrations can prepare well for the
possible uncertainty conditions beforehand. Hence, our uncertainty-aware
spatiotemporal forecasting can provide more informative and valuable
quantified decision-making basis for urban trip planning and city safety.

Figure 6. Quality visualization of uncertainty quantification in different
datasets Figure 7. Uncertainty studies in SIP. Solid circles notate the
ground-truth urban events while dashed circles highlight regions with high
uncertainties for comparison.

###  5.3. Ablation study

We conduct ablation studies to test the sensitivity of each component in our
integrated STUaNet. We successively remove typical components as variants of
C2UQ. C2UQ-1: Remove the neural data-quality estimation. C2UQ-2: Omit the FM-
GCN and spatiotemporal variance components. C2UQ-3: Expurgate the GMuR bridge.
C2UQ-4: Omit the alternate training process and only train on pure dataset.

Table 3 illustrates the performance of four ablative variants on three
datasets. From the quantitative results, we can see the integrated C2UQ
outperforms all its variants. In particular, SIP and NYC datasets are more
sensitive to data quality estimation and GMuR modules, while performances on
Califor dataset are largely improved by alternate training process. After
removing the FM-GCN module, it becomes difficult to capture uncertainty
without considering the interactions of context factors and variance-based
weak supervised information, by illustrating a prominent decreased performance
on three datasets. In contrast, our C2UQ can encourage larger uncertainty for
higher spatiotemporal variance and vice versa, where we can actively learn
uncertainties. The decreased performance of C2UQ-3 and C2UQ-4 demonstrate the
success of re-calibrating spatiotemporal predictions with uncertainty-aware
mechanism, and eventually facilitates uncertainty quantification tasks with
weak supervised learning.

Table 3. Performances of ablative variants on three datasets Variants | SIP | NYC | Califor
---|---|---|---
MAPE/PICP | MAPE/PICP | MAPE/PICP
C2UQ-1 | 33.13%/73.35% | 28.70%/58.07% | 9.24%/72.40%
C2UQ-2 | 21.29%/70.21% | 27.96%/60.59% | 14.39%/69.31%
C2UQ-3 | 28.20%/63.44% | 10.65%/63.39% | 22.93%/67.43%
C2UQ-4 | 24.86%/80.80% | 36.20%/71.50% | 20.78%/67.00%
C2UQ | 17.56%/80.74% | 11.79%/72.14% | 16.10%/88.46%
Figure 8. Performance on different parameter settings

###  5.4. Case study

A higher uncertainty indicates that the prediction model is not confident
about the predicted value or there exists a large dispersion among its
historical observations under this context. In this section, we generate the
mobility and uncertainty maps with STUaNet from test sets, to investigate how
can they benefit diverse web applications.

(1) Urban event detection and prediction. Figure 7(a) illustrates the urban
situation of peak morning hours on March 2nd. Under the context of sunny
morning, these three highlighted regions with both high uncertainties and
mobility intensities can be interpreted as urban events like congestions,
which are further verified in ground truth. These predictions motivate
travelers to re-plan their routes and urge traffic agency to proactively
evacuate crowds to avoid urban safety concerns like accidents and spread of
pandemics. With a heavy rain, the increasing uncertainties across urban
regions in subfigure (b) reveal our model lacking the confidence in such
prediction, due to the rare weather event and complicated context
interactions. This not only reflects the principle of epistemic uncertainty,
also verifies the common practice that the increasing probability of
burstiness like accidents on rainy days can reasonably contribute to mobility
uncertainties. Therefore, it is of great significance to provide uncertainty-
aware predictions which actively prevent misleading decision-makings. (2)
Mining potential commercial interests. As shown in subfigure (c), there
exhibits an expansive coverage of higher uncertainty with moderate mobility
intensity around Jinji Commercial Center, which implies the potential mobility
fluctuations during following intervals. For businessmen, crowds are profits,
thus they can take advantage of these uncertainties and preferable weather, to
maximumly motivate buying desires of consumers and drive the uncertainty into
a positive increase of intensities, by propagandizing the sale promotions with
online web applications. (3) Deeper understanding the nature of human
mobility. We can also discover several interesting phenomena. Firstly, we
identify that commercial centers are more sensitive to weather changes while
arterial roads are more stable to context, and particularly the Jinji Circle
is mostly with high uncertainties as it may experience the quick and dynamic
flow changing for its integratedly complicated functionalities. Secondly, we
can also provide urban planning suggestions for regions A and B to build some
commercial complex for attracting the mobilities as they are currently with
both lower uncertainty and volume intensity. By uncertainty learning, we can
dive deeper into human mobility, uncover the potential intentions and
facilitate the urban planning and human-centered computing for a better life.

###  5.5. Hyperparameter study

To investigate how different values of hyperparameters impact the prediction
performance, we show the hyperparameter studies here. The hyperparameters are
three-fold here, i.e., the number of GCN layers, the number of LSTM layers and
$\rho$ in adjacent matrix. We show the fine-tuning process in Figure 8 and for
simplicity, we only compare the metric of MAPE in regression tasks which is
more fair and intuitive for different datasets. Finally, we stack 2 GCN
blocks, 2 LSTM layers, and set $\rho$ = 0.6 on all three dataset learning
tasks.

##  6\. Conclusion and discussion

STUaNet, which internalizes the uncertainties into the model from the
perspectives of internal content consistency, external context interactions
and temporal evolutions, is a pioneering attempt on spatiotemporal uncertainty
quantification in collective human mobility. In particular, to tackle
uncertainty quantification challenge, we transfer it into a weak supervised
learning and an active hierarchical uncertainty learning by proposing two
implicit but quantifiable uncertainty indicators. Extensive experiments on
three mobility-related datasets verify the effectiveness of our proposal.

For uncertainties, regardless of whether they are aleatoric or epistemic and
are internal or external, these uncertainties are both data-dependent and
model-dependent. Therefore, we burst forth a bold idea that all these
uncertainties can be summarized from an epistemic view by considering
unpredictable factors and highly complex interactions as high-level knowledge
that should be deeply learned and understood from a long-term perspective. In
future, we will further explore both the quantified regularities and
uncertainties of spatiotemporal data with more basic and theoretical analysis,
and hence explicitly optimize spatiotemporal predictions by identifying the
sources of deductible uncertainties.

###### Acknowledgements.

This work is partially supported by Zhejiang Lab’s International Talent Fund
for Young Professionals, Anhui Science Foundation for Distinguished Young
Scholars (No.1908085J24), NSFC (No.62072427, No.61672487, No.61772492), and
Jiangsu Natural Science Foundation (No.BK20191193).

## References

  * (1)
  * Bai et al. (2019) Lei Bai, Lina Yao, Salil S Kanhere, Xianzhi Wang, and Quan Z Sheng. 2019.  STG2seq: spatial-temporal graph to sequence model for multi-step passenger demand forecasting. In _28th International Joint Conference on Artificial Intelligence, IJCAI 2019_. International Joint Conferences on Artificial Intelligence, 1981–1987.
  * Chen et al. (2013) Bei Chen, Fabio Pinelli, Mathieu Sinn, Adi Botea, and Francesco Calabrese. 2013.  Uncertainty in urban mobility: Predicting waiting times for shared bicycles and parking lots. In _16th International IEEE Conference on Intelligent Transportation Systems (ITSC 2013)_. IEEE, 53–58.
  * Chen et al. (2020) Huimin Chen, Zeyu Zhu, Fanchao Qi, Yining Ye, Zhiyuan Liu, Maosong Sun, and Jianbin Jin. 2020.  Country Image in COVID-19 Pandemic: A Case Study of China.  _IEEE Transactions on Big Data_ (2020).
  * Der Kiureghian and Ditlevsen (2009) Armen Der Kiureghian and Ove Ditlevsen. 2009.  Aleatory or epistemic? Does it matter?  _Structural safety_ 31, 2 (2009), 105–112.
  * Feng et al. (2020) Jie Feng, Yong Li, Zeyu Yang, Qiang Qiu, and Depeng Jin. 2020.  Predicting Human Mobility with Semantic Motivation via Multi-task Attentional Recurrent Networks.  _IEEE Transactions on Knowledge and Data Engineering_ (2020).
  * Feng et al. (2018) Jie Feng, Yong Li, Chao Zhang, Funing Sun, Fanchao Meng, Ang Guo, and Depeng Jin. 2018.  Deepmove: Predicting human mobility with attentional recurrent networks. In _Proceedings of the 2018 world wide web conference_. 1459–1468.
  * Gal and Ghahramani (2016) Yarin Gal and Zoubin Ghahramani. 2016.  Dropout as a bayesian approximation: Representing model uncertainty in deep learning. In _international conference on machine learning_. 1050–1059.
  * Gal et al. (2017) Yarin Gal, Jiri Hron, and Alex Kendall. 2017.  Concrete dropout. In _Advances in neural information processing systems_. 3581–3590.
  * Geng and Yang (2017) Wei Geng and Guang Yang. 2017.  Partial correlation between spatial and temporal regularities of human mobility.  _Scientific reports_ 7, 1 (2017), 1–9.
  * Guo et al. (2019) Shengnan Guo, Youfang Lin, Ning Feng, Chao Song, and Huaiyu Wan. 2019.  Attention based spatial-temporal graph convolutional networks for traffic flow forecasting. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , Vol. 33. 922–929.
  * Hafner et al. (2020) Danijar Hafner, Dustin Tran, Timothy Lillicrap, Alex Irpan, and James Davidson. 2020.  Noise contrastive priors for functional uncertainty. In _Uncertainty in Artificial Intelligence_. PMLR, 905–914.
  * He and Shin (2020) Suining He and Kang G Shin. 2020.  Dynamic Flow Distribution Prediction for Urban Dockless E-Scooter Sharing Reconfiguration. In _Proceedings of The Web Conference 2020_. 133–143.
  * Ikanovic and Mollgaard (2017) Edin Lind Ikanovic and Anders Mollgaard. 2017.  An alternative approach to the limits of predictability in human mobility.  _EPJ Data Science_ 6, 1 (2017), 12.
  * Kendall and Gal (2017) Alex Kendall and Yarin Gal. 2017.  What uncertainties do we need in bayesian deep learning for computer vision?. In _Advances in neural information processing systems_. 5574–5584.
  * Kingma and Ba (2015) Diederik P Kingma and Jimmy Ba. 2015.  Adam: A method for stochastic optimization. In _International Conference for Learning Representations_.
  * Kong et al. (2020) Lingkai Kong, Jimeng Sun, and Chao Zhang. 2020.  SDE-Net: Equipping Deep Neural Networks with Uncertainty Estimates.  _arXiv preprint arXiv:2008.10546_ (2020).
  * Lakshminarayanan et al. (2017) Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. 2017.  Simple and scalable predictive uncertainty estimation using deep ensembles. In _Advances in neural information processing systems_. 6402–6413.
  * Leibig et al. (2017) Christian Leibig, Vaneeda Allken, Murat Seçkin Ayhan, Philipp Berens, and Siegfried Wahl. 2017\.  Leveraging uncertainty information from deep neural networks for disease detection.  _Scientific reports_ 7, 1 (2017), 1–14.
  * Lian et al. (2018) Jianxun Lian, Xiaohuan Zhou, Fuzheng Zhang, Zhongxia Chen, Xing Xie, and Guangzhong Sun. 2018\.  xdeepfm: Combining explicit and implicit feature interactions for recommender systems. In _Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining_. ACM, 1754–1763.
  * Liao et al. (2018) Dongliang Liao, Weiqing Liu, Yuan Zhong, Jing Li, and Guowei Wang. 2018.  Predicting Activity and Location with Multi-task Context Aware Recurrent Neural Network.. In _IJCAI_. 3435–3441.
  * Liu et al. (2020) Yongqi Liu, Hui Qin, Zhendong Zhang, Shaoqian Pei, Zhiqiang Jiang, Zhongkai Feng, and Jianzhong Zhou. 2020.  Probabilistic spatiotemporal wind speed forecasting based on a variational Bayesian deep learning model.  _Applied Energy_ 260 (2020), 114259.
  * Liu et al. (2019) Yongqi Liu, Hui Qin, Zhendong Zhang, Shaoqian Pei, Chao Wang, Xiang Yu, Zhiqiang Jiang, and Jianzhong Zhou. 2019\.  Ensemble spatiotemporal forecasting of solar irradiation using variational Bayesian convolutional gate recurrent unit network.  _Applied Energy_ 253 (2019), 113596.
  * Lu et al. (2013) Xin Lu, Erik Wetter, Nita Bharti, Andrew J Tatem, and Linus Bengtsson. 2013.  Approaching the limit of predictability in human mobility.  _Scientific reports_ 3 (2013), 2923.
  * McDermott and Wikle (2019) Patrick L McDermott and Christopher K Wikle. 2019.  Bayesian recurrent neural network models for forecasting and quantifying uncertainty in spatial-temporal data.  _Entropy_ 21, 2 (2019), 184.
  * Postels et al. (2019) Janis Postels, Francesco Ferroni, Huseyin Coskun, Nassir Navab, and Federico Tombari. 2019.  Sampling-free epistemic uncertainty estimation using approximated variance propagation. In _Proceedings of the IEEE International Conference on Computer Vision_. 2931–2940.
  * Song et al. (2010) Chaoming Song, Zehui Qu, Nicholas Blumm, and Albert-László Barabási. 2010\.  Limits of predictability in human mobility.  _Science_ 327, 5968 (2010), 1018–1021.
  * Sun et al. (2020) Ke Sun, Tieyun Qian, Tong Chen, Yile Liang, Quoc Viet Hung Nguyen, and Hongzhi Yin. 2020.  Where to Go Next: Modeling Long-and Short-Term User Preferences for Point-of-Interest Recommendation. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , Vol. 34. 214–221.
  * Tossebro and Nygård (2002) Erlend Tossebro and Mads Nygård. 2002.  Uncertainty in spatiotemporal databases. In _International Conference on Advances in Information Systems_. Springer, 43–53.
  * Vandal et al. (2018) Thomas Vandal, Evan Kodra, Jennifer Dy, Sangram Ganguly, Ramakrishna Nemani, and Auroop R Ganguly. 2018.  Quantifying uncertainty in discrete-continuous and skewed data with Bayesian deep learning. In _Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining_. 2377–2386.
  * Wang et al. (2019) Bin Wang, Jie Lu, Zheng Yan, Huaishao Luo, Tianrui Li, Yu Zheng, and Guangquan Zhang. 2019.  Deep uncertainty quantification: A machine learning approach for weather forecasting. In _Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining_. 2087–2095.
  * Wang et al. (2020) Huandong Wang, Sihan Zeng, Yong Li, and Depeng Jin. 2020\.  Predictability and prediction of human mobility based on application-collected location data.  _IEEE Transactions on Mobile Computing_ (2020).
  * Yao et al. (2019) Huaxiu Yao, Yiding Liu, Ying Wei, Xianfeng Tang, and Zhenhui Li. 2019.  Learning from Multiple Cities: A Meta-Learning Approach for Spatial-Temporal Prediction. In _The World Wide Web Conference_ (San Francisco, CA, USA) _(WWW ’19)_. Association for Computing Machinery, New York, NY, USA, 2181–2191.
  * Ye et al. (2019) Junchen Ye, Leilei Sun, Bowen Du, Yanjie Fu, Xinran Tong, and Hui Xiong. 2019\.  Co-prediction of multiple transportation demands based on deep spatio-temporal neural network. In _Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining_. 305–313.
  * Yu et al. (2018) Bing Yu, Haoteng Yin, and Zhanxing Zhu. 2018.  Spatio-temporal graph convolutional networks: a deep learning framework for traffic forecasting. In _Proceedings of the 27th International Joint Conference on Artificial Intelligence_. 3634–3640.
  * Zhang et al. (2017) Junbo Zhang, Yu Zheng, and Dekang Qi. 2017.  Deep spatio-temporal residual networks for citywide crowd flows prediction. In _Proceedings of the Thirty-First AAAI Conference on Artificial Intelligence_. 1655–1661.
  * Zhang et al. (2019) Junbo Zhang, Yu Zheng, Junkai Sun, and Dekang Qi. 2019\.  Flow prediction in spatio-temporal networks based on multitask deep learning.  _IEEE Transactions on Knowledge and Data Engineering_ 32, 3 (2019), 468–478.
  * Zhao et al. (2020) Pengpeng Zhao, Anjing Luo, Yanchi Liu, Fuzhen Zhuang, Jiajie Xu, Zhixu Li, Victor S Sheng, and Xiaofang Zhou. 2020\.  Where to go next: A spatio-temporal gated network for next poi recommendation.  _IEEE Transactions on Knowledge and Data Engineering_ (2020).
  * Zipf (1946) George Kingsley Zipf. 1946\.  The P 1 P 2/D hypothesis: on the intercity movement of persons.  _American sociological review_ 11, 6 (1946), 677–686.