Explaining Model Confidence Using Counterfactuals

Thao Le, Tim Miller, Ronal Singh, Liz Sonenberg

TL;DR

This paper introduces two novel methods for explaining AI model confidence using counterfactuals: example-based and visualization-based. Their user studies demonstrate that these counterfactual explanations significantly improve users' understanding and trust in AI models compared to no explanation, offering practical insights for designing more effective AI explainability tools.

What Problem Does This Paper Address?

In human-AI interaction, displaying confidence scores is a common way to build trust. However, simply showing a confidence score doesn't tell users why the AI is confident. This lack of transparency can lead to users blindly accepting or rejecting the AI's output without understanding its reasoning. While explainable AI (XAI) research has focused on explaining predictions, explaining the confidence behind those predictions remains an underexplored area. This paper aims to bridge this gap by developing and evaluating methods to explain AI model confidence using counterfactuals, allowing users to better understand and trust the AI's certainty.

Methods

The authors propose two primary methods for generating counterfactual explanations of model confidence:

  • Example-Based Counterfactuals: This approach generates specific examples of how changing input features would alter the model's confidence score. It's akin to saying, "Your loan was denied with 70% confidence because your income was $30,000. If your income had been $45,000, the confidence would have been lower." The core idea is to find counterfactual inputs ($x'$) that change the confidence score ($U(x')$) to a desired level (e.g., lower or higher than a threshold $T$) while ensuring the predicted class remains the same. This is achieved by solving an optimization problem that balances the distance between the original and counterfactual inputs with the desired change in confidence.
  • Visualization-Based Counterfactuals: This method visualizes the counterfactual space, showing how varying a single feature affects the model's confidence. For categorical features, it plots confidence scores for different categories (e.g., different job occupations). For continuous features, it shows how confidence changes as the feature's value is varied within its range. This technique is inspired by Individual Conditional Expectation (ICE) plots but adapted to visualize confidence scores rather than prediction probabilities.

Datasets

The study utilized two real-world datasets:

  • Adult Dataset (UCI Machine Learning Repository): Used for the income prediction domain, classifying income into "below $50K" or "above $50K" based on demographic features.
  • IBM HR Analytics Employee Attrition Performance Dataset (Kaggle): Used for the HR domain, classifying employee attrition (yes/no) based on demographic and job-related features.

For both datasets, the authors selected the seven most important features using a Gradient Boosting Classification model.

Key Insights and Ideas

  • Counterfactuals for Confidence are Valuable: The core insight is that counterfactual explanations can effectively communicate why an AI is confident (or not), leading to better user understanding and trust.
  • Different Explanations, Different Usage: The qualitative analysis revealed that example-based and visualization-based counterfactuals are used differently by users, suggesting that the choice of explanation method should depend on the specific context and user needs.
  • Visualizations Aid Continuous Features: Visualizations are particularly helpful for understanding the impact of continuous features on confidence, reducing misinterpretations that can arise with example-based explanations for such features.
  • Case-Based Reasoning with Examples: Users tend to apply case-based reasoning when interpreting example-based counterfactuals, especially for continuous variables, sometimes overlooking the underlying linear trends.
  • Importance of Context: The effectiveness of explanations can be influenced by the domain and prior user knowledge, as suggested by discrepancies observed between the income and HR domains.

Key Results

The user studies yielded significant findings:

  • Improved Understanding and Trust: Both example-based and visualization-based counterfactual explanations significantly improved users' understanding and trust in AI models compared to a control group receiving no explanations. Hypotheses H1a, H1b, H2a, and H2b were supported in both domains (p < 0.005, r > 0.41).
  • Mixed Results for Direct Comparison: While counterfactuals generally improved understanding and trust, the direct comparison between example-based and visualization-based explanations (Hypotheses H3a, H3b, H3c) showed mixed results. Understanding was not significantly different (H3a rejected), but trust and satisfaction showed support in the income domain but not the HR domain.
  • Qualitative Findings:
    • Users often struggled with example-based explanations when attribute differences were minimal or when dealing with categorical variables presented as numbers.
  • Visualizations helped mitigate issues with continuous variables and reduced "linear assumption" errors for categorical variables in the HR domain.
  • A notable issue with example-based explanations was users applying "case-based reasoning" rather than interpreting the underlying correlation, especially for continuous features.

Limitations and Future Work

  • Limitations:
    • The study observed discrepancies in the effectiveness of visualization-based explanations for trust and satisfaction between the two domains, suggesting that prior knowledge might play a role.
  • Example-based explanations can be challenging for users to interpret when attribute differences are minimal or when categorical variables are not clearly labeled.
  • Users sometimes applied case-based reasoning instead of interpreting linear correlations with example-based explanations.
  • Future Work:
    • Further investigation into the discrepancies observed between domains to understand the impact of prior knowledge.
  • Developing more robust methods for presenting counterfactual explanations, especially for categorical variables and when attribute differences are small.
  • Exploring how to guide users away from case-based reasoning towards a more general understanding of correlations when using example-based explanations for continuous variables.
  • Extending the counterfactual explanation techniques to more complex models beyond logistic regression.
  • Evaluating the impact of these explanations on actual decision-making processes.

Summary updated

BibTeX
@inproceedings{le2023explaining,
  author = {Thao Le and Tim Miller and Ronal Singh and Liz Sonenberg},
  title = {{Explaining Model Confidence Using Counterfactuals}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2023},
  doi = {10.1609/aaai.v37i10.26399},
}
Figure