[Paper Review] X-LXMERT: Paint, Caption and Answer Questions with Multi-Modal Transformers
This paper introduces X-LXMERT, a unified multimodal transformer that extends LXMERT to generate high-quality, semantically meaningful images from text captions by refining training objectives: discretizing visual features, using uniform masking across diverse ratios, and aligning pre-training data to generation tasks. The model achieves state-of-the-art image generation quality comparable to dedicated generative models while retaining strong performance on visual question answering and captioning.
Mirroring the success of masked language models, vision-and-language counterparts like ViLBERT, LXMERT and UNITER have achieved state of the art performance on a variety of multimodal discriminative tasks like visual question answering and visual grounding. Recent work has also successfully adapted such models towards the generative task of image captioning. This begs the question: Can these models go the other way and generate images from pieces of text? Our analysis of a popular representative from this model family - LXMERT - finds that it is unable to generate rich and semantically meaningful imagery with its current training setup. We introduce X-LXMERT, an extension to LXMERT with training refinements including: discretizing visual representations, using uniform masking with a large range of masking ratios and aligning the right pre-training datasets to the right objectives which enables it to paint. X-LXMERT's image generation capabilities rival state of the art generative models while its question answering and captioning abilities remains comparable to LXMERT. Finally, we demonstrate the generality of these training refinements by adding image generation capabilities into UNITER to produce X-UNITER.
Motivation & Objective
- Investigate whether powerful vision-and-language BERT-style models like LXMERT can generate meaningful images from text prompts.
- Identify the root cause of poor image generation in existing models, particularly the use of regression-based visual feature prediction.
- Develop a set of training refinements to enable strong image generation capabilities without degrading discriminative performance.
- Demonstrate the generalizability of these refinements to other multimodal architectures, such as UniFormer.
- Create a unified model capable of answering questions, generating captions, and synthesizing images from text.
Proposed method
- Replace object detection bounding boxes with fixed grid features to simplify visual input representation.
- Discretize visual features into a finite set of clusters to enable classification-based prediction instead of regression.
- Apply uniform masking across a wide range of masking ratios (from 10% to 90%) during pre-training to improve generalization to full image generation.
- Reconfigure pre-training data to align with the image generation objective, using masked image feature prediction as a primary objective.
- Integrate a diffusion-based image generator that samples visual features autoregressively from the model’s predictions.
- Use Gibbs sampling to generate diverse and coherent captions from the model’s text stream, conditioned on initial prefixes.
Experimental results
Research questions
- RQ1Can vision-and-language BERT models like LXMERT generate semantically meaningful images from text descriptions?
- RQ2Why do existing multimodal models fail at image generation despite strong performance on discriminative tasks?
- RQ3What training refinements are necessary to enable reliable image generation in multimodal transformers?
- RQ4To what extent can these refinements be generalized across different multimodal architectures?
- RQ5How does the performance of the extended model compare to dedicated image generation models in terms of image quality and semantic consistency?
Key findings
- LXMERT in its original form fails to generate coherent or meaningful images, producing mostly incomprehensible outputs due to regression-based visual feature prediction.
- X-LXMERT achieves an inception score (IS) of 22.7 and fid score (FID) of 37.4 on image generation, rivaling state-of-the-art generative models.
- Discretizing visual representations and using uniform masking are critical for high-quality image generation, with ablation showing a drop to IS 1.5 and FID 304.4 when omitted.
- The model maintains strong performance on visual question answering, with only a ~2% drop in accuracy on NLVR2 compared to LXMERT, indicating minimal degradation on discriminative tasks.
- The same training refinements successfully enable image generation in UniFormer, producing X-Uniter with IS 20.1 and FID 51.4, demonstrating broad applicability.
- Intermediate image generation via autoregressive sampling shows a coherent progression: salient objects appear first, followed by details and background, indicating structured reasoning.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.