用关键词重要性自动生成可解释的反事实样本,提升模型性能。
FitCF: A Framework for Automatic Feature Importance-guided Counterfactual Example Generation
- 基于特征重要性自动筛选关键词生成反事实例句。
- 通过标签翻转验证,使生成样本更可信且提升模型表现。
- 适合想提升模型可解释性与泛化能力的研究者使用。
反事实例子在自然语言处理中被广泛用于提升模型性能,在可解释人工智能中则用于理解模型行为。尽管大语言模型在多项任务上表现优异,自动化生成反事实例子仍具挑战。本文首先提出ZeroCF,一种利用特征归因方法提取的关键词,在零样本设置下生成忠实反事实例子的方法。其次,提出新框架FitCF,通过标签翻转验证生成的反事实,并将其作为少样本提示中的示范,优于两种先进基线。消融实验表明,各核心组件对反事实质量均有贡献,评估指标包括翻转率、困惑度和相似度。此外,我们发现LIME与积分梯度作为归因方法有效,且示范数量对性能影响最大。最后,揭示特征归因得分忠实性与生成反事实质量间存在强相关性,为未来研究提供重要参考。
原文摘要 · Abstract (English)
Counterfactual examples are widely used in natural language processing (NLP) as valuable data to improve models, and in explainable artificial intelligence (XAI) to understand model behavior. The automated generation of counterfactual examples remains a challenging task even for large language models (LLMs), despite their impressive performance on many tasks. In this paper, we first introduce ZeroCF, a faithful approach for leveraging important words derived from feature attribution methods to generate counterfactual examples in a zero-shot setting. Second, we present a new framework, FitCF, which further verifies aforementioned counterfactuals by label flip verification and then inserts them as demonstrations for few-shot prompting, outperforming two state-of-the-art baselines. Through ablation studies, we identify the importance of each of FitCF's core components in improving the quality of counterfactuals, as assessed through flip rate, perplexity, and similarity measures. Furthermore, we show the effectiveness of LIME and Integrated Gradients as backbone attribution methods for FitCF and find that the number of demonstrations has the largest effect on performance. Finally, we reveal a strong correlation between the faithfulness of feature attribution scores and the quality of generated counterfactuals, which we hope will serve as an important finding for future research in this direction.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。