xai-cola: A Python library for sparsifying counterfactual explanations
Lin Zhu, Lei You

TL;DR
xai-cola is a Python library that enhances counterfactual explanations by reducing redundant feature changes, making explanations more concise while maintaining their validity, and it is validated through empirical experiments.
Contribution
It introduces an open-source pipeline for sparsifying counterfactual explanations, compatible with various generators and models, with multiple sparsification policies and visualization tools.
Findings
Produces sparser counterfactuals, reducing feature modifications by up to 50%.
Works with multiple CE generators and models.
Provides visualization routines for analysis and comparison.
Abstract
Counterfactual explanation (CE) is an important domain within post-hoc explainability. However, the explanations generated by most CE generators are often highly redundant. This work introduces an open-source Python library xai-cola, which provides an end-to-end pipeline for sparsifying CEs produced by arbitrary generators, reducing superfluous feature changes while preserving their validity. It offers a documented API that takes as input raw tabular data in pandas DataFrame form, a preprocessing object (for standardization and encoding), and a trained scikit-learn or PyTorch model. On this basis, users can either employ the built-in or externally imported CE generators. The library also implements several sparsification policies and includes visualization routines for analysing and comparing sparsified counterfactuals. xai-cola is released under the MIT license and can be installed…
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.
Taxonomy
TopicsExplainable Artificial Intelligence (XAI) · Psychology of Moral and Emotional Judgment · Misinformation and Its Impacts
