通过摊销高效估计文本分类中的Shapley值
Efficient Shapley Values Estimation by Amortization for Text Classification
AI总结:
本文提出一种摊销模型直接预测文本分类中每个特征的Shapley值,避免大量随机模型评估,在保证估计稳定性的同时实现最高60倍加速。
摘要:
尽管Shapley值在解释神经文本分类模型方面很受欢迎,但由于需要大量模型评估,对于大型预训练模型而言,计算Shapley值的代价过高。在实践中,Shapley值通常通过少量随机模型评估来估计。然而,我们表明,估计的Shapley值对随机种子选择很敏感——在不同种子下排名靠前的特征往往几乎没有重叠,尤其是在输入文本较长的样本上。这只能通过聚合数千次模型评估来缓解,但另一方面,这会带来巨大的计算开销。为了缓解稳定性与效率之间的权衡,我们开发了一个摊销模型,可以直接预测每个输入特征的Shapley值,而无需额外的模型评估。该模型在一组样本上进行训练,这些样本的Shapley值通过大量模型评估来估计,以确保稳定性。在两个文本分类数据集上的实验结果表明,与传统方法相比,我们的摊销模型能够准确估计Shapley值,并且速度提升最高可达60倍。此外,由于推理是确定性的,估计值也是稳定的。我们在https://github.com/yangalan123/Amortized-Interpretability发布了代码。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。