Distributed Acoustic Sensing for Urban Traffic Monitoring: Spatio-Temporal Attention in Recurrent Neural Networks
Authors: Izhan Fakhruzi, Manuel Titos, Carmen Benítez, Luz García
Organizations: Department of Signal Theory, Telematics and Communications, and the Center for Information and Communication Technologies Research (CITIC), University of Granada, 18014 Granada, Spain
Effective urban traffic monitoring is essential for improving mobility, enhancing safety, and supporting sustainable cities. Distributed Acoustic Sensing (DAS) enables large-scale traffic observation by transforming existing fiber-optic infrastructure into dense arrays of vibration sensors. However, modeling the high-resolution spatio-temporal structure of DAS data for reliable traffic event recognition remains challenging. This study presents a real-world DAS-based traffic monitoring experiment conducted in Granada, Spain, where vehicles cross a fiber deployed perpendicular to the roadway. Recurrent neural networks (RNNs) are employed to model intra- and inter-event temporal dependencies. Spatial and temporal attention mechanisms are systematically integrated within the RNN architecture to analyze their impact on recognition performance, parameter efficiency, and interpretability. Results show that an appropriate and complementary placement of attention modules improves the balance between accuracy and model complexity. Attention heatmaps provide physically meaningful interpretations of classification decisions by highlighting informative spatial locations and temporal segments. Furthermore, the proposed SA-bi-TA configuration demonstrates spatial transferability, successfully recognizing traffic events at sensing locations different from those used during training, with only moderate performance degradation. These findings support the development of scalable and interpretable DAS-based traffic monitoring systems capable of operating under heterogeneous urban sensing conditions.
Figures & tables
Fig. 1: General attention module (adapted from [ 53 ] ).
Fig. 2: 2.5 km of fiber, the red triangles represent the locations of the fiber where the registered data are collected and used in this study. (1) Palacio de Congresos ; (2) Acera del Darro crossroads. (Courtesy of Google Maps)
Fig. 3: (Left) Schematic overview of fiber laid perpendicular to the lanes. Identified SPs on the fiber is denoted by #1, #2, …, #n. (Right) DAS registers of a 10-minute long signals with y-axis corresponds to the SPs. The fiber layout is depicted for: (a) Palacio de Congresos with 2 lanes, 1 direction, and 3 identified SPs; (b) Acera del Darro with 4 lanes, 2 directions, and 7 identified SPs, devided into 3 Groups of SPs: A(#1–#3), B(#3–#5), C(#5–#7).
Event
Description
Palacio. (#W)
Acera. (#W)
Duration (s)
Noise
Pedestrian or no event
43,129
3,482
11.73 ± 12.70
Car
All types of cars
19,460
2,297
5.72 ± 3.05
Bus
Large-size vehicles (all types of buses & trucks)
9,411
1,421
15.86 ± 6.07
Total
72,000
7,200
TABLE I: Summary of window counts (#W) and event durations (Mean ± Std, in seconds (s)) generated from 10- and 1-hour observations at Palacio de Congresos and Acero del Darro Crossroads.
Model
X
X ,+ Δ
Acc(%)
F1(%)
#Param(M)
RI-Acc(%)
RPI(%)
Acc(%)
F1(%)
#Param(M)
RI-Acc(%)
RPI(%)
LSTM
86.62 ±0.02
86.59 ±0.02
0.08
-1.65
-79.55
88.17 ±0.01
88.18 ±0.01
0.92
0.11
124.35
bi-LSTM
88.08 ±0.01
88.10 ±0.01
0.41
0.00
0.00
88.38 ±0.01
88.41 ±0.01
0.69
0.35
68.09
bi-TA
88.47 ±0.01
88.49 ±0.01
0.25
0.45
-38.85
88.13 ±0.01
88.11 ±0.01
3.36
0.06
715.96
TA-bi
87.97 ±0.01
88.06 ±0.01
0.32
-0.12
-23.21
88.41 ±0.00
88.45 ±0.01
1.34
0.37
224.72
bi-SA
88.23 ±0.01
88.25 ±0.01
0.90
0.18
119.50
88.02 ±0.01
88.02 ±0.01
0.92
-0.06
123.26
TABLE II: Performance Comparison of the Models using feature Vectors with/without Temporal Derivatives ( X and X ,+ Δ ). Evaluation metrics include accuracy (Acc), F1-score (F1), number of trainable parameters (#Param), relative improvement in accuracy over the baseline (RI-Acc), and relative increase in the number of trainable parameters with respect to the baseline (RPI), with ± indicating standard deviation across 5-fold cross-validation. The bi-LSTM model serves as the baseline for all comparisons highlighted in gray and #Param is reported in millions (M).
Fig. 4: Model comparison in accuracy, F1-score, and standard deviation (whisker) across 5-fold cross-validation. Detail for the left-side y-axis range between 50%–90%. Models are sorted from left to right based on increasing number of trainable parameters (secondary y-axis) and trained with and without temporal derivatives (+ Δ ). (a) Baseline models (blue), (b) Single attention models (green), and (c) Cascade spatio-temporal attention models (red).
Fig. 5: Two representative architectures from the ablation study: (a) SA-bi-TA, (b) bi-TA-SA.
Fig. 6: Confusion Matrices of the SA-bi-TA model: (a) Group A, (b) Group B, (c) Group C of Acera del Darro , and (d) Palacio de Congresos .
Model
Acc(%)
F1(%)
#Param (M)
RI-Acc (%)
RPI(%)
LSTM
86.62 ±0.02
86.59 ±0.02
0.08
0.00
0.00
bi-LSTM
88.08 ±0.01
88.10 ±0.01
0.41
1.68
389.00
LSTM+ Δ
88.17 ±0.01
88.18 ±0.01
0.92
1.79
997.20
bi-LSTM+ Δ
88.38 ±0.01
88.41 ±0.01
0.69
2.03
722.05
TABLE III: LSTM vs. bi-LSTM comparison using feature vectors with/without temporal derivatives (+ Δ ). Metrics: Acc, F1, #Param, RI-Acc, and RPI. Baseline Model: LSTM (gray shading). #Param is reported in millions (M).
Model
Acc(%)
F1(%)
#Param (M)
RI-Acc (%)
RPI(%)
bi-SA
88.23 ±0.01
88.25 ±0.01
0.90
0.18
119.50
bi-TA
88.47 ±0.01
88.49 ±0.01
0.25
0.45
-38.85
bi-SA+ Δ
88.02 ±0.01
88.02 ±0.01
0.92
-0.06
123.26
bi-TA+ Δ
88.13 ±0.01
88.11 ±0.01
3.36
0.06
715.96
bi-LSTM
88.08 ±0.01
88.10 ±0.01
0.41
0.00
0.00
TABLE IV: SA or TA module After bi-LSTM on feature vectors with/without temporal derivatives (+ Δ ). Metrics: Acc, F1, #Param, RI-Acc, and RPI. Baseline Model: bi-LSTM (gray shading). #Param is reported in millions (M).
Model
Acc(%)
F1(%)
#Param (M)
RI-Acc (%)
RPI(%)
SA-bi
88.07 ±0.01
88.09 ±0.01
2.10
-0.01
408.64
TA-bi
87.97 ±0.01
88.06 ±0.01
0.32
-0.12
-23.21
SA-bi+ Δ
89.05 ±0.01
89.05 ±0.01
0.84
1.10
103.50
TA-bi+ Δ
88.41 ±0.00
88.45 ±0.01
1.34
0.37
224.72
bi-LSTM
88.08 ±0.01
88.10 ±0.01
0.41
0.00
0.00
bi-TA
88.47 ±0.01
88.49 ±0.01
0.25
0.45
-38.85
TABLE V: SA or TA module Before bi-LSTM on feature vectors with/without temporal derivatives (+ Δ ). Metrics: Acc, F1, #Param, RI-Acc, and RPI. Baseline Model: bi-LSTM (gray shading). #Param is reported in millions (M).
Model
Acc(%)
F1(%)
#Param (M)
RI-Acc (%)
RPI(%)
bi-SA-TA
88.23 ±0.01
88.25 ±0.01
0.46
0.18
12.68
bi-TA-SA
88.13 ±0.01
88.17 ±0.01
0.85
0.05
105.64
bi-SA-TA+ Δ
88.63 ±0.01
88.65 ±0.01
1.61
0.63
291.65
bi-TA-SA+ Δ
88.75 ±0.01
88.75 ±0.01
2.87
0.76
597.31
bi-LSTM
88.08 ±0.01
88.10 ±0.01
0.41
0.00
0.00
bi-TA
88.47 ±0.01
88.49 ±0.01
0.25
0.45
-38.85
TABLE VI: SA and TA After bi-LSTM on feature vectors with/without temporal derivatives (+ Δ ). Metrics: Acc, F1, #Param, RI-Acc, and RPI. Baseline Model: bi-LSTM (gray shading). #Param is reported in millions (M).
Model
Acc(%)
F1(%)
#Param (M)
RI-Acc (%)
RPI(%)
TA-SA-bi
88.38 ±0.01
88.41 ±0.01
0.79
0.34
91.47
SA-TA-bi
87.66 ±0.01
87.72 ±0.01
0.21
-0.47
49.23
TA-SA-bi+ Δ
88.37 ±0.01
88.41 ±0.01
1.84
0.33
346.60
SA-TA-bi+ Δ
88.42 ±0.01
88.44 ±0.01
1.03
0.39
149.75
bi-LSTM
88.08 ±0.01
88.10 ±0.01
0.41
0.00
0.00
bi-TA
88.47 ±0.01
88.49 ±0.01
0.25
0.45
-38.85
TABLE VII: SA and TA Before bi-LSTM on feature vectors with/without temporal derivatives (+ Δ ). Metrics: Acc, F1, #Param, RI-Acc, and RPI. Baseline Model: bi-LSTM (gray shading). #Param is reported in millions (M).
Model
Acc(%)
F1(%)
#Param (M)
RI-Acc (%)
RPI(%)
TA-bi-SA
87.24 ±0.01
87.28 ±0.01
0.72
-0.95
88.20
SA-bi-TA
88.62 ±0.01
88.65 ±0.01
0.68
0.62
65.48
TA-bi-SA+ Δ
88.20 ±0.01
88.22 ±0.01
2.70
0.14
555.32
SA-bi-TA+ Δ
89.05 ±0.01
89.03 ±0.01
1.13
1.10
174.15
bi-LSTM
88.08 ±0.01
88.10 ±0.01
0.41
0.00
0.00
bi-TA
88.47 ±0.01
88.49 ±0.01
0.25
0.45
-38.85
TABLE VIII: bi-LSTM between SA and TA on feature vectors with/without temporal derivatives (+ Δ ). Metrics: Acc, F1, #Param, RI-Acc, and RPI. Baseline Model: bi-LSTM (gray shading). #Param is reported in millions (M).
Fig. 7: Spatial and temporal attention weight heatmaps from several models with their model’s class probabilities output, predicted labels, and ground truth labels (True Labels) over the sequence: (a) bi-TA, (b) TA-bi+ Δ , (c) bi-SA, (d) SA-bi-TA, (e) SA-TA-bi+ Δ , (f) bi-TA with a human error labeling identification.
Fig. 8: 2-D UMAP projections of window-based feature representations (36 features) extracted from one hour of traffic data at (left) Palacio de Congresos and (right) Acera del Darro .
Mapping the distribution of traffic dynamics at high spatiotemporal resolution is a fundamental question in transportation research. Distributed acoustic sensing (DAS), an innovative seismic observation tool, emerges as a promising solution for real-time urban traffic monitoring at high spatial and temporal scales. Distributed acoustic sensing repurposes existing underground fiber-optic cables as dense, continuous sensor arrays, enabling passive and privacy-preserving monitoring of roadway traffic activity at meter-level spatial and second-level temporal resolution. This study examines whether integrating DAS and deep learning models can serve as a continuous and efficient urban traffic observatory for revealing urban traffic dynamics (i.e. traffic volume and congestion, event-driven changes) at high spatiotemporal resolution. Using a DAS deployment along a roadway network in the City of College Station, Texas, USA, this study develops a deep learning-empowered analytical framework that converts raw ground vibration waveforms into spatiotemporal representations, detects vehicle trajectory, and infers traffic states from aggregated traffic volume and speed. A hybrid training strategy combining synthetic and manually annotated DAS images is used to improve vehicle detection under noisy and congested conditions, with model outputs further aggregated to characterize system-level traffic dynamics.
Hao Tian, Heng Cai, Xiaowei Chen +1
Department of Geography, Texas A&M University, College Station, TX 77840, USA · Department of Geology and Geophysics, Texas A&M University, College Station, TX 77840, USA
Distributed Acoustic Sensing (DAS) enables large-scale monitoring through optical fibers, but its high dimensionality and complex spatio-temporal patterns make event classification demanding. Existing deep learning approaches-CNNs, recurrent models, and Transformer variants-either fail to capture long-range dependencies or require processing raw DAS matrices at prohibitive cost. We propose DAStatFormer, a hybrid multibranch Transformer that combines compact multidomain statistical features with Gated Transformer Networks. Instead of raw signals, we extract 24 ANOVA-selected attributes per channel from the temporal, waveform, and spectral domains, reducing data size by orders of magnitude while preserving discriminative information. Each domain is processed via dedicated step-wise and channel-wise attention branches, fused by an adaptive gating mechanism. Experiments on the open Φ-OTDR benchmark and a real-scenario DAS dataset show that DAS-tatFormer achieves up to 99.4% accuracy and near-perfect real-world performance, while using significantly fewer parameters and lower inference cost than models such as DASFormer and DeepViT. These results demonstrate its suitability for scalable, real-time DAS-based monitoring. We release our code at https://github.com/MichelD-git/DAStatFormer
Michel Dione, Jerry Lonlac, Hélène Louis +2
CERI SN - IMT Nord Europe · IMT Nord Europe, Institut Mines-Telecom, Univ. Lille, Centre for Digital Systems Lille, France · IMT Mines Ales, Institut Mines-Telecom, Ales, France
Deep spatiotemporal models integrating graph convolutions and attention mechanisms have demonstrated excellent performance in network-level traffic flow prediction, owing to their exceptional ability to capture complex spatiotemporal dependencies. Despite their predictive success, deployment of such models in safety-critical urban systems remains constrained by their inherent lack of transparency. Existing post-hoc diagnostic methods often struggle with spurious correlations and fail to unveil the intrinsic decision-making mechanisms governing traffic dynamics, resulting in suboptimal interpretability and limited operational trustworthiness. To address these challenges, this paper proposes the Structure-Guided Spatiotemporal Attention Graph Neural Network (SGSAN). Departing from traditional architectures that rely on unconstrained adaptive graphs, SGSAN explicitly learns a static Directed Dependency Graph (DDG) to identify the invariant macroscopic propagation paths of traffic states. We further introduce an InfoNCE-based soft-coupling mechanism that anchors the model's dynamic spatiotemporal attention to this structural prior, offering a mechanistic account of the model's decision-making process while ensuring robust forecasting by aligning attention-based reasoning with identified macroscopic dependencies and preventing over-reliance on ephemeral local noise. Furthermore, a decoupled two-stage optimization framework is developed to resolve the fundamental conflict between structural discovery and predictive error minimization. Extensive experiments on multiple real-world datasets demonstrate that SGSAN achieves state-of-the-art predictive accuracy while providing built-in interpretability that organically aligns with the physical logic of traffic networks.
Xuanmian He, Can Li, Wanjing Ma
Department of Civil and Environmental Engineering, University of California, Berkeley, United States · Key Laboratory of Road and Traffic Engineering of the Ministry of Education, Tongji University, Shanghai 201804, China