SafeRL-Lite: A Lightweight, Explainable, and Constrained Reinforcement Learning Library
Satyam Mishra, Phung Thao Vi, Shivam Mishra, Vishwanath Bijalwan, Vijay Bhaskar Semwal, Abdul Manan Khan

TL;DR
SafeRL-Lite is a lightweight Python library that enables the development of safe, explainable reinforcement learning agents with constraint enforcement and interpretability features, demonstrated on CartPole environments.
Contribution
It introduces a modular, extensible RL toolkit with native safety constraints and post-hoc explanation capabilities, filling gaps in existing RL libraries.
Findings
Effective safety constraint enforcement demonstrated on CartPole.
Provides real-time explanations using SHAP values and saliency maps.
Includes built-in metrics for constraint violations.
Abstract
We introduce SafeRL-Lite, an open-source Python library for building reinforcement learning (RL) agents that are both constrained and explainable. Existing RL toolkits often lack native mechanisms for enforcing hard safety constraints or producing human-interpretable rationales for decisions. SafeRL-Lite provides modular wrappers around standard Gym environments and deep Q-learning agents to enable: (i) safety-aware training via constraint enforcement, and (ii) real-time post-hoc explanation via SHAP values and saliency maps. The library is lightweight, extensible, and installable via pip, and includes built-in metrics for constraint violations. We demonstrate its effectiveness on constrained variants of CartPole and provide visualizations that reveal both policy logic and safety adherence. The full codebase is available at: https://github.com/satyamcser/saferl-lite.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
