Manuscript Offprint

arXiv:2610.12942

In-Context Learning Can Help Vision-Language Models Overcome Training Priors

Kun Wang, Xindi Wu, Sanghyuk Chun, Olga Russakovsky, Esin Tureci

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Vision-language models (VLMs) learn strong statistical regularities during training, which can make them fail to properly respond to visual evidence when input images violate those regularities. It is challenging to disambiguate these prior-induced errors from errors caused by the model missing the underlying visual capabilities. In this work, we use controlled visual in-context learning to encourage the model to focus on the visual evidence, and demonstrate that this alone is frequently sufficient to correct the errors – suggesting that the models in fact do possess the relevant visual capabilities. Specifically, we show that across five vision-centric tasks, demonstrations yield large gains on prior-conflicting counterfactual examples (+27.2% for Qwen3-VL 235B and +15.1% for Qwen3-VL 32B) while leaving accuracy on prior-aligned examples nearly unchanged. These findings generalize across five VLM families with gains from +9.7% to +30.3%. We analyze visual representations and find that demonstrations indeed redirect attention toward grounding cues while reducing reliance on cues that support the learned prior. Finally, we find that in-context learning is limited when the underlying visual capability is weak or absent. Together, these results show that current VLMs possess visual grounding capabilities that standard evaluations may overlook, underscoring the need for controlled evaluation design in diagnosing and improving model capability.

1 Introduction

In humans, visual intelligence necessitates grounding abstract knowledge and reasoning directly within the perceived image. Yet, vision-language models (VLMs) frequently falter when an image departs from the dominant patterns of their training data [1–4]: when shown an image depicting a three-legged peacock and asked how many legs are visible, models often answer “2” as shown in Figure 1(a). Existing work addresses these failures by intervening mechanistically [5–8], changing training procedures [9–12], or improving visual input preprocessing [13–15].

These approaches aim to address visual grounding failures by providing models with stronger visual signals and capabilities, treating such failures as evidence that the necessary capabilities are missing. Recent work, however, shows that the relevant visual evidence is already encoded in the internal representations of VLMs [16, 17]. This leaves an open question: are these failures caused by the model’s inability to incorporate visual information, or by a stronger learned expectation that overrides the accessible grounding signal?

In-context learning (ICL) provides a natural test: providing demonstrations of other animals with answers (e.g., a five-legged dog, a two-legged parrot) informs the model that the task is to count the legs visible in the image [18]. If errors persist despite such demonstrations, the model likely lacks the visual capability to count legs in the first place. If demonstrations correct the error, the model can already count legs but its learned knowledge about the animal overrides the visual evidence.

Preprint.

A

Training Prior

Figure

Q: How many legs does this animal have?

Zero-shot

prior answer

A: 2

Training Prior

peacock: 2

ICL (with demos)

A: 5

A: 3

A: 4

VISUAL

Grounded

count legs

B Scaling of Visual ICL

Real images

Counterfactual images

Figure

ICL shots

C Mechanistic Shift

Logit lens

Peacock

(prior cue)

Leg

(grounding cue)

Attention shift

+3

-2.91

+1.21

Peacock

(prior cue)

Leg

(grounding cue)

Figure 1: Visual ICL overcomes training prior dominance. (A) A VLM answers “2” for a three-legged peacock under zero-shot prompting; label-balanced demonstrations shift the answer to the visually grounded “3.” (B) Scaling ICL shots yields a +27.2 pp accuracy gain on counterfactual images while real images remain near ceiling. (C) Mechanistically, demonstrations redirect attention from the prior cue (“peacock”) to the grounding cue (“leg”).

Although ICL is well established as a steering mechanism in language models [19–23], prior work has reported that visual ICL lags behind its language counterpart [24, 25]. These studies have made important progress, but they leave open the question of whether demonstrations can shift a model toward visually grounded answers. Many existing studies test surface-level image–label associations, such as mapping pictures of lions to the label “dog” [24, 25], where the task to be learned does not focus on visual perception and instead can be collapsed into a text-only mapping problem. Others retrieve demonstrations from general VQA pools [26–29], where loose query–demo relevance tends to reduce ICL to format learning. Thus, it is still an open question whether, and for which tasks, demonstrations can actually move a model toward grounded visual evidence.

We address this question by using ICL as a diagnostic tool to study a phenomenon we call training prior dominance, where a model's learned statistical regularity from training overrides visual evidence during generation. We construct a benchmark that separates prior-consistent from prior-conflicting examples and supports label-balanced demonstrations, allowing us to control the demonstration context through task-relevant examples and answer choices. With these controls, we find that many visual grounding failures are not caused by an inability to incorporate visual information, but by overpowering training priors that models can suppress through ICL. We further analyze this effect mechanistically, showing how demonstrations shift the models' attention toward visually grounded evidence, and we test whether demonstrations can also teach capabilities that are absent. Together, these results suggest that addressing prior-driven failures does not require architectural modification or enhanced visual features; effective mitigation can instead focus on managing the influence of training priors during inference to keep the model anchored to the visual evidence.

Our main contributions are: (1) a controlled benchmark that separates prior-consistent from prior-conflicting examples and supports label-balanced demonstrations for visual ICL; (2) empirical and mechanistic evidence that visual ICL improves accuracy most on prior-conflicting examples, distinguishing a visual grounding shift account from simple format learning; and (3) diagnostic analyses that test whether visual ICL teaches new visual capabilities or reveals capabilities already available but dominated by training priors.

References (66)