Towards User Empowerment

Martin Pawelczyk, Johannes Haug, Klaus Broelemann, Gjergji Kasneci · DOI

Abstract: Counterfactual explanations can be obtained by identifying the smallest change made to a feature vector to qualitatively influence a prediction; for example, from 'loan rejected' to 'awarded' or from 'high risk of cardiovascular disease' to 'low risk'. Previous approaches often emphasized that counterfactuals should be easily interpretable to humans, motivating sparse solutions with few changes to the feature vectors. However, these approaches would not ensure that the produced counterfactuals be proximate (i.e., not local outliers) and connected to regions with substantial data density (i.e., close to correctly classified observations), two requirements known as counterfactual faithfulness. These requirements are fundamental when making suggestions to individuals that are indeed attainable. Our contribution is twofold. On one hand, we suggest to complement the catalogue of counterfactual quality measures using a criterion to quantify the degree of difficulty for a certain counterfactual suggestion. On the other hand, drawing ideas from the manifold learning literature, we develop a framework that generates attainable counterfactuals. We suggest the counterfactual conditional heterogeneous variational autoencoder (C-CHVAE) to identify attainable counterfactuals that lie within regions of high data density.

Introduction

As machine learning models increasingly automate high-stakes decisions—such as bank loans, medical diagnoses, or hiring—the need for transparency grows. Regulations like the GDPR even establish a "right to explanation." Counterfactual explanations are a popular solution, informing a user: "If you had changed feature $X$ by amount $Y$, the decision would have been positive."

However, existing methods often fail in three critical ways:

  1. Outliers: They suggest changes that result in "impossible" individuals (e.g., a 20-year-old with 30 years of work experience).
  2. Tabular Complexity: Real-world data is "heterogeneous," containing a messy mix of integers, categories, and continuous numbers that standard algorithms struggle to process.
  3. Attainability: They don't account for the practical difficulty of a human actually making the suggested change.

The C-CHVAE Framework

The core innovation of this work is the C-CHVAE (Counterfactual Conditional Heterogeneous Variational Autoencoder). Instead of attempting to tweak user data directly in the high-dimensional, messy input space, the framework maps data into a lower-dimensional latent space.

The C-CHVAE architecture, showing the encoder and decoder components used to map heterogeneous data into a latent space for counterfactual search.

Key Methodological Components

  • Latent Search: The algorithm perturbs data in the latent space. Because the VAE is trained to represent the "manifold" (the underlying structure) of real data, any point in this space, when decoded, is likely to resemble a plausible observation.
  • Handling Heterogeneous Data: The model utilizes a "factorized decoder," employing different mathematical distributions (e.g., Poisson for counts, Log-Normal for income) for different data types within a single architecture.
  • Conditioning on Immutables: The "Conditional" aspect allows the model to respect "protected" or "immutable" features (like age or race), ensuring the search only suggests changes to features the user can actually control.
  • Measuring Difficulty: The authors introduce a new metric for attainability based on percentile shifts. A suggestion to move income from the 50th to the 99th percentile is flagged as significantly more "difficult" than a move to the 60th.

Results and Discussion

The framework was evaluated on synthetic datasets and real-world financial datasets (GMSC and HELOC). The experiments revealed a crucial tension: "faithful" counterfactuals (those that look like real people) often require larger changes than "unfaithful" ones. Simple algorithms might find a "closer" counterfactual that is actually a local outlier, making it a "cheat" that wouldn't work in the real world.

Visualization of counterfactuals generated by C-CHVAE, demonstrating how they reside within high-density regions of the data manifold.

On the GMSC and HELOC datasets, C-CHVAE significantly outperformed baseline methods in terms of Proximity and Connectedness. It produced counterfactuals that were up to 20 percentage points less likely to be classified as local outliers. In synthetic tests where data lived in specific clusters, C-CHVAE was the only model that consistently suggested counterfactuals inside those clusters, whereas other models suggested points in "empty space."

Conclusion

C-CHVAE provides a model-agnostic framework for generating realistic and attainable counterfactual explanations. By searching the latent manifold, the system ensures that suggestions are practically useful for human users. Future work will focus on improving autoencoder capacity, providing feature importance rankings, and integrating causal links to ensure that suggested changes respect real-world dependencies between variables.

Summary updated

BibTeX
@inproceedings{pawelczyk2020towards,
  author = {Martin Pawelczyk and Johannes Haug and Klaus Broelemann and Gjergji Kasneci},
  title = {{Towards User Empowerment}},
  booktitle = {The Web Conference},
  year = {2020},
  url = {https://openreview.net/forum?id=iLM4_Fcsfn},
}
Figure