使用 LLM 生成的反事实对黑盒 NLP 模型进行忠实解释
Faithful Explanations of Black-box NLP Models Using LLM-generated Counterfactuals
AI总结:
本文提出两种模型无关的反事实近似方法(CF生成与基于LLM引导的匹配方法),用于对黑盒NLP模型进行忠实解释,实验证明其优于多种基线且能降低计算成本。
摘要:
对 NLP 系统预测的因果解释对于确保安全性和建立信任至关重要。然而,现有方法通常无法有效或高效地解释模型预测,且往往特定于模型。在本文中,我们解决模型无关的解释问题,提出了两种反事实(CF)近似方法。第一种方法是 CF 生成,即提示大型语言模型(LLM)改变特定的文本概念,同时保持混淆概念不变。虽然该方法被证明非常有效,但在推理时应用 LLM 成本高昂。因此,我们提出了第二种基于匹配的方法,该方法在训练时由 LLM 引导并学习一个专用嵌入空间。该空间忠实于给定的因果图,并有效地用于识别近似 CF 的匹配。在理论上证明近似 CF 是构建忠实解释的必要条件后,我们对这些方法进行了基准测试,并解释了包括具有数十亿参数的 LLM 在内的多个模型。我们的实证结果表明,CF 生成模型作为模型无关解释器表现优异。此外,我们的匹配方法所需测试时资源极少,同样提供了有效的解释,超越了诸多基线。我们还发现,Top-K 技术普遍提升了所有测试方法的表现。最后,我们展示了 LLM 在构建模型解释新基准方面的潜力,并验证了我们的结论。本研究为高效且准确解释 NLP 系统的方法开辟了新途径。
英文摘要:
Causal explanations of the predictions of NLP systems are essential to ensure safety and establish trust. Yet, existing methods often fall short of explaining model predictions effectively or efficiently and are often model-specific. In this paper, we address model-agnostic explanations, proposing two approaches for counterfactual (CF) approximation. The first approach is CF generation, where a large language model (LLM) is prompted to change a specific text concept while keeping confounding concepts unchanged. While this approach is demonstrated to be very effective, applying LLM at inference-time is costly. We hence present a second approach based on matching, and propose a method that is guided by an LLM at training-time and learns a dedicated embedding space. This space is faithful to a given causal graph and effectively serves to identify matches that approximate CFs. After showing theoretically that approximating CFs is required in order to construct faithful explanations, we benchmark our approaches and explain several models, including LLMs with billions of parameters. Our empirical results demonstrate the excellent performance of CF generation models as model-agnostic explainers. Moreover, our matching approach, which requires far less test-time resources, also provides effective explanations, surpassing many baselines. We also find that Top-K techniques universally improve every tested method. Finally, we showcase the potential of LLMs in constructing new benchmarks for model explanation and subsequently validate our conclusions. Our work illuminates new pathways for efficient and accurate approaches to interpreting NLP systems.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。