Bridging OOD Detection and Generalization: A Graph-Theoretic View

Han Wang,Yixuan Li
2024-09-27
Abstract:In the context of modern machine learning, models deployed in real-world scenarios often encounter diverse data shifts like covariate and semantic shifts, leading to challenges in both out-of-distribution (OOD) generalization and detection. Despite considerable attention to these issues separately, a unified framework for theoretical understanding and practical usage is lacking. To bridge the gap, we introduce a graph-theoretic framework to jointly tackle both OOD generalization and detection problems. By leveraging the graph formulation, data representations are obtained through the factorization of the graph's adjacency matrix, enabling us to derive provable error quantifying OOD generalization and detection performance. Empirical results showcase competitive performance in comparison to existing methods, thereby validating our theoretical underpinnings. Code is publicly available at <a class="link-external link-https" href="https://github.com/deeplearning-wisc/graph-spectral-ood" rel="external noopener nofollow">this https URL</a>.
Machine Learning
What problem does this paper attempt to address?
The paper attempts to address the issue that in real-world application scenarios, machine learning models often encounter various data shifts (such as covariate shift and semantic shift) that differ from the training data distribution. This poses challenges for the model in terms of Out-of-Distribution (OOD) generalization and detection. Although there has been a lot of research on these issues, there is a lack of a unified framework to simultaneously understand and solve both problems. Therefore, the paper proposes a graph theory-based approach that constructs a graph structure to handle both OOD generalization and detection issues simultaneously. By performing spectral decomposition of the graph, data representations are obtained, which can derive provable errors regarding OOD generalization and detection performance. This method not only provides a theoretical understanding of the impact on OOD generalization and detection but also performs excellently in practice, outperforming existing methods.