[论文解读] PnPOOD : Out-Of-Distribution Detection for Text Classification via Plug andPlay Data Augmentation
PnPOOD 提出了一种即插即用的数据增强方法,用于在文本分类中进行分布外(OOD)检测,利用即插即用语言模型(PPLM)生成靠近类别边界的高质量 OOD 样本。该方法显著提升了 OOD 检测性能与模型校准能力,在 SST 和 20 Newsgroup 数据集上优于先前方法,同时解决了现有基准中的数据泄露问题。
While Out-of-distribution (OOD) detection has been well explored in computer vision, there have been relatively few prior attempts in OOD detection for NLP classification. In this paper we argue that these prior attempts do not fully address the OOD problem and may suffer from data leakage and poor calibration of the resulting models. We present PnPOOD, a data augmentation technique to perform OOD detection via out-of-domain sample generation using the recently proposed Plug and Play Language Model (Dathathri et al., 2020). Our method generates high quality discriminative samples close to the class boundaries, resulting in accurate OOD detection at test time. We demonstrate that our model outperforms prior models on OOD sample detection, and exhibits lower calibration error on the 20 newsgroup text and Stanford Sentiment Treebank dataset (Lang, 1995; Socheret al., 2013). We further highlight an important data leakage issue with datasets used in prior attempts at OOD detection, and share results on a new dataset for OOD detection that does not suffer from the same problem.
研究动机与目标
- 为解决 NLP 中缺乏稳健 OOD 检测方法的问题,特别是对话式智能体中的意图分类问题。
- 克服先前 OOD 检测方法的局限性,包括模型校准不足以及训练与测试 OOD 分布重叠导致的数据泄露问题。
- 开发一种即插即用、基于数据增强的方法,生成高质量、边界感知的 OOD 样本,以提升检测效果。
- 通过引入一个无数据泄露的新 OOD 基准数据集(源自 20 Newsgroup 数据集),实现公平评估。
- 在 OOD 检测指标(AUROC、AUPR)上表现优于最先进方法,同时显著降低校准误差。
提出的方法
- 利用即插即用语言模型(PPLM)通过条件化于域内(ID)文本嵌入来生成分布外(OOD)样本。
- 在训练过程中使用熵正则化,促使 OOD 样本具有高熵,使其趋向均匀分布,从而提升可区分性。
- 生成的 OOD 样本集中在 ID 分类器的决策边界附近,增强检测灵敏度。
- 采用最大 Softmax 概率(MSP)作为最终检测得分,并使用 ID 数据与 PPLM 生成的 OOD 数据联合微调模型。
- 用来自 20 Newsgroup 数据集的领域特定 OOD 数据替代通用 OOD 数据集(如 Gutenberg),以消除数据泄露。
- 应用事后 Dirichlet 校准,进一步降低期望校准误差(ECE)。
实验结果
研究问题
- RQ1基于 PPLM 的数据增强能否生成高质量的 OOD 样本,使其接近 ID 分类器的决策边界?
- RQ2与现有最先进方法相比,所提出的 PnPOOD 方法在标准 NLP 基准上的 OOD 检测性能是否得到提升?
- RQ3与先前方法相比,PnPOOD 在多大程度上减少了模型校准误差?
- RQ4先前 OOD 检测基准中的数据泄露如何影响模型评估?新基准能否缓解该问题?
- RQ5该方法在零样本 OOD 检测设置下,能否在多种领域组合中实现良好泛化?
主要发现
- 在 SST-2 数据集上,PnPOOD 达到最先进性能,当检测来自 'Politics' 领域的 OOD 样本时,AUROC 为 0.89,AUPR 为 0.51。
- 在 20 Newsgroup 数据集上,当检测来自 'Sports' 和 'Politics' 领域的 OOD 样本时,PnPOOD 的 AUROC 为 0.89,AUPR 为 0.51,优于 MSP 和 MSP+ER 基线方法。
- 与 MSP 和 MSP+ER 基线相比,该方法将期望校准误差(ECE)降低了最多 30%,表明模型校准能力得到显著提升。
- PnPOOD 在 FPR@90TPR 指标上显著优于先前方法,在 'Politics' 领域的值为 0.31,优于 MSP+ER 的 0.33。
- 作者识别并解决了先前 OOD 基准中的关键数据泄露问题,表明先前结果可能因 OOD 与 ID 数据重叠而被高估。
- 事后 Dirichlet 校准进一步降低了 ECE,证实 PnPOOD 即使在校准后仍能生成校准良好的模型。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。