{"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/negative-label-guided-ood-detection-with","title":"Negative Label Guided OOD Detection with Pretrained Vision-Language Models","arxiv_id":"2403.20078","date":"2024-03-29","proceeding":null,"authors":["Xue Jiang","Feng Liu","Zhen Fang","Hong Chen","Tongliang Liu","Feng Zheng","Bo Han"],"abstract":"Out-of-distribution (OOD) detection aims at identifying samples from unknown classes, playing a crucial role in trustworthy models against errors on unexpected inputs. Extensive research has been dedicated to exploring OOD detection in the vision modality. Vision-language models (VLMs) can leverage both textual and visual information for various multi-modal applications, whereas few OOD detection methods take into account information from the text modality. In this paper, we propose a novel post hoc OOD detection method, called NegLabel, which takes a vast number of negative labels from extensive corpus databases. We design a novel scheme for the OOD score collaborated with negative labels. Theoretical analysis helps to understand the mechanism of negative labels. Extensive experiments demonstrate that our method NegLabel achieves state-of-the-art performance on various OOD detection benchmarks and generalizes well on multiple VLM architectures. Furthermore, our method NegLabel exhibits remarkable robustness against diverse domain shifts. The codes are available at https://github.com/tmlr-group/NegLabel.","url_abs":"https://arxiv.org/abs/2403.20078v1","url_pdf":"https://arxiv.org/pdf/2403.20078v1.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":"negative-label-guided-ood-detection-with","repo_url":"https://github.com/tmlr-group/neglabel","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"negative-label-guided-ood-detection-with","repo_url":"https://github.com/ma-kjh/CMA-OoDD","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"}],"methods":[{"method_slug":"hoc","method_name":"HOC"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2403.20078","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.20078"}},"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/tmlr-group/NegLabel","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/tmlr-group/neglabel","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ma-kjh/CMA-OoDD","reach":null}],"summary":{"ran":8,"ran_draft_wrong":1},"by_repo_kind":{"official":{"samples":8,"ran":8,"repositories":1},"listed":{"samples":1,"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":1,"samples":[{"code_sha256_prefix":"9d9b0c55c72acf25","entry":"annealing_cos","repo":"tmlr-group/NegLabel","repo_kind":"official","path":"mmcls/core/hook/lr_updater.py","file_url":"https://github.com/tmlr-group/NegLabel/blob/HEAD/mmcls/core/hook/lr_updater.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9d9b0c55c72acf25"}},{"code_sha256_prefix":"ba5c9a7d1e9798a4","entry":"average_performance","repo":"tmlr-group/NegLabel","repo_kind":"official","path":"mmcls/core/evaluation/multilabel_eval_metrics.py","file_url":"https://github.com/tmlr-group/NegLabel/blob/HEAD/mmcls/core/evaluation/multilabel_eval_metrics.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":"ba5c9a7d1e9798a4"}},{"code_sha256_prefix":"84f39870fe2090bf","entry":"average_precision","repo":"tmlr-group/NegLabel","repo_kind":"official","path":"mmcls/core/evaluation/mean_ap.py","file_url":"https://github.com/tmlr-group/NegLabel/blob/HEAD/mmcls/core/evaluation/mean_ap.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"84f39870fe2090bf"}},{"code_sha256_prefix":"7aa2a71e9cdafd0a","entry":"calculate_confusion_matrix","repo":"tmlr-group/NegLabel","repo_kind":"official","path":"mmcls/core/evaluation/eval_metrics.py","file_url":"https://github.com/tmlr-group/NegLabel/blob/HEAD/mmcls/core/evaluation/eval_metrics.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":"7aa2a71e9cdafd0a"}},{"code_sha256_prefix":"0e9e0f266b072182","entry":"concatenate_and_scale","repo":"ma-kjh/CMA-OoDD","repo_kind":"listed","path":"inference.py","file_url":"https://github.com/ma-kjh/CMA-OoDD/blob/HEAD/inference.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0e9e0f266b072182"}},{"code_sha256_prefix":"3246acca1a5877de","entry":"mAP","repo":"tmlr-group/NegLabel","repo_kind":"official","path":"mmcls/core/evaluation/mean_ap.py","file_url":"https://github.com/tmlr-group/NegLabel/blob/HEAD/mmcls/core/evaluation/mean_ap.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3246acca1a5877de"}},{"code_sha256_prefix":"8555810d566238b0","entry":"precision","repo":"tmlr-group/NegLabel","repo_kind":"official","path":"mmcls/core/evaluation/eval_metrics.py","file_url":"https://github.com/tmlr-group/NegLabel/blob/HEAD/mmcls/core/evaluation/eval_metrics.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":"8555810d566238b0"}},{"code_sha256_prefix":"3b86f0a822461cbf","entry":"precision_recall_f1","repo":"tmlr-group/NegLabel","repo_kind":"official","path":"mmcls/core/evaluation/eval_metrics.py","file_url":"https://github.com/tmlr-group/NegLabel/blob/HEAD/mmcls/core/evaluation/eval_metrics.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":"3b86f0a822461cbf"}},{"code_sha256_prefix":"84b0ff113e7a1efe","entry":"scaled_all_reduce","repo":"tmlr-group/NegLabel","repo_kind":"official","path":"mmcls/core/hook/precise_bn_hook.py","file_url":"https://github.com/tmlr-group/NegLabel/blob/HEAD/mmcls/core/hook/precise_bn_hook.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":"84b0ff113e7a1efe"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}