时间序列补全、时间序列预测、结构化状态空间模型、Diffusion Model
原文:戳我
作者:Juan Miguel Lopez Alcaraz, Nils Strodthoff
背景
一、任务:时间序列补全(time series imputation)
时序样本$x_0$,形状:$\mathbb{R}^{L \times K}$(L:time steps, K:features/ channels)
补全的目标一般来说就是利用一个补全0/1掩码向量,先让这个向量的形状和时序样本的形状相匹配,同为$\mathbb{R}^{L \times K}$,如$m_{\mathrm{imp}} \in[0,1]^{L \times K^*}$
这个时候,标记为1的就是来自原样本的数据,标记为0的就是亟待模型补全的数据。
与此同时样本数据中可能也存在一些缺失的数据,需要另一个缺省0/1变量,同样的需要和时序样本的形状一致,然后0表示该处缺省,1表示该处存在数值。
缺省类型
RM:随机缺省(random missing)
对所有的channels/ features,都会在均匀分布中采样一个值,作为补全掩码向量的起点,也即输入的时间序列数据的零点。
MNR:非随机缺省(missing not at random)
MNR描述在$x_0$中的一种缺省的随机子集$x_i$,它只存在于某一时间点的某一个特征当中。
BM:完全缺省(blackout missing)
BM描述在$x_0$中的一种缺省的随机子集$x_i$,它存在于某一时间点的所有特征当中。
就像是停电(blackout)了,机器没收集到数据一样导致的数据缺省
二、任务:时间序列预测(time series forecasting)
可以被理解成是一种补全BM的特殊情况,
将原本的时间长度进行扩展,然后将扩展出来的部分视作BM,然后对这个BM进行补全。
三、扩散模型
目标:
解读:
- 从原始的数据集采集$x_0$,
- 从标准高斯分布$\mathcal{N}(0, \mathbb{1})$中采样的到噪声$\epsilon$
- 从(1,T)的均匀分布中采样扩散时间点t
- $\epsilon_\theta$是一个神经网络,输入是$(x_t, t)$
为其添加条件分量后,上述神经网络被改进为:$\epsilon_\theta\left(x_t, t, c\right)$,其中$c=\operatorname{Concat}\left(x_0 \odot\left(m_{\text {imp }} \odot m_{\text {mvi }}\right),\left(m_{\text {imp }} \odot m_{\text {mvi }}\right)\right)$
四、SSM:状态空间模型(state-space model)
作用:在时间序列数据中捕捉特定的、长期的依赖(dependencies)特征
设计了一个线性状态空间,用$u(t)$表示一维的输入序列,通过一个N维的隐藏状态$x(t)$,输出一个一维的$y(t)$,状态转移方程如下:
$x^{\prime}(t)=A x(t)+B u(t)$
$y(t)=C x(t)+D u(t)$
其中$A, B, C, D$是转移矩阵,将其进行离散化之后,就可以进行卷积计算了。
长期的依赖特性根据HiPPO理论12,通过$A \in \mathbb{R}^{N \times N}$进行捕捉的。
在Efficiently Modeling Long Sequences with Structured State Spaces 一文中指出可以堆叠多个SSM代码模块形成结构化的状态空间序列模型(S4: Structured State Space sequence model),
1- $SSSD^{S4}$
类型:条件Diffwave变量
we have replaced and adapted an S4 layer as a diffusion layer within each of its residual blocks after adding the diffusion embedding.
we include a second S4 layer after the addition assignment with the conditional information, which gives the model additional flexibility after joining processed inputs and the conditional information.
The effectiveness of this modification is demonstrated in an ablation study in the technical appendix.
2- $SSSD^{SA}$
under the name SSSDSA we explore an extension of the nonautoregressive of the SaShiMi architecture for time series imputation through appropriate conditioning.
3- $CSDI^{S4}$
原模型:CSDI
we replace the transformer layer operating in the time direction by an S4 model.