LE-GDA: Layer Ensemble Gaussian Discriminant Analysis for Training-Free Few-Shot CLIP Adaptation
Organizations: Temple University Japan Campus · Universit´e de Kinshasa · Universit´e Protestante au Congo · Handong Global University ·
Abstract
Training-free few-shot adaptation of vision-language models typically constructs a classifier from CLIP's final projected image representation, leaving intermediate representations unused. Combining them is not straightforward. Class scores from different representations differ in spread by orders of magnitude for the same query. Direct averaging allocates influence by numerical scale rather than predictive information. We propose Layer-Ensemble Gaussian Discriminant Analysis (LE-GDA), a method that fits regularized shared-covariance discriminants independently to intermediate and final representations extracted in one frozen encoder pass. LE-GDA standardizes each discriminant's class scores per query, selects a small representation multiset on labeled validation data, and combines it with the zero-shot classifier without gradient-based optimization. Across 11 datasets, four CLIP backbones, five shot counts, and three independently sampled K-shot training sets, LE-GDA achieves the highest mean accuracy of all evaluated methods on every backbone, raising the 16-shot mean from 78.01% to 79.54% over a matched GDA-CLIP (final-feature) baseline and improving that baseline for every backbone-shot combination. At one shot, LE-GDA retains a 1.20-point mean gain over the baseline even though covariance estimation is unavailable and per-query standardization is neutral. A control with richer per-class structure inside a single representation does not reproduce the gain, indicating that the benefit comes from combining representations. These results show that intermediate CLIP representations carry information beyond the final embedding and can improve training-free few-shot adaptation. Code and evaluation resources are available at https://github.com/pavodi-NM/le-gda.
Figures & tables
| Method | Grad. | Impl. | RN50 | RN101 | ViT-B/32 | ViT-B/16 | Mean |
|---|---|---|---|---|---|---|---|
| Zero-shot CLIP | – | – | 58.81 | 59.59 | 62.11 | 65.43 | 61.49 |
| Tip-Adapter | – | orig. | 70.20 .13 | 72.06 .12 | 72.88 .16 | 76.88 .02 | 73.01 |
| Proto-Adapter | – | ours | 72.48 .19 | 73.64 .14 | 74.52 .03 | 78.34 .06 | 74.74 |
| GPCache (W+C) | – | ours | 72.81 .05 | 75.26 .21 | 75.61 .10 | 79.42 .14 | 75.78 |
| Tip-Adapter-F | ✓ | orig. | 75.50 .14 | 77.49 .04 | 77.61 .03 | 81.16 .08 | 77.94 |
| Proto-Adapter-F | ✓ | ours | 75.39 .10 | 76.67 .09 | 76.76 .02 | 80.39 .06 | 77.30 |
| Method | Caltech | DTD | EuroSAT | Aircraft | Food | ImageNet | Flowers | Pets | Cars | SUN | UCF | Mean |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| GDA-CLIP (final-feature) | 93.76 | 69.03 | 84.91 | 42.21 | 82.51 | 66.47 | 96.08 | 91.33 | 78.97 | 72.94 | 79.95 | 78.01 |
| LE-GDA (ours) | 94.89 | 69.71 | 89.77 | 46.90 | 82.48 | 66.63 | 97.28 | 91.17 | 79.97 | 73.84 | 82.28 | 79.54 |
| (LE-GDA) | +1.13 | +0.68 | +4.86 | +4.69 | 0.03 | +0.16 | +1.20 | 0.16 | +1.00 | +0.90 | +2.33 | +1.52 |
| GDA-CLIP (published) | 94.10 | 68.51 | 87.23 | 43.82 | 82.58 | – | 96.49 | 91.30 | 78.82 | 73.06 | 80.28 | 79.62 † |
| LE-GDA (ours) | 94.89 | 69.71 | 89.77 | 46.90 | 82.48 | – | 97.28 | 91.17 | 79.97 | 73.84 | 82.28 | 80.83 † |
| (LE-GDA) | +0.79 | +1.20 | +2.54 | +3.08 | 0.10 | – | +0.79 | 0.13 | +1.15 | +0.78 | +2.00 | +1.21 † |
| Backbone | |||||
|---|---|---|---|---|---|
| RN50 | +1.24 | +1.40 | +1.28 | +1.57 | +1.91 |
| RN101 | +1.37 | +1.19 | +1.51 | +1.70 | +2.27 |
| ViT-B/32 | +0.80 | +0.80 | +0.44 | +0.84 | +1.00 |
| ViT-B/16 | +1.40 | +0.73 | +0.75 | +0.93 | +0.91 |
| Mean | +1.20 | +1.03 | +1.00 | +1.26 | +1.52 |
| Comparison | Median |
|---|---|
| Matched search control vs. GDA-CLIP (final-feature) | +0.000 |
| LE-GDA vs. GDA-CLIP (final-feature) | +0.829 |
| Selected component | Mean sd | Share |
|---|---|---|
| Feature-space multiset | 41% | |
| Fusion coefficient | 46% | |
| Ridge coefficient | 13% |
Appendix figures & tables23 assets
Supplementary material from the paper’s appendix.
Appendix
| Backbone | Method | Caltech | DTD | EuroSAT | Aircraft | Food | ImageNet | Flowers | Pets | Cars | SUN | UCF | Mean |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| RN50 | GDA-CLIP (final-feature) | 91.93 | 67.18 | 83.49 | 39.06 | 79.02 | 62.37 | 95.44 | 89.53 | 74.83 | 70.45 | 77.86 | 75.56 |
| LE-GDA | 93.67 | 68.18 | 88.97 | 44.45 | 79.07 | 62.82 | 97.09 | 89.23 | 76.55 | 71.49 | 80.67 | 77.47 | |
| RN101 | GDA-CLIP (final-feature) | 93.74 | 68.64 | 83.02 | 40.23 | 82.10 | 65.41 | 95.57 | 91.24 | 80.52 | 72.10 | 78.94 | 77.41 |
| LE-GDA | 95.09 | 70.39 | 89.22 | 48.06 | 82.15 | 65.88 | 97.77 | 90.95 | 82.03 | 73.22 | 81.67 | 79.68 | |
| ViT-B/32 | GDA-CLIP (final-feature) | 94.27 | 67.79 | 85.62 | 40.64 | 81.76 | 66.67 | 95.95 | 90.82 | 77.51 | 73.46 | 80.14 | 77.69 |
| LE-GDA | 94.97 | 68.16 | 90.34 | 43.15 | 81.58 | 66.46 | 96.35 | 90.86 | 77.94 | 74.14 | 81.66 | 78.69 |
| Method | Grad. | Impl. | RN50 | RN101 | ViT-B/32 | ViT-B/16 | Mean |
|---|---|---|---|---|---|---|---|
| Zero-shot CLIP | – | — | 85.72 .00 | 89.98 .00 | 91.48 .00 | 93.27 .00 | 90.11 |
| Tip-Adapter | – | orig. | 90.33 .12 | 92.95 .13 | 93.81 .37 | 94.86 .19 | 92.99 |
| Proto-Adapter | – | ours | 91.63 .07 | 93.37 .22 | 93.78 .30 | 95.36 .23 | 93.54 |
| GPCache (W+C) | – | ours | 91.62 .12 | 93.63 .22 | 94.37 .18 | 95.36 .14 | 93.75 |
| Tip-Adapter-F | ✓ | orig. | 92.45 .21 | 94.55 .05 | 95.29 .22 | 95.81 .11 | 94.53 |
| Proto-Adapter-F | ✓ | ours | 92.52 .23 | 94.16 .40 | 94.86 .16 | 95.66 .43 | 94.30 |
| Method | Grad. | Impl. | RN50 | RN101 | ViT-B/32 | ViT-B/16 | Mean |
|---|---|---|---|---|---|---|---|
| Zero-shot CLIP | – | — | 42.97 .00 | 38.12 .00 | 44.15 .00 | 44.03 .00 | 42.32 |
| Tip-Adapter | – | orig. | 60.66 .17 | 63.04 .36 | 62.61 .42 | 65.54 .39 | 62.96 |
| Proto-Adapter | – | ours | 65.01 .34 | 64.81 .44 | 65.35 .41 | 67.45 .74 | 65.66 |
| GPCache (W+C) | – | ours | 64.76 .62 | 67.42 .70 | 66.35 .64 | 69.94 .28 | 67.11 |
| Tip-Adapter-F | ✓ | orig. | 66.21 .23 | 69.29 .06 | 69.13 .84 | 72.16 .48 | 69.20 |
| Proto-Adapter-F | ✓ | ours | 67.63 .78 | 68.09 .60 | 67.34 .52 | 70.41 .66 | 68.37 |
| Method | Grad. | Impl. | RN50 | RN101 | ViT-B/32 | ViT-B/16 | Mean |
|---|---|---|---|---|---|---|---|
| Zero-shot CLIP | – | — | 36.27 .00 | 32.78 .00 | 45.31 .00 | 48.49 .00 | 40.71 |
| Tip-Adapter | – | orig. | 71.67 1.24 | 68.47 1.90 | 74.14 .90 | 77.87 .35 | 73.04 |
| Proto-Adapter | – | ours | 74.84 1.10 | 69.22 1.20 | 75.93 .54 | 79.10 .34 | 74.77 |
| GPCache (W+C) | – | ours | 77.60 1.11 | 76.31 .49 | 80.76 .25 | 83.26 .70 | 79.48 |
| Tip-Adapter-F | ✓ | orig. | 85.28 .82 | 82.89 .90 | 85.87 .15 | 87.56 .08 | 85.40 |
| Proto-Adapter-F | ✓ | ours | 80.08 .83 | 74.66 .96 | 79.78 .47 | 81.15 .82 | 78.92 |
| Method | Grad. | Impl. | RN50 | RN101 | ViT-B/32 | ViT-B/16 | Mean |
|---|---|---|---|---|---|---|---|
| Zero-shot CLIP | – | — | 17.10 .00 | 17.91 .00 | 19.08 .00 | 24.81 .00 | 19.73 |
| Tip-Adapter | – | orig. | 29.61 .43 | 31.73 .40 | 31.41 .89 | 40.46 .48 | 33.31 |
| Proto-Adapter | – | ours | 27.63 .28 | 29.01 .36 | 31.17 .30 | 38.83 .57 | 31.66 |
| GPCache (W+C) | – | ours | 32.48 .20 | 35.96 .81 | 35.48 .09 | 43.91 .37 | 36.96 |
| Tip-Adapter-F | ✓ | orig. | 35.40 .37 | 37.66 .67 | 36.69 .21 | 45.75 .32 | 38.88 |
| Proto-Adapter-F | ✓ | ours | 35.79 .17 | 37.55 .22 | 36.87 .38 | 45.42 .51 | 38.91 |
| Method | Grad. | Impl. | RN50 | RN101 | ViT-B/32 | ViT-B/16 | Mean |
|---|---|---|---|---|---|---|---|
| Zero-shot CLIP | – | — | 77.38 .00 | 80.68 .00 | 80.41 .00 | 85.88 .00 | 81.09 |
| Tip-Adapter | – | orig. | 77.85 .13 | 81.05 .06 | 80.89 .05 | 86.36 .12 | 81.54 |
| Proto-Adapter | – | ours | 78.62 .06 | 81.74 .10 | 81.25 .10 | 86.93 .04 | 82.13 |
| GPCache (W+C) | – | ours | 78.29 .10 | 81.73 .09 | 81.30 .09 | 86.94 .04 | 82.06 |
| Tip-Adapter-F | ✓ | orig. | 79.33 .14 | 82.22 .26 | 82.16 .06 | 87.30 .07 | 82.75 |
| Proto-Adapter-F | ✓ | ours | 79.01 .04 | 82.10 .12 | 81.64 .11 | 87.12 .15 | 82.47 |
| Method | Grad. | Impl. | RN50 | RN101 | ViT-B/32 | ViT-B/16 | Mean |
|---|---|---|---|---|---|---|---|
| Zero-shot CLIP | – | — | 59.15 .00 | 61.25 .00 | 63.13 .00 | 67.84 .00 | 62.84 |
| Tip-Adapter | – | orig. | 60.39 .06 | 63.10 .11 | 64.70 .05 | 69.47 .08 | 64.42 |
| Proto-Adapter | – | ours | 61.97 .09 | 64.85 .16 | 65.90 .05 | 70.77 .08 | 65.87 |
| GPCache (W+C) | – | ours | 61.50 .10 | 64.47 .05 | 65.73 .10 | 70.58 .09 | 65.57 |
| Tip-Adapter-F | ✓ | orig. | 63.29 .03 | 66.36 .03 | 67.33 .07 | 71.98 .07 | 67.24 |
| Proto-Adapter-F | ✓ | ours | 63.42 .03 | 66.28 .08 | 67.49 .08 | 72.19 .05 | 67.35 |
| Method | Grad. | Impl. | RN50 | RN101 | ViT-B/32 | ViT-B/16 | Mean |
|---|---|---|---|---|---|---|---|
| Zero-shot CLIP | – | — | 66.06 .00 | 64.43 .00 | 66.50 .00 | 70.81 .00 | 66.95 |
| Tip-Adapter | – | orig. | 89.39 .32 | 90.19 .30 | 91.18 .07 | 93.90 .07 | 91.16 |
| Proto-Adapter | – | ours | 92.11 .18 | 92.34 .15 | 92.66 .13 | 95.60 .08 | 93.18 |
| GPCache (W+C) | – | ours | 92.72 .12 | 94.68 .17 | 94.30 .38 | 96.91 .29 | 94.65 |
| Tip-Adapter-F | ✓ | orig. | 94.56 .58 | 94.92 .10 | 93.99 .26 | 96.52 .32 | 95.00 |
| Proto-Adapter-F | ✓ | ours | 95.55 .05 | 95.82 .25 | 95.28 .02 | 97.28 .03 | 95.98 |
| Method | Grad. | Impl. | RN50 | RN101 | ViT-B/32 | ViT-B/16 | Mean |
|---|---|---|---|---|---|---|---|
| Zero-shot CLIP | – | — | 85.80 .00 | 86.94 .00 | 87.44 .00 | 89.10 .00 | 87.32 |
| Tip-Adapter | – | orig. | 87.90 .25 | 87.65 .10 | 88.27 .57 | 91.74 .50 | 88.89 |
| Proto-Adapter | – | ours | 88.23 .19 | 89.21 .40 | 89.56 .21 | 92.15 .17 | 89.79 |
| GPCache (W+C) | – | ours | 87.97 .06 | 88.90 .53 | 89.32 .75 | 92.40 .34 | 89.65 |
| Tip-Adapter-F | ✓ | orig. | 89.30 .19 | 90.39 .22 | 90.72 .32 | 92.96 .29 | 90.84 |
| Proto-Adapter-F | ✓ | ours | 88.94 .45 | 90.88 .32 | 89.73 .08 | 92.80 .23 | 90.59 |
| Method | Grad. | Impl. | RN50 | RN101 | ViT-B/32 | ViT-B/16 | Mean |
|---|---|---|---|---|---|---|---|
| Zero-shot CLIP | – | — | 55.73 .00 | 63.21 .00 | 60.20 .00 | 65.55 .00 | 61.17 |
| Tip-Adapter | – | orig. | 66.14 .39 | 72.71 .18 | 70.01 .33 | 75.52 .31 | 71.10 |
| Proto-Adapter | – | ours | 70.32 .19 | 76.24 .56 | 72.81 .11 | 79.20 .29 | 74.64 |
| GPCache (W+C) | – | ours | 69.59 .60 | 76.79 .39 | 73.25 .12 | 78.59 .11 | 74.56 |
| Tip-Adapter-F | ✓ | orig. | 74.92 .56 | 80.67 .39 | 77.88 .59 | 82.76 .06 | 79.06 |
| Proto-Adapter-F | ✓ | ours | 75.97 .51 | 80.81 .41 | 77.10 .40 | 82.78 .48 | 79.16 |
| Method | Grad. | Impl. | RN50 | RN101 | ViT-B/32 | ViT-B/16 | Mean |
|---|---|---|---|---|---|---|---|
| Zero-shot CLIP | – | — | 58.85 .00 | 59.02 .00 | 62.06 .00 | 62.56 .00 | 60.62 |
| Tip-Adapter | – | orig. | 67.02 .24 | 68.19 .19 | 70.26 .22 | 71.71 .22 | 69.30 |
| Proto-Adapter | – | ours | 70.09 .15 | 71.05 .15 | 72.80 .06 | 74.62 .30 | 72.14 |
| GPCache (W+C) | – | ours | 69.24 .14 | 70.99 .20 | 72.63 .08 | 74.38 .36 | 71.81 |
| Tip-Adapter-F | ✓ | orig. | 71.29 .05 | 72.83 .17 | 74.02 .22 | 76.17 .16 | 73.58 |
| Proto-Adapter-F | ✓ | ours | 71.61 .13 | 72.94 .09 | 74.12 .14 | 76.16 .25 | 73.71 |
| Method | Grad. | Impl. | RN50 | RN101 | ViT-B/32 | ViT-B/16 | Mean |
|---|---|---|---|---|---|---|---|
| Zero-shot CLIP | – | — | 61.86 .00 | 61.12 .00 | 63.49 .00 | 67.41 .00 | 63.47 |
| Tip-Adapter | – | orig. | 71.27 .24 | 73.52 .33 | 74.39 .30 | 78.26 .22 | 74.36 |
| Proto-Adapter | – | ours | 76.80 .95 | 78.20 .28 | 78.46 .43 | 81.69 .23 | 78.79 |
| GPCache (W+C) | – | ours | 75.12 .11 | 77.01 .31 | 78.21 .25 | 81.32 .22 | 77.91 |
| Tip-Adapter-F | ✓ | orig. | 78.52 .79 | 80.66 .35 | 80.66 .54 | 83.79 .17 | 80.91 |
| Proto-Adapter-F | ✓ | ours | 78.76 .84 | 80.08 .36 | 80.17 .30 | 83.35 .08 | 80.59 |
| Backbone | Distinct spaces | ||||
|---|---|---|---|---|---|
| ViT-B/16 | 4.87 | 6.90 | 0.0525 | 0.0221 | 2.64 |
| ViT-B/32 | 4.09 | 6.61 | 0.0578 | 0.0242 | 2.67 |
| RN50 | 4.08 | 4.52 | 0.0764 | 0.0415 | 2.55 |
| RN101 | 4.80 | 5.56 | 0.0746 | 0.0327 | 2.52 |
| Components | Mean accuracy | vs. |
|---|---|---|
| 80.85 | 0.000 | |
| 80.75 | ||
| 80.47 | ||
| 79.75 | ||
| 78.75 | ||
| Validation-selected | 80.87 | +0.020 |
| Comparison | Median | Positive | Negative | Tied |
|---|---|---|---|---|
| LE-GDA | 109 | 22 | 1 | |
| Matched search control | 52 | 54 | 26 | |
| Per-query score standardization | 98 | 31 | 3 | |
| Within-query score ranks | 25 | 93 | 14 | |
| Median across feature spaces | 13 | 77 | 42 | |
| Mean softmax probabilities | 52 | 67 | 13 |
| Comparison | Feature | Stand. | Unif. | Std. | |
|---|---|---|---|---|---|
| Dispersion matched | RN50 stage 1 | 10 | 0 | ||
| RN50 stage 3 | 14 | 44 | |||
| Accuracy matched | RN101 stage 3 | 24 | 46 | ||
| RN101 final | 32 | 47 |
| Configuration | Representation multiset | Ridge coefficient | Fusion coefficient | Held-out validation used? |
|---|---|---|---|---|
| 0 | none (zero-shot CLIP) | none | none | no |
| 1 | final representation | closed-form Ledoit–Wolf | transferred | no |
| 2 | transferred | validation-selected | validation-selected | yes |
| 3 | transferred | transferred | transferred | no |
| 3a | transferred | transferred | validation-selected | yes |
| 4 | validation-selected | validation-selected | validation-selected | yes |
| Backbone | Config. 0 | Config. 1 | Config. 2 | Config. 3 | Config. 3a | Config. 4 | ||
|---|---|---|---|---|---|---|---|---|
| ViT-B/16 | 65.43 20.48 | 80.29 15.16 | 81.12 14.45 | 80.38 14.43 | 81.05 14.44 | 82.31 13.55 | +0.09 1.90 | +1.93 1.86 |
| ViT-B/32 | 62.11 20.79 | 76.42 16.85 | 77.72 16.20 | 76.80 17.10 | 77.54 16.48 | 78.69 15.56 | +0.39 1.35 | +1.89 2.34 |
| RN50 | 58.81 20.90 | 73.96 16.30 | 76.80 15.56 | 75.15 15.95 | 76.53 15.96 | 77.47 15.36 | +1.19 3.52 | +2.32 2.16 |
| RN101 | 59.59 22.53 | 75.96 16.59 | 78.74 14.67 | 76.74 16.16 | 78.14 15.84 | 79.68 14.55 | +0.78 3.80 | +2.94 2.81 |
| Backbone | Config. 0 | Config. 1 | Config. 2 | Config. 3 | Config. 3a | Config. 4 | ||
|---|---|---|---|---|---|---|---|---|
| ViT-B/16 | 65.43 20.48 | 74.78 17.03 | 76.28 17.66 | 75.36 17.36 | 76.17 17.95 | 77.30 17.14 | +0.58 1.31 | +1.95 2.04 |
| ViT-B/32 | 62.11 20.79 | 71.12 18.44 | 72.84 18.46 | 71.60 18.43 | 72.83 18.43 | 73.15 18.53 | +0.48 1.40 | +1.55 1.80 |
| RN50 | 58.81 20.90 | 66.88 18.03 | 69.85 19.00 | 66.73 18.39 | 69.42 19.46 | 70.87 18.66 | +4.13 3.20 | |
| RN101 | 59.59 22.53 | 69.42 18.40 | 72.25 18.49 | 69.58 18.35 | 71.72 19.20 | 73.35 18.03 | +0.16 2.62 | +3.77 2.81 |
| Comparison | Mean sd | Median | Wins | Sign | Wilcoxon | |
|---|---|---|---|---|---|---|
| 16 | +0.611 2.771 | +0.593 | 28/44 | 0.096 | 0.126 | |
| 16 | +0.941 1.269 | +0.561 | 36/44 | |||
| 16 | +0.283 0.875 | +0.087 | 34/43 | |||
| 16 | +1.046 1.487 | +0.338 | 30/42 | |||
| 16 | +2.270 2.276 | +1.420 | 41/44 | |||
| 4 | +0.267 2.698 | +0.512 | 28/44 | 0.096 | 0.310 |
| Backbone | GDA-CLIP (final-feature) | LE-GDA | Tip-Adapter |
|---|---|---|---|
| RN50 | 1,025 | 3,074 | 16,400 |
| RN101 | 513 | 2,562 | 8,208 |
| ViT-B/32 | 513 | 2,051 | 8,208 |
| ViT-B/16 | 513 | 2,051 | 8,208 |
VLM Adaptation
Vision-language model adaptation tailors pretrained image-text and multimodal models to new tasks and domains while retaining transferable capabilities.
See all 545 papers