Enhancing Road Safety and Sustainability: A Multi-Scale Temporal Model for Vehicle Trajectory Anomaly Detection in Road Network Interactions
Abstract
1. Introduction
1.1. Research Background
1.2. Literature Review
1.2.1. Review of Anomalous Trajectory Generation Methods
- (1)
- Rule-Based and Statistical Models Stage
- (2)
- Deep Generative Models Stage
- (3)
- Diffusion Models and Conditional Diffusion Models Stage
1.2.2. Review of Spatial Feature Extraction Methods
1.2.3. Review of Temporal Feature Extraction Methods
1.3. Research Gaps
- (1)
- Data Scarcity and Ineffective Generation.
- (2)
- Inadequate Modeling of Trajectory-Road Network Interactions.
- (3)
- Insensitivity to Multi-Scale Temporal Anomalies.
1.4. Proposed Framework and Contributions
- CL-CD is proposed to generate trajectory data with varying degrees and categories of anomalies. By using a cross-attention mechanism with normal and abnormal trajectories as dual conditions, the CL-CD model effectively diversifies abnormal samples while preserving complex behavioral patterns.
- UNIM is introduced to capture the deep interactions between trajectories and factors such as road networks and traffic flow. UNIM comprises an Edge-Augmented Heterogeneous Attention Network (EA-HAN) and a Time-Decoupled GCN-GAT module (TDC-GCN-GAT) for spatial feature extraction, which improve trajectory matching accuracy and reduces false positives and negatives.
- LSTAD is presented to capture both short-term spikes and long-term trends. The model integrates a Bidirectional Attention Residual Depth-Separable Convolution Module (BARDSC) and a Dual-Stage Temporal Network (DSTN), enhancing temporal dependency modeling and improving the detection of local anomalies.
- A hybrid framework is designed that combines an offline model for learning road network features with an online model for real-time detection, thereby balancing accuracy with computational efficiency.
2. Materials and Methods
2.1. Problem Definition
2.2. Framework Overview of MTRI
2.3. CL-CD
2.3.1. Embedding Module
- (1)
- Attributes Embedding
- (2)
- Road Segment Embedding
2.3.2. Anomalous Trajectory Generation Module
- (1)
- Contrastive Geo-Denoising U-Net Architecture (C-UNet)
- (2)
- Conditional Diffusion Model
- (3)
- Loss Function
2.4. UNIM
2.4.1. EA-HAN
- The undirected meta-path : “road segment–zone–road segment”.
- The undirected meta-path : “road segment–intersection–road segment”.
- The directed meta-path : “inbound road segment–intersection–outbound road segment”.
- (1)
- Meta-Path Aware Attention Mechanism
- (2)
- Time-Sensitive Information Aggregation
- (3)
- Hierarchical Information Fusion
2.4.2. TDC-GCN-GAT
- Intersection Direct Adjacency Matrix . This matrix is used to reflect whether two road segments are directly connected via an intersection. We construct intersection direct adjacency matrices of three adjacent orders. If road segments i and j are connected via a k-order direct connection at intersection k, then:
- Regional Indirect Adjacency Matrix . This matrix is used to model the indirect relationships between road segments belonging to the same region. We construct three regional indirect adjacency matrices. If road segments i and j belong to the same region but are not connected via an intersection, then:
- Time-Slot Dynamic Adjacency Matrix . This matrix is computed based on the dynamic traffic characteristics (e.g., flow, speed, stay time) for each time slot t. It is dynamically calculated using the time-slot features:
2.5. LSTAD
2.5.1. BARDSC
2.5.2. DSTN
2.5.3. Trajectory Prediction
2.5.4. Anomaly Scoring
- (1)
- Sliding Window Anomaly Score
- (2)
- Trajectory Cumulative Anomaly Score
2.6. Loss
2.7. Model Complexity and Real-Time Analysis
2.8. Experimental Setup: Datasets and Implementation
2.8.1. Datasets Description
2.8.2. Experimental Environment and Parameter Settings
2.9. Experimental Design: Baselines and Evaluation Metrics
2.9.1. Baseline Methods
2.9.2. Evaluation Metrics
3. Results and Discussions
3.1. Comparative Experiments
3.1.1. Anomalous Trajectory Generation Comparison Results
3.1.2. Anomaly Detection Comparison Results
3.1.3. Trajectory Prediction Comparison Results
3.2. Ablation Study
- MTRI-EA-HAN: MTRI incorporating only the EA-HAN module from UNIM (removing TDC-GCN-GAT).
- MTRI-TDC-GCN-GAT: MTRI incorporating only the TDC-GCN-GAT module from UNIM (removing EA-HAN).
- MTRI-DSTN: MTRI incorporating only the DSTN module from LSTAD (removing BARDSC).
- MTRI-BARDSC: MTRI incorporating only the BARDSC module from LSTAD (removing DSTN).
3.2.1. Ablation on UNIM
3.2.2. Ablation on LSTAD
3.3. Case Study
3.4. Analysis of Model Efficiency and Scalability
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Zheng, Y. Trajectory data mining: An overview. ACM Trans. Intell. Syst. Technol. 2015, 6, 29. [Google Scholar] [CrossRef]
- Qi, G.; Li, X.; Li, S.; Pan, G.; Wang, Z.; Zhang, D. Measuring social functions of city regions from large-scale taxi behaviors. In Proceedings of the 2011 IEEE International Conference on Pervasive Computing and Communications Workshops (PERCOM Workshops), Seattle, WA, USA, 21–25 March 2011; pp. 384–388. [Google Scholar]
- Zhang, D.; Lee, K.; Lee, I. Mining hierarchical semantic periodic patterns from GPS-collected spatio-temporal trajectories. Expert Syst. Appl. 2019, 122, 85–101. [Google Scholar] [CrossRef]
- Kong, X.; Chen, Q.; Hou, M.; Wang, H.; Xia, F. Mobility trajectory generation: A survey. Artif. Intell. Rev. 2023, 56, 3057–3098. [Google Scholar] [CrossRef]
- Wu, H.; Sun, W.; Zheng, B. A fast trajectory outlier detection approach via driving behavior modeling. In Proceedings of the ACM Conference on Information and Knowledge Management, Singapore, 6–10 November 2017; pp. 837–846. [Google Scholar]
- Macioszek, E.; Wyderka, A.; Jurdana, I. The bicyclist safety analysis based on road incidents maps. Sci. J. Silesian Univ. Technol. Ser. Transp. 2025, 126, 129–147. [Google Scholar] [CrossRef]
- Qin, K.; Wang, Y.; Wang, B. Detecting anomalous trajectories using the Dempster-Shafer evidence theory considering trajectory features from taxi GNSS data. Information 2018, 9, 258. [Google Scholar] [CrossRef]
- Piciarelli, C.; Micheloni, C.; Foresti, G.L. Trajectory-based anomalous event detection. IEEE Trans. Circuits Syst. Video Technol. 2008, 18, 1544–1554. [Google Scholar] [CrossRef]
- Barbosa, H.; Barthelemy, M.; Ghoshal, G.; James, C.R.; Lenormand, M.; Louail, T.; Menezes, R.; Ramasco, J.J.; Simini, F.; Tomasini, M. Human mobility: Models and applications. Phys. Rep. 2018, 734, 1–74. [Google Scholar] [CrossRef]
- Simini, F.; Barlacchi, G.; Luca, M.; Pappalardo, L. A deep gravity model for mobility flows generation. Nat. Commun. 2021, 12, 6576. [Google Scholar] [CrossRef]
- Henke, N.; Wonsak, S.; Mitra, P.; Nolting, M.; Tempelmeier, N. Condtraj-gan: Conditional sequential gan for generating synthetic vehicle trajectories. In Proceedings of the Pacific-Asia Conference on Knowledge Discovery and Data Mining, Osaka, Japan, 25–28 May 2023; Springer: Berlin/Heidelberg, Germany, 2023; pp. 79–91. [Google Scholar]
- Rao, J.; Gao, S.; Kang, Y.; Huang, Q. LSTM-TrajGAN: A deep learning approach to trajectory privacy protection. In Proceedings of the 11th International Conference on Geographic Information Science (GIScience 2021), Poznań, Poland, 27–30 September 2020. [Google Scholar]
- Zhu, Y.; Ye, Y.; Zhang, S.; Zhao, X.; Yu, J.J. DiffTraj: Generating GPS trajectory with diffusion probabilistic model. In Proceedings of the Thirty-seventh Conference on Neural Information Processing Systems, New Orleans, LA, USA, 10–16 December 2023. [Google Scholar]
- Xia, T.; Song, X.; Fan, Z.; Kanasugi, H.; Chen, Q.; Jiang, R.; Shibasaki, R. DeepRailway: A deep learning system for forecasting railway traffic. In Proceedings of the 2018 IEEE Conference on Multimedia Information Processing and Retrieval (MIPR), Miami, FL, USA, 12 April 2018; pp. 51–56. [Google Scholar]
- Zhang, J.; Huang, Q.; Huang, Y.; Ding, Q.; Tsai, P.-W. DP-TrajGAN: A privacy-aware trajectory generation model with differential privacy. Future Gener. Comput. Syst. 2022, 142, 25–40. [Google Scholar] [CrossRef]
- Feng, J.; Yang, Z.; Xu, F.; Yu, H.; Wang, M.; Li, Y. Learning to simulate human mobility. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, In Virtual, 6–10 July 2020; pp. 3426–3433. [Google Scholar]
- Radford, A.; Kim, J.W.; Hallacy, C.; Ramesh, A.; Goh, G.; Agarwal, S.; Sastry, G.; Askell, A.; Mishkin, P.; Clark, J.; et al. Learning transferable visual models from natural language supervision. In Proceedings of the 38th International Conference on Machine Learning, In Virtual, 18–24 July 2021; pp. 8748–8763. [Google Scholar]
- Wang, X.; Liu, X.; Lu, Z.; Yang, H. Large scale GPS trajectory generation using map based on two stage GAN. J. Data Sci. 2021, 19, 126–141. [Google Scholar] [CrossRef]
- Yuan, Y.; Ding, J.; Wang, H.; Jin, D.; Li, Y. Activity trajectory generation via modeling spatiotemporal dynamics. In Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Washington, DC, USA, 20 February–8 April 2022. [Google Scholar]
- Zhu, L.; Feng, K.; Pu, Z.; Ma, W. Adversarial diffusion attacks on graph-based traffic prediction models. IEEE Internet Things J. 2024, 11, 1481–1495. [Google Scholar] [CrossRef]
- Zhu, Y.; Yu, J.J.; Zhao, X.; Liu, Q.; Ye, Y.; Chen, W.; Zhang, Z.; Wei, X.; Liang, Y. ControlTraj: Controllable trajectory generation with topology-constrained diffusion model. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD ‘24), Barcelona, Spain, 25–29 August 2024; pp. 4676–4687. [Google Scholar] [CrossRef]
- Zhao, S.; Zhao, D.; Liu, R.; Xia, Z.; Cheng, B.; Chen, J. GMAT-DU: Traffic anomaly prediction with fine spatio-temporal granularity in sparse data. IEEE Trans. Intell. Transp. Syst. 2023, 24, 13503–13517. [Google Scholar] [CrossRef]
- Kim, H.; Lee, B.S.; Shin, W.Y.; Lim, S. Graph anomaly detection with graph neural networks: Current status and challenges. IEEE Access 2022, 10, 111820–111829. [Google Scholar] [CrossRef]
- Bessa, A.; Silva, F.d.M.; Nogueira, R.; Bertini, E.; Freire, J. RioBusData: Outlier detection in bus routes of Rio de Janeiro. ArXiv 2016, arXiv:1601.06128. [Google Scholar]
- Munir, M.; Siddiqui, S.A.; Dengel, A.; Ahmed, S. DeepAnT: A deep learning approach for unsupervised anomaly detection in time series. IEEE Access 2019, 7, 1991–2005. [Google Scholar] [CrossRef]
- Zhao, H.; Wang, Y.; Duan, J.; Huang, C.; Cao, D.; Tong, Y.; Xu, B.; Bai, J.; Tong, J.; Zhang, Q. Multivariate time-series anomaly detection via graph attention network. In Proceedings of the 2020 IEEE International Conference on Data Mining (ICDM), Sorrento, Italy, 17–20 November 2020; pp. 841–850. [Google Scholar]
- Teng, X.; Yan, M.; Ertugrul, A.M.; Lin, Y.-R. Deep into hypersphere: Robust and unsupervised anomaly discovery in dynamic networks. In Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence (IJCAI-18), Stockholm, Sweden, 13–19 July 2018; pp. 2724–2730. [Google Scholar]
- Kipf, T.; Welling, M. Semi-supervised classification with graph convolutional networks. arXiv 2016. [Google Scholar] [CrossRef]
- Yan, S.; Xiong, Y.; Lin, D. Spatial temporal graph convolutional networks for skeleton-based action recognition. In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence, New Orleans, LA, USA, 2–7 February 2018; p. 912. [Google Scholar]
- Zhang, Q.; Wang, Z.; Long, C.; Huang, C.; Yiu, S.; Liu, Y.; Cong, G.; Shi, J. Online anomalous sub-trajectory detection on road networks with deep reinforcement learning. In Proceedings of the 2023 IEEE 39th International Conference on Data Engineering (ICDE), Anaheim, CA, USA, 3–7 April 2023; pp. 246–258. [Google Scholar]
- Ding, C.; Sun, S.; Zhao, J. MST-GAT: A multimodal spatial–temporal graph attention network for time series anomaly detection. Inf. Fusion 2023, 89, 527–536. [Google Scholar] [CrossRef]
- Zhao, Z.; Pugdeethosapol, K.; Lin, S.; Li, Z.; Ding, C.; Wang, Y.; Qiu, Q. Learning topics using semantic locality. In Proceedings of the 2018 24th International Conference on Pattern Recognition (ICPR), Beijing, China, 5 January–5 April 2018; pp. 3710–3715. [Google Scholar]
- Graves, A.; Mohamed, A.; Hinton, G. Speech recognition with deep recurrent neural networks. In Proceedings of the 2013 IEEE International Conference on Acoustics, Speech and Signal Processing, Vancouver, BC, Canada, 26–31 May 2013; pp. 6645–6649. [Google Scholar]
- Vedantam, R.; Zitnick, C.L.; Parikh, D. CIDEr: Consensus-based image description evaluation. In Proceedings of the 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Boston, MA, USA, 7–12 June 2015; pp. 4566–4575. [Google Scholar]
- Schmidhuber, J.; Hochreiter, S. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [PubMed]
- Chung, J.; Gulcehre, C.; Cho, K.H.; Bengio, Y. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv 2014. [Google Scholar] [CrossRef]
- Yao, H.; Tang, X.; Wei, H.; Zheng, G.; Li, Z. Revisiting spatial-temporal similarity: A deep learning framework for traffic prediction. In Proceedings of the AAAI Conference on Artificial Intelligence, Honolulu, HI, USA, 29–31 January 2019; Volume 33, pp. 5668–5675. [Google Scholar]
- Malhotra, P.; Vig, L.; Shroff, G.M.; Agarwal, P. Long short-term memory networks for anomaly detection in time series. In The European Symposium on Artificial Neural Networks; i6doc.com: Bruges, Belgium, 2015. [Google Scholar]
- Malhotra, P.; Ramakrishnan, A.; Anand, G.; Vig, L.; Agarwal, P.; Shroff, G. LSTM-based encoder-decoder for multi-sensor anomaly detection. arXiv 2016, arXiv:1607.00148. [Google Scholar]
- Song, L.; Wang, R.; Xiao, D.; Han, X.; Cai, Y.; Shi, C. Anomalous trajectory detection using recurrent neural network. In Proceedings of the Advanced Data Mining and Applications: 14th International Conference, ADMA, Nanjing, China, 16–18 November 2018; Springer: Berlin/Heidelberg, Germany, 2018; pp. 263–277. [Google Scholar] [CrossRef]
- Cheng, Y.; Wu, B.; Song, L.; Shi, C. Spatial-temporal recurrent neural network for anomalous trajectory detection. In Proceedings of the 15th International Conference on Advanced Data Mining and Applications (ADMA), Dalian, China, 21–23 November 2019; pp. 432–443. [Google Scholar]
- Zhang, C.; Song, D.; Chen, Y.; Feng, X.; Lumezanu, C.; Cheng, W.; Ni, J.; Zong, B.; Chen, H.; Chawla, N.V. A Deep Neural Network for Unsupervised Anomaly Detection and Diagnosis in Multivariate Time Series Data. In Proceedings of the 33rd AAAI Conference on Advance of Artificial Intelligence (AAAI), Honolulu, HI, USA, 27 January–1 February 2019; Volume 33, pp. 1409–1416. [Google Scholar]
- Ji, Y.F.; Wang, L.W.; Wu, W.L.; Shao, H.; Feng, Y. A method for LSTM-based trajectory modeling and abnormal trajectory detection. IEEE Access 2020, 8, 104063–104073. [Google Scholar] [CrossRef]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, L.; Polosukhin, I. Attention is all you need. In Proceedings of the 31st International Conference on Neural Information Processing Systems, Long Beach, CA, USA, 4–9 December 2017; pp. 6000–6010. [Google Scholar]
- Wang, X.; Pi, D.; Zhang, X.; Liu, H.; Guo, C. Variational transformer-based anomaly detection approach for multivariate time series. Measurement 2022, 191, 110791. [Google Scholar] [CrossRef]
- Sakurada, M.; Yairi, T. Anomaly detection using auto-encoders with nonlinear dimensionality reduction. In Proceedings of the MLSDA 2014 2nd Workshop on Machine Learning for Sensory Data Analysis (MLSDA’14), Gold Coast, Australia, 2 December 2014; pp. 4–11. [Google Scholar]
- Liu, Y.; Zhao, K.; Cong, G.; Bao, Z. Online anomalous trajectory detection with deep generative sequence modeling. In Proceedings of the 2020 IEEE 36th International Conference on Data Engineering (ICDE), Dallas, TX, USA, 20–24 April 2020; pp. 949–960. [Google Scholar]
- Bashar, M.A.; Nayak, R. TAnoGAN: Time series anomaly detection with generative adversarial networks. In Proceedings of the 2020 IEEE Symposium Series on Computational Intelligence (SSCI), Canberra, Australia, 1–4 December 2020; pp. 1778–1785. [Google Scholar]
- Li, D.; Chen, D.; Jin, B.; Shi, L.; Goh, J.; Ng, S.-K. MAD-GAN: Multivariate anomaly detection for time series data with generative adversarial networks. In Proceedings of the Artificial Neural Networks and Machine Learning–ICANN 2019: 28th International Conference on Artificial Neural Networks, Munich, Germany, 17–19 September 2019; pp. 703–716. [Google Scholar]
- Lee, J.-G.; Han, J.W.; Li, X.L. Trajectory outlier detection: A partition-and-detect framework. In Proceedings of the IEEE International Conference on Data Engineering, Cancun, Mexico, 7–12 April 2008; pp. 140–149. [Google Scholar]
- Zhang, D.Q.; Li, N.; Zhou, Z.H.; Chen, C.; Sun, L.; Li, S. iBAT: Detecting anomalous taxi trajectories from GPS traces. In Proceedings of the International Conference on Ubiquitous Computing, Beijing, China, 17–21 September 2011; pp. 99–108. [Google Scholar]
- Chen, C.; Zhang, D.Q.; Castro, P.S.; Li, N.; Sun, L.; Li, S.; Wang, Z. iBOAT: Isolation-based online anomalous trajectory detection. IEEE Trans. Intell. Transp. Syst. 2013, 14, 806–818. [Google Scholar] [CrossRef]
- Kong, X.; Song, X.; Xia, F.; Guo, H.; Wang, J.; Tolba, A. LoTAD: Long-term traffic anomaly detection based on crowd sourced bus trajectory data. World Wide Web 2018, 21, 825–847. [Google Scholar] [CrossRef]
- Lv, Z.; Xu, J.; Zhao, P.; Liu, G.; Zhao, L.; Zhou, X. Outlier trajectory detection: A trajectory analytics-based approach. In Proceedings of the International Conference on Database Systems and Advanced Applications, Suzhou, China, 27–30 March 2017; Springer: Berlin/Heidelberg, Germany; pp. 231–246. [Google Scholar]
- Kong, X.; Li, Z.; Li, J. Spatial-temporal-cost combination based taxi driving fraud detection for collaborative Internet of Vehicles. IEEE Trans. Ind. Inform. 2022, 18, 3426–3436. [Google Scholar] [CrossRef]
- Han, X.; Cheng, R.; Ma, C.; Grubenmann, T. DeepTEA: Effective and efficient online time-dependent trajectory outlier detection. Proc. VLDB Endow. 2022, 15, 1493–1505. [Google Scholar] [CrossRef]
- Hu, J.; Liu, X.; Fan, Z.; Liang, Y.; Zimmermann, R. Towards unifying diffusion models for probabilistic spatio-temporal graph learning. arXiv 2023, arXiv:2310.17360. [Google Scholar] [CrossRef]
- Wen, H.; Lin, Y.; Xia, Y.; Wan, H.; Wen, Q.; Zimmermann, R.; Liang, Y. DiffSTG: Probabilistic spatio-temporal graph forecasting with denoising diffusion models. In Proceedings of the 31st ACM International Conference on Advances in Geographic Information Systems, Hamburg, Germany, 13–16 November 2023. [Google Scholar]
- Ho, J.; Jain, A.; Abbeel, P. Denoising diffusion probabilistic models. Adv. Neural Inf. Process. Syst. 2020, 33, 6840–6851. [Google Scholar] [CrossRef]
- Keogh, E.J.; Pazzani, M.J. Derivative Dynamic Time Warping; SDM: Hong Kong, China, 2001. [Google Scholar]
- Sun, Y.; Han, J. Mining heterogeneous information networks: A structural analysis approach. SIGKDD Explor. 2012, 14, 20–28. [Google Scholar] [CrossRef]
- Wang, X.; Houye, J.; Shi, C.; Wang, B.; Ye, Y.; Cui, P.; Yu, P.S. Heterogeneous graph attention network. In Proceedings of the The World Wide Web Conference (WWW ‘19), In Virtual, 13–17 May 2019; pp. 2022–2032. [Google Scholar] [CrossRef]
- Veličković, P.; Cucurull, G.; Casanova, A.; Romero, A.; Liò, P.; Bengio, Y. Graph Attention Networks; ICLR: Singapore, 2018. [Google Scholar]
- Li, T.; Liu, L.; Li, M. Multi-scale residual depthwise separable convolution for metro passenger flow prediction. Appl. Sci. 2023, 13, 11272. [Google Scholar] [CrossRef]
- Bai, S.; Kolter, J.Z.; Koltun, V. An empirical evaluation generic for convolutional and recurrent networks sequence modeling. arXiv 2018. [Google Scholar] [CrossRef]
- Ballakur, A.A.; Arya, A. Empirical evaluation of gated recurrent neural network architectures in aviation delay prediction. In Proceedings of the 2020 5th International Conference on Computing, Communication and Security (ICCCS), Patna, India, 14–16 October 2020; pp. 1–7. [Google Scholar] [CrossRef]
- Porto Taxi Trajectory Dataset. Available online: https://tianchi.aliyun.com/dataset/94216 (accessed on 14 December 2025).
- Base Map Vector Data for Porto Metropolitan Area, Portugal. Available online: https://data.nextgis.com/en/region/PT-CITY-002/base/ (accessed on 14 December 2025).
- World Weather Online: Historical and Forecast Weather Data. Available online: https://www.worldweatheronline.com/ (accessed on 14 December 2025).
- Large detailed relief map of Portugal, Cities and Airports. Available online: https://www.mapsland.com/europe/portugal/large-detailed-relief-map-of-portugal (accessed on 1 January 2026).
- Li, L.; Jiang, R.; He, Z.; Chen, X.M.; Zhou, X. Trajectory data-based traffic flow studies: A revisit. Transp. Res. Part C Emerg. Technol. 2020, 114, 225–240. [Google Scholar] [CrossRef]
- Hu, W.; Li, M.; Kwan, M.P.; Luo, H.; Chen, B. Real-time taxi spatial anomaly detection based on vehicle trajectory prediction. Travel Behav. Soc. 2024, 34, 100698. [Google Scholar] [CrossRef]
- Wang, J.; Zhang, X.; Li, C. Anomalous trajectory detection and classification based on difference and intersection set distance. IEEE Trans. Veh. Technol. 2020, 69, 2487–2500. [Google Scholar] [CrossRef]
- Kong, X.; Lin, H.; Jiang, R.; Shen, G. Anomalous sub-trajectory detection with graph contrastive self-supervised learning. IEEE Trans. Veh. Technol. 2024, 73, 9800–9811. [Google Scholar] [CrossRef]
- Greff, K.; Srivastava, R.K.; Koutnìk, J.; Steunebrink, B.R.; Schmidhuber, J. LSTM: A search space odyssey. IEEE Trans. Neural Netw. Learn. Syst. 2017, 28, 2222–2232. [Google Scholar] [CrossRef]
- Xin, L.; Wang, P.; Chan, C.-Y.; Chen, J.; Li, S.E.; Cheng, B. Intention-aware long horizon trajectory prediction of surrounding vehicles using dual LSTM networks. In Proceedings of the 2018 21st International Conference on Intelligent Transportation Systems (ITSC), Maui, NI, USA, 4–7 November 2018; pp. 1441–1446. [Google Scholar] [CrossRef]
- Duan, J.; Wang, J.; Li, R. A combined short-term wind speed forecasting model based on CNN–RNN and linear regression optimization considering error. Renew. Energy 2022, 200, 788–808. [Google Scholar] [CrossRef]
- Li, R.; Qin, Y.; Wang, J.; Wang, H. AMGB: Trajectory prediction using attention-based mechanism GCN-BiLSTM in IoV. Pattern Recognit. Lett. 2023, 169, 17–27. [Google Scholar] [CrossRef]












| Symbol/Abbreviation | Description | Module/Context |
|---|---|---|
| CL-CD | Contrastive Learning-based Conditional Diffusion Model | Data augmentation |
| UNIM | Urban road Network Interaction Modeling model | Offline feature learning |
| EA-HAN | Edge-Augmented Heterogeneous Attention Network | UNIM sub-module |
| TDC-GCN-GAT | Time-Decoupled GCN-GAT module | UNIM sub-module |
| LSTAD | Long-Short Temporal Anomaly Detection Model | Online detection |
| BARDSC | Bidirectional Attention Residual Depth-Separable Convolution | LSTAD sub-module |
| DSTN | Dual-Stage Temporal Network | LSTAD sub-module |
| Static features of a road network node (e.g., segment length, type): , where the subscripts r, i, and z denote the road segment, intersection, and zone node types, respectively. | UNIM input | |
| Dynamic temporal features of a node at time period t: , where the subscripts r, i, and z are as defined above. | UNIM input | |
| Node representation for the p-th meta-path at time period t: , where the subscript i denotes the index of a node in the network. | EA-HAN within UNIM | |
| Aggregated node representation at time t: , where V is the set of all nodes. | EA-HAN within UNIM | |
| S | Local spatial feature representation from TDC-GCN-GAT | UNIM output component |
| Z | Global semantic feature representation from EA-HAN | UNIM output component |
| Final fused road network node embedding (combining S and Z) | UNIM output | |
| Input for the i-th branch of DSTN: the combination of the current trajectory point and the i-th preceding historical point | LSTAD input |
| Data Category | Field Name | Description |
|---|---|---|
| Taxi Trajectory | TRIP_ID | Unique identifier for a trip. |
| TAXI_ID | Unique identifier for a taxi. | |
| CALL_TYPE | Dispatch type: ‘A’ (central dispatch), ‘B’ (pre-booked at a stand), ‘C’ (hailed on-street). | |
| TIMESTAMP | Unix timestamp (seconds) of trip start. | |
| POLYLINE | String-encoded sequence of GPS coordinates (WGS84), sampled every 15 s. | |
| MISSING_DATA | Boolean flag indicating if the trip has missing GPS points. | |
| Map-Road Data | fid | Unique identifier for the road element. |
| length | Length of the road segment (meters). | |
| width | Width of the road (meters). | |
| highway | Road type (e.g., motorway, primary, residential). | |
| lanes | Number of lanes. | |
| maxspeed | Legal speed limit (km/h). | |
| Map-Zone Data | fid | Unique identifier for the zone element. |
| area | Area-related metrics for the zone. | |
| height | Average height of buildings/structures in the zone (meters). | |
| building | Building/zone type (e.g., commercial, apartment). | |
| Map-Intersection Data | fid | Unique identifier for the intersection element. |
| length | Geometric length associated with the intersection (meters). | |
| distance, angle | Distance from the intersection center to the connected road segment (meters) and the connection angle (degrees). | |
| Weather Data | dt | Record time (Unix timestamp). |
| temp | Temperature (°C). | |
| pressure | Atmospheric pressure (hPa). | |
| humidity | Humidity (%). | |
| wind_speed | Wind speed (m/s). | |
| wind_deg | Wind direction (degrees). | |
| weather_main | General weather condition (e.g., Rain, Clear, Snow). |
| Anomaly Degree | Models | Density Error | Trip Error | Length Error |
|---|---|---|---|---|
| L1 | VAE | 0.0134 | 0.0581 | 0.0373 |
| TrajGAN | 0.0145 | 0.046 | 0.0319 | |
| DiffTraj | 0.0086 | 0.0177 | 0.0201 | |
| ControlTraj | 0.0043 | 0.0168 | 0.0182 | |
| CL-CD | 0.0045 | 0.0107 | 0.0094 | |
| L2 | VAE | 0.0162 | 0.0558 | 0.0402 |
| TrajGAN | 0.0157 | 0.0546 | 0.0395 | |
| DiffTraj | 0.0091 | 0.0192 | 0.0258 | |
| ControlTraj | 0.0054 | 0.0171 | 0.0192 | |
| CL-CD | 0.0038 | 0.0074 | 0.0086 | |
| L3 | VAE | 0.0193 | 0.0644 | 0.0423 |
| TrajGAN | 0.017 | 0.0598 | 0.0421 | |
| DiffTraj | 0.0098 | 0.0247 | 0.0266 | |
| ControlTraj | 0.0068 | 0.0184 | 0.023 | |
| CL-CD | 0.005 | 0.0065 | 0.0072 |
| Anomaly Proportion | Models | Accuracy | Precision | Recall | F1 | FPR | AUC-PR | AUC-ROC |
|---|---|---|---|---|---|---|---|---|
| 0.1 | TROAD | 0.9934 | 0.6429 | 0.6923 | 0.6667 | 0.005 | 0.7844 | 0.6372 |
| iBAT | 0.9929 | 0.637 | 0.6111 | 0.6223 | 0.0034 | 0.7975 | 0.6002 | |
| ATDC | 0.9894 | 0.7223 | 0.7432 | 0.7326 | 0.0031 | 0.8122 | 0.7567 | |
| GM-VASE | 0.9119 | 0.9128 | 0.8077 | 0.8541 | 0.0872 | 0.8546 | 0.8428 | |
| GCSSL-ASD | 0.9161 | 0.9167 | 0.8455 | 0.878 | 0.0833 | 0.8499 | 0.8557 | |
| MTRI | 0.9958 | 0.9970 | 0.86 | 0.9231 | 0.003 | 0.8574 | 0.8586 | |
| 0.3 | TROAD | 0.987 | 0.7998 | 0.7885 | 0.7942 | 0.0066 | 0.8953 | 0.6675 |
| iBAT | 0.9892 | 0.8372 | 0.7826 | 0.8068 | 0.0047 | 0.8889 | 0.654 | |
| ATDC | 0.9884 | 0.8095 | 0.8004 | 0.8049 | 0.0058 | 0.9105 | 0.7617 | |
| GM-VASE | 0.9255 | 0.9272 | 0.8635 | 0.8925 | 0.0728 | 0.9675 | 0.8755 | |
| GCSSL-ASD | 0.8916 | 0.8917 | 0.8861 | 0.8889 | 0.1083 | 0.9701 | 0.8872 | |
| MTRI | 0.9942 | 0.9971 | 0.8912 | 0.9408 | 0.0029 | 0.995 | 0.904 | |
| 0.5 | TROAD | 0.986 | 0.8 | 0.8171 | 0.8085 | 0.0118 | 0.8963 | 0.7815 |
| iBAT | 0.9886 | 0.8982 | 0.8571 | 0.8772 | 0.0049 | 0.9261 | 0.7707 | |
| ATDC | 0.9898 | 0.9149 | 0.8754 | 0.8947 | 0.0043 | 0.9437 | 0.8145 | |
| GM-VASE | 0.9453 | 0.9475 | 0.8985 | 0.9223 | 0.0525 | 0.9563 | 0.8246 | |
| GCSSL-ASD | 0.9335 | 0.9347 | 0.9083 | 0.9213 | 0.0653 | 0.9772 | 0.8527 | |
| MTRI | 0.9851 | 0.9887 | 0.91 | 0.9485 | 0.0113 | 0.979 | 0.8545 |
| Anomaly Degree | Models | Accuracy | Precision | Recall | F1 | FPR | AUC-PR | AUC-ROC |
|---|---|---|---|---|---|---|---|---|
| L1 | TROAD | 0.9856 | 0.7505 | 0.7943 | 0.7718 | 0.0083 | 0.8801 | 0.7158 |
| iBAT | 0.9885 | 0.7379 | 0.765 | 0.7507 | 0.0061 | 0.8731 | 0.6525 | |
| ATDC | 0.9907 | 0.8609 | 0.8195 | 0.8397 | 0.0041 | 0.8671 | 0.7512 | |
| GM-VASE | 0.9373 | 0.9402 | 0.8738 | 0.9058 | 0.0598 | 0.8765 | 0.8792 | |
| GCSSL-ASD | 0.9608 | 0.9649 | 0.8722 | 0.9162 | 0.0351 | 0.8821 | 0.8774 | |
| MTRI | 0.9811 | 0.9839 | 0.8808 | 0.9215 | 0.0161 | 0.8826 | 0.8854 | |
| L2 | TROAD | 0.987 | 0.8108 | 0.7855 | 0.798 | 0.0058 | 0.8898 | 0.7597 |
| iBAT | 0.9908 | 0.8079 | 0.732 | 0.7673 | 0.0035 | 0.8642 | 0.6765 | |
| ATDC | 0.9916 | 0.8722 | 0.8403 | 0.856 | 0.0038 | 0.8847 | 0.8281 | |
| GM-VASE | 0.9687 | 0.9717 | 0.9059 | 0.9376 | 0.0283 | 0.8927 | 0.8849 | |
| GCSSL-ASD | 0.9745 | 0.9791 | 0.8753 | 0.9243 | 0.0209 | 0.8805 | 0.8783 | |
| MTRI | 0.9948 | 0.9972 | 0.9119 | 0.9531 | 0.0028 | 0.8952 | 0.8946 | |
| L3 | TROAD | 0.9894 | 0.8301 | 0.814 | 0.822 | 0.005 | 0.8996 | 0.7319 |
| iBAT | 0.9913 | 0.8265 | 0.7538 | 0.7883 | 0.0034 | 0.8752 | 0.6959 | |
| ATDC | 0.9926 | 0.8847 | 0.8638 | 0.8741 | 0.0035 | 0.9113 | 0.8313 | |
| GM-VASE | 0.9409 | 0.9424 | 0.9084 | 0.9251 | 0.0576 | 0.9264 | 0.8971 | |
| GCSSL-ASD | 0.9693 | 0.9712 | 0.9298 | 0.95 | 0.0288 | 0.9305 | 0.9183 | |
| MTRI | 0.9876 | 0.9891 | 0.9378 | 0.9633 | 0.0109 | 0.9538 | 0.9247 |
| Models | LSTM | GRU | Dual-LSTM | EMD-CNN-RNN | AMGB | MTRI |
|---|---|---|---|---|---|---|
| MSE_lat | 0.1163 | 0.12 | 0.0814 | 0.0726 | 0.0717 | 0.0703 |
| MSE_lon | 0.0412 | 0.0428 | 0.0346 | 0.0315 | 0.0277 | 0.0296 |
| MSE | 0.1572 | 0.1634 | 0.1109 | 0.1081 | 0.1005 | 0.0999 |
| Haversine | 32.08 m | 33.86 m | 29.77 m | 26.35 m | 25.21 m | 24.46 m |
| RMSE_lat | 0.2512 | 0.2589 | 0.2282 | 0.2172 | 0.2143 | 0.209 |
| RMSE_lon | 0.2583 | 0.2706 | 0.2378 | 0.212 | 0.1861 | 0.1443 |
| RMSE | 0.336 | 0.3478 | 0.3052 | 0.2754 | 0.2625 | 0.2608 |
| ADE_lat | 0.1931 | 0.1903 | 0.1712 | 0.1586 | 0.1597 | 0.1617 |
| ADE_lon | 0.1344 | 0.1379 | 0.1225 | 0.1192 | 0.1149 | 0.1131 |
| ADE | 0.1682 | 0.1731 | 0.1549 | 0.1387 | 0.1376 | 0.1374 |
| FDE_lat | 0.1456 | 0.1445 | 0.1431 | 0.1427 | 0.1408 | 0.141 |
| FDE_lon | 0.148 | 0.1492 | 0.1458 | 0.1374 | 0.1326 | 0.1409 |
| FDE | 0.1474 | 0.1453 | 0.1443 | 0.1418 | 0.1349 | 0.1416 |
| Anomaly Proportion | Models | Accuracy | Precision | Recall | F1 | FPR | AUC-PR | AUC-ROC |
|---|---|---|---|---|---|---|---|---|
| 0.1 | MTRI | 0.9958 | 0.9970 | 0.86 | 0.9231 | 0.003 | 0.8574 | 0.8586 |
| MTRI-TDC-GCN-GAT | 0.9001 | 0.9057 | 0.8512 | 0.8743 | 0.0909 | 0.8447 | 0.8513 | |
| MTRI-EA-HAN | 0.9706 | 0.952 | 0.8567 | 0.9014 | 0.05 | 0.8536 | 0.857 | |
| MTRI-DSTN | 0.9918 | 0.9904 | 0.8368 | 0.9071 | 0.0054 | 0.8486 | 0.8498 | |
| MTRI-BARDSC | 0.9921 | 0.9957 | 0.8442 | 0.9137 | 0.0041 | 0.8527 | 0.8547 | |
| 0.3 | MTRI | 0.9942 | 0.9971 | 0.8912 | 0.9408 | 0.0029 | 0.995 | 0.904 |
| MTRI-TDC-GCN-GAT | 0.9676 | 0.9044 | 0.8903 | 0.8973 | 0.095 | 0.9504 | 0.889 | |
| MTRI-EA-HAN | 0.9683 | 0.9576 | 0.887 | 0.9217 | 0.0417 | 0.9791 | 0.8933 | |
| MTRI-DSTN | 0.9896 | 0.9884 | 0.8739 | 0.9265 | 0.0068 | 0.9758 | 0.8895 | |
| MTRI-BARDSC | 0.9928 | 0.9912 | 0.8863 | 0.9387 | 0.0056 | 0.9859 | 0.8953 | |
| 0.5 | MTRI | 0.9851 | 0.9887 | 0.91 | 0.9485 | 0.0113 | 0.979 | 0.8545 |
| MTRI-TDC-GCN-GAT | 0.9763 | 0.9426 | 0.887 | 0.9146 | 0.0563 | 0.9519 | 0.8433 | |
| MTRI-EA-HAN | 0.9761 | 0.9553 | 0.9012 | 0.9279 | 0.0442 | 0.9648 | 0.8509 | |
| MTRI-DSTN | 0.9829 | 0.9832 | 0.898 | 0.9357 | 0.0153 | 0.9739 | 0.8483 | |
| MTRI-BARDSC | 0.9848 | 0.9814 | 0.9055 | 0.9443 | 0.013 | 0.9726 | 0.8506 |
| Anomaly Degree | Models | Accuracy | Precision | Recall | F1 | FPR | AUC-PR | AUC-ROC |
|---|---|---|---|---|---|---|---|---|
| L1 | MTRI | 0.9811 | 0.9839 | 0.8808 | 0.9215 | 0.0161 | 0.8826 | 0.8854 |
| MTRI-TDC-GCN-GAT | 0.9768 | 0.9698 | 0.8741 | 0.9204 | 0.0307 | 0.8807 | 0.8799 | |
| MTRI-EA-HAN | 0.9769 | 0.9743 | 0.8758 | 0.9214 | 0.0307 | 0.8824 | 0.8823 | |
| MTRI-DSTN | 0.9774 | 0.9807 | 0.8612 | 0.9063 | 0.0215 | 0.8742 | 0.8775 | |
| MTRI-BARDSC | 0.9763 | 0.9812 | 0.8649 | 0.9128 | 0.0209 | 0.8763 | 0.8782 | |
| L2 | MTRI | 0.9948 | 0.9972 | 0.9119 | 0.9531 | 0.0028 | 0.8952 | 0.8946 |
| MTRI-TDC-GCN-GAT | 0.9861 | 0.9786 | 0.8946 | 0.9349 | 0.0221 | 0.8854 | 0.8807 | |
| MTRI-EA-HAN | 0.9868 | 0.9801 | 0.9071 | 0.9427 | 0.0199 | 0.8933 | 0.8914 | |
| MTRI-DSTN | 0.9903 | 0.9905 | 0.8962 | 0.9308 | 0.0084 | 0.8821 | 0.8883 | |
| MTRI-BARDSC | 0.9917 | 0.9894 | 0.8978 | 0.9468 | 0.0068 | 0.8889 | 0.8929 | |
| L3 | MTRI | 0.9876 | 0.9891 | 0.9378 | 0.9633 | 0.0109 | 0.9538 | 0.9247 |
| MTRI-TDC-GCN-GAT | 0.9865 | 0.9603 | 0.9131 | 0.9364 | 0.0397 | 0.9279 | 0.889 | |
| MTRI-EA-HAN | 0.9871 | 0.9724 | 0.9286 | 0.9502 | 0.0268 | 0.9435 | 0.9072 | |
| MTRI-DSTN | 0.9848 | 0.9874 | 0.929 | 0.9448 | 0.0177 | 0.948 | 0.9103 | |
| MTRI-BARDSC | 0.985 | 0.9866 | 0.9309 | 0.9594 | 0.0151 | 0.953 | 0.9241 |
| Models | Number of Parameters (M) | FLOPs (G) | Average Inference Time (ms) |
|---|---|---|---|
| TROAD | - | - | 0.2 |
| iBAT | - | - | 0.3 |
| ATDC | - | - | 0.2 |
| GM-VASE | 10.5 | 0.5 | 3.5 |
| GCSSL-ASD | 25.7 | 2.1 | 15.2 |
| MTRI | 12.3 | 0.8 | 2.8 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Chen, J.; Chen, H.; Lu, H. Enhancing Road Safety and Sustainability: A Multi-Scale Temporal Model for Vehicle Trajectory Anomaly Detection in Road Network Interactions. Sustainability 2026, 18, 597. https://doi.org/10.3390/su18020597
Chen J, Chen H, Lu H. Enhancing Road Safety and Sustainability: A Multi-Scale Temporal Model for Vehicle Trajectory Anomaly Detection in Road Network Interactions. Sustainability. 2026; 18(2):597. https://doi.org/10.3390/su18020597
Chicago/Turabian StyleChen, Juan, Haoran Chen, and Hongyu Lu. 2026. "Enhancing Road Safety and Sustainability: A Multi-Scale Temporal Model for Vehicle Trajectory Anomaly Detection in Road Network Interactions" Sustainability 18, no. 2: 597. https://doi.org/10.3390/su18020597
APA StyleChen, J., Chen, H., & Lu, H. (2026). Enhancing Road Safety and Sustainability: A Multi-Scale Temporal Model for Vehicle Trajectory Anomaly Detection in Road Network Interactions. Sustainability, 18(2), 597. https://doi.org/10.3390/su18020597

