---
title: 'CLIP-Fed: Lightweight Unsupervised Federated Learning'
url: https://www.emergentmind.com/topics/clip-fed
type: topic
---

# CLIP-Fed: Lightweight Unsupervised Federated Learning

CLIP-Fed is a lightweight unsupervised federated learning framework built around a pretrained vision–language model, specifically CLIP, for the setting in which privacy-preserving clients hold only unlabeled images and operate under strict computation and communication limits. In the formulation introduced in "Lightweight Unsupervised Federated Learning with Pretrained Vision Language Model" [2404.11046], CLIP-Fed—also called FST-CBDG—fixes CLIP’s pretrained image encoder, initializes a linear classifier from CLIP text prototypes, refines soft pseudo-labels by self-training, augments local learning with synthetic class-balanced feature samples, and federated-averages only the linear head parameters. This combination is designed to address unlabeled local data, non-i.i.d. data heterogeneity, class imbalance, and the cost of transmitting deep models [2404.11046].

## 1. Definition and problem setting

CLIP-Fed targets a specific variant of federated learning in which each client holds unlabeled images and cannot afford either the labeling burden of supervised federated learning or the training and transmission cost of deep models. The framework uses CLIP’s zero-shot prediction capability and its pretrained image encoder to avoid full-model training on edge devices, while still permitting collaborative learning across isolated clients [2404.11046].

The method is motivated by three constraints stated explicitly in the original formulation: unlabeled data at each client, non-i.i.d. and class imbalance, and device constraints. The first removes the ordinary supervised signal. The second means that local pseudo-labels may be biased and some classes may be under-represented. The third makes deep-model back-propagation and large parameter exchanges impractical. CLIP-Fed addresses these constraints by reducing the trainable component to a linear head on top of fixed CLIP features, thereby turning federated optimization into the aggregation of a small parameter set rather than a full vision backbone [2404.11046].

A common misconception is to treat CLIP-Fed as a generic label for any CLIP-based federated method. In the literature, however, several related but distinct frameworks exist. FedCLIP fine-tunes a lightweight attention-based adapter for CLIP in labeled federated classification [2302.13485]; CLIP2FL uses CLIP-guided knowledge distillation and federated feature synthesis on heterogeneous and long-tailed labeled data [2312.08648]; and a later work reused the name CLIP-Fed for a federated backdoor-defense framework rather than for unsupervised learning [2508.10315]. In this primary usage, CLIP-Fed refers to the unsupervised linear-head method of [2404.11046].

## 2. Model construction and pseudo-label self-training

The core architectural choice in CLIP-Fed is to keep CLIP’s image encoder fixed and learn only a linear classifier. On the server, for each class \(k=1,\dots,K\), a prompt such as “a photo of a \(\text{class}_k\)” is encoded by CLIP’s text encoder \(E_{\rm text}\) to obtain a text prototype \(T_k\in\mathbb{R}^d\). These prototypes initialize the classifier parameters as

\[
W^0 =
\begin{bmatrix}
T_1^\top \\
T_2^\top \\
\vdots \\
T_K^\top
\end{bmatrix},
\qquad
b^0 = \mathbf 0.
\]

The server then distributes \(\{T_k\}_{k=1}^K\) and the fixed image encoder \(E_{\rm img}\) to the clients [2404.11046].

For each unlabeled image \(x_j\) on client \(c\), CLIP-Fed extracts a feature

\[
z_j = E_{\rm img}(x_j)\in\mathbb{R}^d,
\]

computes zero-shot scores

\[
s_{jk} = z_j\cdot T_k,
\]

and obtains a soft pseudo-label

\[
p_j = \mathrm{softmax}([s_{j1},\dots,s_{jK}])\in\Delta^{K-1}.
\]

These zero-shot probabilities serve as the initial pseudo-labels, \(q_j^0=p_j\). The trainable head is a standard softmax classifier on fixed CLIP features,

\[
f(z_j;W,b)=\mathrm{softmax}(Wz_j+b)\in\Delta^{K-1}.
\]

During local training, the pseudo-labels are refined by a momentum update,

\[
q_j^t = \beta\,q_j^{t-1} + (1-\beta)\,f(z_j;W,b),
\qquad \beta\in[0,1].
\]

This moving-average rule is central to the framework’s self-training behavior: it avoids discarding the initial zero-shot prior while allowing the local linear head to reshape class assignments over time [2404.11046].

The local loss on real unlabeled features is a self-training cross-entropy loss denoted \(\mathcal L_{\mathrm{iST}}\). Only \((W,b)\) are updated; CLIP’s image encoder remains fixed. This sharply constrains the optimization problem, which is a deliberate design choice for edge-side feasibility. A plausible implication is that CLIP-Fed treats CLIP not as a model to be adapted deeply, but as a high-quality frozen feature map whose geometry is already useful for federated self-training.

## 3. Class-balanced text feature sampling

To mitigate class imbalance and non-i.i.d. effects, CLIP-Fed augments local training with synthetic feature samples built directly around CLIP’s text prototypes. The method first estimates class counts from current pseudo-label assignments: if \(m_k\) is the number of images whose current pseudo-label \(\arg\max f(z_j)\) is class \(k\), and \(k^*=\arg\max_k m_k\), then synthetic counts \(n_k\) are determined by

\[
m_k+n_k=(1+\gamma)\,m_{k^*},
\qquad k=1,\dots,K,
\]

where \(\gamma\ge 0\) is a balance factor [2404.11046].

For each class \(k\), CLIP-Fed then draws synthetic features from a Gaussian centered at the corresponding text prototype:

\[
\tilde z_{kj}\sim\mathcal N(T_k,\sigma^2 I_d),
\qquad j=1,\dots,n_k.
\]

These synthetic samples receive one-hot labels \(y_{kj}=k\), and their contribution is optimized through a text-sampling loss \(\mathcal L_{\mathrm{tSamp}}\) [2404.11046].

This mechanism is distinctive because it does not generate images. It generates feature-space samples around CLIP text embeddings, which are treated as class prototypes. Relative to image-space synthesis, this preserves the lightweight character of the method and avoids any need to train or communicate a generative model. The original ablation results report that using only \(\mathcal L_{\mathrm{iST}}\) or only \(\mathcal L_{\mathrm{tSamp}}\) gives no gain, whereas balanced rather than equal sampling yields a 5-point accuracy lift [2404.11046]. That pattern indicates that the framework depends on the interaction between pseudo-label refinement and class-balanced prototype-based augmentation rather than on either ingredient in isolation.

## 4. Federated protocol and resource profile

CLIP-Fed runs for \(R\) federated rounds. In each round, the server samples a subset of clients and sends them the current \((W,b)\). Each selected client downloads the linear head, runs the local self-training and class-balanced sampling routine for one epoch, and uploads updated \((W_c,b_c)\). The server aggregates by plain FedAvg:

\[
W\leftarrow\frac1{|\mathcal S|}\sum_{c\in\mathcal S}W_c,
\qquad
b\leftarrow\frac1{|\mathcal S|}\sum_{c\in\mathcal S}b_c.
\]

The communication cost is therefore limited to approximately \(K\times d+K\) floats per round, with the paper giving \(10\times1024\) for CIFAR-10 as an example, in contrast to tens of millions when transmitting a full ResNet. Likewise, local computation is reduced to back-propagation through one linear layer [2404.11046].

This protocol places CLIP-Fed in a broader family of CLIP-based federated methods that freeze large pretrained backbones and communicate only small task-specific parameters. FedCLIP, for example, communicates only an attention-based adapter and reports approximately \(283\times\) reductions relative to full CLIP fine-tuning [2302.13485]. TriplePlay similarly freezes CLIP’s backbone, updates only an adapter, and adds quantization and LoRA to reduce communication overhead [2409.05347]. CLIP-Fed is more minimal than either: it transmits only the parameters of a linear head.

The minimality of this communication pattern is important for interpreting the method’s scope. CLIP-Fed is not presented as a general-purpose replacement for all federated vision-language adaptation. Rather, it is a highly constrained solution for unlabeled and resource-limited clients, where even adapter fine-tuning may be less attractive than linear-head aggregation.

## 5. Experimental setting and reported performance

The experimental evaluation uses CIFAR-10, CIFAR-100, and CINIC-10, split across \(N=100\) clients, with 10% clients participating per round, under both i.i.d. and non-i.i.d. partitions. Non-i.i.d. settings include sharding with \(s\) shards and LDA with Dirichlet \(\alpha\). The reported metric is test accuracy after 10 rounds, with 1 local epoch per round [2404.11046].

The main homogeneous-setting results are summarized below.

| Dataset | CLIP-ZS | CLIP-Fed / FST-CBDG |
|---|---:|---:|
| CIFAR-10 | 68.7 | 74.0 |
| CIFAR-100 | 39.0 | 43.2 |
| CINIC-10 | 63.2 | 66.3 |

In the same setting, the paper reports supervised federated baselines of 73.3 for FedAvg on CIFAR-10, 37.8 on CIFAR-100, and 66.0 on CINIC-10, so CLIP-Fed not only improves over CLIP zero-shot predictions but also exceeds those supervised federated baselines under limited computational and communication overhead [2404.11046].

Under heavy non-i.i.d. partitioning on CIFAR-10 with sharding \(s=2\), CLIP-Fed improves CLIP-ZS from 68.7 to 72.0, while FedAvg collapses to approximately 32% [2404.11046]. The reported convergence behavior is also notable: one or two rounds suffice to surpass CLIP zero-shot and match supervised FL. This suggests that the initialization from CLIP text prototypes and the momentum-smoothed pseudo-label updates produce a strong early optimization trajectory.

The paper’s ablations identify two salient dependencies. First, using only the self-training loss or only the text-sampling loss gives no gain. Second, class-balanced sampling yields a 5-point accuracy lift over equal sampling. These results reinforce the interpretation that CLIP-Fed’s performance depends on the joint use of CLIP-derived pseudo-label priors and synthetic class balancing in feature space [2404.11046].

## 6. Relationship to adjacent methods and nomenclature

CLIP-Fed belongs to a rapidly expanding line of federated learning methods that use CLIP or other vision–language models to cope with heterogeneity, long-tail structure, and the cost of large pretrained backbones. Within this line, different methods allocate adaptation capacity at different points.

FedCLIP attaches an attention-based adapter immediately after the frozen CLIP image encoder and trains only the adapter in a standard federated-averaging loop, reporting strong generalization and personalization on PACS, VLCS, and Office-Home, as well as approximately \(283\times\) savings in compute and communication relative to full fine-tuning [2302.13485]. CLIP2FL uses client-side CLIP-guided knowledge distillation plus server-side federated feature synthesis with prototype contrastive learning to retrain a balanced server classifier on heterogeneous and long-tailed labeled data [2312.08648]. TriplePlay uses CLIP as a modular adapter within FedAvg, adds GAN-based data balancing, and combines quantization with QLoRA; on PACS at 500 rounds it reports 80.2% final accuracy for TriplePlay versus 75.8% for FedCLIP+QLoRA and 70.4% for FedCLIP, with GPU utilization reduced from approximately 60–70% to approximately 35% [2409.05347].

Against this backdrop, CLIP-Fed is distinguished by three properties. First, it is explicitly unsupervised at the client level. Second, it freezes CLIP completely and learns only a linear head. Third, its synthetic augmentation occurs in feature space around text prototypes rather than through an image generator or an adapter-specific balancing module [2404.11046]. This makes it one of the most lightweight formulations in the CLIP-based federated literature.

A separate nomenclature issue complicates the term. In 2025, "A Vision-Language Pre-training Model-Guided Approach for Mitigating Backdoor Attacks in Federated Learning" introduced a different framework also named CLIP-Fed, centered on pre-aggregation PCA and HDBSCAN filtering, server-side dataset construction using an MLLM, and post-aggregation purification through prototype contrastive loss and KL-divergence knowledge transfer [2508.10315]. For technical clarity, CLIP-Fed in the unsupervised federated learning sense should therefore be identified with the 2024 FST-CBDG formulation [2404.11046], while the 2025 usage should be treated as a distinct backdoor-defense framework that happens to share the same name.

Source: https://www.emergentmind.com/topics/clip-fed