Recognizing implicit visual and textual patterns is essential in many real-world applications of modern AI. However, tackling long-tail pattern recognition tasks remains challenging for current pre-trained foundation models such as LLMs and VLMs. While finetuning pre-trained models can improve accuracy in recognizing implicit patterns, it is usually infeasible due to a lack of training data and high computational overhead. In this paper, we propose ADAMAB, an efficient embedding calibration framework for few-shot pattern recognition. To maximally reduce the computational costs, ADAMAB trains embedder-agnostic light-weight calibrators on top of fixed embedding models without accessing their parameters. To mitigate the need for large-scale training data, we introduce an adaptive data augmentation strategy based on the Multi-Armed Bandit (MAB) mechanism. With a modified upper confidence bound algorithm, ADAMAB diminishes the gradient shifting and offers theoretically guaranteed convergence in few-shot training. Our multi-modal experiments justify the superior performance of ADAMAB, with up to 40% accuracy improvement when training with less than 5 initial data samples of each class.
Figures & tables
Figure 1: Illustration of light-weight neural similarity networks.
Figure 2: The framework of ADAMAB . ADAMAB can be applied to both visual and textual pattern recognition tasks. To calibrate a pre-trained embedder (e.g., CLIP), we train a light-weight neural similarity network with a detailed structure illustrated in Fig. 1 . We select a class with a Multi-armed Bandit, and augment the samples of this class with another pre-trained generator (e.g., diffusion models and GPT for image and text generation respectively). We alternatively augment the training data and train the model until convergence.
Dataset
MultiWD
FQS
TREC
OxfordPets
Flowers102
CUB200
Query Modality
Text
Text
Text
Image
Image
Image
Label Modality
Text
Text
Text
Text
Text
Text
# Classes
6
13
30
37
102
200
# Init Data
30 (5/class)
65 (5/class)
147 (5/class)
111 (3/class)
204 (2/class)
400 (2/class)
# Test Data
227
325
688
3558
5945
5394
Table 1: A summary of the datasets.
Model/Method
MultiWD
Forbidden Question Set
TREC
# Params
Zero-shot
Few-shot
Zero-shot
Few-shot
Zero-shot
Few-shot
GPT-4o-mini
37.89%
51.54%
80.31%
76.00%
60.03%
43.31%
n/a
Gemini2.0-Flash-Lite
39.65%
46.39%
74.77%
81.85%
54.94%
59.74%
n/a
Mistral-Small
30.40%
45.82%
77.23%
79.39%
43.02%
42.73%
24B
Llama-3.2
28.19%
37.00%
75.08%
79.69%
53.78%
60.47%
90B
Cohere-v3.5
3.08%
25.55%
54.15%
78.77%
32.70%
58.29%
n/a
Table 2: The classification accuracy of each method under both zero-shot and few-shot settings in text-query datasets. For embedding calibration methods, we also include the improvement on top of the original embedding models. We report the number of parameters as a metric of the efficiency for each method, where “n/a” denotes that the model is closed-source without parameter information.
Model/Method
OxfordPets
Flowers102
CUB200
# Params
GPT-4o-mini
79.83%
71.05%
33.00%
n/a
Gemini2.0-Flash-Lite
93.32%
85.38%
60.07%
n/a
Mistral-Small
61.22%
48.61%
38.93%
24B
Llama-3.2
78.64%
67.94%
40.06%
90B
Jina-reranker-m0
73.64%
56.60%
35.22%
2.4B
CLIP-VIT-Large
82.88%
60.99%
33.18%
0.4B
Table 3: The classification accuracy of each method in image-query datasets. For embedding calibration methods, we also include the improvement on top of the original embedding models. We report the number of parameters as a metric of the efficiency for each method, where “n/a” denotes that the model is closed-source without parameter information.
Figure 3: Calibration Accuracy with respect to the average number of training samples per class.
Figure 4: Calibration Accuracy with respect to the exploration hyperparameter α .
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
Dataset
MultiWD
FQS
TREC
OxfordPets
Flowers102
CUB200
Batch Size
32
32
64
64
128
256
# Training Rounds
30
50
100
100
300
500
Δn
5
5
5
3
2
2
# Aug. Rounds
18
39
60
74
102
400
α
100
100
30
100
30
100
Appendix
Table 4: The hyperparameters for the results in Tab. 2 and Tab. 3 .
Training-free few-shot adaptation methods have gained significant attention recently in the context of Vision-language Models (VLMs). Yet, current benchmarks rely on strong assumptions about the statistics of the adaptation data, e.g., class balance. We question these simplifying assumptions and introduce a more realistic benchmark that varies both the levels of class balance and the effective number of classes in few-shot tasks via Dirichlet sampling. Surprisingly, under our setting, we observe substantial drops in the performances of state-of-the-art methods, more so when the number of labeled samples increases. To mitigate this, we introduce PRiSM, a class-prototype regularization that can be deployed as a plug and play module on top of any existing baseline method, significantly improving performances. Our method optimizes a novel multi-term loss, which includes a regularizer maximizing inter-class pairwise distances, along with additional terms promoting support-feature alignment and fidelity to the baseline prototypes. Furthermore, we introduce an effective and computationally efficient block Majorize-Minimize optimizer for our objective. More specifically, we derive a valid blockwise Lipschitz constant (i.e., a bound on the Hessian's spectral norm), which can be computed efficiently via the Gershgorin circle theorem. Extensive experiments show that PRiSM improves several training-free baselines, with large gains when dealing with severe class imbalance and high numbers of classes.
Ghassen Baklouti, Omprakash Chakraborty, Jose Dolz +1
Pretrained biomedical vision-language models achieve strong zero-shot performance in biomedical image classification. However, downstream biomedical classification often depends on subtle visual differences between classes that may not be fully captured by pretrained representations. Few-shot adaptation addresses this mismatch by optimizing a task-specific predictor on a small labeled support set. Because the selected examples capture only part of the visual variation within the target classes, the adapted predictions can depend strongly on their composition. We propose Prompt-Anchored Residual Adaptation (PARA), which retains the frozen prompt prediction as a support-invariant semantic anchor and incorporates a visual prediction learned from the support set through an anchor-relative residual. The residual step is computed in a closed form from frozen support embeddings using anchor discrepancy and support agreement. Support-set dependence also limits evaluation: comparisons are fair within a shared draw but remain conditional on its composition. To obtain more reliable comparisons, we introduce a repeated-support protocol that separates support-selection variation from optimization randomness and reports both average and worst-20% performance. PARA achieves state-of-the-art performance in both few-shot classification and base-to-novel generalization.
Jingxuan Kang, Qianying Yue, Che Liu +1
Imperial College London · The Chinese University of Hong Kong
The adaptation of large-scale Vision-Language Models (VLMs) like CLIP to downstream tasks with extremely limited data -- specifically in the one-shot regime -- is often hindered by a significant "Stability-Plasticity" dilemma. While efficient caching mechanisms have been introduced by training-free methods such as Tip-Adapter, these approaches often function as local Nadaraya-Watson estimators. Such estimators are characterized by inherent boundary bias and a lack of global structural regularization. In this paper, ReHARK (Refined Hybrid Adaptive RBF Kernels) is proposed as a synergistic training-free framework that reinterprets few-shot adaptation through global proximal regularization in a Reproducing Kernel Hilbert Space (RKHS). A multistage refinement pipeline is introduced, consisting of: (1) Hybrid Prior Construction, where zero-shot textual knowledge from CLIP and GPT-3 is fused with visual class prototypes to form a robust semantic-visual anchor; (2) Support Set Augmentation (Bridging), where intermediate samples are generated to smooth the transition between visual and textual modalities; (3) Adaptive Distribution Rectification, where test feature statistics are aligned with the augmented support set to mitigate domain shifts; and (4) Multi-Scale RBF Kernels, where an ensemble of kernels is employed to capture complex feature geometries across diverse scales. Superior stability and accuracy are demonstrated through extensive experiments on 11 diverse benchmarks. A new state-of-the-art for one-shot adaptation is established by ReHARK, which achieves an average accuracy of 65.83%, significantly outperforming existing baselines. Code is available at https://github.com/Jahid12012021/ReHARK.
Md Jahidul Islam
Department of Electrical and Electronic Engineering, Bangladesh University of Engineering and Technology, Dhaka, Bangladesh