TL;DR
Vision-Language Models (VLMs) often ignore visual evidence in favor of "training priors"—pre-learned statistical shortcuts like "birds have two legs." This paper demonstrates that Visual In-Context Learning (ICL) can effectively "snap" models out of this habit, proving that they often possess the necessary visual grounding capabilities but simply fail to prioritize them without a few examples to set the stage.
What Problem Does This Paper Address?
When you show a state-of-the-art VLM a picture of a three-legged peacock and ask how many legs it has, the model will frequently answer "2." Is this because the model can't count, or because its training data is so saturated with two-legged birds that it ignores the third leg entirely?
This phenomenon is called training prior dominance. The challenge for researchers is disambiguating whether a model fails because it lacks a specific visual capability (e.g., counting) or because a strong learned expectation is overriding the visual signal. Existing solutions often involve expensive retraining or architectural changes, but this paper asks if we can solve the problem at inference time simply by showing the model how to look.
Methods
The authors employ Visual In-Context Learning (ICL) as a diagnostic and corrective tool. By providing a few "demonstrations" (image-question-answer triplets) of counterfactual scenarios—like a five-legged dog or a pink raven—they signal to the model that it should prioritize the pixels over its internal "common sense."
To understand why this works, they used mechanistic interpretability tools like Logit Lens and LatentLens. These allowed them to identify specific "prior cues" (tokens in the image that identify the object, like "peacock") and "grounding cues" (tokens that represent the evidence, like "legs"). They then analyzed how the model's internal attention shifted when demonstrations were added.
Datasets
The researchers constructed a controlled benchmark across five vision-centric tasks:
- Counting: Visible animal legs (violating species-specific counts).
- Color Identification: Animals rendered in non-canonical colors (e.g., a pink frog).
- Shape Identification: Traffic signs with modified shapes (e.g., a diamond-shaped stop sign).
- Object Direction: Objects in rare orientations (e.g., facing up/down).
- Spatial Relation: Objects in unusual layouts.
The benchmark includes Real (prior-consistent) and Counterfactual (prior-conflicting) images. They also used "Simple" (abstract shapes) and "No-prior" (placeholders) settings to isolate visual competence from linguistic bias.
Key Insights and Ideas
- ICL as a "Capability Selector": The most striking insight is that ICL doesn't necessarily "teach" the model how to count or see color. Instead, it acts as a selector, telling the model to use its existing visual grounding "circuit" rather than its "statistical shortcut" circuit.
- The Asymmetry of Gains: Accuracy gains from ICL are almost exclusively concentrated on counterfactual examples. On "real" images where the prior is correct, accuracy stays high and mostly flat. On counterfactuals, accuracy scales dramatically with the number of shots.
- Attention Redistribution: Mechanistically, demonstrations cause the model to literally "look" differently. As the number of shots increases, the model's internal attention shifts away from tokens that identify the object (the prior) and toward tokens that represent the specific visual evidence (the grounding).
- The Masking Mirror: The authors found that manually masking out the "prior cues" (e.g., hiding the peacock's head so the model can't identify the species) actually improves zero-shot accuracy on counterfactuals. This confirms that the species identity was the "distraction" causing the error.
Key Results
- Massive Accuracy Boosts: For the Qwen3-VL 235B model, 16-shot ICL improved counterfactual accuracy by +27.2%. Across five different VLM families (including InternVL and Gemma), gains ranged from +9.7% to +30.3%.
- Scaling Matters: Larger models benefit significantly more from ICL. While 4B models showed some improvement, the 32B and 235B variants demonstrated a much more sophisticated ability to override priors based on context.
- Attention Shift Quantified: In Qwen3-VL 32B, demonstrations reduced attention to prior cues by -2.91 and increased attention to grounding cues by +1.21 (in units of $10^{-3}$ per token).
Limitations and Future Work
- Capability Floor: ICL is not a silver bullet. If a model fundamentally lacks a capability—like counting more than 10 objects—demonstrations won't fix it. The authors found that ICL gains weaken significantly for high-cardinality counting tasks.
- Compute Cost: Running 32-shot multimodal prompts is computationally expensive and increases latency.
- Future Directions: The authors suggest that instead of relying on ICL at inference, we should look into distilling these "grounding-heavy" behaviors back into the model weights or using ICL as a diagnostic to find which specific priors need to be "unlearned" during fine-tuning.
Summary updated