论文笔记Autoregressive Denoising Diffusion Models for Multivariate Probabilistic Time Series Forecasting

论文针对多元概率时间序列预测(multivariate probabilistic time series forecasting)任务,提出了TimeGrad模型。
有开源的代码:PytorchTS
概率预测如下图所示,对未来的预测带有概率:
在这里插入图片描述

TimeGrad模型基于Diffusion Probabilistic Model,Diffusion Probabilistic Model这里不再介绍,可以简单认为是一个可以拟合复杂分布的概率模型。需要学习的请参见博客《Denoising Diffusion Probabilistic Models简介》
在了解Diffusion Probabilistic Model的基础上,这篇文章的方法非常简单。如果把TimeGrad基于的Diffusion Probabilistic Model换成高斯分布,TimeGrad就类似DeepAR了。

方法

将多变量时间序列表示为 x i , t 0 ∈ R , i = { i , . . . , D } x_{i,t}^0\in \mathbb{R}, i=\{i,...,D\} xi,t0R,i={i,...,D},其中 t t t是时间index, D D D是多变量的变量数。给一个连续时间序列 t ∈ [ 1 , T ] t\in [1, T] t[1,T],将其划分为context window [ 1 , t 0 ) [1,t_0) [1,t0)和prediction window [ t 0 , T ] [t_0,T] [t0,T]。任务目的是用context window的时间序列预测prediction window的时间序列。

TimeGrad的是一个自回归(autoregressive)的模型:
q X ( x t 0 : T 0 ∣ x 1 : t 0 − 1 0 , c 1 : T ) = Π t = t 0 T q X ( x t 0 ∣ x 1 : t − 1 0 , c 1 : T ) (1) q_{\mathcal X}(\mathbf x_{t_0:T}^0 | \mathbf x_{1:t_0-1}^0, \mathbf c_{1:T})=\Pi_{t=t_0}^Tq_{\mathcal X}(\mathbf x_{t}^0 | \mathbf x_{1:t-1}^0, \mathbf c_{1:T}) \tag{1} qX(xt0:T0x1:t010,c1:T)=Πt=t0TqX(xt0x1:t10,c1:T)(1)其中 c i , t \mathbf c_{i,t} ci,t是协变量(covariate),也就是特征,比如天气特征。
类似DeepAR,TimeGrad用RNN结构来建模历史的时间序列,得到隐状态(hidden state):
h t − 1 = RNN θ ( concat ( x t − 1 0 , c t ) , h t − 2 ) \mathbf h_{t-1}=\text{RNN}_\theta(\text{concat}(\mathbf x_{t-1}^0, \mathbf c_{t}), \mathbf h_{t-2}) ht1=RNNθ(concat(xt10,ct),ht2)之后,再根据隐状态用Diffusion Probabilistic Model得到时间序列。
那么,公式(1)有近似:
Π t = t 0 T p θ ( x t 0 ∣ h t − 1 ) \Pi_{t=t_0}^T p_\theta(\mathbf x_{t}^0 | \mathbf h_{t-1}) Πt=t0Tpθ(xt0ht1)这里的 θ \theta θ包含RNN的参数和Diffusion Probabilistic Model的参数。

训练时优化的损失是negative log-likelihodd:
∑ t = t 0 T − log ⁡ p θ ( x t 0 ∣ h t − 1 ) \sum_{t=t_0}^T -\log p_\theta(\mathbf x_{t}^0 | \mathbf h_{t-1}) t=t0Tlogpθ(xt0ht1)
时间 t t t,噪声等级 n n n的diffusion model的优化目标是:
E x t 0 , ϵ , n ∥ ϵ − ϵ θ ( α ˉ t x 0 , ( 1 − α ˉ t ) ϵ , h t − 1 , n ) ∥ 2 \mathbb{E}_{\mathbf{x}_t^0,\epsilon,n}\|\epsilon-\epsilon_\theta(\sqrt{\bar{\alpha}_t}\mathbf{x}_0,\sqrt{(1-\bar{\alpha}_t)}\epsilon, \mathbf h_{t-1}, n)\|^2 Ext0,ϵ,nϵϵθ(αˉt x0,(1αˉt) ϵ,ht1,n)2其实就是Conditional Denoising Diffusion Probabilistic Models。值得注意的是,这里 t t t和普通Diffusion Probabilistic Models论文里面的 t t t是不一样的,这里的 t t t是时间序列的时间,这里的 n n n反而是普通Diffusion Probabilistic Models论文里面的 t t t

方法的结构图如下图所示。RNN产生每个时间点的隐状态,再用Diffusion Probabilistic Model由隐状态产生时间序列的值。因为RNN是自回归的,所以整个模型是自回归的。
在这里插入图片描述
其中 ϵ θ \epsilon_\theta ϵθ的结构如下图:
在这里插入图片描述

评价指标

文章的实验部分评价指标使用的是连续分级概率评分(Continuous Ranked Probability Score,CRPS)。
在贝叶斯机器学习中,预测的不是点估计,而是值的分布。传统的评分函数不适合统计设计,预测的分布聚合成它们的平均值或中值会导致关于预测分布的分散和形状的大量信息的损失。
CRPS计算累计分布函数 F ( z ) F(z) F(z)与观察值的兼容性,可以量化一个连续概率分布(理论值)与确定性观测样本(真实值)间的差异。
CRPS ( F , x ) = ∫ R ( F ( z ) − I { x ≤ z } ) 2 d z \text{CRPS}(F, x) = \int_{\mathbb{R}}(F(z) - \mathbb I \{x \leq z \})^2 dz CRPS(F,x)=R(F(z)I{xz})2dzCRPS可视为平均绝对误差(Mean Absolute Error, MAE)在连续概率分布上的推广。在预测的分布和实际数据分布一致时,CRPS取得最小值。使用模型采样的样本可以近似计算预测的分布 F ^ ( z ) = 1 S ∑ s = 1 S I { x 0 , s ≤ z } \hat F(z)=\frac{1}{S} \sum_{s=1}^S \mathbb I \{x^{0,s} \leq z \} F^(z)=S1s=1SI{x0,sz}

具体地,分别在时间序列的每一个维度计算CRPS。用 CRPS sum \text{CRPS}_{\text{sum}} CRPSsum表示时间序列所有维度的和。

  • 2
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
Abstract: Time series forecasting is a challenging task due to the complex and dynamic nature of the data. In this paper, we propose a novel generative model for time series forecasting, which incorporates diffusion, denoise, and disentanglement techniques. Our model is based on the autoregressive moving average (ARMA) model, which is widely used in time series analysis. We introduce a diffusion process to model the noise in the data, which helps to improve the accuracy of the model. We also use a denoising autoencoder to remove the noise from the data, which helps to improve the quality of the generated samples. Finally, we use a disentanglement technique to separate the underlying factors of variation in the data, which helps to improve the interpretability of the model. We evaluate our model on two benchmark datasets, the Air Quality dataset and the Energy Consumption dataset. Our model outperforms existing state-of-the-art methods on both datasets, achieving lower prediction error and higher accuracy. We also show that our model is capable of generating realistic and plausible samples, which can be used for scenario analysis and decision making. Our work demonstrates the potential of incorporating diffusion, denoise, and disentanglement techniques in time series forecasting. These techniques can help to improve the accuracy, quality, and interpretability of the models. We believe that our model can be applied to a wide range of domains, such as finance, healthcare, and climate science, where time series forecasting is an important task. Keywords: time series forecasting, autoregressive moving average (ARMA) model, diffusion, denoise, disentanglement, generative model.
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值