Introduction
Few-shot learning asks a model to adapt to a new task with only a small number of labeled examples. In image classification, this often means that each class may have only 1, 2, 4, 8, or 16 training images. A model trained from scratch would overfit immediately, so modern methods usually start from a strong pretrained model and add a small number of trainable parameters.
The paper A3B2: Adaptive Asymmetric Adapter for Alleviating Branch Bias in Vision-Language Image Classification with Few-Shot Learning studies this problem in the context of CLIP-style vision-language models. CLIP has two branches: an image encoder and a text encoder. Many few-shot adaptation methods tune prompts, adapters, or small modules attached to these branches.
The central question is simple but important:
In few-shot image classification, should we adapt the image branch, the text branch, or both?
The paper argues that the answer depends on the task. Text-side adaptation is often useful, both-side adaptation helps when the train and test classes are close to the same distribution, but image-side adaptation can hurt robustness under out-of-distribution shifts. This phenomenon is called Branch Bias.
Paper links:
- Paper HTML: ar5iv:2605.13161
- arXiv abstract: arXiv:2605.13161
- arXiv DOI: 10.48550/arXiv.2605.13161
- Code: zyy-2001/A3B2
At a high level, A3B2 means Adaptive Asymmetric Adapter for alleviating Branch Bias. The method keeps text adaptation consistently active, but regulates image adaptation with prediction uncertainty. When the model is confident, the image adapter can contribute. When the model is uncertain, which may indicate OOD data, the image adapter is dampened so the system falls back toward robust pretrained CLIP features.
Background: Few-Shot CLIP Adaptation
CLIP maps images and text into a shared embedding space. Let $\mathcal{V}$ be the image encoder and $\mathcal{T}$ be the text encoder. For an image $I$ and a class prompt such as “a photo of a [CLASS]”, we obtain:
where $x$ is the image feature and $w_c$ is the text feature of class $c$. Classification is performed by comparing the image feature with all class text features:
Here $\tau$ is CLIP’s temperature parameter and $N_c$ is the number of classes.
The few-shot setting changes the problem. We do have a small support set, so we want to adapt to the target dataset. But the support set is tiny, so updating too much of the model can easily damage CLIP’s pretrained generalization.
This is why parameter-efficient adaptation is popular. Instead of fine-tuning the entire CLIP model, methods add lightweight trainable components:
- Prompt learning changes the text prompts or adds learnable prompt tokens.
- Adapter learning inserts small neural modules into the image encoder, text encoder, or both.
- Mixture-of-experts adapters route different samples through different small expert heads.
The question A3B2 asks is not only “can adapters improve few-shot learning?” It asks:
Which branch should the adapters trust, and when should visual adaptation be suppressed?
Branch Bias: The Target Problem
The paper first performs exploratory experiments on three tasks:
- Base-to-novel generalization: train on base classes, test on both base and unseen novel classes within the same dataset.
- Cross-dataset evaluation: train on ImageNet and evaluate on other datasets.
- Domain generalization: train on ImageNet and test on ImageNet variants such as ImageNetV2, ImageNet-Sketch, ImageNet-A, and ImageNet-R.
The experiments lead to three insights.
Insight I: adding trainable parameters to the image encoder often gives lower gains than adapting the text encoder.
Insight II: in in-distribution tasks such as base-to-novel generalization, using both branches can be best.
Insight III: in OOD tasks such as cross-dataset and domain generalization, adapting the image encoder can hurt transferability.
This is Branch Bias. The two CLIP branches do not contribute equally across tasks. A fixed rule such as “always adapt the image branch” or “always adapt both branches” can be too rigid.
A useful way to formalize the idea is to compare the branch contributions. Let $C_V(\mathcal{T})$ and $C_T(\mathcal{T})$ denote the visual and textual contribution strengths on a downstream task $\mathcal{T}$:
If the two branches mattered equally, their normalized contribution vector would be close to $(0.5,0.5)$. Branch Bias measures how far the task-specific contribution distribution is from this uniform reference:
The exact divergence $D(\cdot,\cdot)$ can be read as a distance from balanced branch contribution. The important point is conceptual: if adapting the image branch and text branch produces different gains, the task is branch-biased.
Method Overview
A3B2 follows a conservative design:
- keep adapters in the text branch active, because text adaptation is usually reliable for class-level transfer;
- allow adapters in the image branch, but dampen them when prediction uncertainty is high;
- use a lightweight asymmetric adapter structure with one shared down-projection and multiple up-projection experts;
- regularize expert routing so the experts do not collapse into one dominant path.

The diagram shows the main idea. The text adapter is always on. The image adapter is controlled by an uncertainty gate: confident samples can use visual adaptation, while uncertain samples are pushed toward smaller visual adapter outputs. This is the practical way A3B2 avoids hard manual decisions such as “freeze the image branch for OOD data.”
Asymmetric Adapter Structure
At each transformer layer, A3B2 inserts an adapter into the CLIP text encoder and image encoder. A simplified adapter has a shared down-projection followed by multiple up-projection experts.
For a hidden feature $z$, the routing weights are:
and the adapter output can be written as:
The adapted transformer layer is then:
where $\alpha$ controls the strength of the adapter contribution.
The phrase asymmetric adapter has two meanings here.
First, the two CLIP branches are treated differently. The text branch remains actively adapted, while the image branch is regulated by uncertainty.
Second, the adapter itself uses a one-down-many-ups structure. There is one shared low-rank bottleneck $W_{down}$ and several expert up-projections ${W_{up}^k}_{k=1}^n$. This design forces the model to learn a compact shared representation before expert specialization. It is more stable than giving each expert a separate down-projection and then merging them too early.
Uncertainty-Aware Adapter Dampening
The most important mechanism is Uncertainty-Aware Adapter Dampening (UAAD).
Let $\kappa_j$ be the confidence for sample $j$:
Let $\Delta \mathbf{v}_{i,j}$ be the image-adapter modification at layer $i$ for sample $j$. A3B2 penalizes large image-adapter modifications when confidence is low:
This formula is the heart of the method.
If $\kappa_j$ is high, then $(1-\kappa_j)$ is small. The model is confident, so visual adaptation is allowed to contribute.
If $\kappa_j$ is low, then $(1-\kappa_j)$ is large. The model is uncertain, so the image adapter is discouraged from making large changes. In effect, A3B2 leans back toward the original pretrained CLIP image features.
This is a soft rule, not a hard switch. That matters because the method does not need to know in advance whether a sample is in-distribution or out-of-distribution.
Load Balancing for Expert Routing
Mixture-of-experts modules can suffer from expert collapse. If the router always chooses one expert, the other experts become unused and the model loses the benefit of specialization.
A3B2 adds a load balancing regularizer. Let $\bar{\mathfrak{w}}_{l,j,k}$ be the routing probability of expert $k$ for sample $j$ at layer $l$. The loss encourages average expert usage to be close to uniform:
The final objective combines ordinary classification with the two auxiliary terms:
This objective has a clear division of labor:
- $\mathcal{L}_{CE}$ learns the few-shot classification task;
- $\mathcal{L}_{bias}$ controls risky image adaptation under uncertainty;
- $\mathcal{L}_{bal}$ keeps the expert adapters diverse.
Experimental Setting
The paper evaluates A3B2 on three few-shot image classification settings.
Base-to-novel generalization trains on base classes and tests on both base and novel classes across 11 datasets: ImageNet, Caltech101, OxfordPets, StanfordCars, Flowers102, Food101, FGVCAircraft, SUN397, DTD, EuroSAT, and UCF101.
Cross-dataset evaluation trains on ImageNet with 16 shots per class and evaluates directly on 10 other datasets.
Domain generalization trains on ImageNet and tests on ImageNetV2, ImageNet-Sketch, ImageNet-A, and ImageNet-R.
The main backbone is CLIP ViT-B/16. The paper compares against 11 prompt- and adapter-based baselines, including CLIP, CoOp, CoCoOp, KgCoOp, RPO, MaPLe, CLIP-Adapter, TCP, MMA, MMRL, and MMRL++.
The default A3B2 setting uses:
- number of experts $n=3$;
- low rank $r=32$;
- adapter strength $\alpha=0.001$;
- UAAD coefficient $\lambda_{bias}=0.3$;
- load-balance coefficient $\lambda_{bal}=0.1$.
What the Results Mean
The reported results support the Branch Bias story.
In base-to-novel generalization, A3B2 performs strongly because it can use both branches when the task remains relatively close to the training distribution. This matches Insight II.
In cross-dataset and domain generalization, the uncertainty-aware image dampening becomes more important. Instead of letting the visual adapter over-specialize to ImageNet-style training examples, the method reduces image-branch modifications for uncertain samples. This matches Insight III.
The ablation study is also important. Removing the bias loss or the load-balancing loss weakens the method, and applying the bias loss to the wrong branch hurts performance. This suggests that A3B2 is not simply winning because it adds more parameters. Its branch-aware training rule is part of the gain.
The few-shot analysis shows another useful pattern: A3B2 remains competitive across different shot settings, and its advantage grows as more few-shot examples become available. This is reasonable because the adapter modules need some data to learn task-specific structure, but they still remain much smaller and safer than full fine-tuning.
Limitations and Practical Reading
A3B2 is best understood as a method for few-shot image classification with CLIP-like models, not as a universal solution for every vision-language task. The branch-bias observations are based on image classification protocols, and other tasks such as segmentation, retrieval, captioning, or reasoning may have different branch dynamics.
The uncertainty score is also a proxy. Low confidence often indicates distribution shift or ambiguous input, but not always. A hard example from the same distribution can also be low-confidence. The strength of UAAD is that it uses confidence softly rather than turning the image branch completely off.
Finally, the method introduces several hyperparameters. The paper provides sensitivity analysis, but in a new deployment one should still check whether $n$, $r$, $\alpha$, $\lambda_{bias}$, and $\lambda_{bal}$ remain appropriate.
Conclusion
A3B2 gives a useful answer to a practical few-shot adaptation problem:
Do not assume that the image and text branches of CLIP should always be adapted equally.
The method first identifies Branch Bias, then turns that observation into an adaptive architecture. Text adaptation stays active. Image adaptation is allowed when confidence is high and dampened when confidence is low. A one-down-many-ups adapter structure provides compact expert specialization, and load balancing keeps the experts from collapsing.
The result is a branch-aware few-shot adaptation method that is especially attractive when one wants the benefits of CLIP adaptation without sacrificing too much OOD robustness.