SPICE:一種 SHAP 引導的、具接近性與可解釋性的反事實解釋方法
SPICE:Shapley-guided Proximate and Interpretable Counterfactual Explanations
摘要
反事實解釋(Counterfactual Explanation,CE)是可解釋人工智慧(Explainable AI,
XAI)中廣泛使用的一種方法,旨在找出對輸入特徵進行最小化修改即可改變模型預
測的情況,從而提升模型的可解釋性。然而,現有基於梯度的 CE 生成方法通常存在
兩大限制:(1)採用固定的學習率,對於不同樣本可能會出現步幅過大而越過決策邊
界,或步幅過小而無法達到決策邊界的情況;(2)對特徵重要性的考慮不足,導致產
生不必要或不切實際的修改。本研究提出 SPICE(Shapley-guided Proximate and Interpretable Counterfactual Explanations),這是一種以特徵為導向的 CE 生成框架,將 SHapley Additive exPlanations(SHAP)與 Diverse Counterfactual Explanations(DiCE)相結
合。SPICE 引入了動態學習率增強策略,根據每個樣本與決策邊界的距離自適應地引
導優化過程;同時設計了 Shapley 引導的稀疏性損失,優先修改對預測最具影響力的特
徵,並抑制對不相關特徵的改動。在三個資料集上的實驗結果顯示,SPICE 在保持有
效性(validity)的同時,在接近性(proximity)與稀疏性(sparsity)方面均優於基準
方法。消融實驗證實,兩個提出的方法各自都能提升 CE 的品質,且結合使用時可獲得
最佳整體表現。結果凸顯了 SPICE 能生成簡潔、可解釋且可行的 CE,進一步提升 AI
模型解釋的實用性與可信度。
XAI)中廣泛使用的一種方法,旨在找出對輸入特徵進行最小化修改即可改變模型預
測的情況,從而提升模型的可解釋性。然而,現有基於梯度的 CE 生成方法通常存在
兩大限制:(1)採用固定的學習率,對於不同樣本可能會出現步幅過大而越過決策邊
界,或步幅過小而無法達到決策邊界的情況;(2)對特徵重要性的考慮不足,導致產
生不必要或不切實際的修改。本研究提出 SPICE(Shapley-guided Proximate and Interpretable Counterfactual Explanations),這是一種以特徵為導向的 CE 生成框架,將 SHapley Additive exPlanations(SHAP)與 Diverse Counterfactual Explanations(DiCE)相結
合。SPICE 引入了動態學習率增強策略,根據每個樣本與決策邊界的距離自適應地引
導優化過程;同時設計了 Shapley 引導的稀疏性損失,優先修改對預測最具影響力的特
徵,並抑制對不相關特徵的改動。在三個資料集上的實驗結果顯示,SPICE 在保持有
效性(validity)的同時,在接近性(proximity)與稀疏性(sparsity)方面均優於基準
方法。消融實驗證實,兩個提出的方法各自都能提升 CE 的品質,且結合使用時可獲得
最佳整體表現。結果凸顯了 SPICE 能生成簡潔、可解釋且可行的 CE,進一步提升 AI
模型解釋的實用性與可信度。
Counterfactual Explanation (CE) is a widely used approach in Explainable AI (XAI), aiming to identify minimal changes to input features that would alter a model’s prediction, thereby
enhancing model interpretability. However, existing gradient-based CE generation methods often suffer from two major limitations: (1) the use of fixed learning rates, which can either
overshoot or fail to reach decision boundaries for different instances, and (2) insufficient consideration of feature importance, leading to unnecessary or impractical modifications. This
work proposes SPICE (Shapley-guided Proximate and Interpretable Counterfactual Explanations), a feature-oriented CE generation framework that integrates SHapley Additive exPlanations (SHAP) with Diverse Counterfactual Explanations (DiCE). SPICE introduces a dynamic
learning rate enhancement strategy to adaptively guide the optimization process based on each
instance’s proximity to the decision boundary, and a Shapley-guided sparsity loss to prioritize
modifications on the most influential features while discouraging changes to less relevant ones.
Experiments on three datasets demonstrate that SPICE achieves superior proximity and sparsity
compared to baseline methods, without compromising validity. Ablation studies confirm that
both proposed components independently improve CE quality, and their combination yields the
best overall performance. The results highlight SPICE’s ability to generate concise, interpretable, and actionable CEs, enhancing both the practicality and trustworthiness of AI model explanations.
enhancing model interpretability. However, existing gradient-based CE generation methods often suffer from two major limitations: (1) the use of fixed learning rates, which can either
overshoot or fail to reach decision boundaries for different instances, and (2) insufficient consideration of feature importance, leading to unnecessary or impractical modifications. This
work proposes SPICE (Shapley-guided Proximate and Interpretable Counterfactual Explanations), a feature-oriented CE generation framework that integrates SHapley Additive exPlanations (SHAP) with Diverse Counterfactual Explanations (DiCE). SPICE introduces a dynamic
learning rate enhancement strategy to adaptively guide the optimization process based on each
instance’s proximity to the decision boundary, and a Shapley-guided sparsity loss to prioritize
modifications on the most influential features while discouraging changes to less relevant ones.
Experiments on three datasets demonstrate that SPICE achieves superior proximity and sparsity
compared to baseline methods, without compromising validity. Ablation studies confirm that
both proposed components independently improve CE quality, and their combination yields the
best overall performance. The results highlight SPICE’s ability to generate concise, interpretable, and actionable CEs, enhancing both the practicality and trustworthiness of AI model explanations.