Handling Variable-Dimensional Time Series with Graph Neural Networks
文章 Handling Variable-Dimensional Time Series with Graph Neural Networks 来自于AI4IoT@IJCAI’20 workshop.
问题描述
解决多元时间序列(Multivariate time series, MTS)中传感器个数或组合不固定的问题。
方法解析
1. 条件模块(Conditioning Module)
输入不完整的多传感器时间序列
x
i
∈
R
d
i
×
T
i
\mathbf{x}_i\in\mathbb{R}^{d_i\times T_i}
xi∈Rdi×Ti,经过图神经网络后,输出一个条件向量,为
v
S
i
∈
R
1
×
d
s
\mathbf{v}_{\mathcal{S}_i}\in\mathbb{R}^{1\times d_\mathcal{s}}
vSi∈R1×ds,文中将
d
s
d_s
ds大小取为
d
2
\frac{d}{2}
2d。计算过程为
v
S
i
=
max
(
{
v
~
k
}
v
k
∈
V
i
)
\mathbf{v}_{\mathcal{S}_i}=\max (\{\tilde{\mathbf{v}}_k\}_{{v_k}\in\mathcal{V}_i})
vSi=max({v~k}vk∈Vi)
其中,
V
i
\mathcal{V}_i
Vi为节点集合,
v
~
k
\tilde\mathbf{v}_k
v~k为对应节点更新后的特征向量,
max
\max
max为沿着维度
d
s
d_\mathcal{s}
ds最大值操作。需要注意的是,文中的GNN运算并不改变特征维度大小,即:
d
s
d_s
ds既是sensor embedding vector的长度,也是node vector的长度,也是conditioning vector的长度。
2. 核心动态模块(Core Dynamics Module)
1) 缺失值插补
使用均值替代法将 x i t ∈ R d i \mathbf{x}_i^t\in\mathbb{R}^{d_i} xit∈Rdi 变为 x ~ i t ∈ R d \tilde{\mathbf{x}}_i^t\in\mathbb{R}^{d} x~it∈Rd( d i < d d_i<d di<d),即:其他可用传感器数值求均值。
2) CDM
主体结构是一个循环/递归神经网络RNN,输入为固定维度的MTS,即
x
i
t
∈
R
d
\mathbf{x}_i^t\in\mathbb{R}^{d}
xit∈Rd,该输入是完整的,若有缺失值用其余可用值的均值替代,为一个常数。计算过程为
z
i
t
=
GRU
(
[
x
~
i
t
,
v
S
i
]
,
z
i
t
−
1
;
θ
G
R
U
)
,
t
:
1
,
…
,
T
i
\mathbf{z}^t_i=\text{GRU}([\tilde{\mathbf{x}}_i^t,\mathbf{v}_{\mathcal{S}_i}],\mathbf{z}^{t-1}_i;\theta_{GRU}),\quad t:1,\dots,T_i
zit=GRU([x~it,vSi],zit−1;θGRU),t:1,…,Ti
式中,
[
⋅
,
⋅
]
[\cdot,\cdot]
[⋅,⋅] 并未指明是什么操作,结合GRU的输入应当包括上一单元的hidden state 也就是
z
i
t
−
1
\mathbf{z}^{t-1}_i
zit−1,和该时间步的输入
[
x
~
i
t
,
v
S
i
]
[\tilde{\mathbf{x}}_i^t,\mathbf{v}_{\mathcal{S}_i}]
[x~it,vSi],因此
[
⋅
,
⋅
]
[\cdot,\cdot]
[⋅,⋅]或许是concatenate操作,因为二者的shape分别是
d
d
d和
d
2
\frac{d}{2}
2d,加法不大可能(source codes没有找到)。计算output如下
y
^
i
=
f
o
(
z
i
T
i
;
θ
o
)
\hat{y}_i=f_o(\mathbf{z}^{T_i}_i;\theta_o)
y^i=fo(ziTi;θo)
总结
文章主要用GNN来处理变维度的多元时间序列,生成一个定长的条件向量,这个向量包含了可用传感器的信息;使用基于GRU的RNN来处理插补后的MTS,再考虑条件向量,生成结果。核心思想在于对GNN的应用。