Adaptive Deployment of Fixed Traffic Detectors Based on Attention Mechanism
Abstract
1. Introduction
- A DPSM is proposed to overcome the limitations of traditional static sensor placement, and it significantly enhances traffic state estimation accuracy by dynamically selecting the most representative observation points.
- Three DPSM-based models are constructed by incorporating spatiotemporal features of traffic flow, and their superior performance under various observation configurations is validated.
- Experiments on the real-world NGSIM-US101 traffic dataset demonstrate that the DPSM achieves strong robustness and high prediction accuracy under low-observation-point scenarios.
2. Related Work
2.1. Traffic State Estimation
2.2. Fixed Traffic Detector Deployment
3. Methodology
3.1. Problem Definition
3.2. Detection Point Selection Module (DPSM)
3.3. Detailed Module Design
3.3.1. Input Preparation
3.3.2. Feature Vector Construction
3.3.3. Attention-Based Scoring
3.3.4. Normalized Selection
3.3.5. Output of Selected Detectors
Algorithm 1: Detection Point Selection Module (DPSM) |
Input: |
Ground-truth global flow map |
Normalized spatial coordinates |
Normalized temporal features |
Number of detectors to select k |
Output: |
Indices of selected detectors |
Observed flows of selected detectors |
1: # Step 1: Input Preparation |
2: for i = 1 to D do |
3: # Construct feature vector for each detector |
4: end for |
5: # Step 2: Attention-based Scoring |
6: for i = 1 to D do |
7: = AttentionNetwork () # Compute attention score for each detector |
8: end for |
9: # Aggregate scores into a vector |
10: # Step 3: Normalized Selection |
11: alpha = softmax(s) # Normalize scores to obtain attention weights |
12: # Step 4: Top-k Detector Selection |
13: # Select top k detectors based on attention weights |
14: # Step 5: Output Selected Detectors |
15: # Extract observed flows of selected detectors |
16: return |
4. Experiment
4.1. Dataset Description
4.2. Baseline Models and Evaluation Metrics
- 1.
- DPSM-NN: Fully connected Prediction Model
- 2.
- DPSM-CNN: Convolutional Prediction Model
- 3.
- DPSM-LSTM: LSTM Prediction Model
4.3. Experimental Results
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Zhang, L.; Chen, T.; Yu, B.; Yang, M.; Liu, H. Suburban demand responsive transit service with rental vehicles. IEEE Trans. Intell. Transp. Syst. 2021, 22, 2391–2403. [Google Scholar] [CrossRef]
- Seo, T.; Bayen, A.M.; Kusakabe, T.; Asakura, Y. Traffic state estimation on highway: A comprehensive survey. Annu. Rev. Control 2017, 43, 128–151. [Google Scholar] [CrossRef]
- Zhang, K.; Feng, X.; Jia, N.; Zhao, L.; He, Z. TSR-GAN: Generative Adversarial Networks for Traffic State Reconstruction with Time-Space Diagrams. Phys. A 2022, 591, 126788. [Google Scholar] [CrossRef]
- Li, Z.; Han, W.; Zhang, Y.; Fu, Q.; Li, J.; Qin, L.; Dong, R.; Sun, H.; Deng, Y.; Yang, L. Learning spatiotemporal dynamics with a pretrained generative model. Nat. Mach. Intell. 2024, 6, 1566–1579. [Google Scholar] [CrossRef]
- Zou, G.; Lai, Z.; Wang, T.; Liu, Z.; Li, Y. MT-STNet: A Novel Multi-Task Spatiotemporal Network for Highway Traffic Flow Prediction. IEEE Trans. Intell. Transp. Syst. 2024, 25, 8221–8236. [Google Scholar] [CrossRef]
- Wang, T.; Li, Y.; Cheng, R.; Zou, G.; Dantsujic, T.; Ngoduy, D. Knowledge-data fusion oriented traffic state estimation: A stochastic physics-informed deep learning approach. arXiv 2024, arXiv:2409.00644. [Google Scholar]
- Wang, T.; Ngoduy, D.; Li, Y.; Lyu, H.; Zou, G.; Dantsuji, T. Koopman theory meets graph convolutional network: Learning the complex dynamics of non-stationary highway traffic flow for spatiotemporal prediction. Chaos Solitons Fractals 2024, 187, 115437. [Google Scholar] [CrossRef]
- Kuwahara, M.; Takenouchi, A.; Kawai, K. Traffic state estimation by backward moving observers: An application and validation under an incident. Transp. Res. Part C Emerg. Technol. 2021, 127, 103158. [Google Scholar] [CrossRef]
- Haj-Salem, H.; Lebacque, P.J. Reconstruction of False and Missing Data with First-Order Traffic Flow Model. Transp. Res. Rec. 2002, 1802, 155–165. [Google Scholar] [CrossRef]
- Claudel, C.G.; Bayen, A.M. Guaranteed bounds for traffic flow parameters estimation using mixed Lagrangian-Eulerian sensing. In Proceedings of the 46th Annual Allerton Conference on Communication, Control, and Computing, Monticello, IL, USA, 23–26 September 2008; pp. 636–645. [Google Scholar]
- Xia, C.; Cochrane, C.; DeGuire, J.; Fan, G.; Holmes, E.; McGuirl, M.; Murphy, P.; Palmer, J.; Carter, P.; Slivinski, L.; et al. Assimilating Eulerian and Lagrangian data in traffic-flow models. Phys. D 2017, 346, 59–72. [Google Scholar] [CrossRef]
- Liu, J.; Jiang, R.; Liu, Y.; Zheng, S.; Jia, B.; Ji, H. A multi-layer multiclass cell transmission model for modeling heterogeneous traffic flow. Transp. Res. Part C Emerg. Technol. 2025, 174, 105099. [Google Scholar]
- Wang, Y.; Papageorgiou, M.; Messmer, A. Real-time freeway traffic state estimation based on extended Kalman filter: Adaptive capabilities and real data testing. Transp. Res. Part A Policy Pract. 2008, 42, 1340–1358. [Google Scholar]
- Chang, S.Y.; Wu, H.C.; Kao, Y.C. Tensor extended Kalman filter and its application to traffic prediction. IEEE Trans. Intell. Transp. Syst. 2023, 24, 5432–5443. [Google Scholar] [CrossRef]
- Chen, X.; He, Z.; Sun, L. A Bayesian tensor decomposition approach for spatiotemporal traffic data imputation. Transp. Res. Part C Emerg. Technol. 2019, 98, 73–84. [Google Scholar]
- Rempe, F.; Franeck, P.; Bogenberger, K. On the estimation of traffic speeds with deep convolutional neural networks given probe data. Transp. Res. Part C Emerg. Technol. 2022, 134, 103448. [Google Scholar] [CrossRef]
- Van Lint, J.; Hoogendoorn, S.; Van Zuylen, H. Freeway travel time prediction with state-space neural networks: Modeling state-space dynamics with recurrent neural networks. In Proceedings of the Transport Research Board, Washington, DC, USA, 21–23 March 2002; pp. 30–39. [Google Scholar] [CrossRef]
- Zou, G.; Lai, Z.; Ma, C.; Li, Y.; Wang, T. A Novel Spatio-Temporal Generative Inference Network for Predicting the Long-Term Highway Traffic Speed. Transp. Res. Part C Emerg. Technol. 2023, 154, 104263. [Google Scholar]
- Lu, W.; Yuan, Z.; Wang, T.; Li, P.; Zhang, Y. Will It Get There? A Deep Learning Model for Predicting Next-Trip State of Charge in Urban Green Freight Delivery with Electric Vehicles. ETransportation 2024, 22, 100372. [Google Scholar] [CrossRef]
- Cui, Z.; Ke, R.; Pu, Z.; Wang, Y. Stacked bidirectional and unidirectional LSTM recurrent neural network for forecasting network-wide traffic state with missing values. Transp. Res. Part C Emerg. Technol. 2020, 118, 102674. [Google Scholar] [CrossRef]
- Ma, X.; Tao, Z.; Wang, Y.; Yu, H. Long short-term memory neural network for traffic speed prediction using remote microwave sensor data. Transp. Res. Part C Emerg. Technol. 2015, 54, 187–197. [Google Scholar]
- Tisljaric, L.; Caric, T.; Erdelic, T.; Erdelić, M.; Erdelic, M. Traffic state estimation using speed profiles and convolutional neural networks. In Proceedings of the 43rd International Convention on Information, Communication and Electronic Technology (MIPRO), Opatija, Croatia, 28 September–2 October 2020; pp. 1813–1818. [Google Scholar]
- Dai, J.; Qi, H.; Xiong, Y.; Li, Y.; Tang, X. Deformable convolutional networks. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), Venice, Italy, 22–29 October 2017; pp. 764–773. [Google Scholar]
- Liang, Y.; Cui, Z.; Tian, Y.; Li, Y. A deep generative adversarial architecture for network-wide spatial-temporal traffic-state estimation. Transp. Res. Rec. 2018, 2672, 87–105. [Google Scholar]
- Guo, Y.; Li, H.; Li, X.; Gu, L.; Zhang, J. System observability analysis based on multiple source mixed traffic sensors. In Proceedings of the 2020 Chinese Automation Congress (CAC), Beijing, China, 6–8 November 2020; pp. 7516–7520. [Google Scholar]
- Fu, H.; Lam, W.H.; Ho, H.; Ma, W. Optimization of multi-type traffic sensor locations for network-wide link travel time estimation with consideration of their covariance. Transp. B Dyn. 2023, 11, 760–782. [Google Scholar] [CrossRef]
- Tascikaraoglu, F.Y.; Aksoy, G. Identification of sensor location and link flow reconstruction using turn ratio and flow sensors in an arterial network. J. Intell. Transp. Syst. 2024, 28, 163–173. [Google Scholar] [CrossRef]
- Hong, Z.; Fukuda, D. Effects of traffic sensor location on traffic state estimation. Procedia Soc. Behav. Sci. 2012, 54, 1186–1196. [Google Scholar] [CrossRef]
- Eisenman, S.; Fei, X.; Zhou, X.; Mahmassani, H. Number and location of sensors for real-time network traffic estimation and prediction: Sensitivity analysis. Transp. Res. Rec. 2006, 1964, 253–259. [Google Scholar] [CrossRef]
- Cao, Q.; Bai, Q.; Li, Z.; Li, H.; Ma, Y. Optimal deployment of sensors along freeway corridors for traffic accident detection. J. Transp. Eng. Part A Syst. 2023, 149, 04023042. [Google Scholar] [CrossRef]
- Liu, T.; Meidani, H. End-to-end heterogeneous graph neural networks for traffic assignment. Transp. Res. Part C Emerg. Technol. 2024, 165, 104695. [Google Scholar] [CrossRef]
- Shi, R.; Mo, Z.; Huang, K.; Di, X.; Du, Q. A physics-informed deep learning paradigm for traffic state and fundamental diagram estimation. IEEE Trans. Intell. Transp. Syst. 2021, 23, 11688–11698. [Google Scholar] [CrossRef]
Model | d = 120 (k = 6) | d = 60 (k = 11) | d = 30 (k = 21) | d = 24 (k = 26) | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
MAE | RMSE | MAPE | MAE | RMSE | MAPE | MAE | RMSE | MAPE | MAE | RMSE | MAPE | |
NN | 0.33 | 0.43 | 21.16 | 0.32 | 0.42 | 20.28 | 0.32 | 0.41 | 20.26 | 0.32 | 0.41 | 20.17 |
DPSM-NN | 0.30 | 0.39 | 18.65 | 0.29 | 0.38 | 17.65 | 0.28 | 0.37 | 17.57 | 0.28 | 0.37 | 17.12 |
GAIN (%) | 9.09 | 9.30 | 11.86 | 9.38 | 9.52 | 12.97 | 12.50 | 9.76 | 13.2 | 12.5 | 9.76 | 15.12 |
CNN | 0.38 | 0.49 | 23.3 | 0.41 | 0.51 | 23.55 | 0.40 | 0.56 | 23.80 | 0.42 | 0.56 | 23.17 |
DPSM-CNN | 0.37 | 0.48 | 22.57 | 0.35 | 0.46 | 21.19 | 0.34 | 0.44 | 20.38 | 0.32 | 0.42 | 19.32 |
GAIN (%) | 2.63 | 2.04 | 3.40 | 14.63 | 9.80 | 10.02 | 15.00 | 14.29 | 14.37 | 23.81 | 25.00 | 16.62 |
LSTM | 0.37 | 0.48 | 22.67 | 0.37 | 0.48 | 22.44 | 0.34 | 0.47 | 21.95 | 0.36 | 0.47 | 21.85 |
DPSM-LSTM | 0.33 | 0.43 | 20.43 | 0.30 | 0.39 | 18.22 | 0.30 | 0.38 | 17.86 | 0.29 | 0.38 | 17.65 |
GAIN (%) | 10.81 | 10.42 | 9.88 | 18.92 | 18.75 | 18.81 | 11.76 | 19.15 | 18.63 | 19.44 | 19.15 | 19.22 |
k | Model | Selected Detectors | Distribution Pattern Analysis |
---|---|---|---|
6 | DPSM-NN | [18, 37, 55, 66, 79, 95] | Covers front, middle, and rear sections; strong global representativeness. |
DPSM-CNN | [0, 6, 11, 16, 48, 58] | Dense selection in the front and middle; reflects CNN sensitivity to edges and local spatial features. | |
DPSM-LSTM | [48, 74, 75, 77, 82, 89] | Concentrated in middle and rear; more compact layout; aligned with temporal dependency modeling. | |
11 | DPSM-NN | [6, 10, 37, 51, 59, 77, 83, 87, 90, 97, 98] | Dense selections at the rear; indicates tail section’s importance for global traffic state prediction. |
DPSM-CNN | [0, 9, 21, 22, 24, 27, 32, 48, 55, 63, 85] | Fairly uniform from front to rear; denser in the middle, enabling multi-level spatial feature extraction. | |
DPSM-LSTM | [7, 14, 21, 29, 52, 57, 67, 72, 80, 84, 86] | Focuses on middle and rear with more dispersed layout; helps capture temporal evolution patterns. | |
21 | DPSM-NN | [4, 5, 10, 13, 15, 20, 29, 38, 44, 48, 53, 54, 56, 61, 70, 72, 74, 81, 88, 89, 90] | Broad coverage with emphasis on middle and rear; builds robust spatial perception. |
DPSM-CNN | [0, 3, 5, 6, 9, 14, 15, 23, 25, 27, 29, 32, 35, 44, 45, 67, 68, 70, 84, 89, 97] | Mostly concentrated in the middle and edge zones; loose structure reflecting CNN’s locality. | |
DPSM-LSTM | [2, 4, 8, 16, 17, 21, 22, 25, 40, 48, 49, 50, 51, 54, 61, 62, 65, 70, 71, 84] | Clear middle focus with endpoints added; supports modeling of long-range dependencies. | |
26 | DPSM-NN | [8, 12, 26, 28, 29, 33, 37, 39, 40, 42, 43, 46, 49, 53, 58, 59, 67, 72, 73, 76, 79, 80, 83, 84, 87, 97] | Dense in middle-rear; balanced layout enhances congestion observation. |
DPSM-CNN | [6, 7, 8, 9, 12, 13, 17, 19, 20, 21, 38, 40, 46, 47, 59, 61, 62, 82, 83, 84, 90, 91, 95, 96, 97, 98] | Dispersed and broad spatial coverage; aligns with CNN’s multi-scale feature needs. | |
DPSM-LSTM | [8, 13, 14, 17, 19, 21, 26, 29, 31, 40, 43, 44, 46, 47, 49, 50, 55, 58, 64, 67, 68, 69, 70, 72, 79, 86] | Middle-preferred with rear support; forms a temporal backbone for sequence modeling. |
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. |
© 2025 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Zhao, W.; Wang, T.; Zou, G.; Wang, H.; Li, Y. Adaptive Deployment of Fixed Traffic Detectors Based on Attention Mechanism. Systems 2025, 13, 887. https://doi.org/10.3390/systems13100887
Zhao W, Wang T, Zou G, Wang H, Li Y. Adaptive Deployment of Fixed Traffic Detectors Based on Attention Mechanism. Systems. 2025; 13(10):887. https://doi.org/10.3390/systems13100887
Chicago/Turabian StyleZhao, Wenzhi, Ting Wang, Guojian Zou, Honggang Wang, and Ye Li. 2025. "Adaptive Deployment of Fixed Traffic Detectors Based on Attention Mechanism" Systems 13, no. 10: 887. https://doi.org/10.3390/systems13100887
APA StyleZhao, W., Wang, T., Zou, G., Wang, H., & Li, Y. (2025). Adaptive Deployment of Fixed Traffic Detectors Based on Attention Mechanism. Systems, 13(10), 887. https://doi.org/10.3390/systems13100887