Table of contents
topic
Flow Prediction in Spatio-Temporal Networks Based on Multitask Deep
Learning
Paper background
In 2020, the team of Mr. Zheng Yu from Jingdong Smart City Research Institute published a work in the journal TKDE 2020 .
Abstract
Prediction of flows (e.g., car, crowd, and bicycle flows) in spatio-temporal networks plays an important role in transportation systems, which include inbound and outbound flows of a node and transfer flows between different nodes. However, this is a challenging problem affected by multiple complex factors, such as spatial correlations between different locations, temporal correlations between different time intervals , and external factors (events and weather, etc.). Furthermore, the flow of a node (node flow) and the transfer flow between nodes (edge flow) influence each other.
To address these issues, this paper proposes a multi-task deep learning framework that can simultaneously predict the flow of nodes and edges in space-time . Based on the fully convolutional network, this paper designs two models to predict the traffic of nodes and edges respectively. The two models are connected by coupling the latent representations of their intermediate layers and trained together. External factors are integrated into the framework through a gate fusion mechanism. In the edge traffic prediction model, this paper employs an embedding component to handle sparse transfers between nodes .
This paper evaluates our method on taxi data in Beijing and New York City. Experimental results show that our method outperforms 11 baselines, such as ConvLSTM, CNN, and Markov Random Field.
research content
Flow prediction in spatio-temporal networks: node flow and edge flow prediction.
The following figure shows the flow in a simple space-time network:
challenge
- Scale and complexity Computing scale and complexity: the flow in and out of a location depends on its immediate neighbors as well as its geographically distant neighbors, since people can flow between any locations, especially when some events happen in a city . Suppose a large city has a large number of locations NNN , then there areN 2 N^2NPossibility of 2 transitions, although these transitions may not occur simultaneously within a time interval. Therefore, to predict the flow of a location, whether it is inflow/outflow or transition flow, it is necessary to considerthe dependence between the location and other locations. In addition, the forecast is also related to the flow of past time intervals. Furthermore, it is not possible to predict the flow of each location separately, because locations in a city are interconnected, interrelated, and affect each other. Its complexity and scale pose great challenges to traditional machine learning models such as probabilistic graphical models.
- Model multiple correlations and external factors Model multiple correlations and external factors: When dealing with this type of forecasting problem, three types of correlations need to be established. The first is the spatial correlation between streams at different locations , including the correlation between near locations and the correlation between far locations. The second is the temporal correlation between traffic at different time intervals , including temporal proximity, periodicity, and trend. Third, the inflow and outflow are highly correlated with the transition flow and reinforce each other. The sum of transitions flowing to a location is the inflow to that location.
- Dynamics and sparsity Dynamics and sparsity of edge traffic: Flows between locations vary much more over time than flows in and out . The transition (between one location and the other) that will actually occur in the next time interval may only account for N 2 N^2N2 A very small fraction of the possibilities (i.e. very sparse). Predicting such sparse transitions in such a high-dimensional space is a very challenging task
The main contribution of the paper
This paper proposes a Multitask Deep -Learning ( MDL ) framework, including NodeNet and EdgeNet to predict the traffic of nodes and edges respectively:
-
Both NodeNet and EdgeNet are three-stream fully convolutional networks ( 3S-FCNs ), capturing three different temporal correlations:
Clossness、Period
andTrend
stream , each S-FCN captures the spatial correlation between perigee and apogee simultaneously -
Propose a gating component to fuse external factors with spatiotemporal correlations
-
To solve the sparsity problem, an Embedding component is designed in EdgeNet to encode the high-dimensional sparse input into a latent low-dimensional representation.
network model
MDL consists of three parts: data transformation, node flow modeling and edge flow modeling.
EdgeNet
The transfer flow at the edge is modeled by the image:
M t ∈ R 2 N × I × J { {
\mathcal{M}}_{t}}\in {
{\mathbb{R}} ^{2N\text{ }\!\!\times\!\!\text{ }I\text{ }\!\!\times\!\!\text{ J}}}Mt∈R2N _ × I × J
for each noderij r_{ij}rij, with at most 2 N 2N2 Possibilities of N transfers, includingNNN transfers andNNN transfers out. Among them,NNN is the total number of urban areas, defined as follows:
N ≜ ∣ V ∣ = I × JN\triangleq |V|=I\text{ }\!\!\times\!\!\text{ J }N≜∣V∣=I × J
I I I andJJJ is defined as follows:
Spatio-temporal associations are captured by FCN. As the number of convolutional layers increases, FCN can capture more and more dependencies, even city-wide spatial dependencies. However, such deep convolutional networks become difficult to train. Therefore, this paper uses residual connections to help training. The following figure is the FCN of the residual connection:
NodeNet and Bridge
Like EdgeNet, NodeNet is also based on image modeling; unlike EdgeNet, NodeNet does not have an embedding layer, because the number of channels for a single input is only 2.
Considering that node flow and edge flow are related, the representations learned from NodeNet and EdgeNet should be connected. To connect NodeNet and EdgeNet, suppose the two potential representations of NodeNet and EdgeNet are X fcn \mathcal{X}_{fcn}Xf c nand M fcn \mathcal{M}_{fcn}Mf c n. In this paper, two fusion methods are proposed.
Sum Fusion
Sum the two representations of edges and nodes directly, the same space node rij r_{ij}rijvia channel ccThe output mapping of c
is as follows: H ( c , : , : ) = X fcn ( c , : , : ) + M fcn ( c , : , : ) , c = 0 , . . . , C − 1 , \mathcal{ H}(c,:,:)=\mathcal{X}_{fcn}(c,:,:)+\mathcal{M}_{fcn}(c,:,:),c=0,.. .,C-1,H(c,:,:)=Xf c n(c,:,:)+Mf c n(c,:,:),c=0,...,C−1,
Concat Fusion
via channel ccc is in the same space noderij r_{ij}rijThe mapping at is as follows:
H ( c , : , : ) = X fcn ( c , : , : ) , c = 0 , . . . , C x − 1 H ( C x + c , : , : ) = M fcn ( c , : , : ) , c = 0 , . . . , C m − 1 , \mathcal{H}(c,:,:)=\mathcal{X}_{fcn}(c,:,:) , c=0,...,C_x-1 \\ \mathcal{H}(C_x+c,:,:)=\mathcal{M}_{fcn}(c,:,:), c=0, ..., C_m-1,H(c,:,:)=Xf c n(c,:,:),c=0,...,Cx−1H(Cx+c,:,:)=Mf c n(c,:,:),c=0,...,Cm−1 , the following figure shows the MDL
fused with Concat:
Gating mechanisms incorporate external factors
External factors such as weather, events, etc. are like a gate switch, and if it happens, the traffic will change dramatically. This paper proposes a gating mechanism that considers the influence of external factors.
First, get the gating value of EdgeNet:
F m ( i , j ) = σ ( W e ( : , i , j ) ⋅ ε t ( : , i , j ) + be ( i , j ) ), 1 ≤ i ≤ I , 1 ≤ j ≤ J \mathrm{F}_m(i,j)=\sigma(\mathrm{W}_e(:,i,j)·\varepsilon_t(:,i,j)+\mathrm{ b}_e(i,j)), 1\leq i \leq I,1\leq j \leq JFm(i,j)=s ( We(:,i,j)⋅et(:,i,j)+be(i,j)),1≤i≤I,1≤j≤J
adopts a Product fusion based on the gating mechanism:
M ^ t ( c , : , : ) = tanh ( F m ⊙ MR es ( c , : , : ) ), c = 0 , . . . , 2 N − 1 , \widehat{\mathbf{M}}_t(c,:,:)=tanh(\mathrm{F}_m⊙\mathcal{M}_{Res}(c,:,:)), c=0,. ..,2N-1,M
t(c,:,:)=English ( F _m⊙MRes(c,:,:)),c=0,...,2N _−1,
Similarly, the prediction of NodeNet at the final time t is:
X ^ t ( c , : , : ) = tanh ( F x ⊙ XR es ( c , : , : ) ), c = 0 , 1 , \widehat{\mathbf{ X}}_t(c,:,:)=tanh(\mathrm{F}_x⊙\mathcal{X}_{Res}(c,:,:)), c=0,1,X
t(c,:,:)=English ( F _x⊙XRes(c,:,:)),c=0,1,
experiment
data set
TaxiBJ : GPS data and meteorological data of taxis in Beijing during the four time periods from 2013 to 2016.
TaxiNYC : New York City taxi driving records from 2011 to 2014, including: pick-up and drop-off times and locations.
Experimental results
The figure below shows node flow prediction on the TaxiBJ and TaxiNYC datasets:
on the TaxiBJ dataset, the MRF (Markov Random Field, Markov Random Field) method is better than the MDL proposed in this paper. The reason may be that the TaxiNYC data is larger than TaxiBJ 3 times (time interval in Table 2). In other words, MDL has better performance than MRF on large data.
Metastasis prediction results and results under different fusion strategies:
It shows that the CONCAT + GATING method works best.
Summarize
This is a classic multi-task learning work. The prediction of node traffic and edge traffic in the spatio-temporal network is regarded as multi-task, and the MDL framework is proposed to simultaneously predict the incoming and outgoing traffic (node traffic) and transfer traffic (edge traffic) in the spatio-temporal network. ).
Recently, some deep learning-based work predicts the transfer flow of the edge, models the urban space as a Graph, and the nodes of the graph are divided grids or irregular areas (AOI, TAZ, etc.), and predicts the future through the spatiotemporal graph neural network. Edge traffic.
At present, more and more works consider the impact of external factors on the prediction task, most of which only focus on the results caused by the impact, and it is worth exploring to explain the impact of external factors on the prediction results.