{"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/efficient-vision-language-pre-training-by","title":"Efficient Vision-Language Pre-training by Cluster Masking","arxiv_id":"2405.08815","date":"2024-05-14","proceeding":"CVPR 2024 1","authors":["Zihao Wei","Zixuan Pan","Andrew Owens"],"abstract":"We propose a simple strategy for masking image patches during visual-language contrastive learning that improves the quality of the learned representations and the training speed. During each iteration of training, we randomly mask clusters of visually similar image patches, as measured by their raw pixel intensities. This provides an extra learning signal, beyond the contrastive training itself, since it forces a model to predict words for masked visual structures solely from context. It also speeds up training by reducing the amount of data used in each image. We evaluate the effectiveness of our model by pre-training on a number of benchmarks, finding that it outperforms other masking strategies, such as FLIP, on the quality of the learned representation.","url_abs":"https://arxiv.org/abs/2405.08815v1","url_pdf":"https://arxiv.org/pdf/2405.08815v1.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":"efficient-vision-language-pre-training-by","repo_url":"https://github.com/zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"}],"methods":[{"method_slug":"contrastive-learning","method_name":"Contrastive Learning"},{"method_slug":"flip","method_name":"FLIP"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2405.08815","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.08815"}},"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/zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking","reach":{"status":"ok"}}],"summary":{"ran_violates":3,"unverified":14},"by_repo_kind":{"official":{"samples":17,"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":17,"samples":[{"code_sha256_prefix":"7c29b374198bddcd","entry":"is_global_master","repo":"zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking","repo_kind":"official","path":"training/distributed.py","file_url":"https://github.com/zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking/blob/HEAD/training/distributed.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7c29b374198bddcd"}},{"code_sha256_prefix":"0377e309e95cfc3e","entry":"is_local_master","repo":"zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking","repo_kind":"official","path":"training/distributed.py","file_url":"https://github.com/zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking/blob/HEAD/training/distributed.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0377e309e95cfc3e"}},{"code_sha256_prefix":"b092791002b40e8a","entry":"is_master","repo":"zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking","repo_kind":"official","path":"training/distributed.py","file_url":"https://github.com/zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking/blob/HEAD/training/distributed.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b092791002b40e8a"}},{"code_sha256_prefix":"aafcff3ad1ccef6e","entry":"accuracy","repo":"zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking","repo_kind":"official","path":"training/zero_shot.py","file_url":"https://github.com/zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking/blob/HEAD/training/zero_shot.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":"aafcff3ad1ccef6e"}},{"code_sha256_prefix":"04508bbd793cdfb9","entry":"const_lr","repo":"zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking","repo_kind":"official","path":"training/scheduler.py","file_url":"https://github.com/zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking/blob/HEAD/training/scheduler.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":"04508bbd793cdfb9"}},{"code_sha256_prefix":"cc0d607a8934307d","entry":"const_lr_cooldown","repo":"zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking","repo_kind":"official","path":"training/scheduler.py","file_url":"https://github.com/zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking/blob/HEAD/training/scheduler.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":"cc0d607a8934307d"}},{"code_sha256_prefix":"932d44bbf8bd0e3f","entry":"cosine_lr","repo":"zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking","repo_kind":"official","path":"training/scheduler.py","file_url":"https://github.com/zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking/blob/HEAD/training/scheduler.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":"932d44bbf8bd0e3f"}},{"code_sha256_prefix":"ddcbd45e940484ee","entry":"gather_features","repo":"zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking","repo_kind":"official","path":"open_clip/loss.py","file_url":"https://github.com/zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking/blob/HEAD/open_clip/loss.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":"ddcbd45e940484ee"}},{"code_sha256_prefix":"94a4076103662faf","entry":"get_autocast","repo":"zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking","repo_kind":"official","path":"training/precision.py","file_url":"https://github.com/zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking/blob/HEAD/training/precision.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":"94a4076103662faf"}},{"code_sha256_prefix":"575ba28efe232215","entry":"get_default_params","repo":"zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking","repo_kind":"official","path":"training/params.py","file_url":"https://github.com/zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking/blob/HEAD/training/params.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":"575ba28efe232215"}},{"code_sha256_prefix":"4ab095823c6ec0d7","entry":"get_imagenet","repo":"zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking","repo_kind":"official","path":"training/data.py","file_url":"https://github.com/zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking/blob/HEAD/training/data.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":"4ab095823c6ec0d7"}},{"code_sha256_prefix":"0cf1bb95320d3c1f","entry":"parse_args","repo":"zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking","repo_kind":"official","path":"training/params.py","file_url":"https://github.com/zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking/blob/HEAD/training/params.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":"0cf1bb95320d3c1f"}},{"code_sha256_prefix":"fb651d0a97fd4d3f","entry":"prepare_inputs_for_generation","repo":"zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking","repo_kind":"official","path":"open_clip/coca_model.py","file_url":"https://github.com/zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking/blob/HEAD/open_clip/coca_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":"fb651d0a97fd4d3f"}},{"code_sha256_prefix":"2a377da4a76a2d44","entry":"register_pooler","repo":"zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking","repo_kind":"official","path":"open_clip/hf_model.py","file_url":"https://github.com/zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking/blob/HEAD/open_clip/hf_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":"2a377da4a76a2d44"}},{"code_sha256_prefix":"c8826eee91bf0f73","entry":"remote_sync","repo":"zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking","repo_kind":"official","path":"training/file_utils.py","file_url":"https://github.com/zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking/blob/HEAD/training/file_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":"c8826eee91bf0f73"}},{"code_sha256_prefix":"5ef1e6fce93e5928","entry":"remote_sync_fsspec","repo":"zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking","repo_kind":"official","path":"training/file_utils.py","file_url":"https://github.com/zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking/blob/HEAD/training/file_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":"5ef1e6fce93e5928"}},{"code_sha256_prefix":"0cf5fb2e3a3a9114","entry":"remote_sync_s3","repo":"zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking","repo_kind":"official","path":"training/file_utils.py","file_url":"https://github.com/zi-hao-wei/efficient-vision-language-pre-training-by-cluster-masking/blob/HEAD/training/file_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":"0cf5fb2e3a3a9114"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}