{"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/cadref-robust-out-of-distribution-detection","title":"CADRef: Robust Out-of-Distribution Detection via Class-Aware Decoupled Relative Feature Leveraging","arxiv_id":"2503.00325","date":"2025-03-01","proceeding":"CVPR 2025 1","authors":["Zhiwei Ling","Yachen Chang","Hailiang Zhao","Xinkui Zhao","Kingsum Chow","Shuiguang Deng"],"abstract":"Deep neural networks (DNNs) have been widely criticized for their overconfidence when dealing with out-of-distribution (OOD) samples, highlighting the critical need for effective OOD detection to ensure the safe deployment of DNNs in real-world settings. Existing post-hoc OOD detection methods primarily enhance the discriminative power of logit-based approaches by reshaping sample features, yet they often neglect critical information inherent in the features themselves. In this paper, we propose the Class-Aware Relative Feature-based method (CARef), which utilizes the error between a sample's feature and its class-aware average feature as a discriminative criterion. To further refine this approach, we introduce the Class-Aware Decoupled Relative Feature-based method (CADRef), which decouples sample features based on the alignment of signs between the relative feature and corresponding model weights, enhancing the discriminative capabilities of CARef. Extensive experimental results across multiple datasets and models demonstrate that both proposed methods exhibit effectiveness and robustness in OOD detection compared to state-of-the-art methods. Specifically, our two methods outperform the best baseline by 2.82% and 3.27% in AUROC, with improvements of 4.03% and 6.32% in FPR95, respectively.","url_abs":"https://arxiv.org/abs/2503.00325v1","url_pdf":"https://arxiv.org/pdf/2503.00325v1.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":"cadref-robust-out-of-distribution-detection","repo_url":"https://github.com/LingAndZero/CADRef","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"out-of-distribution-detection","task_name":"Out-of-Distribution Detection"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2503.00325","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2503.00325"}},"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/LingAndZero/CADRef","reach":null}],"summary":{"ran_draft_wrong":4,"ran":1,"unverified":1},"by_repo_kind":{"listed":{"samples":6,"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":"cf5c68239623ca3b","entry":"energy","repo":"LingAndZero/CADRef","repo_kind":"listed","path":"ood_methods/CADRef.py","file_url":"https://github.com/LingAndZero/CADRef/blob/HEAD/ood_methods/CADRef.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"CC0-1.0","inline_ok":true,"mcp_get_code":{"code_sha256":"cf5c68239623ca3b"}},{"code_sha256_prefix":"0935583dca415040","entry":"gen","repo":"LingAndZero/CADRef","repo_kind":"listed","path":"ood_methods/CADRef.py","file_url":"https://github.com/LingAndZero/CADRef/blob/HEAD/ood_methods/CADRef.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"CC0-1.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0935583dca415040"}},{"code_sha256_prefix":"0a4d1b7fc57d721e","entry":"get_linear_layer_mapping","repo":"LingAndZero/CADRef","repo_kind":"listed","path":"ood_methods/CADRef.py","file_url":"https://github.com/LingAndZero/CADRef/blob/HEAD/ood_methods/CADRef.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"CC0-1.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0a4d1b7fc57d721e"}},{"code_sha256_prefix":"da6cb1f2e3ef6b3f","entry":"maxLogits","repo":"LingAndZero/CADRef","repo_kind":"listed","path":"ood_methods/CADRef.py","file_url":"https://github.com/LingAndZero/CADRef/blob/HEAD/ood_methods/CADRef.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"CC0-1.0","inline_ok":true,"mcp_get_code":{"code_sha256":"da6cb1f2e3ef6b3f"}},{"code_sha256_prefix":"c8cce19efd0789e0","entry":"msp","repo":"LingAndZero/CADRef","repo_kind":"listed","path":"ood_methods/CADRef.py","file_url":"https://github.com/LingAndZero/CADRef/blob/HEAD/ood_methods/CADRef.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"CC0-1.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c8cce19efd0789e0"}},{"code_sha256_prefix":"493e4322369ccd54","entry":"CADRef","repo":"LingAndZero/CADRef","repo_kind":"listed","path":"ood_methods/CADRef.py","file_url":"https://github.com/LingAndZero/CADRef/blob/HEAD/ood_methods/CADRef.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"CC0-1.0","inline_ok":true,"mcp_get_code":{"code_sha256":"493e4322369ccd54"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}