Exploring Failure Patterns in UAVs with Transformer-Based Anomaly Detection
Abstract
This work investigates the use of the Sentinel Transformer architecture for anomaly detection in UAVs. Through a statistical analysis on the ALFA dataset, we show that attention maps can reveal distinctive patterns between normal and failure conditions. Results on standard benchmarks confirm state-of-the-art anomaly detection performances.
Full text
Exploring Failure Patterns in UAVs with Transformer-Based Anomaly Detection Davide Villaboni Computer Science Department University of Verona Verona, Italy [email protected] Francesco Bazzani Computer Science Department University of Verona Verona, Italy Alberto Castellini Computer Science Department University of Verona Verona, Italy [email protected] Alessandro Farinelli Computer Science Department University of Verona Verona, Italy [email protected] Abstract—This work investigates the use of the Sentinel Transformer architecture for anomaly detection in UAVs. Through a statistical analysis on the ALFA dataset, we show that attention maps can reveal distinctive patterns between normal and failure conditions. Results on standard benchmarks confirm state-of-theart anomaly detection performances. Index Terms—Anomaly Detection, Transformer, Time Series Analysis, Attention Analysis I. INTRODUCTION Anomaly detection in time series is a cornerstone for ensuring safety and reliability in autonomous systems. In Unmanned Aerial Vehicles (UAVs), the ability to identify failures early is crucial for preventing catastrophic outcomes. Traditional methods, such as statistical models or autoencoders, often struggle to process long sequences and capture long-term dependencies. in high-dimensional sensor data. Transformer-based architectures [1], such as Sentinel [2], have recently demonstrated strong performance on multivariate time series anomaly detection tasks, thanks to their ability to capture long-range temporal and inter-channel dependencies. Sentinel introduces a multi-patch attention mechanism that structures temporal and inter-channel dependencies more effectively than standard attention. In this work, we extend the analysis of [2] by focusing on a statistical characterization of the ALFA dataset [3], showing how correlation and mutual information reveal distinctive fingerprints of failure conditions. II. METHODOLOGY A. Statistical Analysis on ALFA We consider the Air Lab Fault and Anomaly (ALFA) dataset, which records 47 fixed-wing UAV flights with multiple fault scenarios. For each condition, we compute Pearson correlation ρX,Y and mutual information I(X;Y)among the sensor features. The Pearson correlation between two variables Xand Yis defined as: ρX,Y =cov(X, Y ) σXσY (1) where cov(X, Y )represents the covariance between features Xand Y, and σX,σYrepresent their respective standard deviations. Mutual Information, which captures non-linear dependencies, is given by: I(X;Y) = X y∈YX x∈X p(x, y) log p(x, y) p(x)p(y)(2) B. Sentinel-based Anomaly Detection Sentinel is trained in a reconstruction-based anomaly detection framework. Given an input sequence X= {x1, x2, . . . , xL} ∈ RL×C, where Lrepresents the sequence length and Cthe number of channels. the model produces a reconstruction ˆ Xt=fθ(Xt). A reconstruction error etis calculated through the mean squared error (MSE) across all features: et=MSE(Xt,ˆ Xt)(3) Time points are flagged as anomalous when et> τ III. RESULTS A. Benchmarks We evaluated the performance of our sentinel on various standard benchmarks. In particular, we used SMD, MSL, SMAP, SWaT, PSM. Results, are summarized in Table I TABLE I: Comparison of F1-scores (%) for anomaly detection across different models and datasets. The best models is indicated in bold, the second underline Datasets Sentinel CARD TimesNet LightTS Autoformer FEDformer SMD 88.7 87.2 85.81 82.53 85.11 85.08 MSL 83.5 81.7 85.15 78.95 79.05 78.57 SMAP 81.92 85.7 71.52 69.21 71.12 70.76 SWaT 94.7 94.5 92.10 69.26 93.33 93.19 PSM 96.7 95.7 97.5 97.23 93.29 97.23 Avg 89.1 89.0 86.34 82.08 80.50 84.97 2025 I-RIM Conference October 17-19, Rome, Italy ISBN: 9788894580570 10.5281/zenodo.17629834 199
B. Statistical Fingerprints on ALFA In the following, we focus on normal operation and engine failure to illustrate how feature interaction patterns change in the presence of anomalies Under normal operating conditions Fig 1, the drone exhibited well-defined feature relationships: •Strong negative correlation between angular velocity around the z-axis and roll measurement (ang_vel_z and roll_measured: -0.944), representing healthy roll dynamics •Well-coordinated control system response, evidenced by strong positive correlation between roll measurements and commands (0.865) •Expected negative correlation between vertical velocity and climb rate (vel_z and vfr_climb: -0.845) •Structured mutual information patterns with moderate values, indicating predictable feature interactions The mutual information analysis during normal operation showed consistent relationships between orientation variables (quaternion components and yaw) and navigation variables (heading), with values typically around 3.0. This represents baseline feature coupling for comparison with failure modes. Fig. 1: Feature correlations (left) and mutual information (right) during normal operation (no failure). Feature interactions show well-defined structure and moderate complexity During Engine failure conditions Fig 2, it is possible to observe a change in the feature relationships: •Perfect correlation (1.0) between desired velocity components (vel_des_x and vel_des_z), indicating coordinated control adjustments attempting to compensate for engine loss •Strong negative correlation between vertical velocity and climb rate (-0.880), reflecting compromised vertical control •Enhanced coupling between velocity measurements and their commanded values (e.g., vel_y and vel_des_y: 0.868), suggesting active intervention by the control system Mutual information analysis revealed exceptionally high information sharing between velocity desired components, with values exceeding 4.0, the highest observed across all conditions. This indicates complex non-linear interdependencies during engine failure recovery attempts. Fig. 2: Feature correlations (left) and mutual information (right) during engine failure. Velocity desired components show perfect correlation and overall higher mutual information values, indicating complex control interactions. C. Distinguishing Failure Signatures •Normal operation shows the clearest structure with more focused interaction patterns and lower overall complexity •Engine failure displays the most intense mutual information patterns (brightest colors) with highest scale values, indicating the greatest feature interaction complexity. IV. CONCLUSION This extended abstract presents a statistical and interpretability-driven study of UAV anomaly detection. Statistical fingerprints based on correlation and mutual information reveal consistent and physically grounded failure signatures, which align with attention dynamics in the Sentinel Transformer. Benchmark evaluations confirm Sentinel’s robustness across diverse domains. REFERENCES [1] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ł. Kaiser, and I. Polosukhin, “Attention is all you need,” Advances in neural information processing systems, vol. 30, 2017. [2] D. Villaboni, A. Castellini, I. L. Danesi, and A. Farinelli, “Sentinel: Multipatch transformer with temporal and channel attention for time series forecasting,” arXiv preprint arXiv:2503.17658, 2025. [3] A. Keipour, M. Mousaei, and S. Scherer, “Alfa: A dataset for uav fault and anomaly detection,” The International Journal of Robotics Research, vol. 40, no. 2-3, pp. 515–520, 2021. 200