【论文阅读】Attention Based Spatial-Temporal Graph Convolutional Networks for Traffic Flow Forecasting[基于注意力的时空图卷积网络交通流预测](2)
原文地址:https://ojs.aaai.org/index.php/AAAI/article/view/3881
原文代码地址:https://github.com/ wanhuaiyu/ASTGCN
3.Preliminaries(准备工作)
In this study, we define a traffic network as an undirected graph
G
=
(
V
,
E
,
A
)
G=(V,E,\textbf A)
G=(V,E,A), as shown in Fig. 2(a), where
V
V
V is a finite set of
∣
V
∣
=
N
|V|=N
∣V∣=N nodes;
E
E
E is a set of edges, indicating the connectivity between the nodes;
A
∈
R
N
×
N
\textbf A∈\R^{N×N}
A∈RN×N denotes the adjacency matrix of graph
G
G
G . Each node on the traffic network
G
G
G detects
F
F
F measurements with the same sampling frequency, that is, each node generates a feature vector of length
F
F
F at each time slice, as shown by the solid lines in Fig. 2(b).
在本文中,我们将交通网络定义为无向图
G
=
(
V
,
E
,
A
)
G=(V,E,\textbf A)
G=(V,E,A) ,如图2(a)所示,其中
V
V
V 是
∣
V
∣
=
N
|V|=N
∣V∣=N 个节点的有限集;
E
E
E 是边的集合,表示节点之间的连通性;
A
∈
R
N
×
N
\textbf A∈\R^{N×N}
A∈RN×N 表示图
G
G
G 的邻接矩阵。交通网络
G
G
G 上的每个节点以相同的采样频率检测
F
F
F 测量值,即每个节点在每个时间片上生成长度为
F
F
F 的特征向量,如图2(b)实线所示。
Figure 2: (a) The spatial-temporal structure of traffic data, where the data at each time slice forms a graph; (b) Three measurements are detected on a node and the future traffic flow is the forecasting target. Here, all measurements are normalized to [0,1].
图2: (a) 交通数据的时空结构,每个时间片的数据构成一个图; (b) 在一个节点上检测到三个测量值,未来的交通流是预测目标。在这里,所有测量值都归一化为 [0,1]。
Traffic Flow Forecasting(交通流预测)
Suppose the
f
f
f-th time series recorded on each node in the traffic network
G
G
G is the traffic flow sequence, and
f
∈
(
1
,
…
,
F
)
f∈(1,…,F)
f∈(1,…,F) . We use
x
t
c
,
i
∈
R
x_t^{c,i}∈\mathbb R
xtc,i∈R to denote the value of the
c
c
c-th feature of node
i
i
i at time
t
t
t , and
x
t
i
∈
R
F
\textbf x_t^i∈\mathbb R^F
xti∈RF denotes the values of all the features of node
i
i
i at time
t
t
t .
X
t
=
(
x
t
1
,
x
t
2
,
…
,
x
t
N
)
T
∈
R
N
×
F
\textbf X_t=(\textbf x_t^1,\textbf x_t^2,…,\textbf x_t^N)^T∈\mathbb R^{N×F}
Xt=(xt1,xt2,…,xtN)T∈RN×F denotes the values of all the features of all the nodes at time
t
t
t .
X
=
(
X
1
,
X
2
,
…
,
X
τ
)
T
∈
R
N
×
F
×
τ
\mathcal X=(\textbf X_1,\textbf X_2,…,\textbf X_τ)^T∈\mathbb R^{N×F×τ}
X=(X1,X2,…,Xτ)T∈RN×F×τ denotes the value of all the features of all the nodes over
τ
τ
τ time slices. In addition, we set
y
t
i
=
x
t
f
,
i
∈
R
y_t^i=x_t^{f,i}∈\mathbb R
yti=xtf,i∈R to represent the traffic flow of node
i
i
i at time
t
t
t in the future.
设交通网络
G
G
G 中每个节点上记录的
f
f
f 个时间序列为交通流序列,
f
∈
(
1
,
…
,
F
)
f∈(1,…,F)
f∈(1,…,F) 。我们用
x
t
c
,
i
∈
R
x_t^{c,i}∈\mathbb R
xtc,i∈R 表示节点
i
i
i 在时刻
t
t
t 的第
c
c
c 个特征的值,
x
t
i
∈
R
F
\textbf x_t^i∈\mathbb R^F
xti∈RF 表示节点
i
i
i 在时刻
t
t
t 的所有特征的值。
X
t
=
(
x
t
1
,
x
t
2
,
…
,
x
t
N
)
T
∈
R
N
×
F
\textbf X_t=(\textbf x_t^1,\textbf x_t^2,…,\textbf x_t^N)^T∈\mathbb R^{N×F}
Xt=(xt1,xt2,…,xtN)T∈RN×F 表示时刻
t
t
t 时所有节点的所有特征值。
X
=
(
X
1
,
X
2
,
…
,
X
τ
)
T
∈
R
N
×
F
×
τ
\mathcal X=(\textbf X_1,\textbf X_2,…,\textbf X_τ)^T∈\mathbb R^{N×F×τ}
X=(X1,X2,…,Xτ)T∈RN×F×τ 表示所有节点在
τ
τ
τ 时间切片上的所有特征值。另外,我们设
y
t
i
=
x
t
f
,
i
∈
R
y_t^i=x_t^{f,i}∈\mathbb R
yti=xtf,i∈R 表示节点
i
i
i 在未来时刻
t
t
t 的交通流。
Problem. Given
X
\mathcal X
X , all kinds of the historical measurements of all the nodes on the traffic network over past τ time slices, predict future traffic flow sequences
Y
=
(
y
1
,
y
2
,
…
,
y
N
)
T
∈
R
N
×
T
p
\textbf Y=(\textbf y^1,\textbf y^2,…,\textbf y^N)^T∈\mathbb R^{N×T_p}
Y=(y1,y2,…,yN)T∈RN×Tp of all the nodes on the whole traffic network over the next
T
p
T_p
Tp time slices, where
y
i
∈
(
y
τ
+
1
i
,
y
τ
+
2
i
,
…
,
y
τ
+
T
p
i
)
∈
R
T
p
\textbf y^i∈(y_{τ+1}^i,y_{τ+2}^i,…,y_{τ+T_p}^i)∈\mathbb R^{T_p}
yi∈(yτ+1i,yτ+2i,…,yτ+Tpi)∈RTp denotes the future traffic flow of node
i
i
i from
τ
+
1
τ+1
τ+1 .
问题. 给定
X
\mathcal X
X ,交通网络上所有节点在
τ
τ
τ 时间切片上的所有历史测量值,预测整个交通网络上所有节点在下一个
T
p
T_p
Tp 时间切片上的未来交通流序列
Y
=
(
y
1
,
y
2
,
…
,
y
N
)
T
∈
R
N
×
T
p
\textbf Y=(\textbf y^1,\textbf y^2,…,\textbf y^N)^T∈\mathbb R^{N×T_p}
Y=(y1,y2,…,yN)T∈RN×Tp ,其中
y
i
∈
(
y
τ
+
1
i
,
y
τ
+
2
i
,
…
,
y
τ
+
T
p
i
)
∈
R
T
p
\textbf y^i∈(y_{τ+1}^i,y_{τ+2}^i,…,y_{τ+T_p}^i)∈\mathbb R^{T_p}
yi∈(yτ+1i,yτ+2i,…,yτ+Tpi)∈RTp 表示节点
i
i
i 从
τ
+
1
τ+1
τ+1 开始的未来交通流量。