Derivative-Free Diffusion Manifold-Constrained Gradient for Unified XAI

Won Jun Kim, Hyungjin Chung, Jaemin Kim, Sangmin Lee, Byeongsu Sim, Jong Chul Ye

Introduction

Explainable AI (XAI) aims to make complex model decisions transparent. However, standard gradient-based methods often require internal model access (white-box) and produce "off-manifold" explanations—results that look like adversarial noise rather than realistic images. FreeMCG (Derivative-Free Diffusion Manifold-Constrained Gradient) addresses these challenges by providing a unified, black-box framework that generates both human-interpretable feature attributions and realistic counterfactual explanations.

The Challenge of Off-Manifold Explanations

Traditional XAI techniques suffer from three primary limitations:

  1. White-Box Dependency: Most methods require access to model weights, which is impossible for proprietary APIs.
  2. Adversarial Noise: Gradients often highlight high-frequency noise that fools the model but is nonsensical to humans.
  3. Off-Manifold Generation: Standard gradients push images into unrealistic mathematical spaces, resulting in garbled counterfactuals.
Conceptual overview of FreeMCG's manifold-constrained approach compared to adversarial attacks.

Methodology: FreeMCG

FreeMCG overcomes these hurdles by combining two key components:

  • Ensemble Kalman Filters (EnKF): This allows for derivative-free gradient estimation. By perturbing the input and observing changes in output scores, FreeMCG estimates the gradient without backpropagation.
  • Diffusion Models & Tweedie’s Formula: To ensure realism, a pre-trained diffusion model projects noisy perturbations back onto the "data manifold." The covariance of these on-manifold particles acts as a preconditioner, amplifying directions that align with natural image structures while suppressing noise.

Experimental Evaluation

The framework was tested on ImageNet for general object recognition and MIMIC-CXR for medical imaging. These datasets represent diverse challenges in resolution and domain-specific feature importance.

Key Results and Insights

FreeMCG demonstrates that feature attribution and counterfactual generation are mathematically linked via the manifold-constrained gradient. Attribution is a single-step gradient observation, while counterfactuals involve an iterative walk along the manifold.

FreeMCG results showing counterfactual generation (top) and feature attribution (bottom) for various classes.
  • Superior Realism: In user studies, FreeMCG's counterfactuals (e.g., turning a Cheetah into a Tiger by changing spots to stripes) were rated significantly more realistic than baselines like DVCE.
  • Accurate Attribution: On the ROAD benchmark, FreeMCG identified more influential features than standard white-box methods like Integrated Gradients, despite being a black-box approach.
  • Clinical Relevance: In medical X-rays, it successfully highlighted pathological regions without the artifacts common in methods like SHAP.

Conclusion

FreeMCG provides a robust, black-box solution for unified XAI. While it requires logit access and carries a higher computational cost due to diffusion sampling, its ability to produce on-manifold, human-centric explanations marks a significant step forward for interpretable machine learning. Future work will focus on extending the method to hard-label settings and improving sampling efficiency.

Summary updated

BibTeX
@inproceedings{kim2025derivative,
  author = {Won Jun Kim and Hyungjin Chung and Jaemin Kim and Sangmin Lee and Byeongsu Sim and Jong Chul Ye},
  title = {{Derivative-Free Diffusion Manifold-Constrained Gradient for Unified XAI}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.02216},
}
Figure