arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2310.05083cs.LGcs.AIcs.CL
收藏

FLatS: 基于特征似然比得分的原则性分布外检测

FLatS: Principled Out-of-Distribution Detection with Feature-Based Likelihood Ratio Score

Peking University(北京大学)

Haowei Lin, Yuntian Gu

AI总结:

针对现有基于特征的OOD检测方法仅估计分布内密度、并非最优的问题,提出基于似然比的原则性方法FLatS,可作为通用框架增强其他检测方法,在常用基准上达到新SOTA。

摘要:

分布外(OOD)样本检测对实际应用中的NLP模型至关重要。尽管已有大量OOD检测方法,但大多是经验性的。本文在理论分析的支撑下,提出通过分布外分布$\u2112_{\textit{out}}$与分布内分布$\u2112_{\textit{in}}$的似然比来衡量测试样本$\boldsymbol{x}$的“OOD程度”。我们认为,Maha、KNN等当前最优(SOTA)的基于特征的OOD检测方法仅估计分布内密度$p_{\textit{in}}(\boldsymbol{x})$,因此并非最优。为解决该问题,我们提出FLatS——一种基于似然比的原则性OOD检测方案。此外,我们证明FLatS可作为通用框架,通过纳入分布外密度$p_{\textit{out}}(\boldsymbol{x})$估计来增强其他OOD检测方法。实验表明,FLatS在常用基准上创下新的SOTA。我们的代码已公开于https://github.com/linhaowei1/FLatS。

英文摘要:

Detecting out-of-distribution (OOD) instances is crucial for NLP models in practical applications. Although numerous OOD detection methods exist, most of them are empirical. Backed by theoretical analysis, this paper advocates for the measurement of the "OOD-ness" of a test case $\boldsymbol{x}$ through the likelihood ratio between out-distribution $\mathcal P_{\textit{out}}$ and in-distribution $\mathcal P_{\textit{in}}$. We argue that the state-of-the-art (SOTA) feature-based OOD detection methods, such as Maha and KNN, are suboptimal since they only estimate in-distribution density $p_{\textit{in}}(\boldsymbol{x})$. To address this issue, we propose FLatS, a principled solution for OOD detection based on likelihood ratio. Moreover, we demonstrate that FLatS can serve as a general framework capable of enhancing other OOD detection methods by incorporating out-distribution density $p_{\textit{out}}(\boldsymbol{x})$ estimation. Experiments show that FLatS establishes a new SOTA on popular benchmarks. Our code is publicly available at https://github.com/linhaowei1/FLatS.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑