Contextual Importance and Utility in Python: New Functionality and Insights with the py-ciu Package
Kary Främling
TL;DR
The paper addresses explainability for tabular data by introducing py-ciu, a Python implementation of Contextual Importance and Utility (CIU) that explicitly separates Contextual Importance $CI_j$ and Contextual Utility $CU_j$ and computes contextual influence $\phi = CI \times (CU-\,CU_{ref})$. It emphasizes a model-agnostic, post-hoc approach with a sampling-based estimator for $y_{min}$ and $y_{max}$, enabling IO plots, Potential Influence plots, textual explanations, intermediate concepts, and contrastive explanations that offer capabilities beyond LIME/SHAP. Key contributions include a complete rewrite of CIU in Python to match R functionality, support for IC vocabularies, and a suite of CIU-specific visualizations and narrative explanations, demonstrated on Titanic/Johnny D and Ames/Boston datasets. The work advances practical XAI by delivering interpretable, contrastive, and globally oriented explanations, with a roadmap for extending CIU to natural language, time series, and interactive, co-constructive dialog with explainees through ICs.
Abstract
The availability of easy-to-use and reliable software implementations is important for allowing researchers in academia and industry to test, assess and take into use eXplainable AI (XAI) methods. This paper describes the \texttt{py-ciu} Python implementation of the Contextual Importance and Utility (CIU) model-agnostic, post-hoc explanation method and illustrates capabilities of CIU that go beyond the current state-of-the-art that could be useful for XAI practitioners in general.
