EARL library brings counterfactual explanations to RL self-adaptive systems
What-if scenarios clarify opaque RL agent decisions in realistic systems like CitiBikes.
Reinforcement learning (RL) powers autonomous and self-* systems, but deep RL policies built on neural networks remain notoriously opaque, undermining user trust and complicating verification. To tackle this, researchers from the authors' team introduced EARL (Explanations using Alternative Realities for Reinforcement Learning), a Python library designed to generate counterfactual explanations for RL decisions. Instead of just showing what the agent did, EARL lets users explore What-if scenarios—comparing actual outcomes against alternative actions—to reveal why a particular decision was made. This approach is grounded in psychology research, which shows counterfactual explanations are intuitive and user-friendly, yet existing RL implementations have been limited to simple toy examples.
EARL aims to change that by supporting counterfactual explanation generation in realistic RL-based self-adaptive systems. The team demonstrated its applicability on a simulation of CitiBikes, a bike-sharing system, showing how EARL can clarify agent behavior in a practical setting. They also provided evaluations of its performance in real applications. Accepted at the 20th Colombian Computing Congress, the paper includes 13 pages with two figures and three tables, offering a concrete tool for developers and researchers seeking transparency in RL. With EARL, verification becomes more feasible, and users gain a clearer understanding of autonomous decisions, paving the way for more trustworthy AI in adaptive infrastructure and beyond.
- EARL (Explanations using Alternative Realities for Reinforcement Learning) is a new Python library for generating counterfactual explanations in RL settings.
- It enables What-if scenario exploration to compare possible outcomes, making deep RL policies more transparent and user-friendly.
- Demonstrated on a CitiBikes self-adaptive bike-sharing simulation, EARL moves beyond toy benchmarks to realistic RL-based systems.
Why It Matters
EARL makes opaque deep RL systems explainable via counterfactuals, boosting trust and verification in real-world adaptive AI.