arXiv:2609.37659cs.CVSep 2026

Manuscript Offprint

arXiv:2609.37659

Are In-Context Images Worth 10 Dimensions?

Adhemar de Senneville, Xavier Bou, Jérémy Anger, Rafael Grompone, Gabriele Facciolo

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

ABSTRACT

There has been significant work on understanding the In-Context Learning capabilities of Large Language Models, especially on the induction circuit. For a few-shot classification task, the induction circuit leverages linear representations of each labeled example in-context in order to classify an unlabeled query. However, few works focus on how those linear representations are built in the first place. Leveraging the expressivity of the vision modality compared to text, we uncover a Shared Discriminative Geometry (SDG) inside Large Vision Language Models (LVLMs). It is a low-dimensional space, shared across all image classification tasks, in which in-context images are compressed into linearly separable representations later used to perform classification. We observe that this is the result of the model performing a dimensionality reduction of vision representations in early layers. In order to explain this phenomenon: (1) We show analytically that linear self-attention can perform a dimensionality reduction by projecting in-context data onto its principal components, with each layer implementing one gradient descent step toward this objective. (2) We provide evidence that trained LVLMs reduce the dimensionality of vision representations in early layers via a similar mechanism.

1 INTRODUCTION

A fundamental problem in computer vision is learning to recognize novel concepts from only a handful of image examples. To address this problem, the standard approach is fine-tuning, where a pretrained feature extractor is adapted to the task through in-weight learning. A promising alternative is In-Context Learning (ICL), which frames the problem as a conditional prediction problem, where the model receives a small labeled support set together with an unlabeled query image.

ICL was first observed as an emerging capability in Large Language Models (LLMs) (Brown et al., 2020) in the text modality and was later observed in Large Vision Language Models (LVLMs) (Alayrac et al., 2022) on multimodal vision-text tasks. The extension of ICL to the vision modality motivates us to investigate how LVLMs perform it. While the induction circuit (Olsson et al., 2022) by which the model compares in-context examples using linear representations to perform classification is well studied, here we focus on the formation of those representations. In this study, we investigate this process through few-shot in-context image classification. Whereas prior work has focused on text classification, the continuous nature of visual inputs and the diversity of image classes allow us to better trace feature formation across a wide range of classification tasks.

Surprisingly, preliminary experiments show that similarity-based classification performs much worse on text tokens predicting the class labels than on vision tokens. Motivated by this observation, we use a meta-training protocol to find the subspace that best classifies the query image given the support images. This protocol reveals a subspace inside of text tokens in which in-context images are compressed into representations later used by the model to predict the query label. We name this subspace the Shared Discriminative Geometry (SDG) as it has 3 key properties: (1) It is shared across all image classification tasks. (2) Classes are linearly separable in that space. (3) It has a small effective dimensionality ( ∼\sim10 dimensions for Ministral 3 (3B) (Liu et al., 2026)).

We posit that this surprisingly low dimensionality results from the model performing a dimensionality reduction in-context, effectively projecting discriminative high-dimensional vision features onto

Figure

Figure 1: Left (our contribution): The first layers of the LVLM reduce the dimension of image tokens in-context using sample-to-sample comparisons. These representations are transferred to text and later used for in-context learning. Right: Nearest Centroid Classifier (NCC) accuracy across layers for forerunner tokens and vision tokens after and before projecting onto the Text SDG and Vision SDG, respectively.

the principal components of the in-context examples, preserving the linear separability with fewer dimensions. As illustrated in Fig. 1, this dimensionality reduction occurs in early layers in vision tokens. The resulting representations are then transferred to text tokens. The model finally uses this subspace to attend to similar in-context examples.

Our contributions can be summarized as: (I) We introduce a meta-training protocol that uncovers a Shared Discriminative Geometry in text token representations. It is a low-dimensional space shared across image classification tasks in which classes are linearly separable. The model uses this geometry to make predictions. (II) We show theoretically that non-causal linear transformers can perform a dimensionality reduction through in-context sample-to-sample attention. (III) We observe a dimensionality reduction of vision token representations in LVLMs and provide empirical evidence that it relies on a circuit similar to our theoretical construction.

References (55)