KAT: A Knowledge Augmented Transformer for Vision-and-Language

Liangke Gui, Borui Wang, Qiuyuan Huang, Alexander Hauptmann, Yonatan Bisk, Jianfeng Gao

Abstract

Outside Knowledge Visual Question Answering (OK-VQA) requires models to reason using information not present in the image pixels. We present KAT (Knowledge Augmented Transformer), a framework that integrates implicit knowledge from large language models (GPT-3) and explicit knowledge from structured databases (Wikidata). By employing an encoder-decoder architecture to jointly reason over these heterogeneous sources, KAT achieves a new state-of-the-art on the OK-VQA benchmark, demonstrating the power of unifying factual and commonsense knowledge.

Introduction: The Challenge of Outside Knowledge

Standard Visual Question Answering (VQA) typically focuses on identifying objects or attributes within an image. However, OK-VQA demands a higher level of cognitive processing. For instance, identifying a bird is a recognition task, but answering "What did this organism evolve from?" requires biological knowledge.

Examples of OK-VQA tasks requiring external knowledge about biology and maritime equipment.

Current research often splits into two methodologies: implicit methods that leverage the internal parameters of massive pre-trained models, and explicit methods that retrieve facts from knowledge graphs. KAT seeks to bridge the gap between these approaches, addressing the noise in explicit retrieval and the lack of grounding in implicit models.

The KAT Architecture

The KAT framework utilizes a multi-stage pipeline to feed a central transformer-based reasoning engine.

Knowledge Retrieval

  1. Explicit Knowledge: KAT uses a CLIP-based retriever to match image regions to Wikidata entities. By comparing visual embeddings with text embeddings of entity descriptions, the model grounds specific image patches to detailed encyclopedic entries.
  2. Implicit Knowledge: GPT-3 acts as a frozen knowledge base. The system converts images into text captions and prompts GPT-3 to provide a tentative answer and supporting evidence (a rationale).

Reasoning and Generation

The core of the system is the Knowledge Augmented Transformer, which uses an encoder-decoder structure (e.g., T5 or BART).

The KAT architecture pipeline, showing the integration of explicit Wikidata entities and implicit GPT-3 rationales into a transformer reasoning module.

The encoder processes the question alongside each piece of retrieved knowledge separately. A specialized reasoning module then employs global representation and cross-attention to weigh these inputs, allowing the model to ignore irrelevant "distractor" facts. Finally, the decoder generates an open-ended answer.

Experimental Setup and Results

KAT was evaluated primarily on the OK-VQA benchmark, which contains over 14,000 images. The model utilized a curated subset of Wikidata (~423,000 triplets) for explicit facts and GPT-3 (175B) for implicit commonsense.

Key Performance Metrics

  • State-of-the-Art: KAT achieved 54.41% accuracy on the OK-VQA test set, representing a +6% absolute improvement over previous leaders like MAVEx and PICa.
  • Reasoning Impact: Ablation studies showed that removing the reasoning module in favor of simple concatenation dropped accuracy by over 2%, highlighting the importance of the integration strategy.
  • Scaling: Performance scaled positively with the size of the underlying transformer (e.g., T5-base to T5-large).

Insights and Future Directions

The success of KAT underscores the complementary nature of different knowledge types. Explicit knowledge provides fine-grained identification (e.g., specific brands), while implicit knowledge handles logical leaps and general commonsense. Furthermore, the use of rationales and entities improves model interpretability, allowing researchers to trace the evidence behind a specific answer.

Future work will address the computational overhead of querying large-scale models and databases, as well as improving the alignment between image regions and external semantics to reduce retrieval noise.

Summary updated

BibTeX
@inproceedings{gui2022kat,
  author = {Liangke Gui and Borui Wang and Qiuyuan Huang and Alexander Hauptmann and Yonatan Bisk and Jianfeng Gao},
  title = {{KAT: A Knowledge Augmented Transformer for Vision-and-Language}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.naacl-main.70},
}
Figure