Retrieval Augmented Visual Question Answering with Outside Knowledge

Weizhe Lin, Bill Byrne

Researchers from the University of Cambridge have developed RA-VQA, a framework that jointly trains a knowledge retriever and an answer generator to solve complex visual questions. By allowing these two components to "talk" to each other during training, the system achieves state-of-the-art performance on the OK-VQA dataset, even outperforming models that are orders of magnitude larger.

The Challenge of Outside-Knowledge VQA

Standard Visual Question Answering (VQA) asks a model to answer a question based solely on an image (e.g., "What color is the car?"). However, Outside-Knowledge VQA (OK-VQA) involves questions that cannot be answered by the image alone (e.g., "How many teeth does this animal usually have?").

To solve this, modern systems use Dense Passage Retrieval (DPR) to find relevant documents in a massive knowledge base (like Wikipedia) and then feed those documents to a generator to produce an answer. The researchers identified a significant "gap" in existing methods: the retriever and generator are usually trained separately. The retriever is often trained using "pseudo-relevance"—checking if a document contains the answer string—which is a noisy signal. A document might contain the word "26" but have nothing to do with animal teeth, leading the retriever to provide "distractor" information that confuses the generator.

The RA-VQA Framework

The authors propose a "neural-retrieval-in-the-loop" framework called RA-VQA. The process follows four main stages as illustrated in the architecture below:

The RA-VQA architecture showing the joint training of the retriever and generator.
  1. Vision-to-Language Transformation: Instead of processing raw pixels directly in the retrieval loop, the image is converted into a rich text description. This includes detected objects, their attributes (color, material), a generated caption, and any text found via OCR.
  2. Joint Training: Unlike previous "two-step" systems, RA-VQA treats the retriever (based on BERT) and the generator (based on T5) as a single unit. They are trained together using a novel loss function that allows gradients to flow back from the generator to the retriever.
  3. Refined Feedback: The system uses both pseudo-relevance labels and the model’s own predictions to adjust the retriever. If the generator produces the correct answer using a specific document, the retriever is encouraged to prioritize similar documents. Conversely, it learns to reject documents that contain the answer but lead to incorrect reasoning.
  4. Customized Generation Targets: The authors found that training the generator to produce the same answer regardless of the document was inefficient. Instead, they customize the target answer for each retrieved document, improving the model's ability to extract reliable information.

Key Insights and Efficiency

  • The Power of Joint Training: Joint training makes retrieval much more efficient. RA-VQA achieves peak performance using only 5 retrieved documents during training, whereas previous systems often required 50 or more. This drastically reduces the computational cost and GPU memory required.
  • Diagnostic Metrics (HSR & FSR): The paper introduces the Hit Success Ratio (HSR) and Free Success Ratio (FSR). These help researchers understand if a model is actually using the retrieved knowledge (HSR) or just "guessing" based on internal knowledge stored in its weights (FSR).

Results and Performance

RA-VQA achieved a 54.48 VQA score on the OK-VQA dataset, setting a new state-of-the-art. Notably, it outperformed the KAT-Ensemble model, which utilizes GPT-3 (175B parameters), despite RA-VQA being built on the much smaller T5-large (770M parameters).

Comparison of RA-VQA against state-of-the-art models on the OK-VQA dataset.

Beyond accuracy, the model is remarkably efficient. Training RA-VQA takes approximately 3 hours on a single A100 GPU, making it significantly more accessible than massive ensemble models that require vast computing resources. On the FVQA (Fact-based VQA) dataset, the model ranked second overall, proving the framework's generalizability across different types of knowledge-heavy tasks.

Limitations and Future Work

The authors acknowledge that by converting images to text, the model may lose subtle spatial information (e.g., relative positioning of objects). Additionally, the system's performance is inherently tied to the quality of its knowledge corpus. Future research may explore "query-specific" image processing, where the image-to-text transformation is dynamically guided by the question to capture more relevant visual details.

Summary updated

BibTeX
@inproceedings{lin2022retrieval,
  author = {Weizhe Lin and Bill Byrne},
  title = {{Retrieval Augmented Visual Question Answering with Outside Knowledge}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.emnlp-main.772},
}
Figure