Out-of-Distribution (OoD) detection is vital for the reliability of Deep Neural Networks (DNNs). Existing works have shown the insufficiency of Principal Component Analysis (PCA) straightforwardly applied on the features of DNNs in detecting OoD data from In-Distribution (InD) data. The failure of PCA suggests that the network features residing in OoD and InD are not well separated by simply proceeding in a linear subspace, which instead can be resolved through proper non-linear mappings. In this work, we leverage the framework of Kernel PCA (KPCA) for OoD detection, and seek suitable non-linear kernels that advocate the separability between InD and OoD data in the subspace spanned by the principal components. Besides, explicit feature mappings induced from the devoted task-specific kernels are adopted so that the KPCA reconstruction error for new test samples can be efficiently obtained with large-scale data. Extensive theoretical and empirical results on multiple OoD data sets and network structures verify the superiority of our KPCA detector in efficiency and efficacy with state-of-the-art detection performance.
翻译:分布外(OoD)检测对于深度神经网络(DNN)的可靠性至关重要。现有研究表明,直接将主成分分析(PCA)应用于DNN特征以区分分布外(OoD)数据与分布内(InD)数据存在不足。PCA的失效表明,网络特征在OoD与InD之间的区分无法通过简单的线性子空间处理实现,而适当的非线性映射可以解决此问题。本研究利用核主成分分析(KPCA)框架进行OoD检测,并寻求合适的非线性核函数,以增强主成分张成的子空间中InD与OoD数据的可分离性。此外,通过采用由特定任务核函数诱导的显式特征映射,能够在大规模数据下高效计算新测试样本的KPCA重构误差。在多个OoD数据集和网络结构上的大量理论与实证结果验证了所提出的KPCA检测器在效率与效能上的优越性,其检测性能达到了当前最优水平。