Out-of-distribution (OOD) detection is a crucial task for ensuring the reliability and robustness of machine learning models. Recent works have shown that generative models often assign high confidence scores to OOD samples, indicating that they fail to capture the semantic information of the data. To tackle this problem, we take advantage of sample repairing and propose a novel OOD detection framework, namely SR-OOD. Our framework leverages the idea that repairing an OOD sample can reveal its semantic inconsistency with the in-distribution data. Specifically, our framework consists of two components: a sample repairing module and a detection module. The sample repairing module applies erosion to an input sample and uses a generative adversarial network to repair it. The detection module then determines whether the input sample is OOD using a distance metric. Our framework does not require any additional data or label information for detection, making it applicable to various scenarios. We conduct extensive experiments on three image datasets: CIFAR-10, CelebA, and Pokemon. The results demonstrate that our approach achieves superior performance over the state-of-the-art generative methods in OOD detection.
翻译:分布外(OOD)检测是确保机器学习模型可靠性和鲁棒性的关键任务。近期研究表明,生成模型常为OOD样本分配高置信度分数,表明其未能有效捕捉数据的语义信息。为解决该问题,我们利用样本修复技术,提出一种新颖的OOD检测框架——SR-OOD。该框架的核心思想是:修复OOD样本可揭示其与分布内数据的语义不一致性。具体而言,我们的框架包含两个模块:样本修复模块与检测模块。样本修复模块对输入样本应用侵蚀操作,并利用生成对抗网络对其进行修复。随后,检测模块通过距离度量判定输入样本是否为OOD。该框架无需额外数据或标签信息即可完成检测,适用于多种场景。我们在三个图像数据集(CIFAR-10、CelebA、Pokemon)上进行大量实验,结果表明,我们的方法在OOD检测中相较于现有最先进的生成式方法取得了更优性能。