Kernel PCA for Out-of-Distribution Detection: Non-Linear Kernel Selections and Approximations

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Fang, Kun, Tao, Qinghua, He, Mingzhen, Lv, Kexin, Yang, Runze, Hu, Haibo, Huang, Xiaolin, Yang, Jie, Cao, Longbin
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912385484193792
author Fang, Kun
Tao, Qinghua
He, Mingzhen
Lv, Kexin
Yang, Runze
Hu, Haibo
Huang, Xiaolin
Yang, Jie
Cao, Longbin
author_facet Fang, Kun
Tao, Qinghua
He, Mingzhen
Lv, Kexin
Yang, Runze
Hu, Haibo
Huang, Xiaolin
Yang, Jie
Cao, Longbin
contents Out-of-Distribution (OoD) detection is vital for the reliability of deep neural networks, the key of which lies in effectively characterizing the disparities between OoD and In-Distribution (InD) data. In this work, such disparities are exploited through a fresh perspective of non-linear feature subspace. That is, a discriminative non-linear subspace is learned from InD features to capture representative patterns of InD, while informative patterns of OoD features cannot be well captured in such a subspace due to their different distribution. Grounded on this perspective, we exploit the deviations of InD and OoD features in such a non-linear subspace for effective OoD detection. To be specific, we leverage the framework of Kernel Principal Component Analysis (KPCA) to attain the discriminative non-linear subspace and deploy the reconstruction error on such subspace to distinguish InD and OoD data. Two challenges emerge: (i) the learning of an effective non-linear subspace, i.e., the selection of kernel function in KPCA, and (ii) the computation of the kernel matrix with large-scale InD data. For the former, we reveal two vital non-linear patterns that closely relate to the InD-OoD disparity, leading to the establishment of a Cosine-Gaussian kernel for constructing the subspace. For the latter, we introduce two techniques to approximate the Cosine-Gaussian kernel with significantly cheap computations. In particular, our approximation is further tailored by incorporating the InD data confidence, which is demonstrated to promote the learning of discriminative subspaces for OoD data. Our study presents new insights into the non-linear feature subspace for OoD detection and contributes practical explorations on the associated kernel design and efficient computations, yielding a KPCA detection method with distinctively improved efficacy and efficiency.
format Preprint
id arxiv_https___arxiv_org_abs_2505_15284
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Kernel PCA for Out-of-Distribution Detection: Non-Linear Kernel Selections and Approximations
Fang, Kun
Tao, Qinghua
He, Mingzhen
Lv, Kexin
Yang, Runze
Hu, Haibo
Huang, Xiaolin
Yang, Jie
Cao, Longbin
Machine Learning
Computer Vision and Pattern Recognition
Out-of-Distribution (OoD) detection is vital for the reliability of deep neural networks, the key of which lies in effectively characterizing the disparities between OoD and In-Distribution (InD) data. In this work, such disparities are exploited through a fresh perspective of non-linear feature subspace. That is, a discriminative non-linear subspace is learned from InD features to capture representative patterns of InD, while informative patterns of OoD features cannot be well captured in such a subspace due to their different distribution. Grounded on this perspective, we exploit the deviations of InD and OoD features in such a non-linear subspace for effective OoD detection. To be specific, we leverage the framework of Kernel Principal Component Analysis (KPCA) to attain the discriminative non-linear subspace and deploy the reconstruction error on such subspace to distinguish InD and OoD data. Two challenges emerge: (i) the learning of an effective non-linear subspace, i.e., the selection of kernel function in KPCA, and (ii) the computation of the kernel matrix with large-scale InD data. For the former, we reveal two vital non-linear patterns that closely relate to the InD-OoD disparity, leading to the establishment of a Cosine-Gaussian kernel for constructing the subspace. For the latter, we introduce two techniques to approximate the Cosine-Gaussian kernel with significantly cheap computations. In particular, our approximation is further tailored by incorporating the InD data confidence, which is demonstrated to promote the learning of discriminative subspaces for OoD data. Our study presents new insights into the non-linear feature subspace for OoD detection and contributes practical explorations on the associated kernel design and efficient computations, yielding a KPCA detection method with distinctively improved efficacy and efficiency.
title Kernel PCA for Out-of-Distribution Detection: Non-Linear Kernel Selections and Approximations
topic Machine Learning
Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2505.15284