VD-BERT: A Unified Vision and Dialog Transformer with BERT

Yue Wang, Shafiq R. Joty, Michael R. Lyu, Irwin King, Caiming Xiong, Steven C. H. Hoi

Abstract

Visual Dialog (VisDial) requires an agent to maintain a conversation about an image, necessitating a deep understanding of both visual content and conversational context. VD-BERT is a unified Transformer framework that adapts pretrained BERT models to this complex task. By treating image features and multi-turn dialog history as a single, bidirectional sequence, the model achieves state-of-the-art results in both answer ranking and generation without requiring massive multimodal pretraining.

Introduction

Visual Dialog represents a significant advancement in complexity over standard Visual Question Answering (VQA). While VQA typically involves a single-turn interaction, VisDial requires resolving linguistic nuances like co-reference (e.g., "it" or "they") across multiple turns.

Existing research often suffers from two major limitations:

  1. Unidirectional Attention: Most models use the current question to query the image or history in a one-way flow, limiting mutual interactions.
  2. Architectural Split: Systems frequently require distinct architectures for discriminative tasks (ranking) versus generative tasks (synthesis).

VD-BERT addresses these by leveraging a single-stream Transformer encoder based on the BERT-base architecture to facilitate rich, bidirectional interactions between all modalities.

Methodology: Unified Bidirectional Interaction

The core of VD-BERT is a single-stream Transformer that processes visual features and dialog history as a unified sequence.

Comparison of interaction patterns between VQA, standard VisDial, and VD-BERT.

Key Innovations

  • Unified Input Stream: The model integrates 36 object regions (extracted via Faster R-CNN) and the entire dialog history (caption and previous Q&A pairs) into one sequence. Special tokens like [EOT] (End of Turn) and [PRED] maintain structural integrity.
  • Bidirectional Interaction: Unlike traditional "question-to-history" models, VD-BERT allows every element—image regions and words—to attend to every other element simultaneously.
  • Visually Grounded Objectives: The authors adapt BERT’s training tasks:
  • Masked Language Modeling (MLM): Predicting missing words using both textual and visual context.
  • Next Sentence Prediction (NSP): Determining if a candidate answer is the correct follow-up.
  • Flexible Decoding: By adjusting the self-attention mask, the same encoder performs discriminative ranking (bidirectional masks) or generative synthesis (seq2seq masks).
  • Rank Optimization: During fine-tuning, the model employs ListNet, a listwise ranking loss that improves the distinction between multiple semantically similar answers.

Experimental Results

VD-BERT was evaluated on the VisDial v0.9 and v1.0 datasets. VisDial v1.0 is particularly challenging due to its "dense annotations," where candidate answers receive relevance scores (0 to 1), enabling evaluation via the NDCG metric.

The model established a new state-of-the-art on the VisDial v1.0 leaderboard:

  • Performance: A single model achieved 74.54 NDCG, while an ensemble reached 75.35 NDCG, surpassing the 2019 challenge winner.
  • Efficiency: Notably, VD-BERT achieved these results without pretraining on external vision-language datasets like Conceptual Captions, relying instead on the inherent representational power of BERT.

Discussion and Key Insights

  • BERT as a Multimodal Prior: Initializing with standard text-only BERT performed better than using Vision-Language Pretraining (VLP) models. This suggests BERT’s linguistic representations are a more robust starting point for complex dialog than current general-purpose multimodal models.
  • The NDCG vs. MRR Conflict: Fine-tuning on dense annotations causes a spike in NDCG but a drop in Mean Reciprocal Rank (MRR). This reveals a tension between identifying "the one true answer" versus recognizing "all plausible answers."
  • Textual Dominance: Ablation studies showed the model performs remarkably well using only text, suggesting that dialog history often provides sufficient context to narrow down answers even without visual evidence.

Conclusion and Future Work

While VD-BERT sets a new benchmark, it highlights ongoing challenges in the field. The relatively small performance drop when removing visual features suggests a need for better mechanisms to enforce visual grounding. Furthermore, the trade-off between MRR and NDCG indicates that evaluation frameworks for Visual Dialog require further refinement to balance correctness with relevance. Future research may also explore more efficient attention mechanisms to handle the increasing context length of multi-turn conversations.

Summary updated

Abstract

Visual dialog is a challenging vision-language task, where a dialog agent needs to answer a series of questions through reasoning on the image content and dialog history. Prior work has mostly focused on various attention mechanisms to model such intricate interactions. By contrast, in this work, we propose VD-BERT, a simple yet effective framework of unified vision-dialog Transformer that leverages the pretrained BERT language models for Visual Dialog tasks. The model is unified in that (1) it captures all the interactions between the image and the multi-turn dialog using a single-stream Transformer encoder, and (2) it supports both answer ranking and answer generation seamlessly through the same architecture. More crucially, we adapt BERT for the effective fusion of vision and dialog contents via visually grounded training. Without the need of pretraining on external vision-language data, our model yields new state of the art, achieving the top position in both single-model and ensemble settings (74.54 and 75.35 NDCG scores) on the visual dialog leaderboard. Our code and pretrained models are released at https://github.com/salesforce/VD-BERT.
BibTeX
@inproceedings{wang2020vd,
  author = {Yue Wang and Shafiq R. Joty and Michael R. Lyu and Irwin King and Caiming Xiong and Steven C. H. Hoi},
  title = {{VD-BERT: A Unified Vision and Dialog Transformer with BERT}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2020},
  doi = {10.18653/v1/2020.emnlp-main.269},
}
Figure