{"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/distilling-from-vision-language-models-for","title":"Leveraging Vision-Language Models for Improving Domain Generalization in Image Classification","arxiv_id":"2310.08255","date":"2023-10-12","proceeding":"CVPR 2024 1","authors":["Sravanti Addepalli","Ashish Ramayee Asokan","Lakshay Sharma","R. Venkatesh Babu"],"abstract":"Vision-Language Models (VLMs) such as CLIP are trained on large amounts of image-text pairs, resulting in remarkable generalization across several data distributions. However, in several cases, their expensive training and data collection/curation costs do not justify the end application. This motivates a vendor-client paradigm, where a vendor trains a large-scale VLM and grants only input-output access to clients on a pay-per-query basis in a black-box setting. The client aims to minimize inference cost by distilling the VLM to a student model using the limited available task-specific data, and further deploying this student model in the downstream application. While naive distillation largely improves the In-Domain (ID) accuracy of the student, it fails to transfer the superior out-of-distribution (OOD) generalization of the VLM teacher using the limited available labeled images. To mitigate this, we propose Vision-Language to Vision - Align, Distill, Predict (VL2V-ADiP), which first aligns the vision and language modalities of the teacher model with the vision modality of a pre-trained student model, and further distills the aligned VLM representations to the student. This maximally retains the pre-trained features of the student, while also incorporating the rich representations of the VLM image encoder and the superior generalization of the text embeddings. The proposed approach achieves state-of-the-art results on the standard Domain Generalization benchmarks in a black-box teacher setting as well as a white-box setting where the weights of the VLM are accessible.","url_abs":"https://arxiv.org/abs/2310.08255v2","url_pdf":"https://arxiv.org/pdf/2310.08255v2.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":"distilling-from-vision-language-models-for","repo_url":"https://github.com/val-iisc/VL2V-ADiP","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"domain-generalization","task_name":"Domain Generalization"},{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"image-classification","task_name":"image-classification"}],"methods":[{"method_slug":"clip","method_name":"CLIP"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/domain-generalization-on-domainnet","task":"Domain Generalization","dataset":"DomainNet","model":"VL2V-SD (CLIP, ViT-B/16)","rank_in_archive_order":4,"of":38,"metrics":{"Average Accuracy":"62.79"},"uses_additional_data":false},{"leaderboard":"/sota/domain-generalization-on-office-home","task":"Domain Generalization","dataset":"Office-Home","model":"VL2V-SD (CLIP, ViT-B/16)","rank_in_archive_order":5,"of":45,"metrics":{"Average Accuracy":"87.38"},"uses_additional_data":false},{"leaderboard":"/sota/domain-generalization-on-pacs-2","task":"Domain Generalization","dataset":"PACS","model":"VL2V-SD (CLIP, ViT-B/16)","rank_in_archive_order":11,"of":133,"metrics":{"Average Accuracy":"96.68"},"uses_additional_data":false},{"leaderboard":"/sota/domain-generalization-on-terraincognita","task":"Domain Generalization","dataset":"TerraIncognita","model":"VL2V-SD (CLIP, ViT-B/16)","rank_in_archive_order":8,"of":30,"metrics":{"Average Accuracy":"58.54"},"uses_additional_data":false},{"leaderboard":"/sota/domain-generalization-on-vlcs","task":"Domain Generalization","dataset":"VLCS","model":"VL2V-SD (CLIP, ViT-B/16)","rank_in_archive_order":4,"of":37,"metrics":{"Average Accuracy":"83.25"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2310.08255","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.08255"}},"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/val-iisc/VL2V-ADiP","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":10,"ran_draft_wrong":1,"ran_honours":1,"unverified":3},"by_repo_kind":{"official":{"samples":15,"ran":12,"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":"d6339c46586cd5f7","entry":"default_hparams","repo":"val-iisc/VL2V-ADiP","repo_kind":"official","path":"domainbed/hparams_registry.py","file_url":"https://github.com/val-iisc/VL2V-ADiP/blob/HEAD/domainbed/hparams_registry.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d6339c46586cd5f7"}},{"code_sha256_prefix":"c5919b96db289dbd","entry":"get_shapes","repo":"val-iisc/VL2V-ADiP","repo_kind":"official","path":"domainbed/algorithms/miro.py","file_url":"https://github.com/val-iisc/VL2V-ADiP/blob/HEAD/domainbed/algorithms/miro.py","link_basis":"harvester_set","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":"c5919b96db289dbd"}},{"code_sha256_prefix":"71a3a61ceed99bf3","entry":"hashable","repo":"val-iisc/VL2V-ADiP","repo_kind":"official","path":"domainbed/lib/query.py","file_url":"https://github.com/val-iisc/VL2V-ADiP/blob/HEAD/domainbed/lib/query.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"71a3a61ceed99bf3"}},{"code_sha256_prefix":"2f597a2077a1c95d","entry":"levelize","repo":"val-iisc/VL2V-ADiP","repo_kind":"official","path":"domainbed/lib/logger.py","file_url":"https://github.com/val-iisc/VL2V-ADiP/blob/HEAD/domainbed/lib/logger.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2f597a2077a1c95d"}},{"code_sha256_prefix":"2f8af5779e1edcb6","entry":"make_selector_fn","repo":"val-iisc/VL2V-ADiP","repo_kind":"official","path":"domainbed/lib/query.py","file_url":"https://github.com/val-iisc/VL2V-ADiP/blob/HEAD/domainbed/lib/query.py","link_basis":"harvester_set","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":"2f8af5779e1edcb6"}},{"code_sha256_prefix":"955c4020424d8ac1","entry":"make_weights_for_balanced_classes","repo":"val-iisc/VL2V-ADiP","repo_kind":"official","path":"domainbed/lib/misc.py","file_url":"https://github.com/val-iisc/VL2V-ADiP/blob/HEAD/domainbed/lib/misc.py","link_basis":"harvester_set","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":"955c4020424d8ac1"}},{"code_sha256_prefix":"72bf0287a79e4129","entry":"random_hparams","repo":"val-iisc/VL2V-ADiP","repo_kind":"official","path":"domainbed/hparams_registry.py","file_url":"https://github.com/val-iisc/VL2V-ADiP/blob/HEAD/domainbed/hparams_registry.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":"72bf0287a79e4129"}},{"code_sha256_prefix":"185f6c7403da6c33","entry":"random_hparams_st2","repo":"val-iisc/VL2V-ADiP","repo_kind":"official","path":"domainbed/hparams_registry.py","file_url":"https://github.com/val-iisc/VL2V-ADiP/blob/HEAD/domainbed/hparams_registry.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":"185f6c7403da6c33"}},{"code_sha256_prefix":"4fa2b54178fcc1df","entry":"random_pairs_of_minibatches","repo":"val-iisc/VL2V-ADiP","repo_kind":"official","path":"domainbed/lib/misc.py","file_url":"https://github.com/val-iisc/VL2V-ADiP/blob/HEAD/domainbed/lib/misc.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":"4fa2b54178fcc1df"}},{"code_sha256_prefix":"a9fcb7b2aef70def","entry":"str2bool","repo":"val-iisc/VL2V-ADiP","repo_kind":"official","path":"train_all.py","file_url":"https://github.com/val-iisc/VL2V-ADiP/blob/HEAD/train_all.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":"a9fcb7b2aef70def"}},{"code_sha256_prefix":"12c23ce22097acd0","entry":"to_minibatch","repo":"val-iisc/VL2V-ADiP","repo_kind":"official","path":"domainbed/algorithms/algorithms.py","file_url":"https://github.com/val-iisc/VL2V-ADiP/blob/HEAD/domainbed/algorithms/algorithms.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"12c23ce22097acd0"}},{"code_sha256_prefix":"5dd6a674fbe45a89","entry":"to_row","repo":"val-iisc/VL2V-ADiP","repo_kind":"official","path":"domainbed/lib/misc.py","file_url":"https://github.com/val-iisc/VL2V-ADiP/blob/HEAD/domainbed/lib/misc.py","link_basis":"harvester_set","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":"5dd6a674fbe45a89"}},{"code_sha256_prefix":"687efdf3db9c44df","entry":"accuracy_from_loader","repo":"val-iisc/VL2V-ADiP","repo_kind":"official","path":"domainbed/evaluator.py","file_url":"https://github.com/val-iisc/VL2V-ADiP/blob/HEAD/domainbed/evaluator.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":"687efdf3db9c44df"}},{"code_sha256_prefix":"a5527e8f11826a39","entry":"accuracy_from_loader_cls","repo":"val-iisc/VL2V-ADiP","repo_kind":"official","path":"domainbed/evaluator.py","file_url":"https://github.com/val-iisc/VL2V-ADiP/blob/HEAD/domainbed/evaluator.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":"a5527e8f11826a39"}},{"code_sha256_prefix":"7c5a3128571afe6f","entry":"one_hot_embedding","repo":"val-iisc/VL2V-ADiP","repo_kind":"official","path":"domainbed/algorithms/baselines.py","file_url":"https://github.com/val-iisc/VL2V-ADiP/blob/HEAD/domainbed/algorithms/baselines.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":"7c5a3128571afe6f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}