{"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/learning-visual-representations-via-language","title":"Learning Visual Representations via Language-Guided Sampling","arxiv_id":"2302.12248","date":"2023-02-23","proceeding":"CVPR 2023 1","authors":["Mohamed El Banani","Karan Desai","Justin Johnson"],"abstract":"Although an object may appear in numerous contexts, we often describe it in a limited number of ways. Language allows us to abstract away visual variation to represent and communicate concepts. Building on this intuition, we propose an alternative approach to visual representation learning: using language similarity to sample semantically similar image pairs for contrastive learning. Our approach diverges from image-based contrastive learning by sampling view pairs using language similarity instead of hand-crafted augmentations or learned clusters. Our approach also differs from image-text contrastive learning by relying on pre-trained language models to guide the learning rather than directly minimizing a cross-modal loss. Through a series of experiments, we show that language-guided learning yields better features than image-based and image-text representation learning approaches.","url_abs":"https://arxiv.org/abs/2302.12248v2","url_pdf":"https://arxiv.org/pdf/2302.12248v2.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":"learning-visual-representations-via-language","repo_url":"https://github.com/mbanani/lgssl","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"representation-learning","task_name":"Representation Learning"}],"methods":[{"method_slug":"contrastive-learning","method_name":"Contrastive Learning"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2302.12248","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2302.12248"}},"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/mbanani/lgssl","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":6},"by_repo_kind":{"official":{"samples":6,"ran":0,"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":"12b3211e371682cf","entry":"build_loader","repo":"mbanani/lgssl","repo_kind":"official","path":"lgssl/datasets/builder.py","file_url":"https://github.com/mbanani/lgssl/blob/HEAD/lgssl/datasets/builder.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":"12b3211e371682cf"}},{"code_sha256_prefix":"0cea07d9944473ac","entry":"evaluate_fewshot","repo":"mbanani/lgssl","repo_kind":"official","path":"lgssl/evaluation/fewshot.py","file_url":"https://github.com/mbanani/lgssl/blob/HEAD/lgssl/evaluation/fewshot.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":"0cea07d9944473ac"}},{"code_sha256_prefix":"a6257ea120fda2cb","entry":"get_downstream_dataset","repo":"mbanani/lgssl","repo_kind":"official","path":"lgssl/datasets/builder.py","file_url":"https://github.com/mbanani/lgssl/blob/HEAD/lgssl/datasets/builder.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":"a6257ea120fda2cb"}},{"code_sha256_prefix":"f213c5e2b63f33b7","entry":"get_linear_scaled_lr","repo":"mbanani/lgssl","repo_kind":"official","path":"lgssl/optim.py","file_url":"https://github.com/mbanani/lgssl/blob/HEAD/lgssl/optim.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":"f213c5e2b63f33b7"}},{"code_sha256_prefix":"5cc774959c0dda85","entry":"set_weight_decay_per_param","repo":"mbanani/lgssl","repo_kind":"official","path":"lgssl/optim.py","file_url":"https://github.com/mbanani/lgssl/blob/HEAD/lgssl/optim.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":"5cc774959c0dda85"}},{"code_sha256_prefix":"8fcf93fd377505d2","entry":"skip_bad_collate","repo":"mbanani/lgssl","repo_kind":"official","path":"lgssl/datasets/builder.py","file_url":"https://github.com/mbanani/lgssl/blob/HEAD/lgssl/datasets/builder.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":"8fcf93fd377505d2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}