# Image Captioning for Effective Use of Language Models in Knowledge-Based Visual Question Answering

지식 기반 시각 질의응답에서 언어 모델을 효과적으로 활용하기 위한 이미지 캡셔닝

Ander Salaberria, Gorka Azkune, Oier Lopez de Lacalle, Aitor Soroa, Eneko Agirre · arXiv · 2021년 9월 15일

- **연구 문제** 외부 지식이 필요한 OK-VQA에서 이미지를 캡션으로 바꾼 뒤 텍스트 전용 언어 모델로 추론하는 접근을 제안하고 검증합니다.
- **연구 방법** OSCAR-base로 생성한 캡션과 질문을 BERT 또는 T5 언어 모델에 입력하는 캡션 기반 모델(CBM)입니다.
- **주요 결과** CBMBERT는 VQA pre-training 없이 OK-VQA에서 MMBERT보다 높은 32.5±0.4를 기록했고, T5 크기를 키우면 CBMT5-11B가 47.9±0.2에 도달합니다.

## 외부 지식이 필요한 VQA의 어려움

시각 질의응답(VQA)에서 많은 질문은 이미지 안에 답이 있어 이미지와 텍스트만으로 해결할 수 있습니다. 반면 OK-VQA는 이미지 내용만으로는 답할 수 없어 외부 지식을 활용해야 하는 질문으로 구성됩니다. 이 논문은 외부 지식이 어떻게 제공되는지가 명시되지 않은 상황에서 멀티모달 트랜스포머가 이 지식을 충분히 활용하는지에 의문을 제기합니다. 저자들은 사전학습된 언어 모델이 세계 지식을 담고 있다는 점에 주목하여, 이미지를 텍스트로 바꾼 뒤 텍스트 전용 모델로 추론하는 방향을 검토합니다.

![Figure 2: Some examples of VQA 2.0 and OK-VQA datasets for the same images. VQA questions are about image contents, while OK-VQA questions require outside know…](https://refivu.com/papers/651f621d-888b-4126-91e0-384f23e2171a/figures/figure-e027d76ed8c11eae9c9fcd4e99cc3c27.png?thumb=512)

**Figure 2** : Some examples of VQA 2.0 and OK-VQA datasets for the same images. VQA questions are about image contents, while OK-VQA questions require outside knowledge.

[원문](https://arxiv.org/abs/2109.08029v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Ander Salaberria, Gorka Azkune, Oier Lopez de Lacalle, Aitor Soroa, Eneko Agirre · Image Captioning for Effective Use of Language Models in Knowledge-Based Visual Question Answering · 원문 그림 인용 · 원본 PDF 9쪽에서 그림 영역을 추출했습니다.

## 캡션 기반 모델의 구성

제안된 CBM은 두 단계로 동작합니다. 먼저 OSCAR-base가 이미지로부터 짧은 캡션을 생성합니다. 이후 캡션과 질문을 언어 모델에 입력해 답을 얻습니다. 언어 모델로는 BERT 기반 CBMBERT와 여러 크기의 T5 기반 CBMT5가 사용됩니다. CBMBERT는 \[CLS\] 표현 위에 하나의 은닉층을 가진 MLP 분류 헤드를 붙이고, CBMT5는 캡션과 질문에 각각 접두어를 붙여 생성 방식으로 답을 만듭니다. OK-VQA 테스트 이미지와 정답 캡션이 캡션 생성기의 미세조정에 쓰이지 않도록 OSCAR을 재미세조정했습니다. 멀티모달 비교군인 MMBERT는 질문과 FasterRCNN 기반 이미지 영역 특징을 입력받으며, 캡션 생성 단계에 의존하지 않습니다.

![Figure 1: Given a question and image, we verbalize the contents of the image and apply a pretrained language model for inference. We show that current text-onl…](https://refivu.com/papers/651f621d-888b-4126-91e0-384f23e2171a/figures/figure-40184910f0d4204e9e11720b5b5e7260.png?thumb=512)

**Figure 1** : Given a question and image, we verbalize the contents of the image and apply a pretrained language model for inference. We show that current text-only models are better in generalization and inference than multimodal models for knowledge-based VQA.

[원문](https://arxiv.org/abs/2109.08029v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Ander Salaberria, Gorka Azkune, Oier Lopez de Lacalle, Aitor Soroa, Eneko Agirre · Image Captioning for Effective Use of Language Models in Knowledge-Based Visual Question Answering · 원문 그림 인용 · 원본 PDF 2쪽에서 그림 영역을 추출했습니다.

## 분류 손실과 생성형 학습

CBMBERT와 MMBERT는 분류 방식으로 학습되며, 원문은 이들에 대해 VQA 점수에 비례하는 확률 분포를 정답 벡터로 쓰는 교차 엔트로피 손실(SCE)을 사용합니다. 이 손실은 이진 교차 엔트로피 대신 사용되며, 저자들은 두 방식의 결과가 비슷하면서 SCE가 더 빠르게 수렴했다고 보고합니다. CBMT5는 교사 강제 방식의 교차 엔트로피 손실로 미세조정되며, 각 에폭마다 정답 주석 중 하나를 무작위로 골라 목표 시퀀스로 사용합니다. 점수가 완전하지 않은 답변은 학습에서 제외되어 최소 두 명의 주석자가 동의한 답만 사용됩니다.

## VQA pre-training과 OK-VQA 결과

VQA pre-training 없이 OK-VQA에서 CBMBERT는 32.5±0.4, MMBERT는 29.6±0.6, 질문만 사용한 QBERT는 21.2±0.2를 기록했습니다. VQA 2.0으로 추가 사전학습하면 CBMBERT는 36.0±0.4, MMBERT는 35.7±0.3, QBERT는 23.0±0.2가 됩니다. 이 결과는 캡션이나 이미지 표현이 질문만 사용하는 것보다 중요하다는 것을 보여 줍니다. 두 모델은 같은 구조와 파라미터 규모를 공유하며, 추가 pre-training 이후 비슷한 수준에 도달합니다. 저자들은 OK-VQA의 학습 데이터가 상대적으로 작아 MMBERT가 새로운 입력 양식에 충분히 적응하지 못했다고 가설을 세웁니다.

![Table 1: Performance on OK-VQA for three classiﬁcation models (respectively, question only, image-based and caption-based) without and with additional pretrain…](https://refivu.com/papers/651f621d-888b-4126-91e0-384f23e2171a/figures/figure-697b486438ffa1b41db5ae7852b7974a.png?thumb=512)

**Table 1** : Performance on OK-VQA for three classiﬁcation models (respectively, question only, image-based and caption-based) without and with additional pretraining on VQA 2.0. Mean VQA score and standard deviation across 3 different runs.

[원문](https://arxiv.org/abs/2109.08029v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Ander Salaberria, Gorka Azkune, Oier Lopez de Lacalle, Aitor Soroa, Eneko Agirre · Image Captioning for Effective Use of Language Models in Knowledge-Based Visual Question Answering · 원문 그림 인용 · 원본 PDF 11쪽에서 그림 영역을 추출했습니다.

## 언어 모델 크기와 OK-VQA 성능

CBMT5는 60M부터 11B 파라미터까지 다섯 크기로 평가되었습니다. CBMT5-Small은 29.2±0.2, CBMT5-Base는 36.1±0.5, CBMT5-Large는 40.8±0.4, CBMT5-3B는 44.0±0.7, CBMT5-11B는 47.9±0.2를 기록했습니다. 모델 크기마다 수렴 단계가 달라 학습 데이터의 20%를 검증 분할로 두고 단계 수를 정했으며, 이 과정을 세 번 반복해 평균 단계 수를 최종값으로 사용했습니다. 저자들은 점수가 모델 크기의 로그에 비례하여 증가하며 가장 큰 모델에서도 둔화가 보이지 않는다고 해석합니다. 이 관찰은 본 실험에서 사용한 T5 계열 범위에 한정됩니다.

![Table 2: Performance on OK-VQA of our generative CBMT5 models](https://refivu.com/papers/651f621d-888b-4126-91e0-384f23e2171a/figures/figure-5e8f2c92fd53b7799eaf40b6e0b344e7.png?thumb=512)

**Table 2** : Performance on OK-VQA of our generative CBMT5 models.

[원문](https://arxiv.org/abs/2109.08029v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Ander Salaberria, Gorka Azkune, Oier Lopez de Lacalle, Aitor Soroa, Eneko Agirre · Image Captioning for Effective Use of Language Models in Knowledge-Based Visual Question Answering · 원문 그림 인용 · 원본 PDF 12쪽에서 그림 영역을 추출했습니다.

![Figure 3: Correlation between the size ofCBMT5 models and their performance. The horizontal axis is in logarithmic scale](https://refivu.com/papers/651f621d-888b-4126-91e0-384f23e2171a/figures/figure-7c62005f3e898047792e612dad308f31.png?thumb=512)

**Figure 3** : Correlation between the size ofCBMT5 models and their performance. The horizontal axis is in logarithmic scale.

[원문](https://arxiv.org/abs/2109.08029v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Ander Salaberria, Gorka Azkune, Oier Lopez de Lacalle, Aitor Soroa, Eneko Agirre · Image Captioning for Effective Use of Language Models in Knowledge-Based Visual Question Answering · 원문 그림 인용 · 원본 PDF 12쪽에서 그림 영역을 추출했습니다.

## VQA 2.0에서의 비교

VQA 2.0 dev 분할에서는 OK-VQA와 반대의 경향이 나타납니다. MMBERT는 65.8, CBMBERT는 59.6을 기록하여 MMBERT가 약 6점 높습니다. 저자들은 이 차이를 이미지를 캡션으로 바꾸는 과정에서 질문에 필요한 정보가 손실되는 것으로 해석합니다. 이 데이터셋의 질문은 이미지 내용, 공간 관계, 객체 속성을 직접 묻기 때문에 캡션의 정보 손실이 더 크게 작용한다고 설명됩니다. 같은 비교에서 PICa-Full은 56.1로 보고되며, CBMBERT는 이 비교에서 PICa보다 높습니다.

![Table 4: Performance on the dev split of VQA 2.0 of the multimodal model MMBERT and two text-only models: PICa-Full and CBMBERT](https://refivu.com/papers/651f621d-888b-4126-91e0-384f23e2171a/figures/figure-fc53ba65db1baa98bc44066e97ba02f8.png?thumb=512)

**Table 4** : Performance on the dev split of VQA 2.0 of the multimodal model MMBERT and two text-only models: PICa-Full and CBMBERT.

[원문](https://arxiv.org/abs/2109.08029v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Ander Salaberria, Gorka Azkune, Oier Lopez de Lacalle, Aitor Soroa, Eneko Agirre · Image Captioning for Effective Use of Language Models in Knowledge-Based Visual Question Answering · 원문 그림 인용 · 원본 PDF 15쪽에서 그림 영역을 추출했습니다.

## 최신 모델과의 비교

OK-VQA에서 CBMT5-11B는 47.9를 기록하며, 캡션만 사용하는 PICa-Base의 42.0과 PICa 전체 앙상블의 46.9와 비교됩니다. PICa 항목은 175B 파라미터 GPT-3 기반이며, 캡션만 사용한 결과와 객체 태그를 함께 사용한 결과가 나뉘어 있습니다. 원문 표에 따르면 CBMT5-11B는 캡션만 사용한 PICa 버전보다 약간 높으며, 저자들은 이 모델이 PICa보다 15배 작다고 설명합니다. CBMT5-11B의 점수는 본 논문의 자체 측정이며, 다른 모델의 점수는 각 출처의 설정을 따릅니다.

![Table 3: Comparison to the state-of-the-art on OK-VQA. +sym. stands for systems additionally using symbolic knowledge, and +tags for the additional use of obje…](https://refivu.com/papers/651f621d-888b-4126-91e0-384f23e2171a/figures/figure-b42b8b162f534d818037309f3bbba989.png?thumb=512)

**Table 3** : Comparison to the state-of-the-art on OK-VQA. +sym. stands for systems additionally using symbolic knowledge, and +tags for the additional use of object tags. Results of models marked with \* are in OK-VQA v1.0 and† speciﬁes contaminated results (see main text).

[원문](https://arxiv.org/abs/2109.08029v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Ander Salaberria, Gorka Azkune, Oier Lopez de Lacalle, Aitor Soroa, Eneko Agirre · Image Captioning for Effective Use of Language Models in Knowledge-Based Visual Question Answering · 원문 그림 인용 · 원본 PDF 13쪽에서 그림 영역을 추출했습니다.

## 조기 융합과 후기 융합

저자들은 캡션과 이미지 영역 특징이 상호 보완적인지 확인하기 위해 두 가지 결합 방식을 실험했습니다. 조기 융합은 질문, 캡션, 이미지 영역 특징을 하나의 언어 모델 입력으로 처리하며 BERT-base로 초기화합니다. 후기 융합은 CBMBERT와 MMBERT를 따로 학습한 뒤 추론 시 각 클래스의 출력 확률을 곱해 가장 큰 답을 고릅니다. VQA pre-training 없이 조기 융합은 32.5±0.4, 후기 융합은 34.0±0.4를 기록하며, VQA pre-training을 더하면 각각 38.2±0.8과 38.6±0.2가 됩니다. VQA 2.0 dev에서는 조기 융합 67.8, 후기 융합 67.7을 보고합니다.

![Table 5: Performance on OK-VQA for early and late fusion models](https://refivu.com/papers/651f621d-888b-4126-91e0-384f23e2171a/figures/figure-812d1ab8ea9521000c19a3140ba06baf.png?thumb=512)

**Table 5** : Performance on OK-VQA for early and late fusion models.

[원문](https://arxiv.org/abs/2109.08029v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Ander Salaberria, Gorka Azkune, Oier Lopez de Lacalle, Aitor Soroa, Eneko Agirre · Image Captioning for Effective Use of Language Models in Knowledge-Based Visual Question Answering · 원문 그림 인용 · 원본 PDF 16쪽에서 그림 영역을 추출했습니다.

## 생성 캡션과 정답 캡션

생성 캡션의 효과를 확인하기 위해 저자들은 COCO 정답 캡션을 사용해 CBMBERT를 VQA pre-training 없이 미세조정했습니다. 각 이미지마다 정답 캡션을 하나 무작위로 골라 학습 전체에 사용했고, 같은 과정을 세 번 반복했습니다. 정답 캡션을 쓴 평균 정확도는 32.3±0.3으로, 생성 캡션을 쓴 32.5±0.4와 비슷합니다. 저자들은 이로부터 OSCAR이 생성한 캡션이 이 과제에서 CBMBERT가 비슷하게 작동할 만큼의 정보를 담고 있다고 해석합니다.

## 캡션 변환의 한계와 적용 범위

캡션 기반 접근의 핵심 한계는 캡션이 이미지의 모든 정보를 담지 못한다는 점입니다. 질문 예시에서 CBM은 캡션에 객체가 빠져 있거나 캡션이 추론을 충분히 뒷받침하지 못하는 경우 틀릴 수 있으며, 원문은 이런 실패 사례를 함께 보여 줍니다. 또한 VQA 2.0처럼 이미지 내용을 직접 묻는 과제에서는 멀티모달 모델보다 낮습니다. 논문의 OK-VQA 결과는 주로 OK-VQA v1.1, 특정 OSCAR 캡션기, 특정 BERT와 T5 설정에 대한 것이며, 다른 데이터셋이나 다른 모델 계열로 일반화하기 위해서는 추가 검증이 필요합니다.

![Figure 4: Examples of OK-VQA questions where only one between CBMBERT and MMBERT answers correctly according to the ground truth (GT). We also show answers giv…](https://refivu.com/papers/651f621d-888b-4126-91e0-384f23e2171a/figures/figure-06013ca1411277c3307f55f8545f5c60.png?thumb=512)

**Figure 4** : Examples of OK-VQA questions where only one between CBMBERT and MMBERT answers correctly according to the ground truth (GT). We also show answers given by CBMT5-11B for further comparisons. C refers to captions generated by OSCAR. Correct answer in green, incorrect in red.

[원문](https://arxiv.org/abs/2109.08029v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Ander Salaberria, Gorka Azkune, Oier Lopez de Lacalle, Aitor Soroa, Eneko Agirre · Image Captioning for Effective Use of Language Models in Knowledge-Based Visual Question Answering · 원문 그림 인용 · 원본 PDF 17쪽에서 그림 영역을 추출했습니다.

## 논문 정보

- **저자**: Ander Salaberria, Gorka Azkune, Oier Lopez de Lacalle, Aitor Soroa, Eneko Agirre
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2021년 9월 15일
- **등록일**: 2026년 11월 6일
- **수정일**: 2022년 3월 25일
- **버전**: v3
- **arXiv**: 2109.08029
- **DOI**: 10.1016/j.eswa.2022.118669
- **분류**: cs.CV · cs.AI
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2109.08029v3) · [원문 PDF ↗](https://arxiv.org/pdf/2109.08029v3)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

Integrating outside knowledge for reasoning in visio-linguistic tasks such as visual question answering (VQA) is an open problem. Given that pretrained language models have been shown to include world knowledge, we propose to use a unimodal (text-only) train and inference procedure based on automatic off-the-shelf captioning of images and pretrained language models. Our results on a visual question answering task which requires external knowledge (OK-VQA) show that our text-only model outperforms pretrained multimodal (image-text) models of comparable number of parameters. In contrast, our model is less effective in a standard VQA task (VQA 2.0) confirming that our text-only method is specially effective for tasks requiring external knowledge. In addition, we show that increasing the language model's size improves notably its performance, yielding results comparable to the state-of-the-art with our largest model, significantly outperforming current multimodal systems, even though augmented with external knowledge. Our qualitative analysis on OK-VQA reveals that automatic captions often fail to capture relevant information in the images, which seems to be balanced by the better inference ability of the text-only language models. Our work opens up possibilities to further improve inference in visio-linguistic tasks

## 원문 인용

Ander Salaberria, Gorka Azkune, Oier Lopez de Lacalle, Aitor Soroa, Eneko Agirre (2021). Image Captioning for Effective Use of Language Models in Knowledge-Based Visual Question Answering. arXiv:2109.08029v3. https://doi.org/10.1016/j.eswa.2022.118669

**BibTeX**

```
@article{salaberria2021image,
  title = {{Image Captioning for Effective Use of Language Models in Knowledge-Based Visual Question Answering}},
  author = {Ander Salaberria and Gorka Azkune and Oier Lopez de Lacalle and Aitor Soroa and Eneko Agirre},
  year = {2021},
  eprint = {2109.08029},
  archivePrefix = {arXiv},
  doi = {10.1016/j.eswa.2022.118669},
  url = {https://arxiv.org/abs/2109.08029v3}
}
```

## 이 논문의 용어

- [BERT](https://refivu.com/terms/45b639a1d317-bert)
- [GPT-3](https://refivu.com/terms/d95e818ac9ce-gpt-3)
- [teacher forcing](https://refivu.com/terms/5af8c5103329-teacher-forcing)
- [T5](https://refivu.com/terms/ae2113eb6c55-t5)
- [late fusion](https://refivu.com/terms/ae43d517eaa7-late-fusion)
- [Early Fusion](https://refivu.com/terms/1fab36eaa264-early-fusion)
- [OK-VQA](https://refivu.com/terms/92836bc21dab-ok-vqa)
- [Oscar](https://refivu.com/terms/bea2123a518f-oscar)
- [VQA 2.0](https://refivu.com/terms/36b9f2e2b271-vqa-2-0)

## 다른 논문 해설

- [OpenStreetMap: Challenges and Opportunities in Machine Learning and Remote Sensing](https://refivu.com/papers/2d67ee06-952d-405b-a2a6-df4b8bcee03a-openstreetmap-challenges-and-opportunities-in-machine.md)
- [Assessing the impact of contextual information in hate speech detection](https://refivu.com/papers/e2fa836e-f0cc-40d2-9881-aaa7e1443ee0-assessing-the-impact-of-contextual-information-in-hate.md)
- [ROAD: The ROad event Awareness Dataset for Autonomous Driving](https://refivu.com/papers/01e6bd29-da3b-4a4b-a7bd-d94b12442017-road-the-road-event-awareness-dataset-for-autonomous.md)
- [Mine yOur owN Anatomy: Revisiting Medical Image Segmentation with Extremely Limited Labels](https://refivu.com/papers/03ee47cb-ccd3-416a-8287-a119559d70d0-mine-your-own-anatomy-revisiting-medical-image-segmentation.md)
- [A survey of image labelling for computer vision applications](https://refivu.com/papers/832e63b0-3c05-4964-b73a-b471d95c2cd9-a-survey-of-image-labelling-for-computer-vision.md)
- [Reinventing 2D Convolutions for 3D Images](https://refivu.com/papers/6c574208-811f-453b-ad33-424db79250ce-reinventing-2d-convolutions-for-3d-images.md)
- [Transformer and GAN Based Super-Resolution Reconstruction Network for Medical Images](https://refivu.com/papers/e6e29168-68fc-4f83-a27c-093247c48281-transformer-and-gan-based-super-resolution-reconstruction.md)
- [Safe multi-agent deep reinforcement learning for joint bidding and maintenance scheduling of generation units](https://refivu.com/papers/f9a485f1-d788-422f-a48a-2ac7a238f104-safe-multi-agent-deep-reinforcement-learning-for-joint.md)
- [Learning passive policies with virtual energy tanks in robotics](https://refivu.com/papers/3db97432-c7f3-440a-b891-6ea268f115d7-learning-passive-policies-with-virtual-energy-tanks-in.md)
- [Federated Social Recommendation with Graph Neural Network](https://refivu.com/papers/ce54fcd7-f119-4f48-9809-3fe4f5cc05cd-federated-social-recommendation-with-graph-neural-network.md)
- [Reinforcement Learning with Evolutionary Trajectory Generator: A General Approach for Quadrupedal Locomotion](https://refivu.com/papers/38f01b72-7547-4bd0-9edf-75b5cc41e273-reinforcement-learning-with-evolutionary-trajectory.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/651f621d-888b-4126-91e0-384f23e2171a-image-captioning-for-effective-use-of-language-models)
