{"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/pursuing-feature-separation-based-on-neural","title":"Pursuing Feature Separation based on Neural Collapse for Out-of-Distribution Detection","arxiv_id":"2405.17816","date":"2024-05-28","proceeding":null,"authors":["Yingwen Wu","Ruiji Yu","Xinwen Cheng","Zhengbao He","Xiaolin Huang"],"abstract":"In the open world, detecting out-of-distribution (OOD) data, whose labels are disjoint with those of in-distribution (ID) samples, is important for reliable deep neural networks (DNNs). To achieve better detection performance, one type of approach proposes to fine-tune the model with auxiliary OOD datasets to amplify the difference between ID and OOD data through a separation loss defined on model outputs. However, none of these studies consider enlarging the feature disparity, which should be more effective compared to outputs. The main difficulty lies in the diversity of OOD samples, which makes it hard to describe their feature distribution, let alone design losses to separate them from ID features. In this paper, we neatly fence off the problem based on an aggregation property of ID features named Neural Collapse (NC). NC means that the penultimate features of ID samples within a class are nearly identical to the last layer weight of the corresponding class. Based on this property, we propose a simple but effective loss called OrthLoss, which binds the features of OOD data in a subspace orthogonal to the principal subspace of ID features formed by NC. In this way, the features of ID and OOD samples are separated by different dimensions. By optimizing the feature separation loss rather than purely enlarging output differences, our detection achieves SOTA performance on CIFAR benchmarks without any additional data augmentation or sampling, demonstrating the importance of feature separation in OOD detection. The code will be published.","url_abs":"https://arxiv.org/abs/2405.17816v1","url_pdf":"https://arxiv.org/pdf/2405.17816v1.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":[],"tasks":[{"task_slug":"data-augmentation","task_name":"Data Augmentation"},{"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=2405.17816","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.17816"}},"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/Wuyingwen/Pursuing-Feature-Separation-for-OOD-Detection","reach":{"status":"ok"}}],"summary":{"ran":4,"ran_honours":1,"unverified":1},"by_repo_kind":{"found_in_text":{"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":6,"samples":[{"code_sha256_prefix":"7242da839b9822be","entry":"fpr_and_fdr_at_recall","repo":"Wuyingwen/Pursuing-Feature-Separation-for-OOD-Detection","repo_kind":"found_in_text","path":"imagenet/utils/display_results.py","file_url":"https://github.com/Wuyingwen/Pursuing-Feature-Separation-for-OOD-Detection/blob/HEAD/imagenet/utils/display_results.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7242da839b9822be"}},{"code_sha256_prefix":"1c778310a75bf14c","entry":"get_feas_by_hook","repo":"Wuyingwen/Pursuing-Feature-Separation-for-OOD-Detection","repo_kind":"found_in_text","path":"imagenet/visualize_utils.py","file_url":"https://github.com/Wuyingwen/Pursuing-Feature-Separation-for-OOD-Detection/blob/HEAD/imagenet/visualize_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1c778310a75bf14c"}},{"code_sha256_prefix":"b9b6c36f7a3e7e67","entry":"get_measures","repo":"Wuyingwen/Pursuing-Feature-Separation-for-OOD-Detection","repo_kind":"found_in_text","path":"imagenet/utils/display_results.py","file_url":"https://github.com/Wuyingwen/Pursuing-Feature-Separation-for-OOD-Detection/blob/HEAD/imagenet/utils/display_results.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b9b6c36f7a3e7e67"}},{"code_sha256_prefix":"d4acb3120a027622","entry":"stable_cumsum","repo":"Wuyingwen/Pursuing-Feature-Separation-for-OOD-Detection","repo_kind":"found_in_text","path":"imagenet/utils/display_results.py","file_url":"https://github.com/Wuyingwen/Pursuing-Feature-Separation-for-OOD-Detection/blob/HEAD/imagenet/utils/display_results.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d4acb3120a027622"}},{"code_sha256_prefix":"7dcfb5ba6a5d53f5","entry":"subdataset","repo":"Wuyingwen/Pursuing-Feature-Separation-for-OOD-Detection","repo_kind":"found_in_text","path":"imagenet/imagenet_1k_finetune_dal.py","file_url":"https://github.com/Wuyingwen/Pursuing-Feature-Separation-for-OOD-Detection/blob/HEAD/imagenet/imagenet_1k_finetune_dal.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7dcfb5ba6a5d53f5"}},{"code_sha256_prefix":"f04f50a0d23124f5","entry":"knn","repo":"Wuyingwen/Pursuing-Feature-Separation-for-OOD-Detection","repo_kind":"found_in_text","path":"imagenet/imagenet_1k_finetune_dal.py","file_url":"https://github.com/Wuyingwen/Pursuing-Feature-Separation-for-OOD-Detection/blob/HEAD/imagenet/imagenet_1k_finetune_dal.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f04f50a0d23124f5"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}