LXMERT: Learning Cross-Modality Encoder Representations from Transformers

Hao Tan, Mohit Bansal
8/20/2019
cs.CLcs.CVcs.LG

Official code: airsplay/lxmert (967 stars, MIT, last commit 2022-10-22).

Abstract

Vision-and-language reasoning requires an understanding of visual concepts, language semantics, and, most importantly, the alignment and relationships between these two modalities. We thus propose the LXMERT (Learning Cross-Modality Encoder Representations from Transformers) framework to learn these vision-and-language connections. In LXMERT, we build a large-scale Transformer model that consists of three encoders: an object relationship encoder, a language encoder, and a cross-modality encoder. Next, to endow our model with the capability of connecting vision and language semantics, we pre-train the model with large amounts of image-and-sentence pairs, via five diverse representative pre-training tasks: masked language modeling, masked object prediction (feature regression and label classification), cross-modality matching, and image question answering. These tasks help in learning both intra-modality and cross-modality relationships. After fine-tuning from our pre-trained parameters, our model achieves the state-of-the-art results on two visual question answering datasets (i.e., VQA and GQA). We also show the generalizability of our pre-trained cross-modality model by adapting it to a challenging visual-reasoning task, NLVR2, and improve the previous best result by 22% absolute (54% to 76%). Lastly, we demonstrate detailed ablation studies to prove that both our novel model components and pre-training strategies significantly contribute to our strong results; and also present several attention visualizations for the different encoders. Code and pre-trained models publicly available at: https://github.com/airsplay/lxmert

View on arXivView PDF

Code Implementations(1)

airsplay/lxmertOfficial100%
MIT

PyTorch code for EMNLP 2019 paper "LXMERT: Learning Cross-Modality Encoder Representations from Transformers".

967160Shell, PythonAug 20, 20194 years agoMIT

Similar Papers

Cite this paper

@article{tan2019lxmert,
  title  = {LXMERT: Learning Cross-Modality Encoder Representations from Transformers},
  author = {Hao Tan and Mohit Bansal},
  year   = {2019},
  eprint = {1908.07490},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1908.07490}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1908.07490.svg)](https://codeofpaper.com/paper/1908.07490)

Discussion