Realistic Counterfactual Explanations for Machine Learning-Controlled Mobile Robots using 2D LiDAR
Sindre Benjamin Remman, Anastasios M. Lekkas
TL;DR
This work addresses the interpretability gap in ML-controlled mobile robotics by generating realistic counterfactual explanations for 2D LiDAR inputs. It introduces a model-agnostic framework that parameterizes LiDAR space with geometric shapes and uses a genetic algorithm to place virtual obstacles, producing CFEs that induce predefined model outputs via raycasting-based LiDAR simulations. The approach includes two data-combination strategies, a specialized fitness function with hinge and proximity losses, and a comprehensive TurtleBot3 case study using DRL (SAC) trained with domain randomization. Compared to DiCE, the method yields more plausible, human-understandable explanations, validated through both simulated and real-world experiments, including cases with no obstacles, added obstacles to trigger crashes, and explanations of left-turn bias. The results demonstrate improved interpretability and practical utility for debugging and refining ML-based autonomous control, with future work extending to 3D LiDAR and broader robotic applications.
Abstract
This paper presents a novel method for generating realistic counterfactual explanations (CFEs) in machine learning (ML)-based control for mobile robots using 2D LiDAR. ML models, especially artificial neural networks (ANNs), can provide advanced decision-making and control capabilities by learning from data. However, they often function as black boxes, making it challenging to interpret them. This is especially a problem in safety-critical control applications. To generate realistic CFEs, we parameterize the LiDAR space with simple shapes such as circles and rectangles, whose parameters are chosen by a genetic algorithm, and the configurations are transformed into LiDAR data by raycasting. Our model-agnostic approach generates CFEs in the form of synthetic LiDAR data that resembles a base LiDAR state but is modified to produce a pre-defined ML model control output based on a query from the user. We demonstrate our method on a mobile robot, the TurtleBot3, controlled using deep reinforcement learning (DRL) in real-world and simulated scenarios. Our method generates logical and realistic CFEs, which helps to interpret the DRL agent's decision making. This paper contributes towards advancing explainable AI in mobile robotics, and our method could be a tool for understanding, debugging, and improving ML-based autonomous control.
