{"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/arxiv-2603-24181","title":"Unlocking Few-Shot Capabilities in LVLMs via Prompt Conditioning and Head Selection","arxiv_id":"2603.24181","date":"2026-03-25","proceeding":null,"authors":["Adhemar de Senneville","Xavier Bou","Jérémy Anger","Rafael Grompone","Gabriele Facciolo"],"abstract":"Current Large Vision Language Models (LVLMs) excel at many zero-shot tasks like image captioning, visual question answering and OCR. However, these same models suffer from poor performance at image classification tasks, underperforming against CLIP-based methods. Notably, this gap is surprising because many LVLMs use CLIP-pretrained vision encoders. Yet LVLMs are not inherently limited by CLIP's architecture with independent vision and text encoders. In CLIP, this separation biases classification toward class-name matching rather than joint visual-text reasoning. In this paper we show that, despite their poor raw performance, LVLMs can improve visual feature class separability at inference using prompt conditioning, and LVLMs' internal representations, especially attention heads, can outperform the model itself at zero-shot and few-shot classification. We introduce Head Ensemble Classifiers (HEC) to bridge the performance gap between CLIP-based and LVLM-based classification methods. Inspired by Gaussian Discriminant Analysis, HEC ranks the most discriminative vision and text heads and combines them into a training-free classifier. We show that HEC achieves state-of-the-art performance in few-shot and zero-shot classification across 12 datasets.","url_abs":"https://arxiv.org/abs/2603.24181","url_pdf":"https://arxiv.org/pdf/2603.24181","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2603.24181","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2603.24181"}},"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":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/mrflogs/ICLR24","reach":null},{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/rashindrie/DIPA","reach":null},{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/AdhemarDeSenneville/HEC","reach":null},{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/ybendou/ProKeR","reach":null},{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/gaopengcuhk/Tip-Adapter","reach":null}],"summary":{"ran":1,"ran_fixture":4,"ran_draft_wrong":2,"ran_honours":1,"unverified":11},"by_repo_kind":{"found_in_text":{"samples":19,"ran":8,"repositories":4}},"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":16,"samples":[{"code_sha256_prefix":"9ce04136606729c3","entry":"Classifier","repo":"AdhemarDeSenneville/HEC","repo_kind":"found_in_text","path":"src/fewshot/classifier.py","file_url":"https://github.com/AdhemarDeSenneville/HEC/blob/HEAD/src/fewshot/classifier.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":"9ce04136606729c3"}},{"code_sha256_prefix":"e57ad1054530e142","entry":"build_cache_model","repo":"gaopengcuhk/Tip-Adapter","repo_kind":"found_in_text","path":"utils.py","file_url":"https://github.com/gaopengcuhk/Tip-Adapter/blob/HEAD/utils.py","link_basis":"plan_row","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e57ad1054530e142"}},{"code_sha256_prefix":"d919ae32e5e4e616","entry":"get_pairs","repo":"gaopengcuhk/Tip-Adapter","repo_kind":"found_in_text","path":"clip/simple_tokenizer.py","file_url":"https://github.com/gaopengcuhk/Tip-Adapter/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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d919ae32e5e4e616"}},{"code_sha256_prefix":"5e18ce0e1f3bf838","entry":"get_top_heads_V","repo":"AdhemarDeSenneville/HEC","repo_kind":"found_in_text","path":"src/fewshot/classifier.py","file_url":"https://github.com/AdhemarDeSenneville/HEC/blob/HEAD/src/fewshot/classifier.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5e18ce0e1f3bf838"}},{"code_sha256_prefix":"ea8d5fd6970f79fb","entry":"get_vecs","repo":"mrflogs/ICLR24","repo_kind":"found_in_text","path":"main_robustness.py","file_url":"https://github.com/mrflogs/ICLR24/blob/HEAD/main_robustness.py","link_basis":"plan_row","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ea8d5fd6970f79fb"}},{"code_sha256_prefix":"ab796c2494f06d76","entry":"run","repo":"mrflogs/ICLR24","repo_kind":"found_in_text","path":"main_few_shots.py","file_url":"https://github.com/mrflogs/ICLR24/blob/HEAD/main_few_shots.py","link_basis":"plan_row","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ab796c2494f06d76"}},{"code_sha256_prefix":"c7e15186f6aeadec","entry":"run","repo":"mrflogs/ICLR24","repo_kind":"found_in_text","path":"main_robustness.py","file_url":"https://github.com/mrflogs/ICLR24/blob/HEAD/main_robustness.py","link_basis":"plan_row","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c7e15186f6aeadec"}},{"code_sha256_prefix":"9542161e9640b858","entry":"whitespace_clean","repo":"gaopengcuhk/Tip-Adapter","repo_kind":"found_in_text","path":"clip/simple_tokenizer.py","file_url":"https://github.com/gaopengcuhk/Tip-Adapter/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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9542161e9640b858"}},{"code_sha256_prefix":"54780f0f8c28320a","entry":"ClassifierHEC_V","repo":"AdhemarDeSenneville/HEC","repo_kind":"found_in_text","path":"src/fewshot/classifier.py","file_url":"https://github.com/AdhemarDeSenneville/HEC/blob/HEAD/src/fewshot/classifier.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":"54780f0f8c28320a"}},{"code_sha256_prefix":"13f44a66c02770fe","entry":"RBF_Kernel","repo":"ybendou/ProKeR","repo_kind":"found_in_text","path":"trainers/proker.py","file_url":"https://github.com/ybendou/ProKeR/blob/HEAD/trainers/proker.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"13f44a66c02770fe"}},{"code_sha256_prefix":"f3830274a7e18d5e","entry":"build_model","repo":"gaopengcuhk/Tip-Adapter","repo_kind":"found_in_text","path":"clip/model.py","file_url":"https://github.com/gaopengcuhk/Tip-Adapter/blob/HEAD/clip/model.py","link_basis":"harvester_set","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":"f3830274a7e18d5e"}},{"code_sha256_prefix":"f2a0a5061e7c204e","entry":"cls_acc","repo":"gaopengcuhk/Tip-Adapter","repo_kind":"found_in_text","path":"utils.py","file_url":"https://github.com/gaopengcuhk/Tip-Adapter/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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f2a0a5061e7c204e"}},{"code_sha256_prefix":"7d02d5cb2c679f65","entry":"cls_acc","repo":"ybendou/ProKeR","repo_kind":"found_in_text","path":"utils.py","file_url":"https://github.com/ybendou/ProKeR/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7d02d5cb2c679f65"}},{"code_sha256_prefix":"fe317c3d4d24147a","entry":"listdir_nohidden","repo":"mrflogs/ICLR24","repo_kind":"found_in_text","path":"datasets/imagenet.py","file_url":"https://github.com/mrflogs/ICLR24/blob/HEAD/datasets/imagenet.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":"fe317c3d4d24147a"}},{"code_sha256_prefix":"db64af1ba3479e8d","entry":"load","repo":"gaopengcuhk/Tip-Adapter","repo_kind":"found_in_text","path":"clip/clip.py","file_url":"https://github.com/gaopengcuhk/Tip-Adapter/blob/HEAD/clip/clip.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":"db64af1ba3479e8d"}},{"code_sha256_prefix":"f6f30e41636ae569","entry":"load","repo":"mrflogs/ICLR24","repo_kind":"found_in_text","path":"clip/clip.py","file_url":"https://github.com/mrflogs/ICLR24/blob/HEAD/clip/clip.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":"f6f30e41636ae569"}},{"code_sha256_prefix":"807dc79d03aaa20f","entry":"pre_load_features","repo":"mrflogs/ICLR24","repo_kind":"found_in_text","path":"utils.py","file_url":"https://github.com/mrflogs/ICLR24/blob/HEAD/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":"807dc79d03aaa20f"}},{"code_sha256_prefix":"f9282c7399f45992","entry":"pre_load_features","repo":"ybendou/ProKeR","repo_kind":"found_in_text","path":"utils.py","file_url":"https://github.com/ybendou/ProKeR/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f9282c7399f45992"}},{"code_sha256_prefix":"2d182929376e2d82","entry":"run","repo":"mrflogs/ICLR24","repo_kind":"found_in_text","path":"main_base2new.py","file_url":"https://github.com/mrflogs/ICLR24/blob/HEAD/main_base2new.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":"2d182929376e2d82"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.CV","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}