{"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-scale-adversarial-training-for-vision","title":"Large-Scale Adversarial Training for Vision-and-Language Representation Learning","arxiv_id":"2006.06195","date":"2020-06-11","proceeding":"NeurIPS 2020 12","authors":["Zhe Gan","Yen-Chun Chen","Linjie Li","Chen Zhu","Yu Cheng","Jingjing Liu"],"abstract":"We present VILLA, the first known effort on large-scale adversarial training for vision-and-language (V+L) representation learning. VILLA consists of two training stages: (i) task-agnostic adversarial pre-training; followed by (ii) task-specific adversarial finetuning. Instead of adding adversarial perturbations on image pixels and textual tokens, we propose to perform adversarial training in the embedding space of each modality. To enable large-scale training, we adopt the \"free\" adversarial training strategy, and combine it with KL-divergence-based regularization to promote higher invariance in the embedding space. We apply VILLA to current best-performing V+L models, and achieve new state of the art on a wide range of tasks, including Visual Question Answering, Visual Commonsense Reasoning, Image-Text Retrieval, Referring Expression Comprehension, Visual Entailment, and NLVR2.","url_abs":"https://arxiv.org/abs/2006.06195v2","url_pdf":"https://arxiv.org/pdf/2006.06195v2.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-scale-adversarial-training-for-vision","repo_url":"https://github.com/zhegan27/LXMERT-AdvTrain","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"large-scale-adversarial-training-for-vision","repo_url":"https://github.com/zhegan27/VILLA","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"image-text-retrieval","task_name":"Image-text Retrieval"},{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"referring-expression","task_name":"Referring Expression"},{"task_slug":"referring-expression-comprehension","task_name":"Referring Expression Comprehension"},{"task_slug":"representation-learning","task_name":"Representation Learning"},{"task_slug":"retrieval","task_name":"Retrieval"},{"task_slug":"text-retrieval","task_name":"Text Retrieval"},{"task_slug":"visual-commonsense-reasoning","task_name":"Visual Commonsense Reasoning"},{"task_slug":"visual-entailment","task_name":"Visual Entailment"},{"task_slug":"visual-question-answering-1","task_name":"Visual Question Answering"},{"task_slug":"visual-question-answering","task_name":"Visual Question Answering (VQA)"},{"task_slug":"visual-reasoning","task_name":"Visual Reasoning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/visual-entailment-on-snli-ve-val","task":"Visual Entailment","dataset":"SNLI-VE val","model":"VILLA-LARGE","rank_in_archive_order":7,"of":9,"metrics":{"Accuracy":"80.18"},"uses_additional_data":true}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2006.06195","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2006.06195"}},"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/zhegan27/VILLA","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zhegan27/LXMERT-AdvTrain","reach":null}],"summary":{"ran_draft_wrong":2,"ran":6,"ran_fixture":1,"ran_honours":1,"unverified":10},"by_repo_kind":{"official":{"samples":20,"ran":10,"repositories":2}},"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":6,"samples":[{"code_sha256_prefix":"0f786c407fb1ee4c","entry":"swish","repo":"zhegan27/VILLA","repo_kind":"official","path":"model/layer.py","file_url":"https://github.com/zhegan27/VILLA/blob/HEAD/model/layer.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":2,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"0f786c407fb1ee4c"}},{"code_sha256_prefix":"7cd6bab68e15976d","entry":"BertEmbeddings","repo":"zhegan27/LXMERT-AdvTrain","repo_kind":"official","path":"src/lxrt/modeling.py","file_url":"https://github.com/zhegan27/LXMERT-AdvTrain/blob/HEAD/src/lxrt/modeling.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":"7cd6bab68e15976d"}},{"code_sha256_prefix":"2ba3b1dfb07ba4b1","entry":"BertPredictionHeadTransform","repo":"zhegan27/LXMERT-AdvTrain","repo_kind":"official","path":"src/lxrt/modeling.py","file_url":"https://github.com/zhegan27/LXMERT-AdvTrain/blob/HEAD/src/lxrt/modeling.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2ba3b1dfb07ba4b1"}},{"code_sha256_prefix":"2c8c022f71d9ae6e","entry":"BertVisualAnswerHead","repo":"zhegan27/LXMERT-AdvTrain","repo_kind":"official","path":"src/lxrt/modeling.py","file_url":"https://github.com/zhegan27/LXMERT-AdvTrain/blob/HEAD/src/lxrt/modeling.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2c8c022f71d9ae6e"}},{"code_sha256_prefix":"0e7be2781b71b508","entry":"BertVisualObjHead","repo":"zhegan27/LXMERT-AdvTrain","repo_kind":"official","path":"src/lxrt/modeling.py","file_url":"https://github.com/zhegan27/LXMERT-AdvTrain/blob/HEAD/src/lxrt/modeling.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0e7be2781b71b508"}},{"code_sha256_prefix":"ce655ad320784ce8","entry":"GeLU","repo":"zhegan27/LXMERT-AdvTrain","repo_kind":"official","path":"src/lxrt/modeling.py","file_url":"https://github.com/zhegan27/LXMERT-AdvTrain/blob/HEAD/src/lxrt/modeling.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ce655ad320784ce8"}},{"code_sha256_prefix":"1bea2e32e2dc619d","entry":"VisualFeatEncoder","repo":"zhegan27/LXMERT-AdvTrain","repo_kind":"official","path":"src/lxrt/modeling.py","file_url":"https://github.com/zhegan27/LXMERT-AdvTrain/blob/HEAD/src/lxrt/modeling.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1bea2e32e2dc619d"}},{"code_sha256_prefix":"9c9d2823696faa43","entry":"cost_matrix_cosine","repo":"zhegan27/VILLA","repo_kind":"official","path":"model/ot.py","file_url":"https://github.com/zhegan27/VILLA/blob/HEAD/model/ot.py","link_basis":"plan_row","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9c9d2823696faa43"}},{"code_sha256_prefix":"fdc64f4c72036ae4","entry":"gelu","repo":"zhegan27/VILLA","repo_kind":"official","path":"model/layer.py","file_url":"https://github.com/zhegan27/VILLA/blob/HEAD/model/layer.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"fdc64f4c72036ae4"}},{"code_sha256_prefix":"fed42c63be2ceb6c","entry":"multi_head_attention_forward","repo":"zhegan27/VILLA","repo_kind":"official","path":"model/attention.py","file_url":"https://github.com/zhegan27/VILLA/blob/HEAD/model/attention.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fed42c63be2ceb6c"}},{"code_sha256_prefix":"77ff902ef6858211","entry":"BertLMPredictionHead","repo":"zhegan27/LXMERT-AdvTrain","repo_kind":"official","path":"src/lxrt/modeling.py","file_url":"https://github.com/zhegan27/LXMERT-AdvTrain/blob/HEAD/src/lxrt/modeling.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":"77ff902ef6858211"}},{"code_sha256_prefix":"781e8b75f1ca0f7c","entry":"BertPreTrainingHeads","repo":"zhegan27/LXMERT-AdvTrain","repo_kind":"official","path":"src/lxrt/modeling.py","file_url":"https://github.com/zhegan27/LXMERT-AdvTrain/blob/HEAD/src/lxrt/modeling.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":"781e8b75f1ca0f7c"}},{"code_sha256_prefix":"2c0fd477bfbddac7","entry":"LXRTEncoder","repo":"zhegan27/LXMERT-AdvTrain","repo_kind":"official","path":"src/lxrt/modeling.py","file_url":"https://github.com/zhegan27/LXMERT-AdvTrain/blob/HEAD/src/lxrt/modeling.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":"2c0fd477bfbddac7"}},{"code_sha256_prefix":"95e61302335909fb","entry":"LXRTModel","repo":"zhegan27/LXMERT-AdvTrain","repo_kind":"official","path":"src/lxrt/modeling.py","file_url":"https://github.com/zhegan27/LXMERT-AdvTrain/blob/HEAD/src/lxrt/modeling.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":"95e61302335909fb"}},{"code_sha256_prefix":"6f76d36162ffef27","entry":"LXRTPretraining","repo":"zhegan27/LXMERT-AdvTrain","repo_kind":"official","path":"src/lxrt/modeling.py","file_url":"https://github.com/zhegan27/LXMERT-AdvTrain/blob/HEAD/src/lxrt/modeling.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":"6f76d36162ffef27"}},{"code_sha256_prefix":"2731fd9de6d31bc0","entry":"compute_score_with_logits","repo":"zhegan27/VILLA","repo_kind":"official","path":"inf_vqa.py","file_url":"https://github.com/zhegan27/VILLA/blob/HEAD/inf_vqa.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":false,"mcp_get_code":{"code_sha256":"2731fd9de6d31bc0"}},{"code_sha256_prefix":"28e194bd5c984ae7","entry":"evaluate","repo":"zhegan27/VILLA","repo_kind":"official","path":"inf_nlvr2.py","file_url":"https://github.com/zhegan27/VILLA/blob/HEAD/inf_nlvr2.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":false,"mcp_get_code":{"code_sha256":"28e194bd5c984ae7"}},{"code_sha256_prefix":"cbf43203110456f0","entry":"ipot","repo":"zhegan27/VILLA","repo_kind":"official","path":"model/ot.py","file_url":"https://github.com/zhegan27/VILLA/blob/HEAD/model/ot.py","link_basis":"plan_row","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":"cbf43203110456f0"}},{"code_sha256_prefix":"70361102cdeaaf85","entry":"save_for_submission","repo":"zhegan27/VILLA","repo_kind":"official","path":"inf_vcr.py","file_url":"https://github.com/zhegan27/VILLA/blob/HEAD/inf_vcr.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":false,"mcp_get_code":{"code_sha256":"70361102cdeaaf85"}},{"code_sha256_prefix":"d3f4c62a97861b9d","entry":"trace","repo":"zhegan27/VILLA","repo_kind":"official","path":"model/ot.py","file_url":"https://github.com/zhegan27/VILLA/blob/HEAD/model/ot.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":false,"mcp_get_code":{"code_sha256":"d3f4c62a97861b9d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}