{"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/cross-modal-adapter-for-text-video-retrieval","title":"Cross-Modal Adapter for Text-Video Retrieval","arxiv_id":"2211.09623","date":"2022-11-17","proceeding":null,"authors":["Haojun Jiang","Jianke Zhang","Rui Huang","Chunjiang Ge","Zanlin Ni","Jiwen Lu","Jie zhou","Shiji Song","Gao Huang"],"abstract":"Text-video retrieval is an important multi-modal learning task, where the goal is to retrieve the most relevant video for a given text query. Recently, pre-trained models, e.g., CLIP, show great potential on this task. However, as pre-trained models are scaling up, fully fine-tuning them on text-video retrieval datasets has a high risk of overfitting. Moreover, in practice, it would be costly to train and store a large model for each task. To overcome the above issues, we present a novel $\\textbf{Cross-Modal Adapter}$ for parameter-efficient fine-tuning. Inspired by adapter-based methods, we adjust the pre-trained model with a few parameterization layers. However, there are two notable differences. First, our method is designed for the multi-modal domain. Secondly, it allows early cross-modal interactions between CLIP's two encoders. Although surprisingly simple, our approach has three notable benefits: (1) reduces $\\textbf{99.6}\\%$ of fine-tuned parameters, and alleviates the problem of overfitting, (2) saves approximately 30% of training time, and (3) allows all the pre-trained parameters to be fixed, enabling the pre-trained model to be shared across datasets. Extensive experiments demonstrate that, without bells and whistles, it achieves superior or comparable performance compared to fully fine-tuned methods on MSR-VTT, MSVD, VATEX, ActivityNet, and DiDeMo datasets. The code will be available at \\url{https://github.com/LeapLabTHU/Cross-Modal-Adapter}.","url_abs":"https://arxiv.org/abs/2211.09623v1","url_pdf":"https://arxiv.org/pdf/2211.09623v1.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":"cross-modal-adapter-for-text-video-retrieval","repo_url":"https://github.com/leaplabthu/cross-modal-adapter","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"retrieval","task_name":"Retrieval"},{"task_slug":"video-retrieval","task_name":"Video Retrieval"},{"task_slug":"parameter-efficient-fine-tuning","task_name":"parameter-efficient fine-tuning"}],"methods":[{"method_slug":"clip","method_name":"CLIP"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2211.09623","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2211.09623"}},"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/leaplabthu/cross-modal-adapter","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":3,"ran_violates":2,"ran_draft_wrong":2,"ran_honours":1,"unverified":7},"by_repo_kind":{"official":{"samples":15,"ran":8,"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":"d741eb912b24880a","entry":"all_gather","repo":"leaplabthu/cross-modal-adapter","repo_kind":"official","path":"comm.py","file_url":"https://github.com/leaplabthu/cross-modal-adapter/blob/HEAD/comm.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d741eb912b24880a"}},{"code_sha256_prefix":"47c2715feba5fd6b","entry":"check_attr","repo":"leaplabthu/cross-modal-adapter","repo_kind":"official","path":"modules/modeling_jointvt_upshare_adapter.py","file_url":"https://github.com/leaplabthu/cross-modal-adapter/blob/HEAD/modules/modeling_jointvt_upshare_adapter.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"47c2715feba5fd6b"}},{"code_sha256_prefix":"f45b80d057798fed","entry":"compute_metrics","repo":"leaplabthu/cross-modal-adapter","repo_kind":"official","path":"metrics.py","file_url":"https://github.com/leaplabthu/cross-modal-adapter/blob/HEAD/metrics.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f45b80d057798fed"}},{"code_sha256_prefix":"2a3280757ce5a198","entry":"reduce_dict","repo":"leaplabthu/cross-modal-adapter","repo_kind":"official","path":"comm.py","file_url":"https://github.com/leaplabthu/cross-modal-adapter/blob/HEAD/comm.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2a3280757ce5a198"}},{"code_sha256_prefix":"66bf2e9b33bd27dd","entry":"tensor_text_to_video_metrics","repo":"leaplabthu/cross-modal-adapter","repo_kind":"official","path":"metrics.py","file_url":"https://github.com/leaplabthu/cross-modal-adapter/blob/HEAD/metrics.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"66bf2e9b33bd27dd"}},{"code_sha256_prefix":"d34a2226d2cf142e","entry":"update_attr","repo":"leaplabthu/cross-modal-adapter","repo_kind":"official","path":"modules/modeling_jointvt_upshare_adapter.py","file_url":"https://github.com/leaplabthu/cross-modal-adapter/blob/HEAD/modules/modeling_jointvt_upshare_adapter.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d34a2226d2cf142e"}},{"code_sha256_prefix":"af64ec220e8bcdbc","entry":"url_to_filename","repo":"leaplabthu/cross-modal-adapter","repo_kind":"official","path":"modules/file_utils.py","file_url":"https://github.com/leaplabthu/cross-modal-adapter/blob/HEAD/modules/file_utils.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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"af64ec220e8bcdbc"}},{"code_sha256_prefix":"e0960afdb0d64aa7","entry":"warmup_linear","repo":"leaplabthu/cross-modal-adapter","repo_kind":"official","path":"modules/optimization.py","file_url":"https://github.com/leaplabthu/cross-modal-adapter/blob/HEAD/modules/optimization.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e0960afdb0d64aa7"}},{"code_sha256_prefix":"349d780dd4a89a37","entry":"cached_path","repo":"leaplabthu/cross-modal-adapter","repo_kind":"official","path":"modules/file_utils.py","file_url":"https://github.com/leaplabthu/cross-modal-adapter/blob/HEAD/modules/file_utils.py","link_basis":"harvester_set","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":"349d780dd4a89a37"}},{"code_sha256_prefix":"db0ac56aaf6e35e6","entry":"filename_to_url","repo":"leaplabthu/cross-modal-adapter","repo_kind":"official","path":"modules/file_utils.py","file_url":"https://github.com/leaplabthu/cross-modal-adapter/blob/HEAD/modules/file_utils.py","link_basis":"harvester_set","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":"db0ac56aaf6e35e6"}},{"code_sha256_prefix":"28936c41e64792bd","entry":"get_cosine_schedule_with_warmup","repo":"leaplabthu/cross-modal-adapter","repo_kind":"official","path":"modules/optimization_xpool.py","file_url":"https://github.com/leaplabthu/cross-modal-adapter/blob/HEAD/modules/optimization_xpool.py","link_basis":"harvester_set","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":"28936c41e64792bd"}},{"code_sha256_prefix":"afba2c06a42074fe","entry":"get_linear_schedule_with_warmup","repo":"leaplabthu/cross-modal-adapter","repo_kind":"official","path":"modules/optimization_xpool.py","file_url":"https://github.com/leaplabthu/cross-modal-adapter/blob/HEAD/modules/optimization_xpool.py","link_basis":"harvester_set","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":"afba2c06a42074fe"}},{"code_sha256_prefix":"b6f9f3930836fe3f","entry":"tensor_video_to_text_sim","repo":"leaplabthu/cross-modal-adapter","repo_kind":"official","path":"metrics.py","file_url":"https://github.com/leaplabthu/cross-modal-adapter/blob/HEAD/metrics.py","link_basis":"harvester_set","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":"b6f9f3930836fe3f"}},{"code_sha256_prefix":"59e4e730a9dc5dc6","entry":"warmup_constant","repo":"leaplabthu/cross-modal-adapter","repo_kind":"official","path":"modules/optimization.py","file_url":"https://github.com/leaplabthu/cross-modal-adapter/blob/HEAD/modules/optimization.py","link_basis":"harvester_set","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":"59e4e730a9dc5dc6"}},{"code_sha256_prefix":"20b3d25ba1b796e5","entry":"warmup_cosine","repo":"leaplabthu/cross-modal-adapter","repo_kind":"official","path":"modules/optimization.py","file_url":"https://github.com/leaplabthu/cross-modal-adapter/blob/HEAD/modules/optimization.py","link_basis":"harvester_set","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":"20b3d25ba1b796e5"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}