{"notes":[{"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/vilbert","category":"multimodality","legacyPath":"multimodality/1908-vilbert","legacySlug":"1908-vilbert","legacyPaths":[],"title":"ViLBERT","subtitle":"Interwoven Layers in the Beginning","author":"Z. Yuan","paperDate":"2019-08-06","publishedOn":"2024-06-04","paperTitle":"ViLBERT: Pretraining Task-Agnostic Visiolinguistic Representations for Vision-and-Language Tasks","paperUrl":"https://arxiv.org/abs/1908.02265","bibliography":{"title":"ViLBERT: Pretraining Task-Agnostic Visiolinguistic Representations for Vision-and-Language Tasks","authors":["Jiasen Lu","Dhruv Batra","Devi Parikh","Stefan Lee"],"url":"https://arxiv.org/abs/1908.02265","pdfUrl":"https://arxiv.org/pdf/1908.02265","codeUrl":null,"preprint":{"id":"1908.02265","submittedOn":"2019-08-06","url":"https://arxiv.org/abs/1908.02265"},"publication":{"venue":"NeurIPS","year":2019,"kind":"conference","url":"https://papers.nips.cc/paper_files/paper/2019/hash/c74d97b01eae257e44aa9d5bade97baf-Abstract.html"},"citation":"@misc{multimodalityvilbert2019,\n  title = {{ViLBERT: Pretraining Task-Agnostic Visiolinguistic Representations for Vision-and-Language Tasks}},\n  author = {Jiasen Lu and Dhruv Batra and Devi Parikh and Stefan Lee},\n  year = {2019},\n  eprint = {1908.02265},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/1908.02265}\n}\n","citationPath":"/content/papers/citations/multimodality/vilbert.86fae62edbca.bib"},"thumbnail":{"src":"/content/papers/assets/ea83dc4933aa28e1dfed328770285281323328ef76bc1e9fede2130dd9c86cf5.jpg","width":1596,"height":328},"locale":"en","path":"/content/papers/en/multimodality/vilbert.925cb036a151.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-tasks","text":"Pre-training Tasks","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"how-effective-is-vilbert","text":"How Effective is ViLBERT?","depth":3},{"id":"impact-of-model-depth-on-performance","text":"Impact of Model Depth on Performance","depth":3},{"id":"effect-of-pre-training-data","text":"Effect of Pre-training Data","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{},"guide":null,"relatedReading":[{"id":"multimodality/lxmert","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":"During this period, researchers have increasingly focused on multimodal studies.\n\nMany models, such as ViLBERT, VL-BERT, and VisualBERT, were all published around the same time.\n\nLXMERT incorporates more attention mechanisms and a comprehensive pre-training strategy to provide a relatively complete vision-and-language solution for its time.\n\n## Defining the Problem\n\nThe major challenge these models aim to address is similar:\n\n- **How can we design and train a model that effectively understands and represents both visual and language information while performing well across various cross-modal tasks?**\n\nViLBERT, VisualBERT and LXMERT are concurrent explorations. This paper asks whether cross-modal pretraining transfers across tasks; it should not be framed as dismissing those contemporary models as failed predecessors.\n\n## Approach\n\n### Model Architecture\n\n![Figure 1: language and object-relationship encoders feed a bidirectional cross-modality encoder](/content/papers/assets/0e45137e5df15d7a9e2ae46beadc426dc27aff867daf126d283da3c675178f70.jpg)\n\nThe design draws on Transformer self-attention and cross-attention so the image and sentence can first be encoded separately, then interact. Figure 1 has three encoders: a language encoder, an object-relationship encoder and a cross-modality encoder. The first two use self-attention within each modality. The last first exchanges information using **bidirectional cross-attention**, then applies self-attention and feed-forward layers within each stream. The language/object/cross encoders have **9/5/5** layers, with hidden size **768**.\n\nIn the language component, sentences are tokenized using a WordPiece tokenizer, with each word and its position within the sentence represented as a vector.\n\nFor vision, a pretrained Faster R-CNN detector, frozen during LXMERT training, supplies **36** objects per image. Each object's 2048-dimensional RoI feature and bounding-box position are projected separately and combined, preserving spatial cues for the attention layers.\n\nAs illustrated, LXMERT provides three types of outputs: language, vision, and cross-modal. Language and vision outputs derive directly from feature sequences in the cross-modal encoder, while the cross-modal output leverages a special `[CLS]` token, representing the combined information from both modalities and suited for a range of downstream tasks.\n\n### Pre-training Strategy\n\n![Figure 2: masked words and regions, RoI regression, detector-label classification, image–text matching and image QA](/content/papers/assets/9f1c696c31e0fb59f4fd40482dace5eedeb4d76c00706d944e94cc71881bb39e.jpg)\n\nTo help the model develop a deeper understanding of vision-language connections, LXMERT is pre-trained on a large, aggregated dataset.\n\nThe pre-training tasks include:\n\n- **Language Task – Masked Cross-Modal Language Model**\n\n  The model predicts masked tokens rather than generating an open-ended sentence. As in BERT, **15%** of words are selected; LXMERT can also use the image to predict them.\n\n  For example, if the word “apple” is masked in the sentence and the image displays an apple, LXMERT can use the visual hint to fill in the word.\n\n- **Visual Task – Masked Object Prediction**\n\n  Zero out RoI features with **15%** probability, then regress their original features and classify their detector labels using remaining visual/text context. Labels come from Faster R-CNN and can be noisy. These are two objectives, not pixel reconstruction.\n\n- **Cross-Modal Tasks**\n\n  - **Cross-Modal Matching**\n\n    This task strengthens the model’s ability to associate an image and sentence correctly. The model must determine if a sentence accurately describes an image, similar to BERT’s “Next Sentence Prediction” but focused on image-language alignment.\n\n  - **Image Question Answering (QA)**\n\n    Given an image and question, classify among **9,500** answer candidates; this is not open-ended text generation. The loss applies only to unreplaced image–question pairs.\n\nPre-training data is sourced from five major vision-language datasets, using images primarily from MS COCO and Visual Genome. Altogether, the data comprises 180,000 images with 9.18 million associated image-sentence pairs.\n\nEncoders and embeddings start from scratch, without BERT initialization; the visual detector is still pretrained. Losses have equal weights across 20 epochs, with image QA added only in the last 10. The reported run takes about ten days on four Titan Xp GPUs; each downstream task still requires fine-tuning.\n\n## Discussion\n\n### Comparison with Other Models\n\n![Table 2: VQA and GQA test-standard scores and NLVR2 Test-U accuracy and consistency](/content/papers/assets/7a78c06a2d1d18fecf8115016a4095bc0c01f48bb353e8e7c3e18cc25a3bf5da.jpg)\n\n\n> [!TIP]\n> \n> A quick note: in the paper, the authors use “State-of-the-Art” to refer to some of their comparison models without specifying them precisely, which led me to dig around to confirm the exact SOTA references...\n> Alright, let’s move on.\n\n\nDespite `table1` in the imported filename, this image is the paper's **Table 2**. VQA and GQA use test-standard; NLVR2 uses the unreleased Test-U split. These are comparisons across different tasks and earlier methods, not a single controlled ablation.\n\n1. **VQA (Visual Question Answering)**\n\n   The previous SOTA result was presented by Kim et al. in 2018 with [**BAN+Counter**](https://arxiv.org/abs/1805.07932), which outperformed other recent methods such as MFH, Pythia, DFAF, and Cycle-Consistency on VQA.\n\n   Overall accuracy is **72.5% versus 70.4%**, a **2.1-point** gain. Binary is **88.2% versus 85.8%**, and Other **63.1% versus 60.7%**, each **2.4 points** higher. Without BAN+Counter's explicit counting module, Number is **54.2% versus 53.7%**, a **0.5-point** gain.\n\n2. **GQA**\n\n   The comparison uses the contemporary GQA leaderboard’s BAN baseline. The 2018 citation refers to the BAN method, not the date of this GQA evaluation.\n\n   Overall accuracy is **60.3% versus 57.1%**, a **3.2-point** gain; Open questions score **45.0% versus 40.4%**, a **4.6-point** gain. The authors suggest GQA's greater emphasis on visual reasoning may explain the larger improvement.\n\n3. **NLVR2**\n\n   On unreleased Test-U, accuracy is **76.2% versus 53.5%**, a **22.7-point** gain. Consistency is **42.1% versus 12.0%**, about **3.5 times** the earlier score. Consistency measures whether every image pair associated with a statement is answered correctly; it is distinct from per-example accuracy.\n\n### Importance of Pre-training\n\n1. **Comparison between BERT and LXMERT**\n\n   The paper compares variants that use BERT for the language encoder, add visual features or cross-attention, or initialize LXMERT from BERT. On the NLVR2 dev set, variants without LXMERT pre-training score **50.9%–52.6%**, while the full model scores **74.9%**, a gap of roughly 22–24 percentage points. These are multimodal configurations; the table is not showing a 22-point drop for a plain text-only BERT image classifier.\n\n   LXMERT offers a specialized pre-training strategy that accounts for both language and vision, capturing complex relationships across modalities more effectively.\n\n2. **Importance of Visual QA Pre-training**\n\n   With visual QA pre-training, the model learns not only language structure but also how to interpret and respond to questions based on image content, improving performance on tasks like NLVR2.\n\n   Table 4 reports NLVR2 dev scores of 72.4 and 74.9, a 2.5-point gain. The paper’s prose says 2.1%, which conflicts with the table; the arithmetic here follows the table. Both indicate a gain from QA pretraining.\n\n3. **Pre-training and Data Augmentation**\n\n   Here DA means adding questions from other QA datasets during fine-tuning, not generic crops or flips. In Table 4, DA scores slightly below the corresponding single-task fine-tuning setting both without QA pre-training (**68.0% versus 68.9%** on VQA) and with it (**69.1% versus 69.9%**). The experiment favors pre-training with multiple QA datasets followed by single-task fine-tuning over mixing those datasets at the fine-tuning stage.\n\n## Conclusion\n\nBy combining several pre-training tasks, LXMERT achieves strong results across vision-language tasks. It sets new benchmarks among the methods listed in the paper for VQA and GQA, and its transfer to NLVR2 is especially striking: **76.2% versus 53.5%** on Test-U.\n\nWe see why the authors put so much emphasis on pre-training here. The gains come from the combination of architecture, data and objectives; the ablations support parts of that story without assigning every point to one attention layer.\n","imageSizes":{"/content/papers/assets/0e45137e5df15d7a9e2ae46beadc426dc27aff867daf126d283da3c675178f70.jpg":{"width":1024,"height":325},"/content/papers/assets/9f1c696c31e0fb59f4fd40482dace5eedeb4d76c00706d944e94cc71881bb39e.jpg":{"width":1226,"height":380},"/content/papers/assets/7a78c06a2d1d18fecf8115016a4095bc0c01f48bb353e8e7c3e18cc25a3bf5da.jpg":{"width":1024,"height":315}}}
