This paper focuses on a significant yet challenging task: out-of-distribution detection (OOD detection), which aims to distinguish and reject test samples with semantic shifts, so as to prevent models trained on in-distribution (ID) data from producing unreliable predictions. Although previous works have made decent success, they are ineffective for real-world challenging applications since these methods simply regard all unlabeled data as OOD data and ignore the case that different datasets have different label granularity. For example, "cat" on CIFAR-10 and "tabby cat" on Tiny-ImageNet share the same semantics but have different labels due to various label granularity. To this end, in this paper, we propose a novel Adaptive Hierarchical Graph Cut network (AHGC) to deeply explore the semantic relationship between different images. Specifically, we construct a hierarchical KNN graph to evaluate the similarities between different images based on the cosine similarity. Based on the linkage and density information of the graph, we cut the graph into multiple subgraphs to integrate these semantics-similar samples. If the labeled percentage in a subgraph is larger than a threshold, we will assign the label with the highest percentage to unlabeled images. To further improve the model generalization, we augment each image into two augmentation versions, and maximize the similarity between the two versions. Finally, we leverage the similarity score for OOD detection. Extensive experiments on two challenging benchmarks (CIFAR- 10 and CIFAR-100) illustrate that in representative cases, AHGC outperforms state-of-the-art OOD detection methods by 81.24% on CIFAR-100 and by 40.47% on CIFAR-10 in terms of "FPR95", which shows the effectiveness of our AHGC.
翻译:本文聚焦于一项重要且具有挑战性的任务:分布外检测(OOD检测),其旨在区分并拒绝具有语义偏移的测试样本,以防止在分布内(ID)数据上训练的模型产生不可靠的预测。尽管先前的研究已取得不错成果,但这些方法通常将所有未标记数据简单地视为OOD数据,忽略了不同数据集可能具有不同标签粒度的情况,因此难以应对现实世界中具有挑战性的应用。例如,CIFAR-10中的"猫"与Tiny-ImageNet中的"虎斑猫"具有相同的语义,却因标签粒度不同而被赋予不同标签。为此,本文提出了一种新颖的自适应层次图割网络(AHGC),以深入探索不同图像间的语义关系。具体而言,我们构建了一个层次化K近邻图,基于余弦相似度评估不同图像间的相似性。利用图的连接性和密度信息,我们将图分割成多个子图,以整合这些语义相似的样本。若子图中已标记样本的比例超过阈值,我们将把出现频率最高的标签分配给该子图中的未标记图像。为进一步提升模型泛化能力,我们对每张图像生成两种增强版本,并最大化这两个版本之间的相似性。最后,我们利用相似性得分进行OOD检测。在两个具有挑战性的基准数据集(CIFAR-10和CIFAR-100)上进行的大量实验表明,在代表性案例中,AHGC在"FPR95"指标上分别以81.24%(CIFAR-100)和40.47%(CIFAR-10)的优势超越了当前最先进的OOD检测方法,这证明了我们提出的AHGC的有效性。