Out-of-distribution (OOD) detection is a critical task in machine learning that seeks to identify abnormal samples. Traditionally, unsupervised methods utilize a deep generative model for OOD detection. However, such approaches necessitate a different model when evaluating abnormality against a new distribution. With the emergence of foundational generative models, this paper explores whether a single generalist model can also perform OOD detection across diverse tasks. To that end, we introduce our method, Diffusion Paths, (DiffPath) in this work. DiffPath proposes to utilize a single diffusion model originally trained to perform unconditional generation for OOD detection. Specifically, we introduce a novel technique of measuring the rate-of-change and curvature of the diffusion paths connecting samples to the standard normal. Extensive experiments show that with a single model, DiffPath outperforms prior work on a variety of OOD tasks involving different distributions. Our code is publicly available at https://github.com/clear-nus/diffpath.
翻译:分布外(OOD)检测是机器学习中一项关键任务,旨在识别异常样本。传统上,无监督方法利用深度生成模型进行OOD检测。然而,这类方法在评估针对新分布异常的检测时,需要采用不同的模型。随着基础生成模型的出现,本文探讨了单个通用模型是否也能在不同任务中执行OOD检测。为此,我们提出了名为"扩散路径"(DiffPath)的方法。DiffPath提出利用原本为执行无条件生成而训练的单个扩散模型进行OOD检测。具体而言,我们引入了一种新技术,通过测量连接样本与标准正态分布之间扩散路径的变化率和曲率。大量实验表明,使用单个模型,DiffPath在涉及不同分布的多种OOD任务中优于先前的工作。我们的代码已在https://github.com/clear-nus/diffpath 公开。