Data injection detection in ROS 2 robotic systems using entropy metrics and an autoencoder+LSTM pipeline
Keywords:
Anomaly Detection, ROS 2, Entropy Metrics, Autoencoder+LSTM, Time SeriesAbstract
Distributed robotic systems based on ROS 2 require lightweight, real-time mechanisms for the early detection of anomalous behavior (Blázquez-García et al., 2021). Data injection or irregularities in topic publication compromise security, robustness, and operational continuity. Although ROS 2 incorporates security measures (e.g., DDS Security), its overhead can be non-trivial; therefore, complementary monitoring strategies that operate on internal telemetry, without network instrumentation or heavy cryptography, are valued (Zhang et al., 2022; Fernández et al., 2018). This work presents a hybrid approach that combines entropy metrics calculated in sliding windows with an Autoencoder (AE) + LSTM pipeline trained exclusively on nominal robot data. Three complementary entropic measures are employed: Shannon (Shannon, 1948), transitions (based on successive differences; Nardone, 2014), and KDE (a nonparametric approximation of density; Myers et al., 2025). All are calculated over windows of W = 100 samples to capture recent behavior. Stationarity is also verified using ADF on nominal segments, enabling statistical calibration of thresholds (Dickey and Fuller, 1979; Wang et al., 2023). The use of AE and LSTM is supported by robust representation and sequential modeling (Vincent et al., 2008; Hochreiter and Schmidhuber, 1997; Malhotra et al., 2016; Hundman et al., 2018). The system relies on internal telemetry (e.g., /cmd_vel, /odom, /laser_scan, /imu/data; and /movement_label, /attack_type tags) and produces a binary decision with K-persistence and alerts (/ads/alert). In offline evaluation, with explicit selection of the operating point under FPR constraint, high detection rates and low latency are achieved, indicating feasibility for online deployment over ROS 2 (Abokhdair and Baig, 2025).Downloads
References
Abokhdair, M., & Baig, Z. (2025). A deep learning–based intrusion detection system for ROS 2. In Proceedings of the International Joint Conference on Neural Networks (IJCNN). IEEE. (En prensa)
Ahmed, S., Khan, S., & Mian, A. (2023). Entropy-SLAM: Improving robustness and resilience of SLAM systems using entropy-based anomaly detection. In Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS). IEEE.
Blázquez-García, A., Conde, A., Mori, U., & Lozano, J. A. (2021). A review on outlier/anomaly detection in time series data. ACM Computing Surveys, 54(3), 1–33.
Dickey, D. A., & Fuller, W. A. (1979). Distribution of the estimators for autoregressive time series with a unit root. Journal of the American Statistical Association, 74(366), 427–431.
Fernández, G., Rossi, F. A. E., & García, F. J. (2018). Security and performance considerations in ROS 2: A balancing act. arXiv preprint arXiv:1809.09566.
Hochreiter, S., & Schmidhuber, J. (1997). Long short-term memory. Neural Computation, 9(8), 1735–1780.
Hundman, K., Constantinou, V., Laporte, C., Colwell, I., & Soderstrom, T. (2018). Detecting spacecraft anomalies using LSTMs and nonparametric dynamic thresholding. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge
Discovery & Data Mining (pp. 387–395). ACM.
Malhotra, P., Ramakrishnan, A., Anand, G., Vig, L., Agarwal, P., & Shroff, G. (2016). LSTM-based encoder–decoder for multi-sensor anomaly detection. arXiv preprint arXiv:1607.00148.
Myers, A., Kay, B., Alvarez, I., Hughes, M., Mackenzie, C., Ortiz Marrero, C., Ellwein, E., & Lentz, E. (2025). Entropic analysis of time series through kernel density estimation. arXiv preprint arXiv:2503.18916.
Nardone, P. (2014). Entropy of difference. arXiv preprint arXiv:1411.0506. Shannon, C. E. (1948). A mathematical theory of communication. Bell System Technical Journal, 27, 379–423, 623–656.
Tatbul, N., Lee, T. J., Zdonik, S., Alam, M., & Gottschlich, J. (2018). Precision and recall for time series. In Advances in Neural Information Processing Systems (NeurIPS).
Vincent, P., Larochelle, H., Bengio, Y., & Manzagol, P.-A. (2008). Extracting and composing robust features with denoising autoencoders. In Proceedings of the 25th International Conference on Machine Learning (pp. 1096–1103). ACM.
Wang, Y., Zhang, M., & Li, R. (2023). Entropy-based anomaly detection in time series using ADF stationarity validation. IEEE Transactions on Industrial Informatics, 19(4), 4450–4461.
Zhang, T., Shangguan, L., Su, Q., & Zhou, Y. (2022). On the (in)security of secure ROS2. In Proceedings of the 2022 ACM SIGSAC Conference on Computer and Communications Security (CCS) (pp. 1929–1944). ACM.
Downloads
Published
Issue
Section
License
Copyright (c) 2025 Jorge N. Gutiérrez, Bruno Lopes Dalmazo, Paulo Lilles Jorge Drews Junior (Autor/a)

This work is licensed under a Creative Commons Attribution 4.0 International License.
Los autores conservan sus derechos de autor y ceden a la revista el derecho de primera publicación de su obra, el cuál estará simultáneamente sujeto a la licencia Creative Commons Reconocimiento 4.0 Internacional License. que permite compartir la obra siempre que se indique la publicación inicial en esta revista.


