Manuscript Offprint

arXiv:2610.05852

RepICL: Reusable In-Context Prediction Across Heterogeneous Representation Spaces

Yu-Hsiang Liu, Kuan-Yu Chen, Chih-Sheng Chen, Meng-Hsuan Chang, Yu-Chen Den, Tien-Hao Chang

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

ABSTRACT

Frozen representations are widely reused for downstream classification, yet each new task typically requires fitting a new predictor. We ask whether the few-shot prediction procedure itself can instead be learned once and reused across datasets and representation spaces. To study this question, we introduce RepShiftBench, comprising 1,218 encoder–dataset tasks across text, image, and audio, with separate evaluation of generalization to unseen datasets, unseen encoders, jointly unseen datasets and encoders, and unseen modalities. The benchmark exposes a substantial gap: Logistic Regression fitted independently on each episode outperforms every evaluated in-context learner across all settings. We introduce RepICL, a meta-trained in-context learner that canonicalizes each episode through episodic whitening before prediction. Its inductive variant, RepICL-I, surpasses Logistic Regression in all 12 benchmark settings, while RepICL-T substantially outperforms existing transductive methods. Ablations identify episodic whitening as the primary source of these gains, while showing that it is not a universally beneficial preprocessing step. Across both variants, the gains concentrate on queries for which simple support prototypes favor the wrong class or provide little separation between the true class and competing classes. Transduction provides its largest additional gains when limited support coverage gives a misleading view of class separation. Together, these results demonstrate that a shared few-shot prediction procedure can generalize beyond the representation spaces observed during training.

1 INTRODUCTION

Pretrained encoders have made representation reuse a standard paradigm across modern machine learning (Devlin et al., 2019; Radford et al., 2021; Oquab et al., 2024). A frozen encoder can support many downstream datasets, with only a lightweight classifier fitted on top of its representations. This embed-then-fit paradigm is simple and remarkably effective: strong frozen representations often support competitive downstream performance even with basic classifiers (Chen et al., 2019; Kornblith et al., 2019; Tian et al., 2020; El Assadi et al., 2026b). Yet this reuse largely stops at the representation: the downstream prediction rule is still fitted separately for each dataset and refitted when the encoder changes (Kornblith et al., 2019; Tian et al., 2020).

In-context and model-based meta-learning (Santoro et al., 2016; Hospedales et al., 2022) suggest a more ambitious possibility: rather than repeatedly fitting a task-specific classifier, can we learn the prediction procedure itself once and reuse it across tasks? Recent in-context learners instantiate this idea over vector representations and can transfer across datasets and tasks (Kirsch et al., 2022; Fifty et al., 2024; Woerner et al., 2026). However, existing evaluations either keep the encoder fixed or study cross-encoder and cross-modality transfer only in limited settings (Woerner et al., 2026), leaving encoder identity largely unexplored as an independent axis of generalization. Varying the dataset changes the downstream prediction problem, whereas varying the encoder changes

∗^{*}Corresponding Author.

†^{\dagger}Project Leader.

the representation space itself, as different encoders can induce spaces with different dimensionalities, scales, covariance structures, and geometries. This raises a distinct question: can a learned prediction procedure still transfer to an unseen representation space?

To study this question directly, we introduce RepShiftBench, a benchmark for few-shot classification across heterogeneous frozen representations. Each task is defined by an encoder–dataset pair, allowing the downstream dataset and representation space to vary independently, from which we sample few-shot episodes consisting of support and query examples. Across 59 datasets and 62 pretrained encoders spanning text, image, and audio, RepShiftBench comprises 1,218 tasks and evaluates generalization to unseen datasets, unseen encoders, jointly unseen datasets and encoders, and entirely unseen modalities. This systematic evaluation exposes a substantial gap between reusable prediction procedures and per-episode fitting: Logistic Regression fitted independently on each episode outperforms every evaluated in-context learner across all benchmark settings. The challenge is therefore not simply few-shot prediction, but learning a shared predictor that remains reliable as the representation space changes.

We address this gap with RepICL, a meta-trained in-context learner that canonicalizes each episode's representations through episodic whitening—episode-wise PCA followed by standardization—before in-context prediction. We study an inductive variant, RepICL-I, which predicts each query from the labeled support set alone, and a transductive variant, RepICL-T, which additionally exploits the unlabeled query set. RepICL-I surpasses per-episode Logistic Regression in all 12 benchmark settings while consistently outperforming existing in-context learners, and RepICL-T achieves substantially larger gains over existing transductive methods. Together, these results demonstrate that a single learned prediction procedure can generalize beyond the representation spaces observed during training, including to entirely unseen modalities.

Our analyses further clarify what enables this transfer and where its gains arise. Ablations identify episodic whitening as the primary source of improvement, yet applying the same transformation to existing learners does not improve their performance, indicating that its benefit comes from meta-training the predictor on whitened episodes rather than from better preprocessing alone. Across both variants, the gains concentrate on queries for which simple support prototypes either favor the wrong class or provide little separation between the true class and competing classes. Among these difficult queries, transduction provides its largest additional gains when the few-shot support set is an unrepresentative sample of its classes, suggesting that unlabeled queries are especially useful when support coverage is limited.

References (100)

  • XLS-R: Self-supervised cross-lingual speech representation learning at scale
  • vq-wav2vec: Self-supervised learning of discrete speech representations
  • wav2vec 2.0: A framework for self-supervised learning of speech representations
  • data2vec: A general framework for self-supervised learning in speech, vision and language
  • Strong baselines for parameter-efficient few-shot fine-tuning
  • LLM2Vec: Large language models are secretly powerful text encoders
  • Perception encoder: The best visual embeddings are not at the output of the network
  • Transductive information maximization for few-shot learning
  • TaskNorm: Rethinking batch normalization for meta-learning
  • USAD 2.0: Scaling representation distillation for universal audio understanding
  • WavLM: Large-scale self-supervised pretraining for full stack speech processing
  • BEATs: Audio pre-training with acoustic tokenizers
  • A closer look at few-shot classification
  • EAT: Self-supervised pre-training with efficient audio transformer
  • BERT: Pre-training of deep bidirectional transformers for language understanding
  • Scaling up masked audio encoder learning for general audio classification
  • An image is worth $16 \times 16$ words: Transformers for image recognition at scale
  • MAEB: Massive audio embedding benchmark (opens arXiv in a new tab)
  • The embedder's dilemma: LLMs are better, but at what cost? In Conference on Language Modeling (COLM), 2026b
  • Context-aware meta-learning
  • Multimodal autoregressive pre-training of large vision encoders
  • Model-agnostic meta-learning for fast adaptation of deep networks
  • Conditional neural processes
  • Gemma 3 Technical Report
  • AST: Audio spectrogram transformer
  • SSAST: Self-supervised audio spectrogram transformer
  • The Llama 3 Herd of Models
  • Learning word vectors for 157 languages
  • Masked autoencoders are scalable vision learners
  • DeBERTaV3: Improving DeBERTa using ELECTRA-style pre-training with gradient-disentangled embedding sharing
  • TabPFN: A transformer that solves small tabular classification problems in a second
  • Accurate predictions on small data with a tabular foundation model
  • jina-embeddings-v5-omni: Geometry-preserving embeddings via locked aligned towers (opens arXiv in a new tab)
  • Meta-learning in neural networks: A survey
  • Searching for MobileNetV3
  • HuBERT: Self-supervised speech representation learning by masked prediction of hidden units
  • LoRA: Low-rank adaptation of large language models
  • Pushing the limits of simple pipelines for few-shot learning: External data and fine-tuning make a difference
  • Leveraging the feature distribution in transfer-based few-shot learning
  • Densely connected convolutional networks
  • Mistral 7B
  • General-purpose in-context learning by meta-learning transformers
  • Do better imagenet models transfer better? In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 2661–2671, 2019
  • NV-Embed: Improved techniques for training LLMs as generalist embedding models
  • Making text embedders few-shot learners
  • Qwen3-VL-Embedding and Qwen3-VL-Reranker: A unified framework for state-of-the-art multimodal retrieval and ranking (opens arXiv in a new tab)
  • Cross-domain few-shot learning with task-specific adapters
  • TERA: Self-supervised learning of transformer encoder representation for speech
  • Learning to propagate labels: Transductive propagation network for few-shot learning
  • Swin Transformer V2: Scaling up capacity and resolution
  • A ConvNet for the 2020s
  • Exponential moving average of weights in deep learning: Dynamics and benefits
  • Relative representations enable zero-shot latent space communication
  • MTEB: Massive text embedding benchmark
  • Generative representational instruction tuning
  • Transformers can do Bayesian inference
  • DINOv2: Learning robust visual features without supervision
  • Scikit-learn: Machine learning in Python
  • GloVe: Global vectors for word representation
  • Acceleration of stochastic approximation by averaging
  • TabICL: A tabular foundation model for in-context learning on large data
  • TabICLv2: A better, faster, scalable, and open tabular foundation model
  • Language models are unsupervised multitask learners
  • Learning transferable visual models from natural language supervision
  • Robust speech recognition via large-scale weak supervision
  • Sentence-bert: Sentence embeddings using siamese bert-networks
  • Meta-learning with memory-augmented neural networks
  • Very deep convolutional networks for large-scale image recognition
  • Prototypical networks for few-shot learning
  • Whitening sentence representations for better semantics and faster retrieval (opens arXiv in a new tab)
  • EVA-CLIP: Improved training techniques for CLIP at scale (opens arXiv in a new tab)
  • Rethinking the inception architecture for computer vision
  • EfficientNetV2: Smaller models and faster training
  • WAVE: Learning unified & versatile audio-visual embeddings with multimodal LLM. In International Conference on Learning Representations, 2026
  • Rethinking few-shot image classification: a good embedding is all you need? In European Conference on Computer Vision, 2020
  • Meta-dataset: A dataset of datasets for learning to learn from few examples
  • SigLIP 2: Multilingual vision-language encoders with improved semantic understanding, localization, and dense features (opens arXiv in a new tab)
  • Cross-domain few-shot classification via learned feature-wise transformation
  • Meta-Album: Multi-domain meta-dataset for few-shot image classification
  • Realistic evaluation of transductive few-shot learning
  • Powerful and lightweight text representations (opens arXiv in a new tab)
  • Matching networks for one shot learning
  • Fairseq S2T: Fast speech-to-text modeling with fairseq (opens arXiv in a new tab)
  • Text embeddings by weakly-supervised contrastive pre-training (opens arXiv in a new tab)
  • Improving text embeddings with large language models
  • SimpleShot: Revisiting nearest-neighbor classification for few-shot learning (opens arXiv in a new tab)
  • Smarter, better, faster, longer: A modern bidirectional encoder for fast, memory efficient, and long context finetuning and inference
  • Universal algorithm-implicit learning
  • Large-scale contrastive language-audio pretraining with feature fusion and keyword-to-caption augmentation
  • Scaling language-centric omnimodal representation learning
  • MIEB: Massive image embedding benchmark
  • C-Pack: Packed resources for general chinese embeddings
  • Aggregated residual transformations for deep neural networks
  • Omni-Embed-Nemotron: A unified multimodal retrieval model for text, image, audio, and video (opens arXiv in a new tab)
  • Qwen3 Technical Report
  • Few-shot learning via embedding adaptation with set-to-set functions
  • Low-rank few-shot adaptation of vision-language models
  • Sigmoid loss for language image pre-training
  • Jasper and stella: distillation of SOTA embedding models (opens arXiv in a new tab)
  • X-ARES: A comprehensive framework for assessing audio encoder performance

Couldn't load all references. Reload the page to try again.