GradCFA: A Hybrid Gradient-Based Counterfactual and Feature Attribution Explanation Algorithm for Local Interpretation of Neural Networks

Jacob Sanderson, Hua Mao, Wai Lok Woo
3/16/2026
8 citations
cs.LGcs.AI

Official code: jacob-ws/GradCFs (0 stars, Jupyter Notebook, MIT, last commit 2026-02-25).

Abstract

Explainable Artificial Intelligence (XAI) is increasingly essential as AI systems are deployed in critical fields such as healthcare and finance, offering transparency into AI-driven decisions. Two major XAI paradigms, counterfactual explanations (CFX) and feature attribution (FA), serve distinct roles in model interpretability.

Show full abstract

This study introduces GradCFA, a hybrid framework combining CFX and FA to improve interpretability by explicitly optimizing feasibility, plausibility, and diversity - key qualities often unbalanced in existing methods. Unlike most CFX research focused on binary classification, GradCFA extends to multi-class scenarios, supporting a wider range of applications. We evaluate GradCFA's validity, proximity, sparsity, plausibility, and diversity against state-of-the-art methods, including Wachter, DiCE, CARE for CFX, and SHAP for FA. Results show GradCFA effectively generates feasible, plausible, and diverse counterfactuals while offering valuable FA insights. By identifying influential features and validating their impact, GradCFA advances AI interpretability. The code for implementation of this work can be found at: https://github.com/jacob-ws/GradCFs .

View on arXivView PDF

Code Implementations(1)

jacob-ws/GradCFsOfficial100%
MIT
00Jupyter Notebook, PythonAug 6, 20249 months agoMIT

Similar Papers

Cite this paper

@article{sanderson2026gradcfa,
  title  = {GradCFA: A Hybrid Gradient-Based Counterfactual and Feature Attribution Explanation Algorithm for Local Interpretation of Neural Networks},
  author = {Jacob Sanderson and Hua Mao and Wai Lok Woo},
  year   = {2026},
  eprint = {2603.15373},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2603.15373v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2603.15373.svg)](https://codeofpaper.com/paper/2603.15373)

Discussion