[论文解读] Polyjuice: Automated, General-purpose Counterfactual Generation.
Polyjuice 是一种基于 GPT-2 的通用文本生成器,通过将反事实生成与具体应用场景解耦,生成流畅且多样化的反事实样本。它支持可控扰动,并在构建训练和评估数据集时将人工标注工作量减少 40%,同时增强了特征重要性分析方法,以揭示模型错误。
Counterfactual examples have been shown to be useful for many applications, including calibrating, evaluating, and explaining model decision boundaries. However, previous methods for generating such counterfactual examples have been tightly tailored to a specific application, used a limited range of linguistic patterns, or are hard to scale. We propose to disentangle counterfactual generation from its use cases, i.e., gather general-purpose counterfactuals first, and then select them for specific applications. We frame the automated counterfactual generation as text generation, and finetune GPT-2 into a generator, Polyjuice, which produces fluent and diverse counterfactuals. Our method also allows control over where perturbations happen and what they do. We show Polyjuice supports multiple use cases: by generating diverse counterfactuals for humans to label, Polyjuice helps produce high-quality datasets for model training and evaluation, requiring 40% less human effort. When used to generate explanations, Polyjuice helps augment feature attribution methods to reveal models' erroneous behaviors.
研究动机与目标
- 解决自然语言处理中缺乏通用、可扩展且可控的反事实生成方法的问题。
- 减少在构建高质量反事实数据集以用于模型训练和评估过程中的人工劳动。
- 通过生成能暴露模型决策边界错误行为的反事实样本,提升模型可解释性。
- 将反事实生成与具体下游应用解耦,实现在多种任务中的复用。
提出的方法
- 将 GPT-2 微调为反事实生成器,将反事实生成视为文本生成任务。
- 引入控制机制,以指定生成文本中扰动的位置和类型。
- 采用两阶段流程:首先生成多样化的反事实样本,然后为特定应用筛选相关样本。
- 利用 GPT-2 的流畅性和多样性,生成符合人类接受度的反事实样本,而无需针对特定任务进行微调。
- 将生成器应用于反事实样本生成,以支持数据收集和解释增强。
实验结果
研究问题
- RQ1单一的、通用的模型是否能在多个自然语言处理任务中生成多样且流畅的反事实样本?
- RQ2自动化反事实生成在多大程度上能减少数据集构建过程中的人工标注工作量?
- RQ3当与特征重要性分析方法结合时,生成的反事实样本在多大程度上能有效检测模型错误?
- RQ4在序列到序列生成框架中,能否有效实现对扰动位置和类型的控制?
主要发现
- 在为模型训练和评估生成数据集时,Polyjuice 将人工标注工作量减少了 40%。
- 生成的反事实样本流畅且多样化,可在下游应用中有效使用,而无需针对特定任务进行适配。
- Polyjuice 通过反事实解释揭示了模型的错误行为,从而增强了特征重要性分析方法。
- 对扰动位置和类型的控制已成功实现,支持针对特定需求生成反事实样本。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。