arXiv:2610.22182cs.CVOct 2026

Manuscript Offprint

arXiv:2610.22182

LAMP: Layerwise Adaptive Mixing of Predictors for Training-Free Few-Shot Vision-Language Adaptation

Zhipeng Ye, Feng Jiang, Qiufeng Wang, Hao Li

Abstract

Few-shot adaptation often relies on an encoder's final global representation, leaving complementary information in intermediate layers underused. Combining these features is challenging because their dimensions can differ and their usefulness varies across tasks. We propose LAMP, Layerwise Adaptive Mixing of Predictors, a training-free framework that combines global and regional information from multiple encoder layers. A single forward pass per view supplies all descriptors. Global and support-calibrated regional kernel predictors independently fit the same label residuals. Labeled validation data select their mixture in class-score space, preserving native feature dimensions without learned projections. LAMP-F further adapts text-anchored class prototypes, using a cached response to update the fixed-kernel residual predictions exactly. Experiments cover eleven datasets and ViT and ResNet backbones. LAMP achieves state-of-the-art mean accuracy among the compared published training-free ResNet-50 methods at 4, 8, and 16 shots, reaching 78.73% at 16 shots. Averaged across five support budgets, LAMP improves over a paired global-feature-only baseline by 1.14 and 1.59 percentage points on ViT-B/16 and ResNet-50; LAMP-F raises these gains to 1.96 and 2.54 points. LAMP-F reaches 16-shot accuracies of 83.57% and 79.10%, respectively. Controlled experiments identify multi-layer integration as the main source of improvement and examine pooling, calibration, validation labels, and computational cost. These findings show that combining layer-specific predictions can exploit complementary features from frozen encoders to improve few-shot classification.

Keywords: Few-shot classification, Vision–language models, Training-free adaptation, Kernel residual learning, Layerwise predictor mixing

∗^{*}Corresponding author.

Email addresses: zhipengye@nustti.edu.cn (Zhipeng Ye), jf@nustti.edu.cn (Feng Jiang), qiufeng.wang@xjtlu.edu.cn (Qiufeng Wang), lihao@arizona.edu (Hao Li)

1. Introduction

Vision–language models such as CLIP recognize images by matching visual representations to category descriptions [1]. Few-shot adaptation uses a small labeled support set to improve this pretrained predictor for a target task. Many adaptation methods rely on the encoder’s final global descriptor. This compact representation supports image–text matching, but intermediate token grids and convolutional maps also retain visual information at different levels of abstraction. These features are already available during the encoder’s forward pass. Using them offers an opportunity to improve adaptation while keeping the encoder frozen.

Existing approaches use different sources of information to adapt the predictor. Prompt and prototype methods refine the class representations [2–4]. Tip-Adapter retrieves labeled instances, while ProKeR fits a regularized support-label residual; both use final global descriptors to match images [5, 6]. SSP instead uses local features to construct subspaces for image–text alignment [7]. These methods motivate the use of complementary semantic and visual information. Integrating features from several encoder layers, however, requires addressing two related challenges: their native dimensions can differ, and the most useful layers can vary with the target task.

Our central idea is to combine predictions from different layers in a shared class-score space. Different layers provide different measures of image similarity, but each predictor outputs a score for the same set of classes. Their predictions can therefore be combined while preserving the original feature dimensions. Fitting these predictors separately also allows their outputs to be reused when selecting the mixture, so each candidate mixture does not require a new fit.

Based on this idea, we introduce training-free LAMP, Layerwise Adaptive Mixing of Predictors. A single encoder pass per view yields a global descriptor and regional descriptors from three layers of a Vision Transformer (ViT) or ResNet [8, 9]. The global predictor and three regional predictors independently fit the same label residual: the difference between the support labels and CLIP's initial scores. Each regional kernel is calibrated against the support set, and labeled validation data select the mixture of global and regional corrections. LAMP thus uses complementary information from several layers without gradient optimization or learned feature projections. Its extension, LAMP-F, adapts text-anchored class prototypes while retaining the selected kernels and mixture weights. A cached linear response accounts exactly for the resulting changes to both the initial scores and residual corrections, avoiding repeated matrix factorization during prototype evaluation.

We evaluate LAMP on eleven datasets, five support budgets, and CLIP backbones from the ViT and ResNet families. In the comparison with published training-free ResNet-50 (RN50) methods, LAMP achieves state-of-the-art mean accuracy at 4, 8, and 16 shots, reaching 78.73% at 16 shots. LAMP-F reaches 83.57% and 79.10% at 16 shots on ViT-B/16 and RN50, respectively. Across the eleven datasets and five support budgets, LAMP improves over our paired global-feature-only baseline by an average of 1.14 and 1.59 percentage points; LAMP-F raises these gains to 1.96 and 2.54 points. Controlled comparisons identify the integration of multiple encoder layers as the main source of improvement and examine the effects of regional pooling and calibration. Experiments with RN101 and ViT-B/32, together with transfer to ImageNet-V2 and ImageNet-Sketch, assess generalization across architectures and image distributions [10, 11].

Our contributions are:

  • We introduce LAMP, a training-free method that combines global and regional information from multiple encoder layers using independently fitted kernel predictors. Regional kernels are calibrated against the support set. Score-level fusion preserves native feature dimensions, and separating branch fitting from mixture selection makes predictions reusable across candidates.

  • We develop LAMP-F, which combines prototype adaptation with the same global and regional predictors. For fixed kernels and mixture weights, its cached response exactly updates both the initial class scores and residual corrections as the prototypes change.

  • We demonstrate state-of-the-art mean accuracy in the published training-free RN50 comparison at 4, 8, and 16 shots across eleven datasets. Paired comparisons on ViT and ResNet backbones establish the accuracy gains, and controlled experiments explain the contribution of multi-layer integration.

References (35)