{"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/semantically-coherent-out-of-distribution","title":"Semantically Coherent Out-of-Distribution Detection","arxiv_id":"2108.11941","date":"2021-08-26","proceeding":"ICCV 2021 10","authors":["Jingkang Yang","Haoqi Wang","Litong Feng","Xiaopeng Yan","Huabin Zheng","Wayne Zhang","Ziwei Liu"],"abstract":"Current out-of-distribution (OOD) detection benchmarks are commonly built by defining one dataset as in-distribution (ID) and all others as OOD. However, these benchmarks unfortunately introduce some unwanted and impractical goals, e.g., to perfectly distinguish CIFAR dogs from ImageNet dogs, even though they have the same semantics and negligible covariate shifts. These unrealistic goals will result in an extremely narrow range of model capabilities, greatly limiting their use in real applications. To overcome these drawbacks, we re-design the benchmarks and propose the semantically coherent out-of-distribution detection (SC-OOD). On the SC-OOD benchmarks, existing methods suffer from large performance degradation, suggesting that they are extremely sensitive to low-level discrepancy between data sources while ignoring their inherent semantics. To develop an effective SC-OOD detection approach, we leverage an external unlabeled set and design a concise framework featured by unsupervised dual grouping (UDG) for the joint modeling of ID and OOD data. The proposed UDG can not only enrich the semantic knowledge of the model by exploiting unlabeled data in an unsupervised manner, but also distinguish ID/OOD samples to enhance ID classification and OOD detection tasks simultaneously. Extensive experiments demonstrate that our approach achieves state-of-the-art performance on SC-OOD benchmarks. Code and benchmarks are provided on our project page: https://jingkang50.github.io/projects/scood.","url_abs":"https://arxiv.org/abs/2108.11941v1","url_pdf":"https://arxiv.org/pdf/2108.11941v1.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":"semantically-coherent-out-of-distribution","repo_url":"https://github.com/Jingkang50/ICCV21_SCOOD","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"semantically-coherent-out-of-distribution","repo_url":"https://github.com/wolfecameron/GIST","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"ood-detection","task_name":"Out of Distribution (OOD) Detection"},{"task_slug":"out-of-distribution-detection","task_name":"Out-of-Distribution Detection"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2108.11941","atlas_url":"https://app.syntology.ai/?focus=2108.11941","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2108.11941"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/wolfecameron/GIST","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Jingkang50/ICCV21_SCOOD","reach":null}],"summary":{"ran_violates":4,"ran":2,"ran_draft_wrong":1,"unverified":4},"by_repo_kind":{"official":{"samples":10,"ran":6,"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":1,"samples":[{"code_sha256_prefix":"05eda95f9800a1e9","entry":"cosine_annealing","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_violates","verification_level":2,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"05eda95f9800a1e9"}},{"code_sha256_prefix":"ca74574f5cf44300","entry":"BaseTrainer","repo":"Jingkang50/ICCV21_SCOOD","repo_kind":"official","path":"scood/trainers/udg_trainer.py","file_url":"https://github.com/Jingkang50/ICCV21_SCOOD/blob/HEAD/scood/trainers/udg_trainer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ca74574f5cf44300"}},{"code_sha256_prefix":"65ba1d56e5e30f5c","entry":"KMeans","repo":"Jingkang50/ICCV21_SCOOD","repo_kind":"official","path":"scood/trainers/udg_trainer.py","file_url":"https://github.com/Jingkang50/ICCV21_SCOOD/blob/HEAD/scood/trainers/udg_trainer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"65ba1d56e5e30f5c"}},{"code_sha256_prefix":"d8339d591bbd7f52","entry":"rew_ce","repo":"Jingkang50/ICCV21_SCOOD","repo_kind":"official","path":"scood/trainers/udg_trainer.py","file_url":"https://github.com/Jingkang50/ICCV21_SCOOD/blob/HEAD/scood/trainers/udg_trainer.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d8339d591bbd7f52"}},{"code_sha256_prefix":"31075b0878f5cb7a","entry":"rew_sce","repo":"Jingkang50/ICCV21_SCOOD","repo_kind":"official","path":"scood/trainers/udg_trainer.py","file_url":"https://github.com/Jingkang50/ICCV21_SCOOD/blob/HEAD/scood/trainers/udg_trainer.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"31075b0878f5cb7a"}},{"code_sha256_prefix":"61492b343324d2ea","entry":"soft_cross_entropy","repo":"Jingkang50/ICCV21_SCOOD","repo_kind":"official","path":"scood/trainers/udg_trainer.py","file_url":"https://github.com/Jingkang50/ICCV21_SCOOD/blob/HEAD/scood/trainers/udg_trainer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"61492b343324d2ea"}},{"code_sha256_prefix":"c8756cf28e534c80","entry":"sort_array","repo":"Jingkang50/ICCV21_SCOOD","repo_kind":"official","path":"scood/trainers/udg_trainer.py","file_url":"https://github.com/Jingkang50/ICCV21_SCOOD/blob/HEAD/scood/trainers/udg_trainer.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c8756cf28e534c80"}},{"code_sha256_prefix":"0fccde09ee48cbad","entry":"SoftCrossEntropyFunction","repo":"Jingkang50/ICCV21_SCOOD","repo_kind":"official","path":"scood/trainers/udg_trainer.py","file_url":"https://github.com/Jingkang50/ICCV21_SCOOD/blob/HEAD/scood/trainers/udg_trainer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0fccde09ee48cbad"}},{"code_sha256_prefix":"71a3dff3d948d9f4","entry":"UDGTrainer","repo":"Jingkang50/ICCV21_SCOOD","repo_kind":"official","path":"scood/trainers/udg_trainer.py","file_url":"https://github.com/Jingkang50/ICCV21_SCOOD/blob/HEAD/scood/trainers/udg_trainer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"71a3dff3d948d9f4"}},{"code_sha256_prefix":"294d6d9211fbcb70","entry":"preprocess_features","repo":"Jingkang50/ICCV21_SCOOD","repo_kind":"official","path":"scood/trainers/udg_trainer.py","file_url":"https://github.com/Jingkang50/ICCV21_SCOOD/blob/HEAD/scood/trainers/udg_trainer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"294d6d9211fbcb70"}},{"code_sha256_prefix":"b919ef68178b78aa","entry":"run_kmeans","repo":"Jingkang50/ICCV21_SCOOD","repo_kind":"official","path":"scood/trainers/udg_trainer.py","file_url":"https://github.com/Jingkang50/ICCV21_SCOOD/blob/HEAD/scood/trainers/udg_trainer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b919ef68178b78aa"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}