kFolden: k-Fold Ensemble for Out-Of-Distribution Detection
31851Authors
nan
Abstract
AbstractOut-of-Distribution (OOD) detection is an important problem in natural language processing (NLP). In this work, we propose a simple yet effective framework kFolden, which mimics the behaviors of OOD detection during training without the use of any external data. For a task with k training labels, kFolden induces k sub-models, each of which is trained on a subset with k-1 categories with the left category masked unknown to the sub-model. Exposing an unknown label to the sub-model during training, the model is encouraged to learn to equally attribute the probability to the seen k-1 labels for the unknown label, enabling this framework to simultaneously resolve in- and out-distribution examples in a natural way via OOD simulations. Taking text classification as an archetype, we develop benchmarks for OOD detection using existing text classification datasets. By conducting comprehensive comparisons and analyses on the developed benchmarks, we demonstrate the superiority of kFolden against current methods in terms of improving OOD detection performances while maintaining improved in-domain classification accuracy.
Keywords
Full Content
Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 3102–3115 November 7–11, 2021. c⃝2021 Association for Computational Linguistics 3102 kFolden: k-Fold Ensemble for Out-Of-Distribution Detection Xiaoya Li♠, Jiwei Li♣♠, Xiaofei Sun♠, Chun Fan⋆▲▼ Tianwei Zhang♦, Fei Wu♣, Yuxian Meng♠, Jun Zhangn ♠Shannon.AI ▼National Biomedical Imaging Center, Peking University ⋆Computer Center of Peking University, ▲Peng Cheng Laboratory ♦Nanyang Technological University ♣Zhejiang University, nTsinghua University {xiaoya_li, jiwei_li, xiaofei_sun, yuxian_meng}@shannonai.com fanchun@pku.edu.cn, tianwei.zhang@ntu.edu.sg wufei@zju.edu.cn, jun-zhan19@mails.tsinghua.edu.cn Abstract Out-of-Distribution (OOD) detection is an im- portant problem in natural language process- ing (NLP). In this work, we propose a sim- ple yet effective framework kFolden, which mimics the behaviors of OOD detection during training without the use of any external data. For a task with k training labels, kFolden in- duces k sub-models, each of which is trained on a subset with k − 1 categories with the left category masked unknown to the sub-model. Exposing an unknown label to the sub-model during training, the model is encouraged to learn to equally attribute the probability to the seen k − 1 labels for the unknown la- bel, enabling this framework to simultaneously resolve in- and out-distribution examples in a natural way via OOD simulations. Tak- ing text classification as an archetype, we de- velop benchmarks for OOD detection using existing text classification datasets. By con- ducting comprehensive comparisons and anal- yses on the developed benchmarks, we demon- strate the superiority of kFolden against cur- rent methods in terms of improving OOD de- tection performances while maintaining im- proved in-domain classification accuracy. 1 1 Introduction Recent progress in deep neural networks has drastically improved accuracy in numerous NLP tasks (Sun et al., 2019; Raffel et al., 2019; Chai et al., 2020; He et al., 2020), but detecting out-of- distribution (OOD) examples from the in-domain (ID) examples is still a challenge for existing state- of-the-art deep NLP models. The ability of identi- fying OOD examples is critical for building reliable and trustworthy NLP systems for, say, text classifi- 1Corresponding author: Jun Zhang. cation (Hendrycks and Gimpel, 2016; Mukherjee and Awadallah, 2020), question answering (Ka- math et al., 2020) and neural machine translation (Kumar and Sarawagi, 2019). Existing works study- ing OOD detection in NLP often rely on external data (Hendrycks et al., 2018) to diversify model predictions and achieve better generality in OOD detection. The reliance on external data not only brings additional burden for data collection, but also results in the annoying issue in deciding which subset of external data to use: there is massive amount of external data and the using different subsets leads to different final results. Therefore, developing OOD detection system without external data is important towards building reliable NLP systems. In this work, we propose a novel, simple yet ef- fective framework, kFolden, short for a k-Fold ensemble, to address OOD detection for NLP with- out the use of any external data. We accomplish this goal by simulating the process of detecting OOD examples during training. Concretely, for a standard …
Content truncated to 500 words
Labeled Text
AbstractOut-of-Distribution (OOD) detection is an important problem in natural language processing (NLP). In this work, we propose a simple yet effective framework kFolden, which mimics the behaviors of OOD detection during training without the use of any external data. For a task with k training labels, kFolden induces k sub-models, each of which is trained on a subset with k-1 categories with the left category masked unknown to the sub-model. Exposing an unknown label to the sub-model during training, the model is encouraged to learn to equally attribute the probability to the seen k-1 labels for the unknown label, enabling this framework to simultaneously resolve in- and out-distribution examples in a natural way via OOD simulations. Taking text classification as an archetype, we develop benchmarks for OOD detection using existing text classification datasets. By conducting comprehensive comparisons and analyses on the developed benchmarks, we demonstrate the superiority of kFolden against current methods in terms of improving OOD detection performances while maintaining improved in-domain classification accuracy.
Publication Details
- Paper ID:
- 31851
- Year:
- 2021
- Publication:
- TIPSTER
- Publication Type:
- conf
- DOI:
- nan