{"notes":[{"id":"multimodality/villa","category":"multimodality","legacyPath":"multimodality/2006-villa","legacySlug":"2006-villa","legacyPaths":[],"title":"VILLA","subtitle":"The Phantom in the Villa","author":"Z. Yuan","paperDate":"2020-06-11","publishedOn":"2024-06-04","paperTitle":"Large-Scale Adversarial Training for Vision-and-Language Representation Learning","paperUrl":"https://arxiv.org/abs/2006.06195","bibliography":{"title":"Large-Scale Adversarial Training for Vision-and-Language Representation Learning","authors":["Zhe Gan","Yen-Chun Chen","Linjie Li","Chen Zhu","Yu Cheng","Jingjing Liu"],"url":"https://arxiv.org/abs/2006.06195","pdfUrl":"https://arxiv.org/pdf/2006.06195","codeUrl":null,"preprint":{"id":"2006.06195","submittedOn":"2020-06-11","url":"https://arxiv.org/abs/2006.06195"},"publication":{"venue":"NeurIPS","year":2020,"kind":"conference","url":"https://arxiv.org/abs/2006.06195"},"citation":"@misc{multimodalityvilla2020,\n  title = {{Large-Scale Adversarial Training for Vision-and-Language Representation Learning}},\n  author = {Zhe Gan and Yen-Chun Chen and Linjie Li and Chen Zhu and Yu Cheng and Jingjing Liu},\n  year = {2020},\n  eprint = {2006.06195},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/2006.06195}\n}\n","citationPath":"/content/papers/citations/multimodality/villa.08c94689f1b7.bib"},"thumbnail":{"src":"/content/papers/assets/2add79be1b0b274b2266ff4a725a9e39f4e2c1302b2776930d6b1b229624b433.jpg","width":1224,"height":332},"locale":"en","path":"/content/papers/en/multimodality/villa.6a41c1bcd5b8.md","headings":[{"id":"defining-the-problem","text":"Defining the Problem","depth":2},{"id":"solution","text":"Solution","depth":2},{"id":"villa-model-design","text":"VILLA Model Design","depth":3},{"id":"pre-training-tasks","text":"Pre-Training Tasks","depth":3},{"id":"two-stage-adversarial-training","text":"Two-Stage Adversarial Training","depth":3},{"id":"perturbations","text":"Perturbations","depth":3},{"id":"multimodal-free-adversarial-training","text":"Multimodal \"Free\" Adversarial Training","depth":3},{"id":"free-adversarial-training-strategy","text":"Free Adversarial Training Strategy","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"experimental-setup","text":"Experimental Setup","depth":3},{"id":"villa-on-uniter-and-analysis","text":"VILLA on UNITER and Analysis","depth":3},{"id":"in-depth-analysis-of-villa","text":"In-Depth Analysis of VILLA","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{},"guide":null,"relatedReading":[{"id":"multimodality/lxmert","relation":"referenced","topic":""},{"id":"multimodality/uniter","relation":"referenced","topic":""}]},{"id":"multimodality/lxmert","category":"multimodality","legacyPath":"multimodality/1908-lxmert","legacySlug":"1908-lxmert","legacyPaths":[],"title":"LXMERT","subtitle":"Pre-training Matters","author":"Z. Yuan","paperDate":"2019-08-20","publishedOn":"2024-06-04","paperTitle":"LXMERT: Learning Cross-Modality Encoder Representations from Transformers","paperUrl":"https://arxiv.org/abs/1908.07490","bibliography":{"title":"LXMERT: Learning Cross-Modality Encoder Representations from Transformers","authors":["Hao Tan","Mohit Bansal"],"url":"https://arxiv.org/abs/1908.07490","pdfUrl":"https://arxiv.org/pdf/1908.07490","codeUrl":null,"preprint":{"id":"1908.07490","submittedOn":"2019-08-20","url":"https://arxiv.org/abs/1908.07490"},"publication":{"venue":"EMNLP","year":2019,"kind":"conference","url":"https://arxiv.org/abs/1908.07490"},"citation":"@misc{multimodalitylxmert2019,\n  title = {{LXMERT: Learning Cross-Modality Encoder Representations from Transformers}},\n  author = {Hao Tan and Mohit Bansal},\n  year = {2019},\n  eprint = {1908.07490},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/1908.07490}\n}\n","citationPath":"/content/papers/citations/multimodality/lxmert.47814670c229.bib"},"thumbnail":{"src":"/content/papers/assets/0e45137e5df15d7a9e2ae46beadc426dc27aff867daf126d283da3c675178f70.jpg","width":1024,"height":325},"locale":"en","path":"/content/papers/en/multimodality/lxmert.e69a6afe7d80.md","headings":[{"id":"defining-the-problem","text":"Defining the Problem","depth":2},{"id":"approach","text":"Approach","depth":2},{"id":"model-architecture","text":"Model Architecture","depth":3},{"id":"pre-training-strategy","text":"Pre-training Strategy","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"comparison-with-other-models","text":"Comparison with Other Models","depth":3},{"id":"importance-of-pre-training","text":"Importance of Pre-training","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{},"guide":null,"relatedReading":[{"id":"multimodality/vilbert","relation":"comparison","topic":"Region features in vision-language pretraining"},{"id":"multimodality/uniter","relation":"comparison","topic":"Region features in vision-language pretraining"}]},{"id":"multimodality/uniter","category":"multimodality","legacyPath":"multimodality/1909-uniter","legacySlug":"1909-uniter","legacyPaths":[],"title":"UNITER","subtitle":"The Song of the Unifiers","author":"Z. Yuan","paperDate":"2019-09-25","publishedOn":"2024-06-04","paperTitle":"UNITER: UNiversal Image-TExt Representation Learning","paperUrl":"https://arxiv.org/abs/1909.11740","bibliography":{"title":"UNITER: UNiversal Image-TExt Representation Learning","authors":["Yen-Chun Chen","Linjie Li","Licheng Yu","Ahmed El Kholy","Faisal Ahmed","Zhe Gan","Yu Cheng","Jingjing Liu"],"url":"https://arxiv.org/abs/1909.11740","pdfUrl":"https://arxiv.org/pdf/1909.11740","codeUrl":null,"preprint":{"id":"1909.11740","submittedOn":"2019-09-25","url":"https://arxiv.org/abs/1909.11740"},"publication":{"venue":"ECCV","year":2020,"kind":"conference","url":"https://arxiv.org/abs/1909.11740"},"citation":"@misc{multimodalityuniter2019,\n  title = {{UNITER: UNiversal Image-TExt Representation Learning}},\n  author = {Yen-Chun Chen and Linjie Li and Licheng Yu and Ahmed El Kholy and Faisal Ahmed and Zhe Gan and Yu Cheng and Jingjing Liu},\n  year = {2019},\n  eprint = {1909.11740},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/1909.11740}\n}\n","citationPath":"/content/papers/citations/multimodality/uniter.4f2cee580d03.bib"},"thumbnail":{"src":"/content/papers/assets/9be0d2a008d474713ee083cc7a8f379f76889ff1ade6f34dcb6ec6fad5fe22f2.jpg","width":1224,"height":492},"locale":"en","path":"/content/papers/en/multimodality/uniter.53e85332b8f2.md","headings":[{"id":"problem-definition","text":"Problem Definition","depth":2},{"id":"solution","text":"Solution","depth":2},{"id":"uniter-model-design","text":"UNITER Model Design","depth":3},{"id":"pre-training-strategy","text":"Pre-Training Strategy","depth":3},{"id":"pre-training-datasets","text":"Pre-Training Datasets","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"performance-on-pre-training-tasks","text":"Performance on Pre-Training Tasks","depth":3},{"id":"performance-on-downstream-tasks","text":"Performance on Downstream Tasks","depth":3},{"id":"what-did-the-model-learn","text":"What Did the Model Learn?","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{},"guide":null,"relatedReading":[{"id":"multimodality/vilbert","relation":"comparison","topic":"Region features in vision-language pretraining"},{"id":"multimodality/lxmert","relation":"comparison","topic":"Region features in vision-language pretraining"}]}],"text":"Let’s dive into an intriguing paper.\n\nThe authors introduce the concept of **adversarial training** in this work, which can often be confused with **denoising**. So, let’s first clarify the distinction between these two concepts:\n\n1. **Denoising**\n\n   The goal of denoising is to remove noise from images or data to recover the original, unperturbed information.\n\n   For example, if you have a noisy image, the denoising process seeks to eliminate the noise and restore the image to its clean, original state.\n\n2. **Adversarial Training**\n\n   The goal of adversarial training is to enable the model to make correct predictions even when facing **adversarial attacks**.\n\n   For instance, if a model is presented with inputs deliberately designed to mislead it into making incorrect predictions, adversarial training helps the model learn to handle such scenarios, improving its generalization capability.\n\nIn summary, **denoising** seeks to recover clean data from noisy inputs, while **adversarial training** challenges the model with deliberately chosen perturbations. Denoising need not assume that the noise pattern is known.\n\nWhen training a model, we don’t only show it standard, familiar images and text but also introduce imaginary “adversaries” — inputs deliberately altered to confuse the model. These surprise challenges ask it to cope with different situations. In VILLA, the changes are applied to image-region features or word embeddings, and the paper mainly measures downstream performance on clean data.\n\n## Defining the Problem\n\nThe authors present VILLA as the first known large-scale attempt to add adversarial training to vision–language pretraining. That is the gap they saw!\n\nThe authors aim to explore how to effectively apply adversarial training to **multimodal tasks** while ensuring good performance.\n\nBesides seeking robustness to bounded feature-space perturbations, they want to maintain or improve generalization on clean data. This is challenging because adversarial training adds considerable computation and training time. The study tests the clean-data gains; practical image or text attacks require a separate robustness evaluation.\n\n## Solution\n\nThis section is a bit technical, but let's read through it together.\n\nThe authors structure the entire model into three parts.\n\n### VILLA Model Design\n\n![VILLA Model Design](/content/papers/assets/2add79be1b0b274b2266ff4a725a9e39f4e2c1302b2776930d6b1b229624b433.jpg)\n\nThe primary goal of this stage is to learn generalized image and text representations applicable to various downstream tasks.\n\n1. **Dataset**\n\n   The dataset for pre-training (denoted as Dp in the paper) consists of image-text pairs (X_img, X_txt).\n\n2. **Feature Representation**\n\n   - Images (X_img) are transformed into region feature vectors through a fixed bottom-up feature extractor (g_bu(·)).\n   - Text (X_txt) is converted into feature vectors through a learnable word embedding function (g_emb(·)).\n\n3. **Multimodal Fusion**\n\n   To fuse image and text features, a multi-layer Transformer structure is used, popular in natural language processing and other multimodal tasks. Here, the [CLS] token holds special significance, with its encoding serving as the joint representation for multimodal tasks.\n\n### Pre-Training Tasks\n\nMLM and ITM have been discussed in previous papers, so we'll briefly cover them and spend more time on MRM. These are common pretraining tasks; VILLA's UNITER adversarial-pretraining experiment applies to **MLM and ITM**.\n\n- **Masked Language Model (MLM)**\n\n  In masked language modeling, about 15% of the input tokens are randomly selected and masked. The model's task is to predict these masked tokens based on other visible language tokens and provided visual tokens.\n\n- **Image-Text Matching (ITM)**\n\n  ITM asks the model to decide whether an image and a text are paired. It is a binary classification task.\n\n- **Masked Region Modeling (MRM)**\n\n  MRM asks the model to predict masked image-region targets using the remaining image regions and text. It resembles MLM but applies to region features rather than text tokens. Here we are explaining a common pretraining task; the VILLA-on-UNITER experiment above uses MLM and ITM.\n\n  In image data X_img, selected region features are set to zero. The model then has to infer targets for those regions.\n\n  Given other unmasked multimodal information (such as other parts of the image and related text descriptions), the model's task is to predict the correct content of the masked regions. This prediction can be quantified through cross-entropy loss, KL divergence loss, or contrastive learning.\n\n\n> [!TIP]\n> \n> Imagine a children's coloring book with the right quarter of an apple covered. Having seen whole apples before, you might guess what the hidden quarter looks like. This is only an analogy: the model predicts targets for masked **region features**, not missing photo pixels.\n\n\n### Two-Stage Adversarial Training\n\nThis refers to both pre-training and fine-tuning stages.\n\nThis discussion explores how to conduct adversarial training during pre-training and fine-tuning stages and their relationship.\n\n1. **Connection Between Pre-Training and Fine-Tuning**\n\n   Pre-training and fine-tuning are two main stages in most deep learning workflows. Pre-training aims to gain a fundamental understanding and basic feature extraction capabilities, while fine-tuning specializes the model for specific tasks. These two stages are closely related, with pre-training providing the necessary foundation for fine-tuning.\n\n2. **Importance of Cross-Modal Understanding**\n\n   The model needs to understand both image and text content in tasks like MLM or VQA. For example, if a picture contains a dog, the model needs to link this visual information with the word \"dog.\"\n\n3. **Assumptions in Adversarial Training**\n\n   - The first assumption is that adversarial pre-training can enhance the model's generalization ability, benefiting the fine-tuning stage. Generalization refers to the model's performance on unseen data.\n   - The second assumption is that during the fine-tuning stage, with specific task training data, adversarial training methods can be reused to further improve model performance.\n\n4. **Shared Mathematical Formulas**\n\n   Since pre-training and fine-tuning stages are mathematically similar, both can employ the same adversarial training methods.\n\nThe emphasis is that both stages can use adversarial training. The paper evaluates generalization on clean downstream data, not robustness by measuring attack success rates.\n\nAdversarial training in the pre-training stage helps enhance the model's basic generalization ability, while in the fine-tuning stage, it can further improve performance for specific tasks.\n\n### Perturbations\n\nThis section explores how to add adversarial perturbations in the embedding space of image and text.\n\n1. **Perturbations in Image Modality**\n\n   In the V+L models studied here, the input includes region features from a pretrained object detector. Instead of changing a dog photo's pixels, VILLA adds bounded perturbations directly to the region features supplied to the multimodal model. It does not produce a visibly attacked photo.\n\n2. **Perturbations in Text Modality**\n\n   Unlike the continuous values in image pixels, text tokens are discrete, making them harder to manipulate. Traditionally, creating adversarial examples that preserve the original semantics is challenging in text modality. However, this method chooses to add perturbations in the word embedding space instead of directly altering the words. This avoids changing the original text content while still affecting the model's prediction.\n\n   For instance, consider \"The dog barks.\" Instead of replacing or modifying the word, VILLA adds a bounded perturbation to the embedding of \"dog.\" The resulting vector need not correspond to another readable word.\n\n3. **Position Encoding**\n\n   In pre-trained V+L models, position encoding is used to encode the positions of image regions and subword tokens. In this adversarial training method, only image and word encodings are modified, keeping other features unchanged.\n\n4. **Consideration for Simultaneous Perturbations**\n\n   The authors perturb image or text features separately and combine the training losses, rather than always changing both inputs in one forward pass. The objective retains the original supervision labels and encourages the perturbed and clean prediction distributions to stay close. Table 3 also notes that simultaneous and alternating perturbation gave similar results in their test.\n\n### Multimodal \"Free\" Adversarial Training\n\n![Multimodal \"Free\" Adversarial Training](/content/papers/assets/3c1da58a37488d7692ddcae1b4b9bb14f075de85e12186aaf69077197adb8ae7.jpg)\n\nThis section elaborates on the multimodal \"free\" adversarial training method used in the VILLA model, involving multiple mathematical formulas and technical details. Don't worry, let's break it down:\n\n- **Training Objective**\n\n  In VILLA, adversarial training adds bounded perturbations to image-region features or word embeddings during training. Its purpose is to improve generalization on downstream clean data.\n\n  The training process considers three main loss components:\n\n  1. **Standard Cross-Entropy Loss (L-std)**\n\n     This is cross-entropy on clean inputs, using the supervision labels of the pretraining or downstream task.\n\n  2. **Label-Preserving Adversarial Training Loss (R-at)**\n\n     This separately searches for image- and text-embedding perturbations that increase loss, then trains against them using the original supervision labels. It is an optimization objective.\n\n  3. **Fine-Grained Adversarial Regularization Term (R-kl)**\n\n     This uses symmetric KL divergence to encourage the perturbed and clean predictive distributions to be close.\n\n- **Multimodal Adversarial Perturbations**\n\n  VILLA trains on the original image-region features and word embeddings, and on bounded perturbations of each representation, to improve downstream generalization.\n\n  The perturbations have **norm constraints**, so their magnitude is controlled.\n\n  The training has an outer minimization over model parameters and an inner maximization over bounded perturbations. The model update lowers the objective; projected gradient **ascent** seeks perturbations that raise it. This is the direction required by the inner maximization, even though the method is conventionally called PGD (Projected Gradient Descent).\n\n  Specifically, for image modality, during each iteration of updating perturbations, PGD first calculates the current perturbation's impact on the loss, i.e., the gradient of the loss with respect to the perturbation. Then, it takes a small step in this gradient direction to find a new perturbation that maximizes the loss. This process is repeated until the preset number of iterations or perturbation size limit is reached.\n\n  Imagine training a model to distinguish dogs from cats in photos. The image-region encoding represents features extracted from the photo.\n\n  1. **Adding Adversarial Perturbations**\n\n     Suppose someone nudges the extracted region features to make a cat harder for the model to distinguish from a dog. VILLA perturbs these features, **not the photo pixels**.\n\n  2. **Norm Constraints**\n\n     These changes are bounded in feature space. The bound limits their magnitude; it does not literally prevent a cat's visible face from deforming, since the photo is never edited.\n\n  3. **Optimization**\n\n     In each training iteration, the model tries to identify these adjustments and learn to ignore them, focusing on distinguishing features between dogs and cats. Using SGD, the model adjusts its parameters based on these adjustments' impact, reducing the error rate on these perturbed images. Using PGD, the model tries to find the most likely disturbances in each iteration, learning and adjusting for the worst-case scenarios.\n\n- **Further Enhancement of Adversarial Regularization**\n\n  Adversarial regularization is a technique in machine learning aimed at improving the model's generalization, ensuring it can make correct predictions even with adversarial perturbations. In some situations, adversarial perturbations can significantly alter the model's prediction, and this regularization method seeks to limit such changes.\n\n  This regularizer adds a distribution-similarity target beyond the original-label loss. It encourages predictions before and after perturbation to stay close; it is a training constraint, not a promise that every prediction stays unchanged.\n\n\n> [!TIP]\n> \n> Kullback-Leibler divergence is a tool for measuring the difference between two probability distributions. In this context, it compares the similarity of the model's prediction distributions before and after perturbations. If the distributions are similar, the KL divergence will be close to 0; otherwise, the value will increase.\n\n\n\n> [!TIP]\n> \n> For example:\n> \n> Consider a model that predicts a cat with 90% probability on a clean input, then 60% after a feature perturbation. Its confidence has changed. KL divergence compares the **full predictive distributions**, not just the 90% and 60% entries; the regularizer encourages them to stay close.\n\n\n### Free Adversarial Training Strategy\n\nAdversarial training uses perturbed representations while optimizing model parameters. Here, the authors call one gradient-reuse strategy “Free.” (Does that mean “no cost” or “freedom”? Neither is quite right.)\n\n- **Computational Cost of K-step PGD**\n\n  PGD (Projected Gradient Descent) is commonly used in adversarial training. Using K-step PGD requires K forward and backward passes through the model, which is time-consuming. Moreover, only the final perturbation after K steps is used for model training, meaning all previous steps are just for generating this final perturbation.\n\n- **Solution: FreeLB**\n\n  To make large-scale training more practical, the authors adopt FreeLB. Each perturbation step still runs forward and backward computation, but parameter gradients $\\nabla_\\theta L$ are accumulated while the perturbation gradients are calculated. The model parameters are updated once after the K steps.\n\n  This uses the intermediate perturbations as a K-fold “virtual” mini-batch. It does not create K independent new training examples or remove the roughly K-fold adversarial computation.\n\nTo make it more relatable, let's consider an example:\n\nImagine assembling a bicycle, where each step involves specific parts.\n\n- **Traditional K-step PGD Method**\n\n  This is like testing the bicycle's functionality at each assembly step. For instance, after installing the pedals, you take a short ride, then add the chain and ride again, testing at each step. While this ensures each part is correctly installed, it's time-consuming.\n\n  However, you find that only the final ride test after assembling all parts is crucial, indicating whether the entire bicycle is correctly assembled.\n\n- **FreeLB Strategy**\n\n  Now, imagine a different assembly strategy.\n\n  Instead of testing at each step, you note potential issues or considerations during assembly (equivalent to accumulating gradients). After assembling all parts, you conduct a comprehensive test and adjustment based on accumulated issues and considerations.\n\n  This analogy illustrates accumulating information before one model-parameter update. It has a limit: FreeLB **still runs a forward and backward pass at every perturbation step**, so it does not eliminate those tests or their compute cost.\n\nOf course, all analogies have limitations and may not perfectly map to the target concept, but they help provide a feel.\n\n## Discussion\n\nThe focus of this paper is mainly on the design of adversarial training.\n\nBut we still need to see if this design is effective. And how effective?\n\n### Experimental Setup\n\nTo validate VILLA, the authors evaluated pretrained V+L models on Visual Question Answering (VQA), Visual Commonsense Reasoning (VCR), Referring Expression Comprehension (RE), Visual Entailment, Image–Text Retrieval, and NLVR2.\n\nThe validation proceeds with UNITER for downstream tasks and ablations, then LXMERT for a smaller transfer test of whether the fine-tuning recipe also works on another V+L model.\n\nIf you haven't read about these two models, refer to the following:\n\n- **Links: [LXMERT](/blog/papers/multimodality/lxmert), [UNITER](/blog/papers/multimodality/uniter)**\n- **Main Model Configurations: UNITER and LXMERT**\n\n  - **UNITER**\n\n    - UNITER-base: A single-stream model with 12 layers, 768 hidden units per layer, and 12 attention heads.\n    - UNITER-large: A larger version with 24 layers, 1024 hidden units per layer, and 16 attention heads.\n    - Same structure as BERT, but with inputs combining both modalities (vision and language).\n\n  - **LXMERT**\n    - LXMERT is a dual-stream model with independent self-attention layers for each modality (9 layers for text, 5 layers for vision), followed by 5 layers for cross-attention and self-attention processing.\n\n- **Setup Details**\n  - For UNITER experiments, the authors used four main large datasets for pre-training: COCO, Visual Genome (VG), Conceptual Captions, and SBU Captions.\n  - VILLA's adversarial pretraining applies to UNITER's MLM and ITM tasks. UNITER-base runs 100k standard steps and 100k adversarial steps; UNITER-large runs 425k and 75k respectively. The total step counts match their respective baselines, but adversarial steps require more computation, so the comparison is not equal compute.\n\n### VILLA on UNITER and Analysis\n\n![VILLA on UNITER and Analysis](/content/papers/assets/4beffdd6291a527376445d3a27ab95458ef75e248ae97f1d9b44462aec0a19a9.jpg)\n\n1. **VILLA Compared to Other Pre-Trained V+L Models**\n\n   - VILLA performs strongly on most listed columns, but does not win every one. For example, VILLA-base Flickr30k image retrieval R@10 is **95.82**, below UNITER-base's **96.08**.\n   - Compare VILLA-base with UNITER-base using the same split and metric:\n\n2. **In VQA: test-std rises by 0.76 percentage points over UNITER-base**\n\n   - In VCR Q→AR: the **parenthesized ensemble** scores 60.6 versus 58.2, a 2.4-point gain; the single models score 59.75 versus 57.76, a 1.99-point gain.\n   - In NLVR2 test-P: 79.30 versus 77.85, a 1.45-point gain.\n   - In SNLI-VE test: 79.03 versus 78.28, a 0.75-point gain.\n   - In Flickr30k image/text retrieval: +2.22/+0.70 points at R@1.\n   - The average gain across three RE datasets is 0.99 points; individual splits vary.\n\n3. **VILLA-large model improvements**\n   - Similar performance improvement trends overall.\n   - In VCR Q→AR: the parenthesized ensemble scores 65.7 versus 62.8, a 2.9-point gain; the single-model scores are 65.18 versus 62.59, a 2.59-point gain. The authors suggest that the task's social dynamics and common-sense reasoning might be involved, but this experiment does not isolate that cause.\n   - In VQA test-std: from 74.02 to 74.87 for the single models.\n   - An ensemble reaches 75.85 on VQA test-std, a different condition from the 74.87 single-model result.\n\n### In-Depth Analysis of VILLA\n\n1. **Pre-Training vs. Fine-Tuning**\n\n   ![Pre-Training vs. Fine-Tuning](/content/papers/assets/12b51a083cba1c191ad5ceecf392f610615c4a76a3d8116d4b767403b9a67f6a.jpg)\n\n   Using UNITER-base to study the effects of adversarial training in pre-training and fine-tuning stages.\n\n   - UNITER (reimp.): UNITER-base model re-implemented with standard training.\n   - VILLA-pre vs. VILLA-fine: Models applying adversarial training only in pre-training or fine-tuning stages, respectively.\n   - Results: VILLA-pre and VILLA-fine provided +0.51 and +0.82 average performance gains across six evaluation tasks. Combining both stages resulted in +1.15 gain.\n\n   ![Training Curves](/content/papers/assets/c83b1907ded3d7a6fd244dec8f6fdf28052bf006ac981db0236d388285f7054a.jpg)\n\n   On these three validation curves, full VILLA is ahead of original UNITER in the later training period. UNITER is still ahead for part of early VQA training, and the gap does not grow at every step.\n\n2. **Image vs. Text Modality (Table 3a)**\n\n   ![Image vs. Text Modality](/content/papers/assets/63c9d5a1538d4044541d8bbd7428407659ecefd6798bcd5dc465938c86d4c0c1.jpg)\n\n   These adversarial examples are perturbations of image-region features or word embeddings; the paper does not produce a photo or sentence for a human visual similarity comparison. Table 3(a) contrasts text-only, image-only, and both-modality training.\n\n   - Experiments and Results\n     - Independent image perturbation: Adding perturbation only to image features significantly improves model performance. This contrasts with traditional belief where adversarial training often negatively impacts model accuracy on clean images.\n     - Intuition vs. Actual Results: A single perturbed modality already helps. Yet the **both** row has the highest VILLA-base VQA and VCR Q→AR values, and all four VILLA-large columns. The paper also reports similar results for simultaneous versus alternating perturbation.\n\n   VCR requires social and common-sense reasoning about images. Its gains here are larger than VQA's; the authors suggest task complexity as a possible reason, but the ablation does not test that explanation separately.\n\n3. **FreeLB vs. VILLA (Table 3b)**\n\n   ![FreeLB vs. VILLA](/content/papers/assets/63c9d5a1538d4044541d8bbd7428407659ecefd6798bcd5dc465938c86d4c0c1.jpg)\n\n   Table 3(b) compares FreeLB with **VILLA-fine** on VQA and VCR. Every listed VILLA-fine column is higher in this fine-tuning comparison. In the base model, VQA rises from **72.82 to 73.29** and VCR Q→AR from **58.73 to 59.30**.\n\n   ***\n\n   But wait, didn't we mention earlier that VILLA adopts the FreeLB strategy? Why compare it again?\n\n   VILLA uses FreeLB's gradient accumulation strategy but adds fine-grained adversarial regularization. That is why the paper compares VILLA-fine with FreeLB rather than treating them as the same method.\n\n   The table supports an improvement from that added regularization in these tested models and tasks.\n\n4. **Results on LXMERT**\n\n   ![Results on LXMERT](/content/papers/assets/a4d9a65f31edce937b5c88e20b42882435d46fc6e6b9cf42a23e19c31ee554c6.jpg)\n\n   To check whether the method is limited to UNITER, the authors applied **VILLA-fine only** to LXMERT. Relative to the reimplemented LXMERT baseline, VQA test-dev rises **72.50→73.02**, GQA test-dev **59.92→60.98**, and NLVR2 test-P **74.75→75.73**. Its VQA test-std **73.18** exceeds UNITER-base's **72.91**, while NLVR2 test-P **75.73** remains below UNITER-base's **77.85**.\n\n   The three-task Meta-Ave. increases from **69.12 to 70.00**, or 0.88 points. This is evidence that adversarial fine-tuning transfers to LXMERT; LXMERT did not receive VILLA's adversarial pretraining.\n\n## Conclusion\n\nIn exploring deep-learning robustness, adversarial attacks are an important area. This study considers adversarial training for vision-and-language (V+L) representations. Attack strategies for these models were relatively underexplored: backpropagating through multimodal Transformers to a CNN backbone for pixel-level image attacks, and crafting text attacks that fit the visual context, are challenging. VILLA instead perturbs the **input feature and embedding spaces** and mainly evaluates clean-data tasks.\n\nVILLA is an adversarial training framework for vision-and-language representation learning. It applies adversarial training during both pretraining and fine-tuning. By perturbing the embedding spaces, it improves many reported benchmark results, with exceptions in individual columns.\n\nThe authors view VILLA as a “plug-in” training concept: an existing V+L architecture can incorporate its adversarial training recipe without being replaced. You still need to train the model; it is not a last-minute inference switch. Gains of roughly 1–3 percentage points apply to particular models, tasks, splits, and metrics rather than every score.\n\nFinally, the authors acknowledge that despite VILLA's significant benefits, the time-consuming nature of adversarial training remains a challenge. Future work aims to find more efficient adversarial training methods to make large-scale pre-training more feasible in everyday practice.\n","imageSizes":{"/content/papers/assets/2add79be1b0b274b2266ff4a725a9e39f4e2c1302b2776930d6b1b229624b433.jpg":{"width":1224,"height":332},"/content/papers/assets/3c1da58a37488d7692ddcae1b4b9bb14f075de85e12186aaf69077197adb8ae7.jpg":{"width":1024,"height":616},"/content/papers/assets/4beffdd6291a527376445d3a27ab95458ef75e248ae97f1d9b44462aec0a19a9.jpg":{"width":982,"height":1024},"/content/papers/assets/12b51a083cba1c191ad5ceecf392f610615c4a76a3d8116d4b767403b9a67f6a.jpg":{"width":1024,"height":207},"/content/papers/assets/c83b1907ded3d7a6fd244dec8f6fdf28052bf006ac981db0236d388285f7054a.jpg":{"width":1024,"height":271},"/content/papers/assets/63c9d5a1538d4044541d8bbd7428407659ecefd6798bcd5dc465938c86d4c0c1.jpg":{"width":1024,"height":301},"/content/papers/assets/a4d9a65f31edce937b5c88e20b42882435d46fc6e6b9cf42a23e19c31ee554c6.jpg":{"width":1024,"height":247}}}
