BehaviorICL: Task-Conditioned Decoder States for Visual In-Context Learning
Chenyang Wang, Jiamo Hu, Chengrui Wu, Lingyue Chen, Jianguo Chen, Xun Xu, Xulei Yang
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.
Create a lesson
Related papers
Task-Conditioned Detail Allocation for Synthetic Segmentation Data
Shared title terminologycs.CVChunming He, Dingming Zhang, Jifan Zhang et al.
CAR: Reducing Decoder Output Shift in Visual Token Pruning via Coverage Selection and Attention Reallocation
Shared title terminologycs.CVXixi Jiang, Pingcheng Dong, Chen Yang et al.
SENSA: Visual-to-Brain Generation with Individualized Subject-State Transfer and Adaptation
Shared title terminologycs.CVYihang Zou, Chunmei Qing, Ruixi Liang et al.
AdapToC: A Unified Framework for Multi-Task Visual Token Communication
Shared title terminologycs.CVZhicheng Liu, Chenliang Wu, Zhouxiang Zhao et al.
PSC-Gen: Physical Sequence Conditioning for Video Generation via Agentic Visual Planning
Shared title terminologycs.CVWonsik Shin, Jinju Jang, Junhoo Lee et al.
CAST: Calibrating Correspondences for Training-Free Biomedical In-Context Segmentation
Shared title terminologycs.CVMingze Jiang, Jiashu Han, Haonan Chen et al.