As of my last update in 2023, there isn't a universal, singular mathematical definition of faithfulness that applies across all types and contexts of Explainable AI (XAI). This is largely because faithfulness, as a concept in XAI, is contextual and depends on the specifics of the models, the data, and the type of explanation being provided. However, faithfulness generally aims to measure the degree to which an explanation accurately represents the decision-making process of the model it seeks to explain.
The assessment of faithfulness often involves comparisons between the effects of features, as indicated by the explanation, and their actual effects on the model's output. In some contexts, especially where the explanations are feature-centric (e.g., feature attribution methods), certain metrics and approaches can indirectly quantify aspects of faithfulness:
1. Perturbation-Based Methods
One common approach involves perturbing the input (changing the values of features) and observing how these changes affect the model's predictions. A faithful explanation method would attribute high importance to features whose perturbation significantly changes the output. Mathematically, if modifying a feature (x_i) leads to a large change in the model's prediction (f(x)), then a faithful explanation should attribute high importance to (x_i).
2. Correlation Measures
For models explained by feature importance scores, one could compute the correlation between the importance scores assigned by the explanation method and the change in model output resulting from perturbing or masking each feature. A higher correlation could indicate higher faithfulness.
3. Leave-One-Out or Leave-Some-Out Experiments
By systematically removing features or combinations of features from the input and measuring the impact on the model’s output, researchers can estimate the "true" importance or effect of those features. A faithful explanation would align these "true" importances with the explained importances.
Example of a Quantitative Assessment:
Let’s consider a simplified scenario involving a regression model (f), and an explanation method that provides importance scores for each feature (I(x_i)). One way to assess faithfulness might involve comparing the actual change in output to the expected change based on importance scores:
- Compute the model’s prediction with all features: (f(x)).
- For each feature (x_i), modify or perturb it to get a new input (x'_i), and compute the new prediction (f(x'_i)).
- Measure the change in output due to this perturbation (\Delta f_i = |f(x) - f(x'_i)|).
- Compare (\Delta f_i) to the importance score (I(x_i)) given by the explanation method, for each feature.
A higher correlation between (\Delta f_i) and (I(x_i)) across features could indicate a more faithful explanation.
Conclusion