{"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-yields-positive-unified-dual-path","title":"Enhancing Vision-Language Few-Shot Adaptation with Negative Learning","arxiv_id":"2403.12964","date":"2024-03-19","proceeding":null,"authors":["Ce Zhang","Simon Stepputtis","Katia Sycara","Yaqi Xie"],"abstract":"Large-scale pre-trained Vision-Language Models (VLMs) have exhibited impressive zero-shot performance and transferability, allowing them to adapt to downstream tasks in a data-efficient manner. However, when only a few labeled samples are available, adapting VLMs to distinguish subtle differences between similar classes in specific downstream tasks remains challenging. In this work, we propose a Simple yet effective Negative Learning approach, SimNL, to more efficiently exploit the task-specific knowledge from few-shot labeled samples. Unlike previous methods that focus on identifying a set of representative positive features defining \"what is a {CLASS}\", SimNL discovers a complementary set of negative features that define \"what is not a {CLASS}\", providing additional insights that supplement the positive features to enhance task-specific recognition capability. Further, we identify that current adaptation approaches are particularly vulnerable to potential noise in the few-shot sample set. To mitigate this issue, we introduce a plug-and-play few-shot instance reweighting technique to suppress noisy outliers and amplify clean samples for more stable adaptation. Our extensive experimental results across 15 datasets validate that the proposed SimNL outperforms existing state-of-the-art methods on both few-shot learning and domain generalization tasks while achieving competitive computational efficiency. Code is available at https://github.com/zhangce01/SimNL.","url_abs":"https://arxiv.org/abs/2403.12964v2","url_pdf":"https://arxiv.org/pdf/2403.12964v2.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-yields-positive-unified-dual-path","repo_url":"https://github.com/zhangce01/dualadapter","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"negative-yields-positive-unified-dual-path","repo_url":"https://github.com/zhangce01/simnl","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"computational-efficiency","task_name":"Computational Efficiency"},{"task_slug":"domain-generalization","task_name":"Domain Generalization"},{"task_slug":"few-shot-learning","task_name":"Few-Shot Learning"}],"methods":[{"method_slug":"focus","method_name":"Focus"},{"method_slug":"set","method_name":"SET"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2403.12964","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.12964"}},"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/zhangce01/dualadapter","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zhangce01/simnl","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":3,"ran":2,"unverified":3},"by_repo_kind":{"official":{"samples":8,"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":"98f385d847636a3e","entry":"basic_clean","repo":"zhangce01/dualadapter","repo_kind":"official","path":"clip/simple_tokenizer.py","file_url":"https://github.com/zhangce01/dualadapter/blob/HEAD/clip/simple_tokenizer.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"98f385d847636a3e"}},{"code_sha256_prefix":"d919ae32e5e4e616","entry":"get_pairs","repo":"zhangce01/dualadapter","repo_kind":"official","path":"clip/simple_tokenizer.py","file_url":"https://github.com/zhangce01/dualadapter/blob/HEAD/clip/simple_tokenizer.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d919ae32e5e4e616"}},{"code_sha256_prefix":"98959a36f76d691e","entry":"load_few_shot_feature","repo":"zhangce01/dualadapter","repo_kind":"official","path":"utils.py","file_url":"https://github.com/zhangce01/dualadapter/blob/HEAD/utils.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":"98959a36f76d691e"}},{"code_sha256_prefix":"a44e1ca49828cc93","entry":"load_text_feature","repo":"zhangce01/dualadapter","repo_kind":"official","path":"utils.py","file_url":"https://github.com/zhangce01/dualadapter/blob/HEAD/utils.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":"a44e1ca49828cc93"}},{"code_sha256_prefix":"9542161e9640b858","entry":"whitespace_clean","repo":"zhangce01/dualadapter","repo_kind":"official","path":"clip/simple_tokenizer.py","file_url":"https://github.com/zhangce01/dualadapter/blob/HEAD/clip/simple_tokenizer.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9542161e9640b858"}},{"code_sha256_prefix":"6a9aff2f8e7115de","entry":"build_model","repo":"zhangce01/dualadapter","repo_kind":"official","path":"clip/model.py","file_url":"https://github.com/zhangce01/dualadapter/blob/HEAD/clip/model.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":"6a9aff2f8e7115de"}},{"code_sha256_prefix":"f2a0a5061e7c204e","entry":"cls_acc","repo":"zhangce01/dualadapter","repo_kind":"official","path":"utils.py","file_url":"https://github.com/zhangce01/dualadapter/blob/HEAD/utils.py","link_basis":"harvester_set","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":"f2a0a5061e7c204e"}},{"code_sha256_prefix":"db64af1ba3479e8d","entry":"load","repo":"zhangce01/dualadapter","repo_kind":"official","path":"clip/clip.py","file_url":"https://github.com/zhangce01/dualadapter/blob/HEAD/clip/clip.py","link_basis":"harvester_set","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":"db64af1ba3479e8d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}