Methods which utilize the outputs or feature representations of predictive models have emerged as promising approaches for out-of-distribution (OOD) detection of image inputs. However, these methods struggle to detect OOD inputs that share nuisance values (e.g. background) with in-distribution inputs. The detection of shared-nuisance out-of-distribution (SN-OOD) inputs is particularly relevant in real-world applications, as anomalies and in-distribution inputs tend to be captured in the same settings during deployment. In this work, we provide a possible explanation for SN-OOD detection failures and propose nuisance-aware OOD detection to address them. Nuisance-aware OOD detection substitutes a classifier trained via empirical risk minimization and cross-entropy loss with one that 1. is trained under a distribution where the nuisance-label relationship is broken and 2. yields representations that are independent of the nuisance under this distribution, both marginally and conditioned on the label. We can train a classifier to achieve these objectives using Nuisance-Randomized Distillation (NuRD), an algorithm developed for OOD generalization under spurious correlations. Output- and feature-based nuisance-aware OOD detection perform substantially better than their original counterparts, succeeding even when detection based on domain generalization algorithms fails to improve performance.
翻译:利用预测模型的输出或特征表示的方法已成为图像输入分布外(OOD)检测的有效途径。然而,这些方法难以检测与分布内输入共享干扰值(如背景)的分布外输入。在真实应用中,共享干扰的分布外(SN-OOD)输入的检测尤为重要,因为在部署过程中异常与分布内输入往往在相同场景下被捕获。本研究为SN-OOD检测失败提供了可能的解释,并提出了一种考虑干扰的OOD检测方法。该方法通过以下两点替换基于经验风险最小化和交叉熵损失训练的分类器:1. 在打破干扰-标签关系的分布上进行训练;2. 在该分布下生成与干扰独立(包括边缘独立和标签条件独立)的表征。我们可采用针对虚假相关性下OOD泛化开发的干扰随机蒸馏(NuRD)算法来训练符合上述目标的分类器。基于输出和特征的干扰感知OOD检测性能显著优于原始方法,甚至在基于域泛化算法的检测无法提升性能时仍能成功。