Pobe: Generative Model-based Out-of-distribution Text Detection Method

被引:0
作者
Ouyang, Ya-Wen [1 ,2 ]
Gao, Yuan [1 ,2 ]
Zong, Shi [2 ]
Bao, Yu [1 ,2 ]
Dai, Xin-Yu [1 ,2 ]
机构
[1] State Key Laboratory for Novel Software Technology, Nanjing University, Nanjing
[2] Department of Computer Science and Technology, Nanjing University, Nanjing
来源
Ruan Jian Xue Bao/Journal of Software | 2024年 / 35卷 / 09期
关键词
generative model; machine learning; out-of-distribution detection; pre-trained language model; text retrieval;
D O I
10.13328/j.cnki.jos.006956
中图分类号
学科分类号
摘要
It is essential to detect out-of-distribution (OOD) training set samples for a safe and reliable machine learning system. Likelihood-based generative models are popular methods to detect OOD samples because they do not require sample labels during training. However, recent studies show that likelihoods sometimes fail to detect OOD samples, and the failure reason and solutions are under explored, especially for text data. Therefore, this study investigates the text failure reason from the views of the model and data: insufficient generalization of the generative model and prior probability bias of the text. To tackle the above problems, the study proposes a new OOD text detection method, namely Pobe. To address insufficient generalization of the generative model, the study increases the model generalization via KNN retrieval. Next, to address the prior probability bias of the text, the study designs a strategy to calibrate the bias and improve the influence of probability bias on OOD detection by a pre-trained language model and demonstrates the effectiveness of the strategy according to Bayes’ theorem. Experimental results over a wide range of datasets show the effectiveness of the proposed method. Specifically, the average AUROC is over 99%, and FPR95 is below 1% under eight datasets. © 2024 Chinese Academy of Sciences. All rights reserved.
引用
收藏
页码:4365 / 4376
页数:11
相关论文
共 31 条
  • [1] Hendrycks D, Gimpel K., A baseline for detecting misclassified and out-of-distribution examples in neural networks, Proc. of the 5th Int’l Conf. on Learning Representations, (2017)
  • [2] Gangal V, Arora A, Einolghozati A, Gupta S., Likelihood ratios and generative classifiers for unsupervised out-of-domain detection in task oriented dialog, Proc. of the 34th AAAI Conf. on Artificial Intelligence, pp. 7764-7771, (2020)
  • [3] Ren J, Liu PJ, Fertig E, Snoek J, Poplin R, DePristo MA, Dillon JV, Lakshminarayanan B., Likelihood ratios for out-of-distribution detection, Proc. of the 33rd Int’l Conf. on Neural Information Processing Systems, (2019)
  • [4] Nalisnick ET, Matsukawa A, Teh YW, Gorur D, Lakshminarayanan B., Do deep generative models know what they don’t know?, Proc. of the 7th Int’l Conf. on Learning Representations, (2019)
  • [5] Arora U, Huang W, He H., Types of out-of-distribution texts and how to detect them, Proc. of the 2021 Conf. on Empirical Methods in Natural Language Processing, pp. 10687-10701, (2021)
  • [6] Serra J, Alvarez D, Gomez V, Slizovskaia O, Nunez JF, Luque J., Input complexity and out-of-distribution detection with likelihood-based generative models, Proc. of the 8th Int’l Conf. on Learning Representations, (2020)
  • [7] Schirrmeister RT, Zhou YX, Ball T, Zhang D., Understanding anomaly detection with deep invertible networks through hierarchies of distributions and features, Proc. of the 34th Conf. on Neural Information Processing Systems, pp. 21038-21049, (2020)
  • [8] Radford A, Wu J, Child R, Luan D, Amodei D, Sutskever I., Language models are unsupervised multitask learners, OpenAI Blog, 1, 8, (2019)
  • [9] Nalisnick E, Matsukawa A, Teh YW, Et al., Detecting out-of-distribution inputs to deep generative models using typicality, Proc. of the 8th Int’l Conf. on Learning Representations, (2020)
  • [10] Podolskiy A, Lipin D, Bout A, Artemova E, Piontkovskaya I., Revisiting Mahalanobis distance for Transformer-based out-of-domain detection, Proc. of the 35th AAAI Conf. on Artificial Intelligence, pp. 13675-13682, (2021)