arXiv:2610.34901cs.CVOct 2026

Manuscript Offprint

arXiv:2610.34901

LE-GDA: Layer Ensemble Gaussian Discriminant Analysis for Training-Free Few-Shot CLIP Adaptation

Pavodi Maniamfu, Vogel Kiketa, Zezina Kuzulu Kuetu, Jakin Mukendi Kabongo, David Mayoya Kutangila, Pescie Honore Kinkani Mampuya, L'Or Wolo Sieka

Abstract

https://github.com/pavodi-NM/le-gda.

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

1. Introduction

Vision-language models such as Contrastive Language-Image Pre-training (CLIP) [27] learn image representations that transfer effectively to downstream recognition tasks. In zero-shot classification, predictions are obtained through the cosine similarity between the encoded image features and text embeddings generated from class-specific prompt templates. For example, a template like “a photo of {class}” allows the language encoder to construct the necessary classifier weights. This enables the model to categorize images across arbitrary domains without downstream fine-tuning. To further improve performance, a small few-shot training set can introduce task-specific information through prompt learning, feature adapters, residual classifiers, or non-parametric retrieval as adopted by recent efficient fine-tuning methods [10, 34, 35, 37]. Although these approaches can be parameter-efficient, methods that optimize task-specific parameters still require a training procedure for every downstream dataset. Training-free adaptation [1, 7, 18, 31, 32, 38] instead constructs the classifier directly from frozen CLIP features.

In this work, we study training-free adaptation in the validation-assisted regime. This is the convention adopted by cache-based CLIP adapters [7, 32, 35, 38], where classifiers are fit on the few support examples per class. A held-out labeled split selects the fusion and regularization hyperparameters these methods require. Within this regime, a gain is only interpretable if every method draws on the same validation budget [29].

Gaussian discriminant analysis provides a strong training-free classifier for CLIP [32]. It estimates class statistics from the few-shot training features and combines the resulting linear discriminant with the zero-shot classifier. Like cache-and adapter-based methods more generally [10, 32, 35], it operates on the final projected image embedding. This representation is the natural default because it is aligned with the text encoder and is often the most accurate individual representation. It is nevertheless only the last output of a sequence of transformations performed by the visual encoder.

Combining intermediate representations requires more than naive classifier averaging. Each representation defines a different statistical feature space, with its own dimensionality, covariance structure, and per-query dispersion of scaled discriminant-scores. The last is the spread of a representation's class scores within a single query and varies by more than three orders of magnitude across the intermediate representations of a single backbone (e.g. ResNets). Under direct score averaging, influence is therefore allocated by numerical scale rather than predictive information. Normalizing scores before combination is long-established practice when fusing classifiers whose outputs live on different scales [17, 19]. Training-free CLIP adapters have not required it, since they operate in a single feature space. A selection procedure operating on such scores inherits the same bias, preferring representations for their scale rather than their contribution to classification.

Building on [32], which we refer to as GDA-CLIP, we propose Layer-Ensemble Gaussian Discriminant Analysis (LE-GDA) to combine these representations. The method extracts intermediate and final representations from a single frozen CLIP forward pass and fits the same shared-covariance Gaussian discriminant to each representation. It standardizes the class scores of each representation within each query, then greedily selects [4] a small subset of representations using validation accuracy and combines their scores with the zero-shot classifier. All classifiers are obtained from few-shot training statistics, without back-propagation.

Our contributions are as follows:

• We show that CLIP’s intermediate representations carry information a training-free ensemble can extract without gradient-based optimization. The same shared-covariance discriminant is fitted independently in each frozen feature space.

• We identify per-query score standardization as the component that makes discriminants from different feature spaces commensurate under a single fusion coefficient. Validation selection therefore tracks predictive quality rather than scale.

• We evaluate the method across 11 datasets, four CLIP backbones, and five shot counts against a matched GDA-CLIP (final-feature) baseline. Controls isolate the source of the gain. At one shot, where neither covariance estimation nor standardized fusion applies, LE-GDA retains a 1.20-point mean gain.

References (37)