Introduction
Explainable AI (XAI) is critical for deploying "black-box" models in sensitive domains. However, existing feature-attribution methods face a significant trade-off between efficiency and applicability. Model-agnostic methods like SHAP or RISE are versatile but computationally prohibitive, requiring thousands of forward passes per explanation. Conversely, model-specific methods like GradCAM are fast but restricted to specific architectures. Amortized methods, such as FastSHAP, attempt to bridge this gap by training a "student" model to predict explanations. However, these are often limited by the performance of the "teacher" method they mimic and the high cost of generating training labels.
This paper introduces FEX, a novel framework presented at IJCAI-25 that leverages Reinforcement Learning (RL) to train a model-agnostic explainer directly from data and the target model, bypassing the need for expensive teacher-generated labels.
The FEX Framework
The core innovation of FEX is formulating feature attribution as a Policy Gradient optimization problem. Instead of mimicking another explainer, FEX learns to identify important features through direct interaction with the black-box model.
As illustrated in Figure 1, the process involves several key components:
- Explainer as a Policy: The explainer $g(x)$ is a neural network that outputs parameters for a multivariate Bernoulli distribution, representing the probability of each feature being "important."
- Action and Reward: The "actions" are binary masks applied to the input. The "reward" is determined by a score function that measures how well the masked input preserves the original model's prediction.
- Optimization via PPO: The explainer is trained using Proximal Policy Optimization (PPO). This "proxy-independent" approach allows the explainer to discover the model's logic through trial and error (masking), rather than being capped by a teacher's performance.
- KL-Divergence Regularization: To improve generalization across diverse datasets, the authors introduce a regularization term that aligns the explainer's class-specific scores with the model's actual predicted probabilities.
Experimental Evaluation
FEX was evaluated on both image and text classification tasks using ImageNet (with a Vision Transformer) and SST2/Movie Reviews (with BERT). For ground-truth comparison in images, the authors used annotated segmentation datasets to measure how well the identified features overlap with actual objects.
Efficiency and Quality
FEX achieves a remarkable balance of speed and quality. Once trained, it generates attribution maps in a single forward pass, resulting in a 97% reduction in inference time and 70% less memory usage compared to traditional model-agnostic methods like RISE or Integrated Gradients.
As shown in Figure 2, FEX produces heatmaps that are more accurately centered on the target objects compared to the noisier outputs of RISE or the broader attributions of FastSHAP. Quantitatively, FEX achieved a mean Intersection over Union (mIoU) of 0.6587 on ImageNet, significantly outperforming FastSHAP (0.4811) and even model-specific methods like GradCAM (0.4458).
Conclusion and Future Work
FEX provides a powerful solution for real-time, model-agnostic explanations. By treating XAI as an RL problem, it avoids the "teacher cap" of previous amortized methods while maintaining extreme efficiency at inference time. While training remains computationally intensive and requires large datasets, FEX represents a significant step toward practical, high-quality XAI. Future research may explore simultaneous training of the predictor and explainer to further align model logic with human-interpretable features.
Summary updated