Empowering A* Algorithm With Neuralized Variational Heuristics for Fastest Route Recommendation

IEEE TKDE 2023

0. Summary

0.1 本文解决的问题

把路线推荐算法当作路线规划问题,使用A*算法。SOTA模型使用神经网络估计g()和h()函数。

h()不应当被过度估计,否则会产生次优解。
g()应当足够精确。现有方法分别预测每一个边的时间,最后把所有时间相加。应当结合已通过路径的上下文和顺序性特征,预测整个路径的通过时间。

0.2 本文的主要贡献

  1. 用序列模型预测整个已通过路径的时间。
  2. 提出使用variational inference学习h()的分布,因此可以获得一个admissible的(高置信的)h()值,避免次优解。
  3. 用GAN生成类似g()估计器的路径表示,用于把g()中获得的最快路径信息传输给h()

1. Background

路径推荐任务:基于历史路径数据,给定source node 和 destination node,预测 most likely route。

1.1 Baselines

  • NASF: 使用A*和神经网络估计g()和h()

1.2 Problem Formulation

最佳路径 pp^* 由路网图 G=(V,E)G=(V, E) 和 query q=[vs,vd]q=[v_s,v_d] 预测得到:

p=F(G,q)p^*=\mathcal{F}(G,q)

A*算法:

g(): observable path / path-aware

h(): path-blind

f()=g()+h()f(\cdot)=g(\cdot)+h(\cdot)

2. Method

framework

2.1 g()估计器

2.1.1 Attribute Embedding Component

Topological features

使用 DeepWalk 进行 Edge embedding

Temporal features

按照[1]的方法创建时域图。使用 Node2Vec 进行 Node embedding。

Temporal graph

External features
  • weather, holiday: one-hot encoding
  • recent traffic condition: normalized average traffic time of road segments in the last 24 hours

最后把以上信息Concatenate,得到每一个边上的representation:{rei}i[1,,t]\{r_{e_i}\}_{i \in [1, \ldots , t]}.

2.1.2 Sequentiality Modeling Component

使用BiLSTM处理每一个path上的edge。BiLSTM在第 i(1,...,t)i\in (1,...,t) 个edge上的输出是 hfdih_{fd}^ihbdih_{bd}^i

2.1.3 Multi-Task Learning Component

使用最后一个(第t个)edge上的 hop=hfd(t)hbd(t)h_{op}=h_{\mathrm{fd}}^{(t)}\oplus h_{\mathrm{bd}}^{(t)} 作为总可见路径的信息,同时把 {hspi=hfd(i)}i[1,,t1]\{h_{sp_i}=h_\mathrm{fd}^{(i)}\}_{i \in [1, \ldots , t-1]} 作为从出发点走过的i个边组成的子路径的信息。

使用两个Head分别对subpath和path做时间预测:

[t^sp1,,t^spt1]=MLP1([hsp1,,hspt1])[\hat{t}_{sp_1},\ldots,\hat{t}_{sp_{t-1}}]=MLP_1\left([h_{sp_1},\ldots,h_{sp_{t-1}}]\right)

t^op=MLP2(hop)\hat{t}_{op}= MLP_2(h_{op})

使用MSE作为Loss:

Lsp(θg)=1t1i=1t1t^spit[1:i]22\mathcal{L}_{sp}(\theta_g)=\frac1{t-1}\sum_{i=1}^{t-1}\|\hat{t}_{sp_i}-t_{[1:i]}\|_2^2

Lop(θg)=t^opt22\mathcal{L}_{op}(\theta_g)=\|\hat{t}_{op}-t\|_2^2

2.2 h()估计器

2.2.1 Representation Learning of Heuristic Inputs

g()g()的输入是整个可见路径 {e1,,et}\{e_1, \ldots, e_t\} ,但h()h()的输入只有当前节点vcv_c和终点vdv_d。但是两个估计器的目的是一样的:估算最短时间。

第一个idea是仿照[3]的方法,用当前节点和终点之间的shortest path估计最短时间。但是shortest和fastest有所不同,因此直接使用会引入噪声。

第二个idea是同时学习g()g()h()h(),让h()h()学习g()g()提取最快路径的信息。

Fastest Path - GAN

首先,手动找到从 vcv_cvdv_d的 fastest path,然后用 g()g() 编码作为 ground truth hfph_{fp}

generator: hod=G(rvc,vd)h_{od}=\mathcal{G}(r_{v_c,v_d})

rvc,vdr_{v_c,v_d}如何得到?论文原文:

Specifically, we first use the representation of road segments in the g(⋅) estimator to initialize the representation of the two nodes rvc,vdr_{v_c,v_d}

没懂

discriminator: D\mathcal D

G\mathcal G 生成的 hodh_{od} 在多个下游任务上同时训练:最快路径长度dd、最快路径转弯数等。

这里的G\mathcal GD\mathcal D都是MLP。相当于强行让G\mathcal G记住,对于特定的图,任意两个节点之间的最快路径。

Shortest Path - GRU

按照[3]的经验, K shortest path也可以用来估计h。从 vcv_cvdv_d最短路径作为 GRU 的输入,得到 hsph_{sp}, 用来预测从 vcv_cvdv_d最快时间

最后结果采用hfph_{fp}hsph_{sp}的动态门控加权和。

2.2.2 Variational Inference Based Prediction

[5]和[19]分别证明了高斯分布可以对交通情况和交通速度建模。把交通情况记作 uodu_{od},把交通速度记作 vodv_{od},假设这两个量 P(uodrod)P(u_{od}|r_{od})P(voduod)P(v_{od}|u_{od}) 遵循高斯分布。

P(uodrod)=N(μu,diag(σu2))P(u_{od}|r_{od}) = \mathcal {N}(\mu _{u}, diag(\sigma ^{2}_{u}))

P(voduod)=N(μv,σv2)P(v_{od}|u_{od}) = \mathcal {N}(\mu _{v}, \sigma ^{2}_{v})

又因为tod=dvodt_{od} = \frac{d}{v_{od}},所以可以估计从节点vcv_c到节点vdv_d的时间。

论文原文说 todt_{od} 遵循Inverse Gaussian distribution。应该是错了。应该遵循Reciprocal normal distribution

两个条件分布可以看成是VAE,因此用VAE建模训练。

给定最短时间tht_h的置信度理论上是 τth=0thP(t,μt,λt)dt\tau _{t_{h}} = \int ^{t_{h}}_{0}{P(t,\mu _{t}^{\prime },\lambda _{t}^{\prime })dt},但还是额外学习了一个置信度。

如何获得Decoder输出的分布?贝叶斯线性回归?

Reference

  1. Li, Yaguang, et al. Multi-task representation learning for travel time estimation. Proceedings of the 24th ACM SIGKDD international conference on knowledge discovery & data mining. 2018.

Empowering A* Algorithm With Neuralized Variational Heuristics for Fastest Route Recommendation
https://blog.wintertee.top/机器学习/Empowering-A-Algorithm-With-Neuralized-Variational-Heuristics-for-Fastest-Route-Recommendation/
作者
WinterTee
发布于
2024年4月28日
更新于
2024年5月6日
许可协议