Enhanced Isolation Forest-Based Algorithm for Unsupervised Anomaly Detection in Lidar SLAM Localization
Abstract
:1. Introduction
- The main contributions are as follows:
- 1.
- The correlation analysis of the estimated position and orientation information is carried out to determine the analysis object accurately. The formula for calculating the single variable error is derived and the test data is calculated.
- 2.
- Develop an unsupervised scoring mechanism based on the isolation forest algorithm to evaluate the pose in real time under unknown road environments without labels.
- 3.
- Introduce a weighted path scoring mechanism, magnifying the distinction be-tween anomalous and normal data scores, thereby improving the accuracy and stability of anomaly detection.
- 4.
- Employ an adaptive OTSU algorithm for the automatic classification of scores, enabling targeted and precise anomaly identification for various variables in different environments.
- The remainder of this paper is organized as follows:
- 1.
- Section 2 analyzes the pose variables of different Lidar SLAM systems, particularly focusing on the transformation methods between rotation variables. The univariate pose error values are calculated to obtain the strength of correlation between variables.
- 2.
- Section 3 introduces our localization anomaly detection method, detailing the algorithm process, scoring method, and classification technique.
- 3.
- Section 4 presents our experimental process, data environment, evaluation parameters, calculation results, and comparison data.
- 4.
- Section 5 summarizes the research findings and discusses potential future re-search directions.
2. Variable Analysis
2.1. Pose and Pose Errors
2.1.1. Pose
2.1.2. Errors
2.2. Variable Correlation Analysis
- Urban environment, complex roads: 00, 02, 08 (02 maximum data volume);
- Urban environment, short trajectory: 03, 05, 10 (05 maximum data volume);
- Urban environment, straight round-trip track: 06 (Straight-line loopback data in special scenarios);
- Urban environment, circular trajectory: 07, 09 (07 route is more structured, most researchers use this as their standard);
- Expressway: 01 (High speed scene radar failure is serious);
- Urban environment, straight track: 04 (The data is small and contained in other city scenarios).
3. Localization Anomaly Detection Algorithm
3.1. Isolation Forest Anomaly Scoring Algorithm
3.1.1. Classic Isolation Forest
- 1.
- Isolation tree construction.
- 2.
- Path length calculation.
- 3.
- Calculate the average path length.
- 4.
- Normalization of path length.
- 5.
- Anomaly score calculation.
3.1.2. Advanced Scoring Formula
3.2. Adaptive Score Thresholding Using the Otsu Method
- 1.
- Calculate the probability distribution of the scoring data.
- 2.
- Initialize the between-class variance parameters.
- 3.
- Iterate over each possible threshold and calculate the within-class variance and between-class variance.
- 4.
- Select the threshold corresponding to the maximum between-class variance.
- 5.
- Output the final threshold.
4. Experiments and Results Analysis
4.1. Evaluation Metrics
4.2. Hardware Configuration and Software Environment
- Hardware Configuration:
- Software Environment:
4.3. Results and Analysis of the ALOAM Framework
4.3.1. Result Visualization
- Max time: 0.03999 s;
- Min time: 0.009402 s;
- Mean time: 0.020577 s.
4.3.2. Result Evaluation and Algorithm Comparison
4.4. Results and Analysis of the LIO-SAM Framework
- Max time: 0.027024 s;
- Min time: 0.0094382 s;
- Mean time: 0.017034467 s.
5. Discussion and Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Abbreviations
ALOAM | Advanced Lidar odometry and mapping |
APE | Absolute pose error |
ATE | Absolute trajectory error |
DBSCAN | Density-based spatial clustering of applications with noise |
EVO | Evaluation of odometry |
Gtsam | Georgia Tech Smoothing and Mapping |
IF | Isolation forest |
iForest | Isolation forest |
iTree | Isolation tree |
KITTI | Karlsruhe Institute of Technology and Toyota Technological Institute |
LIO-SAM | LiDAR inertial odometry via smoothing and mapping |
LOF | Local outlier factor |
OTSU | Otsu’s method (thresholding) |
OpenCV | Open-Source Computer Vision Library |
PCA | Principal component analysis |
PCL | Point Cloud Library |
PTE | Pose tracking error |
REMS | Recursive environmental monitoring system |
ROS1 | Robot Operating System 1 |
RPE | Relative pose error |
RTX | Ray Tracing Texel |
SLAM | Simultaneous localization and mapping |
SOTA | State Of the art |
Std | Standard deviation |
SVM | Support vector machine |
TUM | Technical University of Munich |
References
- Singandhupe, A.; La, H.M. A Review of SLAM Techniques and Security in Autonomous Driving. In Proceedings of the 2019 Third IEEE International Conference on Robotic Computing (IRC), Naples, Italy, 25–27 February 2019; pp. 602–607. [Google Scholar]
- Zheng, S.; Wang, J.; Rizos, C.; Ding, W.; El-Mowafy, A. Simultaneous Localization and Mapping (SLAM) for Autonomous Driving: Concept and Analysis. Remote Sens. 2023, 15, 1156. [Google Scholar] [CrossRef]
- Cadena, C.; Carlone, L.; Carrillo, H.; Latif, Y.; Scaramuzza, D.; Neira, J.; Reid, I.; Leonard, J.J. Past, Present, and Future of Simultaneous Localization and Mapping: Toward the Robust-Perception Age. IEEE Trans. Robot. 2016, 32, 1309–1332. [Google Scholar] [CrossRef]
- Yong, L.; Jiexin, A.; Na, H.; Yanbo, L.; Zhenyu, H.; Zishan, C.; Yaping, Q. A Review of Simultaneous Localization and Mapping Algorithms Based on Lidar. World Electr. Veh. J. 2025, 16, 56. [Google Scholar] [CrossRef]
- Zhang, J.; Singh, S. LOAM: Lidar Odometry and Mapping in Real-Time. In Proceedings of the Robotics: Science and Systems Foundation, Berkeley, CA, USA, 12–16 July 2014. [Google Scholar]
- Shan, T.; Englot, B.; Meyers, D.; Wang, W.; Ratti, C.; Rus, D. LIO-SAM: Tightly-Coupled Lidar Inertial Odometry via Smoothing and Mapping. In Proceedings of the 2020 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), Las Vegas, NV, USA, 25–29 October 2020; pp. 5135–5142. [Google Scholar]
- Huang, L. Review on Lidar SLAM Techniques. In Proceedings of the 2021 International Conference on Signal Processing and Machine Learning (CONF-SPML), Beijing, China, 14 November 2021; pp. 163–168. [Google Scholar]
- Evo: Python Package for the Evaluation of Odometry and SLAM. Available online: https://github.com/MichaelGrupp/evo (accessed on 19 July 2023).
- Gelfand, N.; Ikemoto, L.; Rusinkiewicz, S.; Levoy, M. Geometrically Stable Sampling for the ICP Algorithm. In Proceedings of the Fourth International Conference on 3-D Digital Imaging and Modeling, Banff, AB, Canada, 6–10 October 2003; pp. 260–267. [Google Scholar]
- Kwok, T.H.; Tang, K. Improvements to the Iterative Closest Point Algorithm for Shape Registration in Manufacturing. J. Manuf. Sci. Eng. 2015, 138, 011014. [Google Scholar] [CrossRef]
- Zhen, W.; Scherer, S. Estimating the Localizability in Tunnel-like Environments Using Lidar and UWB. In Proceedings of the 2019 International Conference on Robotics and Automation (ICRA), Montreal, QC, Canada, 20–24 May 2019; pp. 4903–4908. [Google Scholar]
- Rong, Z.; Michael, N. Detection and Prediction of Near-Term State Estimation Degradation via Online Nonlinear Observability Analysis. In Proceedings of the 2016 IEEE International Symposium on Safety, Security, and Rescue Robotics (SSRR), Kobe, Japan, 7–11 October 2016; pp. 28–33. [Google Scholar]
- Cho, H.; Yeon, S.; Choi, H.; Doh, N. Detection and Compensation of Degeneracy Cases for IMU-Kinect Integrated Continuous SLAM with Plane Features. Sensors 2018, 18, 935. [Google Scholar] [CrossRef] [PubMed]
- Tagliabue, A.; Tordesillas, J.; Cai, X.; Santamaria-Navarro, A.; How, J.P.; Carlone, L. LION: Lidar-Inertial Observability-Aware Navigator for Vision-Denied Environments. In Proceedings of the Experimental Robotics The 17th International Symposium (ISER 2020), La Valletta, Malta, 15–18 November 2021. [Google Scholar]
- Liu, Y.; Wang, J.; Huang, Y. A Localizability Estimation Method for Mobile Robots Based on 3D Point Cloud Feature. In Proceedings of the 2021 IEEE International Conference on Real-Time Computing and Robotics (RCAR), Xining, China, 15–19 July 2021; pp. 1035–1041. [Google Scholar]
- Dong, L.; Chen, W.; Wang, J. Efficient Feature Extraction and Localizability Based Matching for Lidar SLAM. In Proceedings of the 2021 IEEE International Conference on Robotics and Biomimetics (ROBIO), Sanya, China, 27–31 December 2021; pp. 820–825. [Google Scholar]
- Nashed, S.B.; Jin Park, J.; Webster, R.; Durham, J.W. Robust Rank Deficient SLAM. In Proceedings of the 2021 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), Prague, Czech Republic, 27 September 2021–1 October 2021; pp. 6603–6608. [Google Scholar]
- Rodríguez-Arévalo, M.L.; Neira, J.; Castellanos, J.A. On the Importance of Uncertainty Representation in Active SLAM. IEEE Trans. Robot. 2018, 34, 829–834. [Google Scholar]
- Zhang, J.; Kaess, M.; Singh, S. On Degeneracy of Optimization-Based State Estimation Problems. In Proceedings of the 2016 IEEE International Conference on Robotics and Automation (ICRA), Stockholm, Sweden, 16–21 May 2016; pp. 809–816. [Google Scholar]
- Jiao, J.; Ye, H.; Zhu, Y.; Liu, M. Robust Odometry and Mapping for Multi-Lidar Systems with Online Extrinsic Calibration. IEEE Trans. Robot. 2022, 38, 351–371. [Google Scholar] [CrossRef]
- Westman, E.; Kaess, M. Degeneracy-Aware Imaging Sonar Simultaneous Localization and Mapping. IEEE J. Ocean. Eng. 2020, 45, 1280–1294. [Google Scholar] [CrossRef]
- Ren, R.; Fu, H.; Xue, H.; Sun, Z.; Ding, K.; Wang, P. Towards a Fully Automated 3D Reconstruction System Based on Lidar and GNSS in Challenging Scenarios. Remote Sens. 2021, 13, 1981. [Google Scholar] [CrossRef]
- Zhou, H.; Yao, Z.; Lu, M. Lidar/UWB Fusion Based SLAM With Anti-Degeneration Capability. IEEE Trans. Veh. Technol. 2021, 70, 820–830. [Google Scholar]
- Nobili, S.; Tinchev, G.; Fallon, M. Predicting Alignment Risk to Prevent Localization Failure. In Proceedings of the 2018 IEEE International Conference on Robotics and Automation (ICRA), Brisbane, Australia, 21–25 May 2018; pp. 1003–1010. [Google Scholar]
- Chen, X.; Läbe, T.; Milioto, A. OverlapNet: A siamese network for computing LiDAR scan similarity with applications to loop closing and localization. Auton. Robot. 2022, 46, 61–81. [Google Scholar]
- Gao, Y.; Wang, S.Q.; Li, J.H.; Hu, M.Q.; Xia, H.Y.; Hu, H.; Wang, L.J. A Prediction Method of Localizability Based on Deep Learning. IEEE Access 2020, 8, 110103–110115. [Google Scholar] [CrossRef]
- Dani, M.C.; Jollois, F.X.; Nadif, M.; Freixo, C. Adaptive Threshold for Anomaly Detection Using Time Series Segmentation. In Proceedings of the Neural Information Processing: 22nd International Conference (ICONIP 2015), Istanbul, Turkey, 9–12 November 2015. [Google Scholar]
- Huang, T.; Zhu, Y.; Zhang, Q.; Zhu, Y.; Wang, D.; Qiu, M.; Liu, L. An LOF-Based Adaptive Anomaly Detection Scheme for Cloud Computing. In Proceedings of the 2013 IEEE 37th Annual Computer Software and Applications Conference Workshops, Kyoto, Japan, 22–26 July 2013; pp. 206–211. [Google Scholar]
- XIaoyu, L.; Xiao, G.; Zhaosheng, Z.; Qiping, C.; Zhenpo, W. Fault Diagnosis and Detection for Battery System in Real-World Electric Vehicles Based on Long-Term Feature Outlier Analysis. IEEE Trans. Transp. Electrif. 2024, 10, 1668–1679. [Google Scholar]
- Ehsan, N.; Arash, A. Toward Detecting Cyberattacks Targeting Modern Power Grids: A Deep Learning Framework. In Proceedings of the 2022 IEEE World AI IoT Congress (AIIoT), Seattle, WA, USA, 6–9 June 2022; pp. 357–363. [Google Scholar]
- Ehsan, N.; Arash, A. Detection of False Data Injection Cyberattacks: Experimental Validation on a Lab-scale Microgrid. In Proceedings of the 2022 IEEE Green Energy and Smart System Systems (IGESSC), Seattle, WA, USA, 13 July 2022; pp. 1–6. [Google Scholar]
- Liu, F.T.; Ting, K.M.; Zhou, Z.H. Isolation Forest. In Proceedings of the Eighth IEEE International Conference on Data Mining, Pisa, Italy, 15 December 2008; pp. 413–422. [Google Scholar]
- Novakov, S.; Lung, C.-H.; Lambadaris, I.; Seddigh, N. Studies in Applying PCA and Wavelet Algorithms for Network Traffic Anomaly Detection. In Proceedings of the 2013 IEEE 14th International Conference on High Performance Switching and Routing (HPSR), Vienna, Austria, 3–6 July 2013; pp. 185–190. [Google Scholar]
- Chen, Y.; Chen, L.; Huang, C.; Lu, Y.; Wang, C. A dynamic tire model based on HPSO-SVM. Int. J. Agric. Biol. Eng. 2019, 12, 36–41. [Google Scholar]
- Chandola, V.; Banerjee, A.; Kumar, V. Anomaly detection: A survey. ACM Comput. Surv. (CSUR) 2009, 15, 1–58. [Google Scholar] [CrossRef]
- David, S.; Thore, G.; Nikolaus, D.; Vladyslav, U.; Jorg, S.; Daniel, C. The TUM VI Benchmark for Evaluating Visual-Inertial Odometry. In Proceedings of the 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), Madrid, Spain, 1–5 October 2018; pp. 1680–1687. [Google Scholar]
- Geiger, A.; Lenz, P.; Stiller, C.; Urtasun, R. Vision meets robotics: The kitti dataset. Int. J. Robot. Res. 2013, 32, 1231–1237. [Google Scholar] [CrossRef]
- Pearson Correlation Coefficient (r). Available online: https://www.scribbr.com/statistics/pearson-correlation-coefficient/ (accessed on 9 January 2025).
- Chen, Y.; Chen, D.; Li, Y.; Chen, L. Otsu’s thresholding method based on gray level-gradient two-dimensional histogram. In Proceedings of the 2010 2nd International Asia Conference on Informatics in Control, Automation and Robotics (CAR 2010), Changchun, China, 6–7 March 2010; pp. 282–285. [Google Scholar]
- Ma, Z.; Yang, S.; Li, J.; Qi, J. Research on SLAM Localization Algorithm for Orchard Dynamic Vision Based on YOLOD-SLAM2. Agriculture 2024, 14, 1622. [Google Scholar] [CrossRef]
- Sun, X.; Jin, L.; He, Y.; Wang, H.; Huo, Z.; Shi, Y. SimoSet: A 3D Object Detection Dataset Collected from Vehicle Hybrid Solid-State LiDAR. Electronics 2023, 12, 24. [Google Scholar] [CrossRef]
KITTI | 00 | 01 | 02 | 03 | 04 | 05 |
Scene | Urban environment, complex roads | Expressway | Urban environment, complex roads | Urban environment, short trajectory | Urban environment, straight track | Urban environment, short trajectory |
Time | 227 s | 55 s | 233 s | 40 s | 14 s | 138 s |
Frame | 4540 | 1100 | 4660 | 800 | 270 | 2760 |
KITTI | 06 | 07 | 08 | 09 | 10 | |
Scene | Urban environment, straight roundtrip track | Urban environment, circular trajectory | Urban environment, complex roads | Urban environment, circular trajectory | Urban environment, short trajectory | |
Time | 55 s | 55 s | 204 s | 80 s | 60 s | |
Frame | 1100 | 1100 | 4070 | 1590 | 1200 |
02 | 05 | 06 | 07 | |||||
---|---|---|---|---|---|---|---|---|
T | R | T | R | T | R | T | R | |
APE | ||||||||
Ours | 0.84160 | 0.00264 | 0.04706 | 0.00251 | 0.09444 | 0.00418 | 0.06635 | 0.00121 |
1.04135 | 0.00390 | 0.19698 | 0.00278 | 0.10670 | 0.00512 | 0.17922 | 0.00223 | |
0.74249 | 0.00149 | 0.08948 | 0.00069 | 0.00105 | 0.00002 | 0.09068 | 0.00317 | |
1.36288 | 0.00674 | 0.30866 | 0.00501 | 0.21752 | 0.00969 | 0.63412 | 0.00709 | |
IF-OTSU | 1.23262 | 0.00339 | 0.08882 | 0.00533 | 0.12912 | 0.00447 | 0.06873 | 0.00184 |
IF | 1.00887 | 0.00400 | 0.22374 | 0.00563 | 0.21294 | 0.00661 | 0.10711 | 0.00347 |
K-means | 1.20817 | 0.00336 | 0.19094 | 0.00274 | 0.11253 | 0.00557 | 0.11253 | 0.00157 |
SVM | 1.10947 | 0.00317 | 0.15360 | 0.00390 | 0.21699 | 0.00417 | 0.17130 | 0.00182 |
RPE | ||||||||
Ours | 0.00665 | 0.00037 | 0.00461 | 0.00022 | 0.00136 | 0.00009 | 0.00493 | 0.00029 |
0.00976 | 0.00038 | 0.00456 | 0.00024 | 0.00559 | 0.00041 | 0.00462 | 0.00030 | |
−0.02447 | 0.00002 | 0.00151 | 0.00003 | −0.00224 | 0.00003 | 0.00139 | 0.00005 | |
0.04399 | 0.00056 | 0.00885 | 0.00045 | 0.01342 | 0.00079 | 0.00787 | 0.00057 | |
IF-OTSU | 0.01112 | 0.00042 | 0.00453 | 0.00033 | 0.00681 | 0.00047 | 0.00529 | 0.00041 |
IF | 0.02806 | 0.00093 | 0.01189 | 0.00071 | 0.01245 | 0.00151 | 0.01144 | 0.00093 |
K-means | 0.00897 | 0.00039 | 0.00437 | 0.00022 | 0.00528 | 0.00044 | 0.00646 | 0.00049 |
SVM | 0.02071 | 0.00047 | 0.00725 | 0.00033 | 0.00727 | 0.00081 | 0.00518 | 0.00039 |
02 | 05 | 06 | 07 | |||||
---|---|---|---|---|---|---|---|---|
T | R | T | R | T | R | T | R | |
APE | ||||||||
Ours | 0.90283 | 0.00463 | 1.27805 | 0.01196 | 41.05863 | 0.02232 | 0.13573 | 0.00697 |
1.25060 | 0.00889 | 1.75415 | 0.01145 | 46.84931 | 0.18280 | 0.32040 | 0.00666 | |
0.36866 | 0.00236 | 0.79776 | 0.00634 | 28.81473 | 0.00669 | 0.11701 | 0.00452 | |
2.18203 | 0.01583 | 2.71408 | 0.01661 | 64.88514 | 0.70234 | 0.53544 | 0.00886 | |
IF-OTSU | 1.48564 | 0.00662 | 2.09861 | 0.01013 | 51.56967 | 0.03560 | 0.28095 | 0.00815 |
IF | 2.72471 | 0.02068 | 2.14663 | 0.01804 | 51.59019 | 0.11143 | 0.51852 | 0.00701 |
K-means | 1.02534 | 0.00906 | 1.94124 | 0.01129 | 52.42176 | 0.03337 | 0.29393 | 0.00710 |
SVM | 1.39776 | 0.01231 | 1.90602 | 0.01491 | 60.10872 | 0.25558 | 0.50305 | 0.00801 |
RPE | ||||||||
Ours | 0.00561 | 0.00046 | 0.00462 | 0.00050 | 0.08778 | 0.00096 | 0.00585 | 0.00034 |
0.02457 | 0.00059 | 0.01355 | 0.00075 | 0.24578 | 0.04372 | 0.00873 | 0.00080 | |
0.03057 | 0.00054 | 0.00462 | 0.00006 | 0.07211 | 0.24057 | 0.00260 | 0.00007 | |
0.07050 | 0.00145 | 0.02248 | 0.00143 | 0.56331 | 0.32798 | 0.01488 | 0.00163 | |
IF-OTSU | 0.01302 | 0.00117 | 0.01871 | 0.00065 | 0.11010 | 0.00089 | 0.01059 | 0.00060 |
IF | 0.06711 | 0.00174 | 0.03282 | 0.00253 | 1.05258 | 0.02311 | 0.02282 | 0.00289 |
K-means | 0.04605 | 0.00118 | 0.00939 | 0.00108 | 0.02238 | 0.00847 | 0.00123 | 0.00049 |
SVM | 0.02307 | 0.00062 | 0.01391 | 0.00080 | 0.11427 | 0.00434 | 0.00893 | 0.00090 |
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. Published by MDPI on behalf of the World Electric Vehicle Association. 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
Geng, G.; Wang, P.; Sun, L.; Wen, H. Enhanced Isolation Forest-Based Algorithm for Unsupervised Anomaly Detection in Lidar SLAM Localization. World Electr. Veh. J. 2025, 16, 209. https://doi.org/10.3390/wevj16040209
Geng G, Wang P, Sun L, Wen H. Enhanced Isolation Forest-Based Algorithm for Unsupervised Anomaly Detection in Lidar SLAM Localization. World Electric Vehicle Journal. 2025; 16(4):209. https://doi.org/10.3390/wevj16040209
Chicago/Turabian StyleGeng, Guoqing, Peining Wang, Liqin Sun, and Han Wen. 2025. "Enhanced Isolation Forest-Based Algorithm for Unsupervised Anomaly Detection in Lidar SLAM Localization" World Electric Vehicle Journal 16, no. 4: 209. https://doi.org/10.3390/wevj16040209
APA StyleGeng, G., Wang, P., Sun, L., & Wen, H. (2025). Enhanced Isolation Forest-Based Algorithm for Unsupervised Anomaly Detection in Lidar SLAM Localization. World Electric Vehicle Journal, 16(4), 209. https://doi.org/10.3390/wevj16040209