Efficient Shapley Values Estimation by Amortization for Text Classification

Chenghao Yang, Fan Yin, He He, Kai-Wei Chang, Xiaofei Ma +1 more
5/31/2023
cs.CLcs.LG

Official code: yangalan123/Amortized-Interpretability (10 stars, MIT, last commit 2024-05-18).

Abstract

Despite the popularity of Shapley Values in explaining neural text classification models, computing them is prohibitive for large pretrained models due to a large number of model evaluations. In practice, Shapley Values are often estimated with a small number of stochastic model evaluations. However, we show that the estimated Shapley Values are sensitive to random seed choices -- the top-ranked features often have little overlap across different seeds, especially on examples with longer input texts. This can only be mitigated by aggregating thousands of model evaluations, which on the other hand, induces substantial computational overheads. To mitigate the trade-off between stability and efficiency, we develop an amortized model that directly predicts each input feature's Shapley Value without additional model evaluations. It is trained on a set of examples whose Shapley Values are estimated from a large number of model evaluations to ensure stability. Experimental results on two text classification datasets demonstrate that our amortized model estimates Shapley Values accurately with up to 60 times speedup compared to traditional methods. Furthermore, the estimated values are stable as the inference is deterministic. We release our code at https://github.com/yangalan123/Amortized-Interpretability.

View on arXivView PDF

Code Implementations(1)

MIT

Codebase for the ACL 2023 paper "Efficient Shapley Values Estimation by Amortization for Text Classification"

101Shell, PythonMay 21, 20232 years agoMIT

Similar Papers

Cite this paper

@article{yang2023efficient,
  title  = {Efficient Shapley Values Estimation by Amortization for Text Classification},
  author = {Chenghao Yang and Fan Yin and He He and Kai-Wei Chang and Xiaofei Ma and Bing Xiang},
  year   = {2023},
  eprint = {2305.19998},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.19998v1}
}

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/2305.19998.svg)](https://codeofpaper.com/paper/2305.19998)

Discussion