BehaviorICL: Task-Conditioned Decoder States for Visual In-Context Learning
Chenyang Wang, Jiamo Hu, Chengrui Wu, Lingyue Chen, Jianguo Chen, Xun Xu, Xulei Yang
Key points
From the paper's conclusion- These results support the target VLM's internal states as a practical basis for visual in-context learning.
Abstract
The usefulness of an in-context demonstration for a vision-language model (VLM) depends on both the query image and the task posed about it. We study whether the frozen target VLM's own decoder states, read before answer generation, can select such demonstrations. BehaviorICL represents each image and task by a task-conditioned processing signature, the hidden states at the final input position across all decoder layers. Its training-free variant, BehaviorICL-Raw, averages cosine similarities between corresponding layer states and passes the retrieved examples with their reference answers to the same VLM. When the same NICO++ images are asked about their object or their context, Raw retrieves largely different demonstrations for the two questions and outperforms an image retriever given task-matched demonstrations on both VLMs. Across two VLMs and eight classification and visual question answering datasets, Raw gives the highest average accuracy among training-free retrievers on both VLMs and exceeds RICES with a CLIP ViT-L/14 encoder by 3.83 points on Qwen and 1.85 on InternVL. A lightweight shared projection, BehaviorICL-Proj, brings further gains on classification. Analyses of extraction text, decoder depth and bank answers help explain these gains, and attention analysis describes how the task text shifts attention at the extraction position toward the classified object. These results support the target VLM's internal states as a practical basis for visual in-context learning.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- EmoICL: Enhancing Visual Emotion Recognition with Emotion-Aware In-Context Learning.IEEE transactions on image processing : a publication of the IEEE Signal Processing Society · 2026
- Query-Only Prompt-Agnostic Attacks on Visual In-Context LearningarXiv · 2026
- Watch and Learn: Teaching Visual In-Context Learning by Removing Textual ShortcutsarXiv · 2026
- TraceICL: Thread-Resolved Demonstration Curation with Consistency Calibration for Robust Multimodal In-Context LearningarXiv · 2026
- SEE: Unlocking the Hidden Perception of Frozen VLMsarXiv · 2026
- Heads That Write, Not Just Point: Image Retrieval Heads in Vision-Language ModelsarXiv · 2026