PyXAI is a Python library (version 3.6 or later) allowing to bring explanations of various forms from classifiers resulting of machine learning techniques (Decision Tree, Random Forest, Boosted Tree).

More precisely, several types of explanations for the classification task of a given instance X can be computed:

  • Abductive explanations for X are intended to explain why X has been classified in the way it has been classified by the ML model (thus, addressing the “Why?” question).
  • Contrastive explanations for X is to explain why X has not been classified by the ML model as the user expected it (thus, addressing the “Why not?” question).

In addition to finding explanations, PyXAI also contains methods that perform operations (production, saving, loading) on models and instances.



MIT    Any category    Perennial software    Recent software   


  • 2022 Gilles Audemard, Steve Bellart, Louenas Bounia, Frederic Koriche, Jean-Marie Lagniez, Pierre Marquis, On Preferred Abductive Explanations for Decision Trees and Random Forests in Thirty-First International Joint Conference on Artificial Intelligence {IJCAI-22}, International Joint Conferences on Artificial Intelligence Organization, pp. 643-650, 2022.
    2020 Gilles Audemard, Frédéric Koriche, Pierre Marquis, On Tractable XAI Queries based on Compiled Representations in 17th International Conference on Principles of Knowledge Representation and Reasoning (KR'20), 2020.