Task-Aware In-Context Retrieval for Visual Question Answering

Authors

  • Yifan Wang

DOI:

https://doi.org/10.61173/cdvv8617

Keywords:

Visual Question Answering (VQA), In-Context Learning, Task-Aware Retrieval, Unsupervised Clustering, Large Vision-Language Models

Abstract

Multimodal In-Context Learning (ICL) has demonstrated remarkable potential in enabling Large Vision-Language Models to adapt to new tasks without parameter updates. However, existing training-free methods primarily rely on visual or semantic similarity for demonstration retrieval, often overlooking the latent task intent of the query. This limitation leads to “task-mismatch” problem and the examples presented by this retrieval method reveal visual similarities but different logical reasoning pattern, consequently misleading the model. This paper presents a novel Task-Aware Retrieval (TAR) framework aimed at enhancing Visual Question Answering (VQA). An unsupervised semantic clustering mechanism utilizing Sentence-BERT is proposed to categorize questions into distinct task clusters through a data-driven approach. A hybrid retrieval strategy is utilized during inference to select demonstrations that correspond with the latent task intent and visual context of the test instance. Experimental results on the OK-VQA dataset indicate that the proposed method attains an accuracy of 41.44%, surpassing robust training-free baselines. Qualitative analysis confirms that TAR effectively addresses reasoning errors resulting from task misalignment, consequently validating the significance of intent consistency in multimodal ICL.

References

[1] Marino K, Rastegari M, Farhadi A, & Mottaghi R. OK-VQA: A Visual Question Answering Benchmark Requiring External Knowledge. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). 2019, pp. 3195-3204.

[2] Liu H, Li C, Wu Q, & Lee Y J. Visual Instruction Tuning. In Advances in Neural Information Processing Systems (NeurIPS). 2023.

[3] Li J, Li D, Savarese S, & Hoi S. BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language Models. In International Conference on Machine Learning (ICML). 2023, pp. 19730-19742. PMLR.

[4] Bai J, Bai S, Yang S, et al. Qwen-VL: A Frontier Large Vision-Language Model with Versatile Abilities. arXiv preprint arXiv:2308.12966. 2023.

[5] Brown T, Mann B, Ryder N, et al. Language Models are Few-Shot Learners. In Advances in Neural Information Processing Systems (NeurIPS), 2020, 33, 1877-1901.

[6] Alayrac J B, Donahue J, Luc P, et al. Flamingo: a Visual Language Model for Few-Shot Learning. In Advances in Neural Information Processing Systems (NeurIPS), 2022, 35, 23716- 23736.

[7] Xenos A, Stlpnoy P, & Ion A. A Simple Baseline for Knowledge-Based Visual Question Answering. In Findings of the Association for Computational Linguistics: EMNLP 2023, 2023, pp. 1-10.

[8] Reimers N, & Gurevych I. Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing (EMNLP). 2019.

[9] Min S, Lewis M, Zettlemoyer L, & Hazan T. Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing (EMNLP) 2022, pp. 11048-11064.

[10] Zhang P, Zeng G, Wang T, & Lu W. TinyLlama: An Open-Source Small Language Model. arXiv preprint arXiv:2401.02385. 2024.

Downloads

Published

2026-02-28