{"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/large-vision-language-models-are-unsupervised","title":"Large (Vision) Language Models are Unsupervised In-Context Learners","arxiv_id":"2504.02349","date":"2025-04-03","proceeding":null,"authors":["Artyom Gadetsky","Andrei Atanov","Yulun Jiang","Zhitong Gao","Ghazal Hosseini Mighan","Amir Zamir","Maria Brbic"],"abstract":"Recent advances in large language and vision-language models have enabled zero-shot inference, allowing models to solve new tasks without task-specific training. Various adaptation techniques such as prompt engineering, In-Context Learning (ICL), and supervised fine-tuning can further enhance the model's performance on a downstream task, but they require substantial manual effort to construct effective prompts or labeled examples. In this work, we introduce a joint inference framework for fully unsupervised adaptation, eliminating the need for manual prompt engineering and labeled examples. Unlike zero-shot inference, which makes independent predictions, the joint inference makes predictions simultaneously for all inputs in a given task. Since direct joint inference involves computationally expensive optimization, we develop efficient approximation techniques, leading to two unsupervised adaptation methods: unsupervised fine-tuning and unsupervised ICL. We demonstrate the effectiveness of our methods across diverse tasks and models, including language-only Llama-3.1 on natural language processing tasks, reasoning-oriented Qwen2.5-Math on grade school math problems, vision-language OpenFlamingo on vision tasks, and the API-only access GPT-4o model on massive multi-discipline tasks. Our experiments demonstrate substantial improvements over the standard zero-shot approach, including 39% absolute improvement on the challenging GSM8K math reasoning dataset. Remarkably, despite being fully unsupervised, our framework often performs on par with supervised approaches that rely on ground truth labels.","url_abs":"https://arxiv.org/abs/2504.02349v1","url_pdf":"https://arxiv.org/pdf/2504.02349v1.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":"large-vision-language-models-are-unsupervised","repo_url":"https://github.com/mlbio-epfl/joint-inference","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"gsm8k","task_name":"GSM8K"},{"task_slug":"in-context-learning","task_name":"In-Context Learning"},{"task_slug":"math","task_name":"Math"},{"task_slug":"prompt-engineering","task_name":"Prompt Engineering"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2504.02349","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2504.02349"}},"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/mlbio-epfl/joint-inference","reach":null}],"summary":{"ran_draft_wrong":2,"ran_honours":1,"unverified":2},"by_repo_kind":{"official":{"samples":5,"ran":3,"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":"00a886c1703d3ae6","entry":"replace_none_with_default","repo":"mlbio-epfl/joint-inference","repo_kind":"official","path":"unsupervised_ft_llm.py","file_url":"https://github.com/mlbio-epfl/joint-inference/blob/HEAD/unsupervised_ft_llm.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":2,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"00a886c1703d3ae6"}},{"code_sha256_prefix":"cac6357ee909bfae","entry":"find_len_of_common_prefix","repo":"mlbio-epfl/joint-inference","repo_kind":"official","path":"unsupervised_icl_llm.py","file_url":"https://github.com/mlbio-epfl/joint-inference/blob/HEAD/unsupervised_icl_llm.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cac6357ee909bfae"}},{"code_sha256_prefix":"640a420f34882a39","entry":"get_location_prefix","repo":"mlbio-epfl/joint-inference","repo_kind":"official","path":"unsupervised_icl_llm.py","file_url":"https://github.com/mlbio-epfl/joint-inference/blob/HEAD/unsupervised_icl_llm.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"640a420f34882a39"}},{"code_sha256_prefix":"83f821a080f6142a","entry":"balanced_sampling","repo":"mlbio-epfl/joint-inference","repo_kind":"official","path":"unsupervised_icl_llm.py","file_url":"https://github.com/mlbio-epfl/joint-inference/blob/HEAD/unsupervised_icl_llm.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":"83f821a080f6142a"}},{"code_sha256_prefix":"09dd1dd500c5dec3","entry":"icl_inference","repo":"mlbio-epfl/joint-inference","repo_kind":"official","path":"unsupervised_icl_llm.py","file_url":"https://github.com/mlbio-epfl/joint-inference/blob/HEAD/unsupervised_icl_llm.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":"09dd1dd500c5dec3"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}