Out-of-distribution (OOD) detection in deep learning has traditionally been framed as a binary task, where samples are either classified as belonging to the known classes or marked as OOD, with little attention given to the semantic relationships between OOD samples and the in-distribution (ID) classes. We propose a framework for detecting and classifying OOD samples in a given class hierarchy. Specifically, we aim to predict OOD data to their correct internal nodes of the class hierarchy, whereas the known ID classes should be predicted as their corresponding leaf nodes. Our approach leverages the class hierarchy to create a probabilistic model and we implement this model by using networks trained for ID classification at multiple hierarchy depths. We conduct experiments on three datasets with predefined class hierarchies and show the effectiveness of our method. Our code is available at https://github.com/walline/prohoc.
翻译:深度学习中的分布外(OOD)检测传统上被视为二分类任务,即样本要么被归类为已知类别,要么被标记为OOD,而很少关注OOD样本与分布内(ID)类别之间的语义关系。本文提出一种在给定类别层次结构中检测并分类OOD样本的框架。具体而言,我们的目标是将OOD数据预测至类别层次结构中正确的内部节点,而已知的ID类别则应被预测至其对应的叶节点。本方法利用类别层次结构构建概率模型,并通过使用在多个层次深度上训练的ID分类网络来实现该模型。我们在三个具有预定义类别层次结构的数据集上进行了实验,验证了本方法的有效性。相关代码已发布于 https://github.com/walline/prohoc。