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

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

TL;DR

KAT (Knowledge Augmented Transformer) is a novel multimodal framework that achieves state-of-the-art results on the Outside Knowledge Visual Question Answering (OK-VQA) task. By combining explicit facts retrieved from Wikidata with implicit "common sense" knowledge extracted from GPT-3, KAT demonstrates that jointly reasoning over diverse knowledge sources significantly outperforms models that rely on parameter-stored information alone.

What Problem Does This Paper Address?

While large-scale transformers are excellent at "memorizing" information within their parameters (implicit knowledge), they often stumble on tasks requiring specific, external facts not present in the training data. This is particularly evident in Outside Knowledge Visual Question Answering (OK-VQA), where answering a question about an image requires information beyond the pixels—such as knowing that a specific bird evolved from reptiles or identifying a niche brand logo.

Existing approaches typically suffer from two issues:

  1. Generic Retrieval: Using simple image tags to search knowledge bases often yields noisy or irrelevant results.
  2. Integration Gap: Most models focus on either explicit knowledge (encyclopedias) or implicit knowledge (LLM weights), but rarely integrate both in a way that allows for sophisticated joint reasoning.

Methods

The KAT architecture employs an encoder-decoder transformer (based on T5) to synthesize information from three distinct streams:

  1. Explicit Knowledge Retrieval: Instead of using generic object detectors, the authors use a CLIP-based retriever. They use a sliding window to extract image patches and match them against 423,520 entities from Wikidata. This allows the model to ground specific image regions to fine-grained entity descriptions.
  2. Implicit Knowledge Retrieval: The model queries a frozen GPT-3 model. Crucially, they don't just ask for an answer; they prompt GPT-3 to provide both a tentative answer and the supporting evidence (the "why") based on a textual description of the image.
  3. Joint Reasoning Module: As shown in the architecture diagram below, KAT encodes the question alongside each piece of retrieved knowledge separately. A specialized reasoning module then uses cross-attention to allow the decoder to adaptively weigh and combine these different knowledge sources during answer generation.
Figure 2: Our KAT model uses a contrastive-learning-based module to retrieve knowledge entries from an explicit knowledge base, and uses GPT-3 to retrieve implicit knowledge with supporting evidence. The integration of knowledge is processed by the respective encoder transformer, and jointly with reasoning module and the decoder transformer as an end-to-end training with the answer generation.

Datasets

The primary benchmark used is OK-VQA, currently the largest dataset for knowledge-based visual question answering. It contains over 14,000 images and questions that require external knowledge to solve. The authors follow standard evaluation metrics and compare against a wide array of baselines, including those that use no external knowledge, those using only Wikipedia/ConceptNet, and recent GPT-3-based methods.

Key Insights and Ideas

  • Complementary Strengths: Explicit knowledge is superior for fine-grained recognition (e.g., identifying a "Macbook Pro" vs. just a "laptop"), while implicit knowledge provides the "connective tissue" of common sense (e.g., knowing that a refrigerator is used to keep food cold).
  • Evidence Matters: Prompting an LLM for rationale or evidence, rather than just a raw answer, provides richer context for the reasoning module to work with.
  • Reasoning vs. Concatenation: Simply "dumping" all retrieved text into a prompt (concatenation) introduces noise. KAT’s reasoning module, which attends to knowledge entries individually, performed 2.43% better than simple concatenation, proving that the model learns to filter out irrelevant "distractor" knowledge.
  • Interpretability: Because the model explicitly retrieves and attends to specific Wikidata entries and GPT-3 evidence, its decision-making process is more transparent than a standard "black box" transformer.

Key Results

KAT set a new state-of-the-art on the OK-VQA benchmark:

  • Top Performance: KAT achieved an accuracy of 54.41% (ensemble), a significant jump over the previous state-of-the-art, MAVEx (39.4%), and even the strong GPT-3-based PICa-Full (48.0%).
  • Ablation Gains: Adding explicit knowledge to a model that already had implicit knowledge provided a ~4% absolute boost, confirming that structured databases still offer value that LLMs haven't fully captured.
  • Category Wins: KAT showed the most significant improvements in categories like "Geo, History, Language, and Culture" (+10.2%) and "Science and Technology" (+8.3%), where factual accuracy is paramount.
Figure 4: Qualitative examples where KAT successfully combines the color of a logo (explicit) with the object type (implicit) to reach the correct answer.

Limitations and Future Work

The authors acknowledge several areas for growth:

  • Computational Overhead: Training and running KAT is resource-intensive, requiring multiple high-end GPUs (16 V100s were used in the study).
  • Retrieval Noise: While the reasoning module helps, the model can still be misled if the retrieval stage returns highly similar but incorrect entities.
  • Knowledge Alignment: Future work could explore better ways to align image regions with external semantics and more efficiently integrate even larger, more diverse knowledge bases beyond Wikidata.

Summary updated

BibTeX
@inproceedings{gui2022kat,
  author = {Liangke Gui and Borui Wang and Qiuyuan Huang and Alex 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