{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/bridging-ood-detection-and-generalization-a","title":"Bridging OOD Detection and Generalization: A Graph-Theoretic View","arxiv_id":"2409.18205","date":"2024-09-26","proceeding":null,"authors":["Han Wang","Yixuan Li"],"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 https://github.com/deeplearning-wisc/graph-spectral-ood.","url_abs":"https://arxiv.org/abs/2409.18205v1","url_pdf":"https://arxiv.org/pdf/2409.18205v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"bridging-ood-detection-and-generalization-a","repo_url":"https://github.com/deeplearning-wisc/graph-spectral-ood","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[],"methods":[{"method_slug":"attention","method_name":"Attention"},{"method_slug":"softmax","method_name":"Softmax"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2409.18205","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2409.18205"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/deeplearning-wisc/graph-spectral-ood","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":4,"ran_draft_wrong":1,"unverified":3},"by_repo_kind":{"official":{"samples":8,"ran":5,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"17bbd961aaf86569","entry":"ODIN","repo":"deeplearning-wisc/graph-spectral-ood","repo_kind":"official","path":"utils/score_calculation.py","file_url":"https://github.com/deeplearning-wisc/graph-spectral-ood/blob/HEAD/utils/score_calculation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"17bbd961aaf86569"}},{"code_sha256_prefix":"24f5b40495bb542e","entry":"get_Mahalanobis_score","repo":"deeplearning-wisc/graph-spectral-ood","repo_kind":"official","path":"utils/score_calculation.py","file_url":"https://github.com/deeplearning-wisc/graph-spectral-ood/blob/HEAD/utils/score_calculation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"24f5b40495bb542e"}},{"code_sha256_prefix":"3ad01de2f86dccba","entry":"get_ood_scores_odin","repo":"deeplearning-wisc/graph-spectral-ood","repo_kind":"official","path":"utils/score_calculation.py","file_url":"https://github.com/deeplearning-wisc/graph-spectral-ood/blob/HEAD/utils/score_calculation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3ad01de2f86dccba"}},{"code_sha256_prefix":"00b7465723fc955d","entry":"load_CorCifar","repo":"deeplearning-wisc/graph-spectral-ood","repo_kind":"official","path":"CIFAR/make_datasets.py","file_url":"https://github.com/deeplearning-wisc/graph-spectral-ood/blob/HEAD/CIFAR/make_datasets.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"00b7465723fc955d"}},{"code_sha256_prefix":"b645d731bc4d2de3","entry":"normalized_thresh","repo":"deeplearning-wisc/graph-spectral-ood","repo_kind":"official","path":"CIFAR/models/wrn.py","file_url":"https://github.com/deeplearning-wisc/graph-spectral-ood/blob/HEAD/CIFAR/models/wrn.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b645d731bc4d2de3"}},{"code_sha256_prefix":"2b388cb209f9ada4","entry":"load_CIFAR","repo":"deeplearning-wisc/graph-spectral-ood","repo_kind":"official","path":"CIFAR/make_datasets.py","file_url":"https://github.com/deeplearning-wisc/graph-spectral-ood/blob/HEAD/CIFAR/make_datasets.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2b388cb209f9ada4"}},{"code_sha256_prefix":"c63450f1ff9c5044","entry":"load_CorImageNet","repo":"deeplearning-wisc/graph-spectral-ood","repo_kind":"official","path":"CIFAR/make_datasets.py","file_url":"https://github.com/deeplearning-wisc/graph-spectral-ood/blob/HEAD/CIFAR/make_datasets.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c63450f1ff9c5044"}},{"code_sha256_prefix":"4ebc0e09cb353eac","entry":"unpickle","repo":"deeplearning-wisc/graph-spectral-ood","repo_kind":"official","path":"utils/imagenet_rc_loader.py","file_url":"https://github.com/deeplearning-wisc/graph-spectral-ood/blob/HEAD/utils/imagenet_rc_loader.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4ebc0e09cb353eac"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}