Out-of-Distribution (OOD) detection is an important problem in natural language processing (NLP). In this work, we propose a simple yet effective framework $k$Folden, which mimics the behaviors of OOD detection during training without the use of any external data. For a task with $k$ training labels, $k$Folden 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 $k$Folden against current methods in terms of improving OOD detection performances while maintaining improved in-domain classification accuracy.
翻译:在这项工作中,我们提议了一个简单而有效的框架,即美元Folden,在不使用任何外部数据的情况下模仿培训期间OOD检测的行为。对于一项使用美元培训标签的任务,$k$Folden诱发美元分型模型,每个分型模型都经过以美元-1美元的子类培训,其左类别掩盖在子模型上。在培训期间向子模型展示一个未知的标签,鼓励该模型学会将这种可能性同等地归因于所看到的美元-1美元的标签,使这一框架能够通过OOOD模拟以自然的方式同时解决在分配中和在分配中的实例。将文字分类作为原型,我们利用现有文本分类数据集制定OOD检测基准。我们通过对开发的基准进行全面比较和分析,在改进OOD检测性能的同时,在保持改进内部分类的准确性方面,显示了美元-美元-美元比现行方法的优越性能。