{"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/out-of-distribution-detection-with-1","title":"Out-Of-Distribution Detection with Diversification (Provably)","arxiv_id":"2411.14049","date":"2024-11-21","proceeding":null,"authors":["Haiyun Yao","Zongbo Han","Huazhu Fu","Xi Peng","QinGhua Hu","Changqing Zhang"],"abstract":"Out-of-distribution (OOD) detection is crucial for ensuring reliable deployment of machine learning models. Recent advancements focus on utilizing easily accessible auxiliary outliers (e.g., data from the web or other datasets) in training. However, we experimentally reveal that these methods still struggle to generalize their detection capabilities to unknown OOD data, due to the limited diversity of the auxiliary outliers collected. Therefore, we thoroughly examine this problem from the generalization perspective and demonstrate that a more diverse set of auxiliary outliers is essential for enhancing the detection capabilities. However, in practice, it is difficult and costly to collect sufficiently diverse auxiliary outlier data. Therefore, we propose a simple yet practical approach with a theoretical guarantee, termed Diversity-induced Mixup for OOD detection (diverseMix), which enhances the diversity of auxiliary outlier set for training in an efficient way. Extensive experiments show that diverseMix achieves superior performance on commonly used and recent challenging large-scale benchmarks, which further confirm the importance of the diversity of auxiliary outliers.","url_abs":"https://arxiv.org/abs/2411.14049v1","url_pdf":"https://arxiv.org/pdf/2411.14049v1.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":"out-of-distribution-detection-with-1","repo_url":"https://github.com/haiyunyao/diversemix","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"diversity","task_name":"Diversity"},{"task_slug":"ood-detection","task_name":"Out of Distribution (OOD) Detection"},{"task_slug":"out-of-distribution-detection","task_name":"Out-of-Distribution Detection"}],"methods":[{"method_slug":"focus","method_name":"Focus"},{"method_slug":"mixup","method_name":"Mixup"},{"method_slug":"set","method_name":"SET"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2411.14049","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2411.14049"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/haiyunyao/diversemix","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":1,"unverified":11},"by_repo_kind":{"official":{"samples":12,"ran":1,"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":12,"samples":[{"code_sha256_prefix":"8511dff685e73d9d","entry":"get_msp_score","repo":"haiyunyao/diversemix","repo_kind":"official","path":"eval_ood_detection.py","file_url":"https://github.com/haiyunyao/diversemix/blob/HEAD/eval_ood_detection.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8511dff685e73d9d"}},{"code_sha256_prefix":"4335cdb8bdf70aa0","entry":"Imagenet200_800_loader","repo":"haiyunyao/diversemix","repo_kind":"official","path":"utils/imagenet1k_loader.py","file_url":"https://github.com/haiyunyao/diversemix/blob/HEAD/utils/imagenet1k_loader.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":"4335cdb8bdf70aa0"}},{"code_sha256_prefix":"f0c9a29156911331","entry":"accuracy","repo":"haiyunyao/diversemix","repo_kind":"official","path":"train_diverseMix.py","file_url":"https://github.com/haiyunyao/diversemix/blob/HEAD/train_diverseMix.py","link_basis":"plan_row","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":"f0c9a29156911331"}},{"code_sha256_prefix":"19a1562ecc07342e","entry":"cal_metric","repo":"haiyunyao/diversemix","repo_kind":"official","path":"compute_metrics.py","file_url":"https://github.com/haiyunyao/diversemix/blob/HEAD/compute_metrics.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":"19a1562ecc07342e"}},{"code_sha256_prefix":"96aa26ad0e39af8d","entry":"get_aupr_in","repo":"haiyunyao/diversemix","repo_kind":"official","path":"compute_metrics.py","file_url":"https://github.com/haiyunyao/diversemix/blob/HEAD/compute_metrics.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":"96aa26ad0e39af8d"}},{"code_sha256_prefix":"632f682cbeef65ca","entry":"get_aupr_out","repo":"haiyunyao/diversemix","repo_kind":"official","path":"compute_metrics.py","file_url":"https://github.com/haiyunyao/diversemix/blob/HEAD/compute_metrics.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":"632f682cbeef65ca"}},{"code_sha256_prefix":"486627d2c362021e","entry":"get_energy_score","repo":"haiyunyao/diversemix","repo_kind":"official","path":"eval_ood_detection.py","file_url":"https://github.com/haiyunyao/diversemix/blob/HEAD/eval_ood_detection.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":"486627d2c362021e"}},{"code_sha256_prefix":"1a260b26c34c51f1","entry":"get_ood_score","repo":"haiyunyao/diversemix","repo_kind":"official","path":"eval_ood_detection.py","file_url":"https://github.com/haiyunyao/diversemix/blob/HEAD/eval_ood_detection.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":"1a260b26c34c51f1"}},{"code_sha256_prefix":"400566ccc0e9397f","entry":"set_ood_loader_ImageNet","repo":"haiyunyao/diversemix","repo_kind":"official","path":"utils/dataloaders_utils.py","file_url":"https://github.com/haiyunyao/diversemix/blob/HEAD/utils/dataloaders_utils.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":"400566ccc0e9397f"}},{"code_sha256_prefix":"9b59d054726f50bc","entry":"set_train_loader","repo":"haiyunyao/diversemix","repo_kind":"official","path":"utils/dataloaders_utils.py","file_url":"https://github.com/haiyunyao/diversemix/blob/HEAD/utils/dataloaders_utils.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":"9b59d054726f50bc"}},{"code_sha256_prefix":"10ce0e72284c6061","entry":"set_val_loader","repo":"haiyunyao/diversemix","repo_kind":"official","path":"utils/dataloaders_utils.py","file_url":"https://github.com/haiyunyao/diversemix/blob/HEAD/utils/dataloaders_utils.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":"10ce0e72284c6061"}},{"code_sha256_prefix":"4ebc0e09cb353eac","entry":"unpickle","repo":"haiyunyao/diversemix","repo_kind":"official","path":"utils/imagenet_loader.py","file_url":"https://github.com/haiyunyao/diversemix/blob/HEAD/utils/imagenet_loader.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":"4ebc0e09cb353eac"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}