Explanation-quality metrics in the Quantus families (roadmap XAI-5): faithfulness (deletion and insertion curves, with ROAD's imputation), randomization (the model-parameter randomization test) and complexity (sparseness and complexity).
More...
|
| float | pulsatrix::Sparseness (const Attribution &attribution) |
| | Gini index of the attribution magnitudes (Chalasani et al. 2020; Quantus Sparseness): 0 when relevance is spread evenly, approaching 1 when one feature holds it all.
|
| |
| float | pulsatrix::Complexity (const Attribution &attribution) |
| | Entropy of the fractional contributions |a_i| / sum |a| (Bhatt et al. 2020; Quantus Complexity), natural log: 0 when one feature holds all relevance, ln n when spread evenly.
|
| |
| float | pulsatrix::SpearmanRankCorrelation (const std::vector< float > &x, const std::vector< float > &y) |
| | Spearman rank correlation, with tied values given their average rank.
|
| |
| Tensor | pulsatrix::Impute (const Tensor &input, const std::vector< bool > &removed, const Imputation &imputation) |
| | Returns input with every element whose removed flag is set filled by imputation.
|
| |
| PerturbationCurve | pulsatrix::DeletionCurve (const PredictFn &predict, const Tensor &input, const Attribution &attribution, const PerturbationOptions &options={}) |
| | Deletion (MoRF): removes features from most to least relevant, imputing them, and records the target score. A faithful attribution makes the score drop fast: lower AUC is better.
|
| |
| PerturbationCurve | pulsatrix::InsertionCurve (const PredictFn &predict, const Tensor &input, const Attribution &attribution, const PerturbationOptions &options={}) |
| | Insertion: starts from the fully imputed input and restores features from most to least relevant. A faithful attribution makes the score rise fast: higher AUC is better.
|
| |
| RandomizationResult | pulsatrix::ModelParameterRandomizationTest (Module &model, const ExplainFn &explain, const Tensor &input, uint64_t seed) |
| | The model-parameter randomization test (Adebayo et al., "Sanity Checks for Saliency
Maps", NeurIPS 2018), cascading: randomizes the model's layers from the output down, re-explains input after each, and measures how similar the explanation stays.
|
| |
| RandomizationResult | pulsatrix::ModelParameterRandomizationTest (Module &model, const ExplainFn &explain, const Tensor &input, uint64_t seed, const std::vector< std::string > &layers) |
| | ModelParameterRandomizationTest over layers, in the order given: each a prefix of named_parameters() names, such as "layers.11", randomized cumulatively.
|
| |
Explanation-quality metrics in the Quantus families (roadmap XAI-5): faithfulness (deletion and insertion curves, with ROAD's imputation), randomization (the model-parameter randomization test) and complexity (sparseness and complexity).
- Note
- Explainer-agnostic: the faithfulness metrics take a prediction function and a finished Attribution; the randomization test takes a function that explains an input with the model as it currently is.