Please wait a minute...
Journal of ZheJiang University (Engineering Science)  2020, Vol. 54 Issue (6): 1156-1163    DOI: 10.3785/j.issn.1008-973X.2020.06.012
Computer Technology     
Vehicle motion trajectory prediction based on attention mechanism
Chuang LIU(),Jun LIANG*()
College of Control Science and Engineering, Zhejiang University, Hangzhou 310058, China
Download: HTML     PDF(972KB) HTML
Export: BibTeX | EndNote (RIS)      


A new vehicle motion trajectory prediction algorithm was proposed by using the attention mechanism based on the classic convolutional social long-short term memory (LSTM) trajectory prediction algorithm. Firstly, the lateral attention mechanism was introduced to assign different weights to neighboring vehicles. The features obtained from the historical trajectory of the vehicle via LSTM were taken as global features, and the trajectory features were extracted as local features through convolution pooling. The two features were fused as the overall neighbor feature information for trajectory prediction. Secondly, the Encoder-Decoder framework of traditional trajectory prediction was improved, and a vertical attention mechanism on historical position was introduced, so that each moment of prediction could use the historical information, which was most relevant to the current moment. The improved model was verified on the US101 and I80 datasets provided by NGSIM, and the results show that the proposed trajectory prediction algorithm can obtain more accurate future trajectories than other algorithms.

Key wordsself-driving      trajectory prediction      attention mechanism      long-short term memory (LSTM)     
Received: 22 January 2019      Published: 06 July 2020
CLC:  TP 183  
Corresponding Authors: Jun LIANG     E-mail:;
Cite this article:

Chuang LIU,Jun LIANG. Vehicle motion trajectory prediction based on attention mechanism. Journal of ZheJiang University (Engineering Science), 2020, 54(6): 1156-1163.

URL:     OR


基于经典的Convolutional Social LSTM轨迹预测算法,提出一种全新的采用注意力机制的车辆运动轨迹预测算法. 引入横向注意力机制对邻居车辆赋予不同的权重,将车辆历史轨迹经由LSTM得到的特征作为全局特征,通过卷积池化提取轨迹特征作为局部特征,将两者融合作为整体邻居特征信息,用于轨迹预测. 对用于传统轨迹预测的Encoder-Decoder框架进行改进,引入关于历史位置的纵向注意力机制,使得预测的每一时刻都能使用与当前时刻最相关的历史信息. 在NGSIM提供的US101和I80数据集进行验证,结果表明:提出的轨迹预测算法相比其他算法能更精确地预测车辆未来轨迹.

关键词: 自动驾驶,  轨迹预测,  注意力机制,  长短期记忆(LSTM) 
Fig.1 Schematic diagram of Social Pooling process
Fig.2 Network framework of Social LSTM
Fig.3 network framework of Convolutional Social LSTM
Fig.4 Trajectory prediction model based on attention mechanism
预测算法 1 s 2 s 3 s 4 s 5 s $\delta $
KF 1.936 3.860 5.779 7.704 9.648 5.013
LSTM 0.698 1.691 2.981 4.567 6.465 2.741
Fc_pool 0.673 1.518 2.584 3.910 5.524 2.382
Conv_pool 0.661 1.472 2.509 3.821 5.406 2.324
Nbrs_conv 0.635 1.448 2.470 3.751 5.306 2.280
Hist_Nbrs_conv 0.629 1.432 2.454 3.730 5.265 2.263
Tab.1 Comparison of mean square errors of trajectory prediction of each model m
Fig.5 Model trajectory deviation comparison of each model
Fig.6 Comparison of model trajectory prediction results on real data sets
Fig.7 Distribution map of vehicle attention weight
Fig.8 Weight distribution of historical trajectories at different times
[1]   HELBING D, MOLNAR P Social force model for pedestrian dynamics[J]. Physical Review E, 1995, 51 (5): 4282
doi: 10.1103/PhysRevE.51.4282
[2]   PELLEGRINI S, ESS A, SCHINDLER K, et al. You'll never walk alone: modeling social behavior for multi-target tracking [C] // 2009 IEEE 12th International Conference on Computer Vision. Kyoto: IEEE, 2009: 261-268.
[3]   HOCHREITER S, SCHMIDHUBER J Long short-term memory[J]. Neural Computation, 1997, 9 (8): 1735- 1780
doi: 10.1162/neco.1997.9.8.1735
[4]   ALAHI A, GOEL K, RAMANATHAN V, et al. Social LSTM: Human trajectory prediction in crowded spaces [C] // Proceedings of the IEEE Conference On Computer Vision and Pattern Recognition. Las Vegas: IEEE 2016: 961-971.
[5]   XU K, QIN Z, WANG G, et al. Collision-Free LSTM for human trajectory prediction [C] // International Conference on Multimedia Modeling. Bangkok: Springer, Cham, 2018: 106-116.
[6]   DEO N, TRIVEDI M M. Convolutional social pooling for vehicle trajectory prediction [C] // Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops. Munich: IEEE, 2018: 1468-1476.
[7]   GUPTA A, JOHNSON J, FEI-FEI L, et al. Social GAN: socially acceptable trajectories with generative adversarial networks [C] // Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Salt Lake City: IEEE, 2018: 2255-2264.
[8]   MANH H, ALAGHBAND G. Scene-LSTM: a model for human trajectory prediction [J]. arXiv Preprint, arXiv: 1808.04018, 2018.
[9]   XUE H, HUYNH D Q, REYNOLDS M. SS-LSTM: a hierarchical LSTM model for pedestrian trajectory prediction [C] // 2018 IEEE Winter Conference on Applications of Computer Vision (WACV). Lake Tahoe: IEEE, 2018: 1186-1194.
[10]   FERNANDO T, DENMAN S, SRIDHARAN S, et al Soft+ hardwired attention: an LSTM framework for human trajectory prediction and abnormal event detection[J]. Neural Networks, 2018, 108: 466- 478
doi: 10.1016/j.neunet.2018.09.002
[11]   GRAVES A. Generating sequences with recurrent neural networks[J]. arXiv Preprint, arXiv: 1308.0850, 2013.
[12]   COLYAR J, HALKIAS J. US highway 101 dataset [R]. Washington: Federal Highway Administration (FHWA), 2007.
[1] Zi-ye YONG,Ji-chang GUO,Chong-yi LI. weakly supervised underwater image enhancement algorithm incorporating attention mechanism[J]. Journal of ZheJiang University (Engineering Science), 2021, 55(3): 555-562.
[2] Yan ZHANG,Bin GUO,Qian-ru WANG,Jing ZHANG,Zhi-wen YU. SeqRec: sequential-based recommendation model with long-term preference and instant interest[J]. Journal of ZheJiang University (Engineering Science), 2020, 54(6): 1177-1184.
[3] Xiao-hu ZHAO,Liang-fei YIN,Cheng-long ZHAO. Image captioning based on global-local feature and adaptive-attention[J]. Journal of ZheJiang University (Engineering Science), 2020, 54(1): 126-134.
[4] GUO Bao-zhen, ZUO Wan-li, WANG Ying. Double CNN sentence classification model with attention mechanism of word embeddings[J]. Journal of ZheJiang University (Engineering Science), 2018, 52(9): 1729-1737.