[Paper Review] Model Agnostic Contrastive Explanations for Structured Data
This paper proposes MACEM, a model-agnostic method for generating contrastive explanations—pertinent positives and negatives—for structured data using only query access to any black-box classification model. It introduces a principled framework for handling real and categorical features, significantly improving explanation quality over LIME in both quantitative and qualitative evaluations across five public datasets.
Recently, a method [7] was proposed to generate contrastive explanations for differentiable models such as deep neural networks, where one has complete access to the model. In this work, we propose a method, Model Agnostic Contrastive Explanations Method (MACEM), to generate contrastive explanations for \emph{any} classification model where one is able to \emph{only} query the class probabilities for a desired input. This allows us to generate contrastive explanations for not only neural networks, but models such as random forests, boosted trees and even arbitrary ensembles that are still amongst the state-of-the-art when learning on structured data [13]. Moreover, to obtain meaningful explanations we propose a principled approach to handle real and categorical features leading to novel formulations for computing pertinent positives and negatives that form the essence of a contrastive explanation. A detailed treatment of the different data types of this nature was not performed in the previous work, which assumed all features to be positive real valued with zero being indicative of the least interesting value. We part with this strong implicit assumption and generalize these methods so as to be applicable across a much wider range of problem settings. We quantitatively and qualitatively validate our approach over 5 public datasets covering diverse domains.
Motivation & Objective
- To develop a model-agnostic method for generating contrastive explanations—pertinent positives and negatives—for any black-box classification model with only query access to class probabilities.
- To address the limitations of prior contrastive explanation methods that require model differentiability and assume all features are positive real-valued with zero as the base value.
- To provide a principled approach for defining base values for both real and categorical features, enabling meaningful contrastive explanations across diverse data types.
- To ensure explanations are trustworthy and align with expert intuition, particularly in regulated domains like finance and healthcare.
- To validate the method quantitatively and qualitatively on diverse structured data benchmarks, demonstrating superiority over existing methods like LIME.
Proposed method
- MACEM uses a FISTA-based optimization framework to compute sparse perturbations that maintain or flip the model’s prediction, forming pertinent positives (PPs) and pertinent negatives (PNs).
- It introduces a novel formulation for base values in real and categorical features, where base values represent the least informative or neutral state for each feature type.
- For real features, the base value is defined as the minimum or median value depending on the feature’s distribution, ensuring semantic consistency.
- For categorical features, the base value is determined by the mode or a neutral category, with a one-hot encoding strategy to enable gradient-free optimization.
- The method formulates the PP and PN search as constrained optimization problems, minimizing L1-norm perturbations while preserving or changing the model’s output class.
- It leverages query-based model access to estimate gradients via finite differences, enabling optimization without model introspection.
Experimental results
Research questions
- RQ1Can contrastive explanations be effectively generated for non-differentiable models such as random forests and gradient-boosted trees using only query access?
- RQ2How can base values be meaningfully defined for both real and categorical features to ensure semantically coherent pertinent positives and negatives?
- RQ3Does the proposed method produce more accurate and trustworthy explanations than LIME in terms of feature importance and model sensitivity?
- RQ4To what extent do PPs and PNs capture complementary information about model decisions, especially in comparison to decision tree paths?
- RQ5Can expert-validated explanations from MACEM reflect domain-specific knowledge better than proxy model-based methods?
Key findings
- MACEM outperforms LIME in both CFIP_PP and CFIP_PN metrics, with higher accuracy in identifying relevant features for pertinent positives and negatives across five public datasets.
- For the German Credit dataset, 44 out of 50 PPs and 38 out of 50 PNs generated by MACEM were judged reasonable by a finance expert, compared to 27 and 19 for LIME, respectively.
- In the olfaction dataset, 41 out of 50 PPs and 39 out of 50 PNs from MACEM were considered reasonable by a neuroscience expert, compared to 32 and 20 for LIME.
- Over 80% of inputs in the German Credit and olfaction datasets showed that top PP features from MACEM aligned with the top features in the model’s decision path, indicating global interpretability.
- PNs from MACEM were consistently more accurate than LIME’s, as they represented minimal, meaningful changes that would flip the model’s prediction, as confirmed by expert feedback.
- The method successfully generalizes to diverse structured data types, including real-valued and categorical features, without relying on model differentiability or strong assumptions about feature semantics.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.