Manuscript Offprint
arXiv:2610.09907FedSSMCoOp: SSM Encoders for light-weight Federated Prompt Learning for Few-shot Classification
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Ankita Das
Department of Computer Science and Engineering
Indian Institute of Technology Hyderabad
Ambarish Parthasarathy
Department of Artificial Intelligence
Indian Institute of Technology Hyderabad
Sumohana S. Channappayya
Department of Electrical Engineering
Indian Institute of Technology Hyderabad
C. Krishna Mohan
Department of Computer Science and Engineering
Indian Institute of Technology Hyderabad
Abstract
Vision-Language Models (VLMs) have shown strong performance across a wide range of downstream vision tasks, thanks to the complementary information contained in the respective domains. Despite the performance gains, most of these approaches rely on aligning these domains using the cosine similarity metric, which fails to capture token-level structure and cross-modal interactions prior to the classification stage. This is especially critical in biomedical applications under federated constraints, where data sharing is restricted, labeled data is scarce at each site, and it differs widely across institutions, leading to substantial statistical heterogeneity. To overcome this issue, we propose FedSSMCoOp, a federated few-shot image classification framework that enables multimodal learning while preserving data privacy. With the help of the SSM-based Vision Mamba and Cross Mamba blocks, and by optimizing only the soft-prompt and communication-prompt updates in the federated setting, the framework prioritizes both computation and performance. Importantly, this eliminates the need to use an external Large Language Model (LLM) for feature alignment. The framework is further trained and evaluated on various biomedical image datasets, and its performance is assessed. The proposed framework delivers stable performance relative to the baselines and is, on average, 1.96 times lighter. The corresponding script will be made available soon.
1 Introduction
The VLMs are a performance-oriented framework where information is processed using one or more complementary modalities. One of the most commonly used modalities is vision and text, where either of them can aid the other. The features from each of the modalities are either combined in a common space or processed by a dedicated encoder Tan & Bansal (2019). Commonly used encoders are attention-based transformers that prioritize performance. The Contrastive Language Image Pretraining (CLIP) is one such VLM that uses this approach in the vision and text domain, respectively Radford et al. (2021). The features from both modalities are aligned by means of a contrastive learning approach inspired by InfoNCE Oord et al. (2018). This is the foundational template for most of the present-day VLMs. On the other hand, the Bootstrapped Language Image Pretraining (BLIP), the second variant of the prior CLIP model, is designed for both retrieval and generative applications Li et al. (2022). Further, the BLIP introduces a filtering mechanism called CaptFilt that filters out noisy captions, thereby making it more robust to perturbations. The SigLIP Zhai et al. (2023) is another variant of the CLIP model in which the contrastive approach is replaced with a sigmoid objective, which is simple but has proven quite effective in terms of performance and stability. Biomedical imaging is an important application domain for VLMs because the data is typically distributed across multiple healthcare institutions and cannot be directly shared due to privacy constraints. In addition, biomedical images can differ substantially across institutions due to variations in imaging devices, acquisition protocols, and patient populations. These characteristics make biomedical imaging a challenging and highly heterogeneous setting for VLM adaptation, particularly when only a small number of labeled samples are available.
Despite the advancements, the transformer-based VLMs are computationally inefficient due to the presence of an attention mechanism. The State Space Modeling (SSMs) of Mamba Gu & Dao (2023) was effective in reducing the computation complexity from quadratic in attention to almost linear. This helped to curb the computational complexity while simultaneously maintaining performance, and is widely used in most of the applications in Biomedical and Satellite Imaging, respectively. The Vision Mamba Zhu et al. (2024) is an extension of this approach in the vision domain, using a bidirectional state-space approach for an effective scanning mechanism. The VMamba Liu et al. (2024), on the other hand, used an unidirectional stage-wise approach, mimicking an SSM-based mixer model.
However, every advancement comes at a cost. The Mamba variants, despite being lightweight, weren't as effective as attention-based models. This is because the attention mechanism was effective at extracting fine-grained features, whereas Mamba focuses more on the global perspective of features Parthasarathy & Channappayya (2026). These factors are also crucial in the federated environments, where the performance and the latency between the client and the server must be jointly optimized. Given that the data across participating clients are typically non-independent and identically distributed (non-IID), each client's data is drawn from a different underlying distribution, which further increases the difficulty of achieving stable convergence. These characteristics create a unique trade-off in federated biomedical VLMs: the model should be computationally efficient enough to communicate across clients, while still being capable of capturing both global and fine-grained features from heterogeneous medical images. Therefore, the choice of the visual encoder and the strategy for adapting it are particularly important in this setting. The computational efficiency of SSM-based models is particularly attractive here, where both local computation and communication between clients and the server are important. Therefore, we propose FedSSMCoOp, a federated framework that integrates Vision Mamba with the Cross-Mamba Interaction block Liu et al. (2026); Zhu et al. (2024), balancing performance and computational complexity. The integrated design is further stitched into a Federated Learning (FL) setup that communicates only with the soft prompt deltas. This reduces the per-round communication cost between the client and the server. We demonstrate gains and on-par performance across several datasets while significantly reducing computational cost. Further, this approach is trained and validated across biomedical imaging datasets and compared over the baselines under the non-IID data distributions.
Further, in the domain of Prompt Learning, CoOp Zhou et al. (2022b) helps to address the issue of communication cost by optimizing the learnable context tokens, which can be adapted from a frozen CLIP encoder. Works like CoCoOp Zhou et al. (2022a) and KgCoOp Yao et al. (2023) use probabilistic conditioning and further compute the cosine similarity between the soft and hard prompts through an external knowledge mechanism. Further, PromptFL Guo et al. (2023a), aggregates only the soft prompts, and the BiomedCoOp
Table 1: Comparison of related methods with FedSSMCoOp. FL: Federated Learning, PL: Prompt Learning, Vim: Vision Mamba encoder, MIB: Mamba Interaction Block. ✓: supported, ×: not supported, ~: partially supported.
| Method | FL | PL | Vim | MIB | Medical | Few-shot |
|---|---|---|---|---|---|---|
| Federated Learning | ||||||
| FedAvgMcMahan et al. (2017) | ✓ | ✕ | ✕ | ✕ | ~ | ✕ |
| FedProxLi et al. (2020) | ✓ | ✕ | ✕ | ✕ | ~ | ✕ |
| SCAFFOLDKarimireddy et al. (2020) | ✓ | ✕ | ✕ | ✕ | ✕ | ✕ |
| Prompt Learning | ||||||
| CoOpZhou et al. (2022b) | ✕ | ✓ | ✕ | ✕ | ✕ | ✓ |
| CoCoOpZhou et al. (2022a) | ✕ | ✓ | ✕ | ✕ | ✕ | ✓ |
| KgCoOpYao et al. (2023) | ✕ | ✓ | ✕ | ✕ | ✕ | ✓ |
| ProDALu et al. (2022) | ✕ | ✓ | ✕ | ✕ | ✕ | ✓ |
| PromptFLGuo et al. (2023b) | ✓ | ✓ | ✕ | ✕ | ✕ | ✓ |
| BiomedCoOpKoleilat et al. (2025) | ✕ | ✓ | ✕ | ✕ | ✓ | ✓ |
| FedTPGQiu et al. (2024) | ✓ | ✓ | ✕ | ✕ | ✕ | ✓ |
| FedMVPSingha et al. (2025) | ✓ | ✓ | ✕ | ✕ | ✕ | ✓ |
| FedMPTWang et al. (2026) | ✓ | ✓ | ✕ | ✕ | ✕ | ✓ |
| BioVLMSingha et al. (2026) | ✕ | ✓ | ✕ | ✕ | ✓ | ✓ |
| State Space Models | ||||||
| MambaGu & Dao (2023) | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| Vision MambaZhu et al. (2024) | ✕ | ✕ | ✓ | ✕ | ✕ | ✕ |
| VMambaLiu et al. (2024) | ✕ | ✕ | ✓ | ✕ | ✕ | ✕ |
| MedMambaYue & Li (2024) | ✕ | ✕ | ✓ | ✕ | ✓ | ✕ |
| MambaDFuseLi et al. (2024) | ✕ | ✕ | ✓ | ✓ | ✕ | ✕ |
| COMOLiu et al. (2026) | ✕ | ✕ | ✓ | ✓ | ✕ | ✕ |
| FedSSMCoOp (ours) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Koleilat et al. (2025) builds on top of this approach through an LLM-generated class descriptions and semantic prototypes. FedTPG Qiu et al. (2024) implemented a shared text-conditioned prompt generator in this framework. To better understand and learn the multimodal prompts, FedMVP Singha et al. (2025) combines the vision features with LLM-derived class attributes. As an extension of this the FedMPT Wang et al. (2026) uses this LLM-based class attributes to improve federated multi-label recognition. In biomedical domain BioVLM Singha et al. (2026) learns a dynamic prompt bank by distilling LLM-derived attributes for few-shot biomedical classification.
The introduction of SSMs such as Mamba Gu & Dao (2023) provides a lightweight alternative to the bulky transformer-based models. The Vision Mamba Zhu et al. (2024) adapts a similar mechanism to the vision domain by serializing patches into a bidirectional SSMs approach, one for the forward pass and the other for the backward pass. The VMambaLiu et al. (2024) incorporates a stage-wise scanning approach similar to a Mixer model. The MedMamba Yue & Li (2024) uses the strengths both the Vision Mamba and convolution blocks for medical image classification. On the other hand, MambaDFuse Li et al. (2024) and COMO Liu et al. (2026) introduce dual-stream Mamba architectures that fuse two feature streams and serve as an alternative to the bulky cross attention mechanism.
However, these existing prompt learning methods mainly operate in centralized setting or on the cosine similarity between the two modalities don't necessarily capture the cross-modal interaction. Further, most of the Mamba-based methods mainly rely on unimodal setups, and fewer works contribute to multimodal and federated setups. To the best of our knowledge, the proposed FedSSMCoOp is a work that addresses these issues, integrating the federated setup with SSM approaches of Vision Mamba and Cross Mamba block (COMO), capturing cross-modal cues for effective alignment. This eliminates the use of bulky LLMs, as the COMO already solves this. The comparison of the different approaches with reference to the proposed framework is shown in Table 1.
3 Preliminaries
3.1 State Space Models (SSMs)
Given an input image , it is first divided into non-overlapping patches, similar to that of the transformer model. Now, each patch is linearly projected to a -dimensional embedding, along with learnable positional embeddings in order to preserve spatial ordering. Vision Mamba models the patch sequence as a selective state space model (SSM) with the following recurrent formulation:
where is the embedding of the -th patch, is hidden state capturing context from all previously seen patches, and are input-dependent projection matrices that implement selective gating. Importantly, the matrices and are functions of input , allowing the model to selectively absorb informative patches into memory while suppressing background patches. Importantly, with reference to Equation 1, it can be observed that it clearly operates in the continuous domain. Since the Mamba operates in the discrete domain, an intermediate parameter is used to convert the above variables in the discrete space.
The output is then computed using the convolution and the sequential mode, helping in both optimized training and inference. Here, is the sequence length of the input, and is the corresponding kernel having a dimension of .
Further, in the case of the cross-modal mechanism, the COMO Liu et al. (2026) is a much lighter alternative to the attention-based mechanism. It gets its inspiration from the dual-streamed architecture and combines the spatial features from the two modalities by means of a Cross mamba Block Liu et al. (2026). Firstly, the high-level features, a combination of both average and max pooling, are applied along with deep feature mapping in order to make the model more adaptive. These processed features are further flattened, and are incorporated with a learning position embedding , providing the necessary positional encodings. Now, the is scanned across the four directions ( ), helping in the expansion of the serialization approach. The results of this, goes across the SSM structure (S6), further resulting in four separate outputs.
Similarly, for the Cross-mamba block, the inputs from both modalities are processed. The governing expression is very similar to that of the Equation 5.
where, , are the multimodal inputs for the Cross mamba block, with the CS6 being the main structure of the cross mamba, and , are the serialized inputs from the two modalities.
3.2 Federated Learning
Federated Learning McMahan et al. (2017) is a distributed machine learning paradigm in which multiple clients collaboratively train a shared model without exchanging their private data. Considering clients, where each client has a local dataset which remains private. The objective is to learn a global model with parameter that minimizes the local objectives:
where is the local loss on client . The FedAvg McMahan et al. (2017) algorithm proceeds in synchronous rounds. At each round the server broadcasts the current global parameters to all the clients and each client performs local epochs of stochastic gradient descent on its own private data and obtains updated parameters . Then the server aggregates client updates using weighted averaging:
Because of this, the raw data never leaves the clients, preserving privacy. Another challenge in FL is data heterogeneity, where datasets in clients follow different data distributions ( for a setting known as non-IID). To simulate this in medical imaging, class labels are partitioned across clients using Dirichlet distribution, , where a smaller induces greater heterogeneity. Communication cost with the server is another challenge, as full model weights for vision encoders can be heavy, making each communication round expensive, especially on bandwidth-constrained hospital networks. Prompt-based federated learning (FL) Guo et al. (2023b) addresses this by sharing only a small set of learnable parameters, reducing communication cost while keeping all encoder weights frozen and local.
4 Proposed Approach
In this work, we introduce the FedSSMCoOp framework, a federated approach to zero-shot and few-shot image classification that exploits a decentralized Prompt Learning objective to optimize communication cost between clients and the server. Further, to optimize the computational complexity of the attention mechanism, we first bring in the Vision Mamba Zhu et al. (2024) at the vision encoder end. Further, to capture the inter-modality cues, we incorporate the Cross Mamba interaction block Liu et al. (2026), importantly, to the vision and the text modality, respectively. Since this interaction block already captures and aligns the corresponding modal features, we believe that this can substitute the role of the LLM. The corresponding architecture and the algorithm of the proposed framework is shown in Figure 1 and Algorithm 1.
We consider a federated framework with clients, where each client holds a private dataset of medical images and class labels . The data remains local and is never shared across the clients or with the central server at any point during training. In the federated few-shot setting, each client trains on at most -shot samples per class, giving a total of training images distributed across all clients. The data is partitioned using Dirichlet distribution to simulate realistic non-IID clinical distributions, where smaller induces greater heterogeneity across clients. The goal is to learn a classifier that generalizes to all classes, including classes unseen at individual clients, through global communication rounds of federated training. Each client maintains a set of learnable soft prompt context tokens , where the subscript denotes the prompt parameters, the superscript indexes the client, is the number of context tokens and is the embedding dimension. Importantly, the server maintains only the global prompt from which each client initializes its local at the start of every round. Each round, every client uploads only the prompt delta , ensuring that communication cost scales with the prompt size.
Each client computes its predictions using the Vim Zhu et al. (2024) encoder for image branch and text encoder with learnable soft prompt for text branch. The input image is processed through Vim Zhu
Figure 1: The architecture of the proposed FedSSMCoOp framework. On each client, a frozen Vison Mamba encoder produces image tokens V while the text encoder produces text tokens T. The COMO block fuses both the streams bidirectionally into text-aware and image-aware features, which are mean-pooled to form which is optimized using the cross-entropy loss . Only the prompt parameters are sent to the server for aggregation.

Algorithm 1: FedSSMCoOp Federated Training
Data: Number of clients K, local epochs E, global rounds T, learning rate , and client datasets .
Data: Frozen Vision Mamba encoder and BiomedCLIP text encoder .
Result: Trained global prompt and per-client MIB parameters .
/* Server initialization */
Initialize global prompt from “a photo of a”
for each client do
Initialize MIB parameters and text projection locally
for round do
/* Server broadcasts the global prompt */
Broadcast global prompt to all clients
for each client in parallel do
for local epoch do
for mini-batch do
,
Update , , and via SGD on
/* Compute local prompt update */
Upload and
/* only prompt delta is uploaded */
/* Server-side FedAvg aggregation */
return and
et al. (2024) to obtain the patch tokens , while the text encoder produces class tokens from the concatenation for each class . the text tokens are projected via a learnable linear layer, giving . The Mamba Interaction Block (MIB) Liu et al. (2026) as mentioned in Section 3.1, fuses the image and text tokens bidirectionally, producing text-aware image patches and image-aware class tokens . The class logits are computed by mean-pooling and taking the inner product with . During the local training each client minimizes the standard cross-entropy loss. Only the soft prompt , the text projection matrix , and the MIB parameters receive the gradient updates. The Vision Mamba and BiomedCLIP text encoders remain frozen throughout the training process, as shown in Algorithm 1.
At each round , the server broadcasts the current global prompt to all clients. Each client initializes , performs local epochs using SGD on , and uploads only the prompt delta along with its local sample count . The server aggregates client updates via weighted averaging McMahan et al. (2017):
This process follows the prompt-based federated paradigm introduced by PromptFL Guo et al. (2023a), in which only the lightweight prompt parameters are communicated between clients and the server. Since is soft weight the per-round communication cost is reduced compared to full Vision Mamba weight sharing. As the raw data never leave clients and only prompt deltas are transmitted to the server, preserving privacy. It is important to note that only the soft prompts are aggregated at the server. The text projection matrix and the MIB parameters are optimized locally and remain client-specific throughout both training and inference; they are never uploaded or aggregated. The shared prompt captures knowledge across clients, while the client-specific and adapt the model to each client's non-IID data distribution. During inference time client performs prediction using the aggregated global prompt together with its locally learned and , and we report the mean performance across clients. By aggregating only the soft prompt, FedSSMCoOp substantially reduces communication overhead as reported in Section 9.
5 Experiments
In the case of the experimental setup, the models such as BiomedCoOp Koleilat et al. (2025), CoCoOP Zhou et al. (2022a), KgCoOp Yao et al. (2023) models respectively, were adopted for the Prompt Learning objective. In this work, we extend these models to the federated setting and keep this as the baseline, and compare our proposed FedSSMCoOp framework. In order to evaluate the performance of our framework, we evaluate on 11 diverse biomedical datasets, including Magnetic Resonance Imaging (MRI), Ultrasound, histopathology, X-ray Imaging, Optical Coherence Tomography (OCT), gastrointestinal endoscopy, dermatoscopy, fundus imaging, and computed tomography (CT). The descriptions of the dataset are shown in Table 2. These datasets are particularly chosen, as they exhibit properties that make the federated prompt-learning setup particularly challenging.
Table 2: Overview of the eleven biomedical imaging datasets used in our evaluation.
| Dataset | Modality | Organ | #Cls | Classes | Train / Test / Val |
|---|---|---|---|---|---|
| BTMRI | Brain MRI | Brain | 4 | Glioma, Meningioma, Normal, Pituitary | 2854 / 1717 / 1141 |
| BUSI Al-Dhabyani et al. (2020) | Breast US | Breast | 3 | Benign, Malignant, Normal | 389 / 236 / 155 |
| CHMNIST Kather et al. (2016) | Histopathology | Colon | 8 | Adipose, Complex Stroma, Debris, Empty, Immune, Normal Mucosa, Simple Stroma, Tumor Epithelium | 2496 / 1504 / 1000 |
| COVID Tahir et al. (2021) | Chest X-ray | Lungs | 4 | COVID-19, Lung Opacity, Normal, Viral Pneumonia | 10582 / 6351 / 4232 |
| LC25000 Borkowski et al. (1912) | Histopathology | Lung & Colon | 5 | Colon Adeno., Colon Benign, Lung Adeno., Lung Benign, Lung SCC | 12500 / 7500 / 5000 |
| OCTMNIST Kermany et al. (2018) | Retinal OCT | Retina | 4 | CNV, Drusen, DME, Normal | 97477 / 1000 / 10832 |
| Kvasir Pogorelov et al. (2017) | GI Endoscopy | GI Tract | 8 | Dyed Lifted Polyps, Cecum, Esophagitis, Dyed Resection, Pylorus, Z-Line, Polyps, Ulcerative Colitis | 2000 / 1200 / 800 |
| DermaMNIST Codella et al. (2019); Tschandl et al. (2018) | Dermatoscopy | Skin | 7 | Actinic Keratosis, BCC, Benign Keratosis, Dermatofibroma, Nevus, Melanoma, Vascular Lesion | 7007 / 2005 / 1003 |
| RetinaMNIST Köhler et al. (2013) | Fundus | Retina | 4 | Cataract, Diabetic Retinopathy, Glaucoma, Normal | 2108 / 1268 / 841 |
| CTKidney Islam et al. (2022) | CT Scan | Kidney | 4 | Cyst, Stone, Tumor, Normal | 6221 / 3738 / 2487 |
| KneeXray Chen (2018) | X-ray | Knee | 5 | None, Doubtful, Minimal, Moderate, Severe (OA grade) | 5778 / 1656 / 826 |
In this framework, we simulate the federated learning setup with clients under non-IID data distributions, and with a Dirichlet partitioning strategy, , where smaller induces higher
Table 3: The corresponding modality-wise parameters of the models. Note that the PromptFL framework makes use of a ResNet-based model in the vision modality.
| Model/Modality | BioMedCLIP | CoCoOp | KgCoOp | PromptFL | PromptFL+FedProx | FedOTP | BioMedCoOp | FedSSMCoOp |
|---|---|---|---|---|---|---|---|---|
| Vision Modality | 86M | 86M | 86M | 38M | 38M | 38M | 86M | 26M |
| Text Modality | 110M | 38M | 38M | 38M | 38M | 38M | 38M | 38M |
| Others | - | Prompt (35k) | Prompt (659k) | Prompt (2k) | Prompt (2k) | Prompt (4k) | Prompt (86M) | Cross-Mamba (5M) |
| Total Parameters | 196M | 124M | 125M | 77M | 77M | 77M | 210M | 69M |
heterogeneity. For all experiments, training was performed for 100 communication rounds, with 5 local epochs per communication round. In this paper, we report results with 8 clients and , representing a moderate heterogeneity setting. The few-shot classification performance is reported here, while the results of the zero-shot classification are provided in the Appendix. The results are reported on the test set and averaged over three random seed values. Importantly, at the time of training, only the lightweight soft prompts are updates and communicated between clients and the server. The server aggregates the updates from the clients using the weighted average technique, while prototype updates are combined using the trimmed mean for robustness.
Table 4: The quantitative few-shot classification accuracy () results on the respective baselines and the proposed framework on different datasets. For each dataset, best-performing and second-best performing models are reported.
| Dataset | FedBiomedCLIP | FedCoCoOp | FedKgCoOp | PromptFL | PromptFL+FedProx | FedOTP | FedTPG | FedMVP | FedMPT | FedBiomedCoOp | FedSSMCoOp (Ours) |
|---|---|---|---|---|---|---|---|---|---|---|---|
| BTMRI | 44.321 | 23.12 | |||||||||
| BUSI | 40.678 | 55.93 | |||||||||
| CHMNIST | 50.931 | 12.50 | |||||||||
| COVID | 41.474 | 17.08 | |||||||||
| LC25000 | 37.840 | 20.00 | |||||||||
| OCTMNIST | 22.100 | 25.00 | |||||||||
| DermaMNIST | 14.214 | 13.29 | |||||||||
| RetinaMNIST | 35.489 | 26.03 | |||||||||
| Kvasir | 42.833 | 12.50 | |||||||||
| CTKidney | 27.127 | 29.80 | |||||||||
| KneeXray | 25.543 | 38.59 |
Coming to the models, we use a Vision Mamba small variant (Vim-S) in the vision encoder and the transformer equivalent encoder at the text modality end. Further, the image resolution is resized to . Similar to the CoOp Zhou et al. (2022a) model, 4 learnable context tokens are initialized. Importantly, the prompts and Cross Mamba Interaction block that consists of a combination of single and cross stacked mamba layers are kept trainable, and the remaining are kept frozen. The Stochastic Gradient Descent (SGD) is used with a momentum of 0.9 along with a cosine learning rate decay. A constant batch size of 16 is used across all the dataset and trained 100 epochs. The mean classification accuracy (top-1) is the primary metric reported here. As a comparison of performance and the complexity, we also report the model's GFLOP information. Furthermore, we also conduct a set of ablation study with reference to the presence and the absence of the LLM model on the above mentioned datasets. All the experiments here are reported on the workstation powered with 2 NVIDIA Tesla V-100 with 32 GB of GPU.
5.1 Comparison with Baselines
The corresponding quantitative results of the baselines and the proposed works are shown in Table 12. The results of the BiomedCLIP, CoCoOP, KgCoOp, and BiomedCoOp models, respectively, were not reported on the federated setting. Therefore, the above models were evaluated on the federated settings and further, this serves as the baseline.
It can be observed with reference to the above models under the federated system, our proposed lightweight approach, in fact perform consistently in par or sometimes better than the baselines in some of the datasets. For instance, in the case of CHMNIST Kather et al. (2016), COVID, LC25000, there was approximate improvement in performance of roughly . On the other hand, in some instances, the proposed framework underperforms, particular in the case of BUSI and CTKidney datasets respectively. One of the reasons attributed to this could be due to the SSM's inability to capture fine-grained representations as compared to the attention-based framework which is effective in capturing this representation. In order to explain this, we use the UMAPs McInnes et al. (2018) and demonstrate the model's ability of capturing the features. The UMAPs of the proposed framework along with the baselines are shown in Figure 2.

Figure 2: The UMAP plots of the proposed model against the baselines on different dataset. Observe that the proposed FedSSMCoOp framework has compact and well-separated embeddings in the text domain and a relatively looser cluster in the vision domain. This explains its ability of capturing discriminative features.
Furthermore, in order to qualitative analysis the performance of the models, we plot the activation maps for the models under the three datasets, as shown in Figure 3.
Covid

LC25000

Retina
FedCoCoOp
FedKgCoOp
FedBiomedCoOp
FedSSMCoOp (ours)
Figure 3: Visualization of activation maps of different models. The visualizations of baselines; FedCoCoOp, FedKgCoOp and FedBiomedCoOp are reported on 16 shot and the proposed FedSSMCoOp on 1 shot.
The models such as FedCoCoOP, FedKgCoOp and the FedBiomedCoOp respectively, perform good and concentrate on localized and fine features. For instance, in the case of the COVID dataset, most of the models particularly concentrate on the main part of the lungs. A similar scenario is observed in the case of the LC25000 dataset, where the model focuses more on the tissues. Importantly, in the Retina Dataset, the focus is not only around the cornea, but across the various other locations. Given the ability of these models to extract fine-grained features, these are ideal for detecting the abnormalities, especially in the terminal medical stages.
Furthermore, in the case of the FedSSMCoOp, a global perspective of attention is observed. Particularly in the case of the Covid dataset, the model focuses from the throat portion to almost the entire diaphragm section of the chest. But it is also to be noted, it doesn't focus on the localized portion. Similarly, in the case of the Retina dataset, the entire eyeball is attended by the model. This is vital especially in the scenario of cataract, where a global focus is necessary. Given this global focus ability of the model, this is ideal for an early-staged detection. On the other hand, a lower performance is observed on BUSI and CTKidney, where diagnosis relies on subtle lesion boundaries and highly localized pathological patterns. This behavior primarily reflects the global contextual modeling bias of the Vision Mamba backbone rather than the proposed federated prompt learning strategy. Despite this limitation, FedSSMCoOp provides an effective accuracy-efficiency trade-off across a diverse set of biomedical imaging modalities, reducing computational complexity by nearly while remaining competitive on most datasets. To investigate whether external
Table 5: Architectural and training-objective differences across the four ablation configurations. The LLM prototype bank is precomputed offline and never used during federated training; only the soft prompt is communicated.
| Component / Objective | No-LLM (FedSSMCoOp) | LLM-Server | LLM-Client | LLM-Client+Server |
|---|---|---|---|---|
| LLM prototype bank | ✕ | Server-side | Client-side | Both |
| Client text branch | Prompt only | Prompt only | Dual (prompt+) | Dual (prompt+) |
| Prompt-prototype fusion | ✕ | ✕ | Learnable α | Learnable α |
| Classification loss | ✓ | ✓ | ✓ | ✓ |
| Alignment loss | ✕ | ✓ | ✕ | ✓ |
| Distillation loss | ✕ | ✕ | ✕ | ✓ |
| Total client objective | ||||
| Federated communication | Prompt only | Prompt only | Prompt only | Prompt only |
| LLM used during training | ✕ | ✕ (offline) | ✕ (offline) | ✕ (offline) |
semantic knowledge can further improve federated few-shot biomedical image classification, we conduct an ablation study by using a LLM into training pipeline. It is important to note that the proposed FedSSMCoOp framework is entirely LLM-free during both training and inference. The LLM is introduced solely for this ablation study and is not part of the final proposed method. Specifically, prior to federated training, GPT-4 generates multiple textual descriptions for each disease class. These descriptions are then encoded using frozen BiomedCLIP text encoder, which is PubMedBERT-based, and averaged to obtain fixed-class semantic prototypes. Since these prototypes are computed only once before training, the LLM is never invoked during the communication round. Only the learnable prompt updates continue to be exchanged between the clients and the server. We evaluate on three strategies (Table 5): LLM-Server, where clients align prompt features to the global prototypes via ; LLM-Client, where each client fuses prompt and prototype features through a learnable coefficient; and LLM-Client+Server, which combines both and adds a distillation loss .
Firstly, we conduct an ablation analysis depicting the impact of having on LLM either in server, client end or at both the ends. The results of the same are shown in Table 6. Despite the introduction of the LLM, there is only a minor improvement in the performance. It is worth noting, the performance is in-par and some cases better, when there is no LLM presence at the client and the server end respectively. We also conduct an ablation study reported in Table 7, with the different combinations of either attention mechanism of ViT and the SSM mechanism of Vision Mamba (Vim) integrated with the LLM. This is then also compared with the proposed framework of FedSSMCoOp. In particular the Small variant of Vision Mamba (Vim-S) is chosen and the Base variant of Vision Transformer (ViT-B) was compared as used by Koleilat et al. (2025). Importantly the Gpt4 Achiam et al. (2023) is used as the LLM here, and is integrated at the server side of the federated setup.
One of the main observations is that, the propose framework with Vision mamba and COMO based cross-modal interaction without the use of LLM in the server performs consistently in-par or sometimes better than the baselines. For instance, there is a good improvement observed in the case of the COVID, LC25000, and
Table 6: Ablation study on the proposed framework with inclusion of LLMs at the server and client ends across all datasets. For each of the datasets, Best performing and second best performing models are reported.
| Dataset | No-LLM | LLM-Server | LLM-Client | LLM-Client+Server |
|---|---|---|---|---|
| BTMRI | ||||
| BUSI | ||||
| CHMNIST | ||||
| COVID | ||||
| LC25000 | ||||
| OCTMNIST | ||||
| DermaMNIST | ||||
| RetinaMNIST | ||||
| Kvasir | ||||
| CTKidney | ||||
| KneeXray |
Table 7: Ablation study (% accuracy) across different model variants under 1-shot setting for all biomedical datasets. For each of the datasets, Best performing and second best performing models are reported.
| Dataset | ViT + no LLM | ViT + LLM | Vim + no LLM | Vim + LLM | Ours (w/o LLM) | Ours (with LLM) |
|---|---|---|---|---|---|---|
| BTMRI | ||||||
| BUSI | ||||||
| CHMNIST | ||||||
| COVID | ||||||
| LC25000 | ||||||
| OCTMNIST | ||||||
| DermaMNIST | ||||||
| RetinaMNIST | ||||||
| Kvasir | ||||||
| CTKidney | ||||||
| KneeXray |
Kvasir datasets. Further with RetinaMNIST, OCTMNIST and CHMNIST datasets, despite the presence of LLM helped improving the accuracy, the proposed approach was also within 5% range of the prior approach.
5.2 Effect of Client Participation
In the further extension, another ablation study was performed on the proposed FedSSMCoOp, with the effect of the number of clients under three Dirichlet values ( ) 0.1, 0.5 and 1 respectively, thereby giving an indication on how the model performs under the non-IID scenarios. The results on the corresponding datasets are reported in Table 8. It can be observed that the model performance gap between the lowest Dirichlet value as compared to the highest Dirichlet value is quite less. This indicates that the model on average is relative stable under non-IID conditions when analysed across most of the datasets.
In particular the highest stability was observed with the 4-client system, where the deviation across different values was less than 2%. A similar scenario is observed in the case of the reported 8-client system, with a minor spike in the gap especially in the case of BTMRI and KVASIR datasets respectively. Generalizing it to a compute intensive 16-client system, a similar pattern followed up, with minimal fluctuations in the gap. In addition, the ablation corresponding to different shots from 2, 4, 8 and 16 respectively is performed and the performances are reported in the Appendix.
Table 8: Effect of client count and data heterogeneity on FedSSMCoOp accuracy (%) at 1-shot, averaged over 3 seeds. For each of the datasets, Best performing and second best performing models are reported.
| Dataset | 4 Clients | 8 Clients | 16 Clients | ||||||
|---|---|---|---|---|---|---|---|---|---|
| α=0.1 | α=0.5 | α=1.0 | α=0.1 | α=0.5 | α=1.0 | α=0.1 | α=0.5 | α=1.0 | |
| BTMRI | 31.59±12.96 | 32.17±12.90 | 32.81±15.43 | 33.72±15.92 | 53.64±1.78 | 42.46±6.20 | 34.50±15.50 | 52.21±7.94 | 33.59±16.13 |
| BUSI | 40.53±10.81 | 40.96±9.76 | 41.24±10.81 | 40.82±11.71 | 40.11±6.75 | 40.11±10.17 | 41.00±11.20 | 42.30±11.00 | 38.72±5.63 |
| CHMNIST | 36.37±3.80 | 36.30±4.84 | 36.19±4.37 | 33.38±4.91 | 53.39±1.67 | 36.39±3.82 | 34.22±4.82 | 35.18±4.15 | 37.20±5.94 |
| COVID | 34.84±6.65 | 34.82±6.49 | 34.56±7.49 | 34.10±7.20 | 46.71±10.13 | 34.88±6.62 | 33.68±6.99 | 34.29±6.58 | 34.84±7.12 |
| LC25000 | 48.56±3.63 | 48.77±3.72 | 49.17±3.41 | 48.49±2.79 | 68.61±4.67 | 48.67±3.41 | 48.54±3.07 | 48.72±3.31 | 48.92±2.92 |
| OCTMNIST | 25.70±6.17 | 25.87±5.72 | 26.07±5.10 | 25.27±5.34 | 34.93±5.76 | 26.20±5.45 | 25.27±5.85 | 24.90±1.44 | 25.60±5.37 |
| DermaMNIST | 21.73±16.37 | 22.01±16.43 | 22.43±16.29 | 22.44±17.01 | 22.72±3.00 | 22.43±16.33 | 21.80±16.50 | 45.65±4.72 | 21.10±16.97 |
| RetinaMNIST | 26.03±1.89 | 26.42±1.70 | 26.79±2.06 | 26.42±1.79 | 42.98±2.25 | 26.34±1.36 | 26.31±1.73 | 29.60±1.25 | 26.42±1.79 |
| Kvasir | 38.31±6.30 | 38.59±5.13 | 38.67±5.55 | 48.77±3.72 | 46.80±2.79 | 38.09±4.88 | 38.62±5.24 | 39.42±4.19 | 37.50±5.35 |
| CTKidney | 39.05±5.95 | 43.77±2.55 | 39.53±2.51 | 38.34±5.12 | 29.03±6.35 | 38.65±5.55 | 39.14±5.02 | 43.31±3.82 | 38.40±5.15 |
| KneeXray | 19.66±5.62 | 19.46±4.91 | 20.61±5.16 | 18.98±6.00 | 26.67±2.30 | 20.07±6.57 | 19.37±5.98 | 20.53±5.66 | 18.82±6.40 |
5.3 Efficiency Analysis
We then made an analysis of the computation complexity in terms of GFLOPs for each of the models as shown in Table 9. Given the different training strategies amongst the respective datasets, a variation can be observed here. The FedBioMedCLIP and the FedBioMedCoOp model make use of the BERT and the ViT-B
Table 9: The corresponding computational complexity (GFLOPs) with respect to the baselines and the proposed framework across all biomedical datasets.
| Model | BTMRI | BUSI | CHMNIST | COVID | LC25000 | OCTMNIST | DermaMNIST | RetinaMNIST | Kvasir | CTKidney | KneeXray |
|---|---|---|---|---|---|---|---|---|---|---|---|
| FedBiomedCLIP | 33.70G | 33.70G | 33.70G | 33.70G | 33.70G | 33.70G | 33.70G | 33.70G | 33.70G | 33.70G | 33.70G |
| FedCoCoOp | 38.04G | 34.17G | 53.55G | 38.04G | 38.04G | 49.67G | 41.92G | 53.55G | 41.92G | 38.04G | 38.04G |
| FedKgCoOp | 38.04G | 34.17G | 53.55G | 38.04G | 38.04G | 49.67G | 41.61G | 53.55G | 41.92G | 38.04G | 38.04G |
| PromptFL | 26.33G | 22.46G | 41.84G | 26.33G | 30.21G | 26.33G | 37.96G | 26.33G | 41.84G | 26.33G | 30.21G |
| PromptFL + FedProx | 26.33G | 22.46G | 41.84G | 26.33G | 30.21G | 26.33G | 37.96G | 26.33G | 41.84G | 26.33G | 30.21G |
| FedOTP | 41.94G | 34.13G | 73.14G | 41.94G | 49.74G | 41.94G | 65.34G | 49.74G | 73.14G | 41.94G | 41.94G |
| FedBiomedCoOp | 38.04G | 34.16G | 53.54G | 38.04G | 41.91G | 38.04G | 49.66G | 38.04G | 53.54G | 38.04G | 41.91G |
| FedSSMCoOp (Ours) | 15.81G | 11.95G | 31.33G | 15.81G | 15.81G | 27.45G | 19.69G | 31.32G | 19.69G | 15.81G | 15.81G |
for the text and image encodings respectively, which make them heavy from the computational perspective. The FedCoCop and the FedKgCoOp introduce the concept of learnable prompts in addition to the ViT based vision encoder and transformer equivalent text encoder respectively. Despite being heavy, these are relatively less bulky than the prior models. On the other hand, the PromptFL and FedOTP variant frameworks exploit ResNet based vision encoder additionally with learnable prompts, thus making the system relatively light. However, our proposed FedSSMCoop makes use of vision mamba for the vision encoding with an introduction of a learnable Cross Mamba block for better cross modal interaction. The computational complexity (GFLOPs) reported in this work was measured as the number of floating-point operations required for a single forward pass using an input image of size . The reported values include the inference pipeline consisting of the frozen visual encoder, text encoder, prompt-learning modules, and the proposed Mamba Interaction Block (MIB). Despite an increase in the total parameter count, the overall GFLOPs are actually quite lower than most of the baselines used above. This makes it an apt candidate for edge-device deployment.
6 Conclusion & Future Directions
We introduce FedSSMCoOp, an SSM-based federated few-shot framework for biomedical image classification that uses Vision Mamba and the Mamba interaction block for cross-modal interaction. This helps in capturing the cross-modal information between the two modalities, unlike the prior works, which usually rely on the cosine similarity between the pooled modality features. Since, the mamba interaction block already captures the cross-modal information and alignments of the modality features, the LLM presence, which performed the same task can be removed. Further, by communicating with just the soft prompt deltas between clients and server, the model is optimized for computation and performance. The FedSSMCoOp is trained and analyzed on different biomedical datasets, and the performances are quite consistent and stable against the baselines, given that the proposed approach is roughly 1.96 times lighter than other models. From the UMAPs and the activation maps, the FedSSMCoOp is a suitable model for early detection and at the inference stage. Despite the positives, there are a few drawbacks and future directions that can be carried out.
The Mamba-based approach fails to capture the fine-grained representations, unlike the attention-based approach. Despite the high computation factor, the attention-based approaches are still dominant even today. Thus, the future directions can look at a hybrid approach of Attention and State space mechanism Hatamizadeh & Kautz (2025).
Secondly, there were instances where the LLM presence in the server side of the federated learning aided in the performance especially in Kvasir and RetinaMNIST dataset due to their presence of localized detections. The forthcoming works can also focus more on whether to what extent the LLM help to aid these alignments.
References
Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Altman, Shyamal Anadkat, et al. Gpt-4 technical report. arXiv preprint arXiv:2303.08774, 2023.
Walid Al-Dhabyani, Mohammed Gomaa, Hussien Khaled, and Aly Fahmy. Dataset of breast ultrasound images. Data in brief, 28:104863, 2020.
Andrew A Borkowski, Marilyn M Bui, L Brannon Thomas, Catherine P Wilson, Lauren A DeLand, and Stephen M Mastorides. Lung and colon cancer histopathological image dataset (lc25000)(2019). arXiv preprint arXiv:1912.12142, 1912.
Pingjun Chen. Knee osteoarthritis severity grading dataset. Mendeley Data, 1(10.17632):30784984, 2018.
Noel Codella, Veronica Rotemberg, Philipp Tschandl, M Emre Celebi, Stephen Dusza, David Gutman, Brian Helba, Aadi Kalloo, Konstantinos Liopyris, Michael Marchetti, et al. Skin lesion analysis toward melanoma detection 2018: A challenge hosted by the international skin imaging collaboration (isic). arXiv preprint arXiv:1902.03368, 2019.
Albert Gu and Tri Dao. Mamba: Linear-time sequence modeling with selective state spaces. arXiv preprint arXiv:2312.00752, 2023.
Tao Guo, Song Guo, and Junxiao Wang. Pfedprompt: Learning personalized prompt for vision-language models in federated learning. In Proceedings of the ACM Web Conference 2023, pp. 1364–1374, 2023a.
Tao Guo, Song Guo, Junxiao Wang, Xueyang Tang, and Wenchao Xu. Promptfl: Let federated participants cooperatively learn prompts instead of models—federated learning in age of foundation model. IEEE Transactions on Mobile Computing, 23(5):5179–5194, 2023b.
Ali Hatamizadeh and Jan Kautz. Mambavision: A hybrid mamba-transformer vision backbone. In Proceedings of the Computer Vision and Pattern Recognition Conference, pp. 25261–25270, 2025.
Md Nazmul Islam, Mehedi Hasan, Md Kabir Hossain, Md Golam Rabiul Alam, Md Zia Uddin, and Ahmet Soylu. Vision transformer and explainable transfer learning models for auto detection of kidney cyst, stone and tumor from ct-radiography. Scientific Reports, 12(1):11440, 2022.
Sai Praneeth Karimireddy, Satyen Kale, Mehryar Mohri, Sashank Reddi, Sebastian Stich, and Ananda Theertha Suresh. Scaffold: Stochastic controlled averaging for federated learning. In International conference on machine learning, pp. 5132–5143. PMLR, 2020.
Jakob Nikolas Kather, Cleo-Aron Weis, Francesco Bianconi, Susanne M Melchers, Lothar R Schad, Timo Gaiser, Alexander Marx, and Frank Gerrit Zöllner. Multi-class texture analysis in colorectal cancer histology sci. Rep, 6(1):1–11, 2016.
Daniel S Kermany, Michael Goldbaum, Wenjia Cai, Carolina CS Valentim, Huiying Liang, Sally L Baxter, Alex McKeown, Ge Yang, Xiaokang Wu, Fangbing Yan, et al. Identifying medical diagnoses and treatable diseases by image-based deep learning. cell, 172(5):1122–1131, 2018.
Thomas Köhler, Attila Budai, Martin F Kraus, Jan Odstrčilik, Georg Michelson, and Joachim Hornegger. Automatic no-reference quality assessment for retinal fundus images using vessel segmentation. In Proceedings of the 26th IEEE international symposium on computer-based medical systems, pp. 95–100. IEEE, 2013.
Taha Koleilat, Hojat Asgariandehkordi, Hassan Rivaz, and Yiming Xiao. Biomedcoop: Learning to prompt for biomedical vision-language models. In Proceedings of the Computer Vision and Pattern Recognition Conference, pp. 14766–14776, 2025.
Junnan Li, Dongxu Li, Caiming Xiong, and Steven Hoi. Blip: Bootstrapping language-image pre-training for unified vision-language understanding and generation. In International conference on machine learning, pp. 12888–12900. PMLR, 2022.
Tian Li, Anit Kumar Sahu, Manzil Zaheer, Maziar Sanjabi, Ameet Talwalkar, and Virginia Smith. Federated optimization in heterogeneous networks. Proceedings of Machine learning and systems, 2:429–450, 2020.
Zhe Li, Haiwei Pan, Kejia Zhang, Yuhua Wang, and Fengming Yu. Mambadfuse: A mamba-based dual-phase model for multi-modality image fusion. arXiv preprint arXiv:2404.08406, 2024.
Chang Liu, Xin Ma, Xiaochen Yang, Yuxiang Zhang, and Yanni Dong. Como: Cross-mamba interaction and offset-guided fusion for multimodal object detection. Information Fusion, 125:103414, 2026.
Yue Liu, Yunjie Tian, Yuzhong Zhao, Hongtian Yu, Lingxi Xie, Yaowei Wang, Qixiang Ye, Jianbin Jiao, and Yunfan Liu. Vmamba: Visual state space model. Advances in neural information processing systems, 37:103031–103063, 2024.
Yuning Lu, Jianzhuang Liu, Yonggang Zhang, Yajing Liu, and Xinmei Tian. Prompt distribution learning. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 5206–5215, 2022.
Leland McInnes, John Healy, and James Melville. Umap: Uniform manifold approximation and projection. Journal of Open Source Software, 3(29):861, 2018. doi: 10.21105/joss.00861. URL https://doi.org.
Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. Communication-efficient learning of deep networks from decentralized data. In Artificial intelligence and statistics, pp. 1273–1282. PMLR, 2017.
Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018.
Ambarish Parthasarathy and Sumohana Channappayya. Vimclip: A vision mamba based multimodal approach for retrieval and zero-shot classification tasks. In 2026 National Conference on Communications (NCC), pp. 460–465. IEEE, 2026.
Konstantin Pogorelov, Kristin Ranheim Randel, Carsten Griwodz, Sigrun Losada Eskeland, Thomas de Lange, Dag Johansen, Concetto Spampinato, Duc-Tien Dang-Nguyen, Mathias Lux, Peter Thelin Schmidt, et al. Kvasir: A multi-class image dataset for computer aided gastrointestinal disease detection. In Proceedings of the 8th ACM on Multimedia Systems Conference, pp. 164–169, 2017.
Chen Qiu, Xingyu Li, Chaithanya Kumar Mummadi, Madan Ganesh, Zhenzhen Li, Lu Peng, and Wan-Yi Lin. Federated text-driven prompt generation for vision-language models. In International conference on learning representations, volume 2024, pp. 12997–13012, 2024.
Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In International conference on machine learning, pp. 8748–8763. PmLR, 2021.
Mainak Singha, Subhankar Roy, Sarthak Mehrotra, Ankit Jha, Moloud Abdar, Biplab Banerjee, and Elisa Ricci. Fedmvp: Federated multimodal visual prompt tuning for vision-language models. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 17869–17878, 2025.
Mainak Singha, Tanisha Gupta, Ankit Jha, Muhammad Haris Khan, Sayantani Ghosh, and Biplab Banerjee. Biovlm: Routing prompts, not parameters, for cross-modality generalization in biomedical vlms. In Findings of the Association for Computational Linguistics: ACL 2026, pp. 40986–41005, 2026.
Anas M Tahir, Muhammad EH Chowdhury, Amith Khandakar, Tawsifur Rahman, Yazan Qiblawey, Uzair Khurshid, Serkan Kiranyaz, Nabil Ibtehaz, M Sohel Rahman, Somaya Al-Maadeed, et al. Covid-19 infection localization and severity grading from chest x-ray images. Computers in biology and medicine, 139:105002, 2021.
Hao Tan and Mohit Bansal. LXMERT: Learning cross-modality encoder representations from transformers. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pp. 5100–5111, 2019. URL https://aclanthology.org/D19-1514.
Philipp Tschandl, Cliff Rosendahl, and Harald Kittler. The ham10000 dataset, a large collection of multi-source dermatoscopic images of common pigmented skin lesions. Scientific data, 5(1):180161, 2018.
Xucong Wang, Pengkun Wang, Zhe Zhao, Liheng Yu, Shuang Wang, and Yang Wang. Fedmpt: Federated multi-label prompt tuning of vision-language models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 17226–17236, 2026.
Hantao Yao, Rui Zhang, and Changsheng Xu. Visual-language prompt tuning with knowledge-guided context optimization. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 6757–6767, 2023.
Yubiao Yue and Zhenzhang Li. Medmamba: Vision mamba for medical image classification. arXiv preprint arXiv:2403.03849, 2024.
Xiaohua Zhai, Basil Mustafa, Alexander Kolesnikov, and Lucas Beyer. Sigmoid loss for language image pretraining. In Proceedings of the IEEE/CVF international conference on computer vision, pp. 11975–11986, 2023.
Kaiyang Zhou, Jingkang Yang, Chen Change Loy, and Ziwei Liu. Conditional prompt learning for vision-language models. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 16816–16825, 2022a.
Kaiyang Zhou, Jingkang Yang, Chen Change Loy, and Ziwei Liu. Learning to prompt for vision-language models. International journal of computer vision, 130(9):2337–2348, 2022b.
Lianghui Zhu, Bencheng Liao, Qian Zhang, Xinlong Wang, Wenyu Liu, and Xinggang Wang. Vision mamba: Efficient visual representation learning with bidirectional state space model. arXiv preprint arXiv:2401.09417, 2024.
A Appendix
B Notation
Table 10 summarizes the notation used throughout the paper.
Table 10: Summary of notation used in FedSSMCoOp.
| Symbol | Description |
|---|---|
| Federated setup | |
| Number of clients (hospitals) | |
| Client index, | |
| Communication round index | |
| Total number of communication rounds | |
| Number of local epochs per round | |
| Local dataset of client | |
| Number of training samples at client | |
| Dirichlet concentration parameter (data heterogeneity) | |
| Number of classes in the dataset | |
| Number of shots per class (few-shot setting) | |
| Prompt learning | |
| Learnable soft prompt (context tokens) | |
| Client 's prompt after local training | |
| Global prompt at round (server) | |
| Client 's prompt update, | |
| Number of context tokens () | |
| Embedding dimension of a prompt token () | |
| Ground-truth class label | |
| Encoders and features | |
| Frozen Vision Mamba image encoder (Vim-S) | |
| Frozen BiomedCLIP text encoder | |
| Input image | |
| Image tokens from | |
| Text tokens from | |
| Text-aware image features (MIB output) | |
| Image-aware text features (MIB output) | |
| Mean-pooled image features | |
| Learnable text projection | |
| Temperature scaling parameter | |
| Mamba Interaction Block (MIB) | |
| Number of MIB layers | |
| Low-rank ratio in the MIB | |
| Image feature dimension in the MIB () | |
| Objectives | |
| Pr | Predicted class probability distribution |
| Cross-entropy classification loss | |
| LLM ablation only (not in the main method) | |
| LLM-derived class prototype bank | |
| Semantic alignment loss, MSE(, ) | |
| Distillation loss, KL() | |
| Weight of the alignment loss | |
| Weight of the distillation loss | |
| Learnable prompt-prototype fusion coefficient | |
B.1 Few-shot Results Across Shot Settings
We report the complete per-dataset few-shot accuracy for shots in Tables 12–16, and the zero-shot results in Table 11. The results reveal a clear improvement in the performance of FedSSMCoOp as the number of labeled examples increases. At 1-shot, FedSSMCoOp achieves the best performance on 4 of the 11 datasets. This increases to 7 datasets at both 2- and 4-shot, 8 datasets at 8-shot, and 10 datasets at 16-shot. These results indicate that the proposed approach benefits consistently from additional labeled examples and performs particularly well when more supervision is available.
FedSSMCoOp achieves the best performance across all shot settings on CHMNIST, COVID, and LungColon. These datasets involve visual patterns that can benefit from capturing broader image-level context, which is consistent with the global feature modeling capability of the Vision Mamba encoder. For example, on LungColon, the accuracy improves from at 1-shot to at 8-shot.
However, the performance is less consistent on datasets that require fine-grained or localized visual discrimination. In particular, KneeXray does not achieve the best performance at any shot level, while BUSI, CTKidney, and DermaMNIST show larger performance gaps at lower shot levels. These results suggest that the global feature modeling of the SSM-based encoder may be less advantageous for tasks where subtle local differences or lesion-level details are important.
Table 11: Top-1 accuracy (%) across all datasets and methods for zero-shot evaluation. Best and second-best results are highlighted for each dataset.
| Dataset | FedBiomedCLIP | FedCoCoOp | FedKgCoOp | FedBiomedCoOp | FedSSMCoOp (Ours) |
|---|---|---|---|---|---|
| BTMRI | 57.08 | 26.42±4.40 | 23.30 | 31.00 | 23.74±2.67 |
| BUSI | 51.27 | 37.85±13.23 | 17.37 | 22.10 | 36.44±13.15 |
| CHMNIST | 29.06 | 22.07±1.95 | 23.14 | 22.85 | 17.87±1.75 |
| COVID | 45.84 | 25.29±7.30 | 31.29 | 29.40 | 30.23±8.98 |
| LungColon | 51.20 | 22.97±3.69 | 28.80 | 26.15 | 20.80±6.52 |
| OCTMNIST | 35.00 | 25.40±0.86 | 21.80 | 22.45 | 19.03±5.72 |
| DermaMNIST | 30.87 | 11.20±6.87 | 12.87 | 12.10 | 43.71±13.78 |
| RetinaMNIST | 27.68 | 24.92±3.97 | 26.10 | 25.50 | 24.92±3.97 |
| Kvasir | 55.50 | 16.19±3.79 | 18.25 | 17.40 | 18.03±1.84 |
| CTKidney | 36.73 | 21.87±5.30 | 40.40 | 34.80 | 21.33±5.98 |
| KneeXray | 27.48 | 20.21±6.42 | 25.60 | 23.10 | 19.51±5.16 |
Table 12: The quantitative few-shot classification accuracy () results on the respective baselines and the proposed framework on different datasets. For each of the datasets, Best performing and second best performing models are reported.
| Dataset | FedBiomedCLIP | FedCoCoOp | FedKgCoOp | PromptFL | PromptFL+FedProx | FedOTP | FedBiomedCoOp | FedSSMCoOp (Ours) |
|---|---|---|---|---|---|---|---|---|
| BTMRI | 57.08±0.00 | 48.86±7.92 | 51.19±4.62 | 41.60±3.29 | 36.93±5.44 | 31.43±3.93 | 50.67±3.74 | 53.64±1.78 |
| BUSI Al-Dhabyani et al. (2020) | 51.27±0.00 | 43.22±6.27 | 39.69±4.73 | 43.30±12.72 | 37.43±12.65 | 33.33±6.91 | 46.61±7.79 | 40.11±6.75 |
| CHMNIST Kather et al. (2016) | 29.06±0.00 | 49.53±1.90 | 45.48±2.53 | 30.57±6.17 | 33.60±3.78 | 34.06±9.48 | 52.87±3.43 | 53.39±1.67 |
| COVID Tahir et al. (2021) | 45.84±0.00 | 44.69±1.03 | 43.52±11.06 | 42.35±8.13 | 42.30±8.20 | 37.50±2.70 | 43.59±16.49 | 46.71±10.13 |
| LC25000 | 51.20±0.00 | 58.72±2.63 | 55.99±7.84 | 42.90±5.52 | 55.50±5.33 | 26.25±8.40 | 61.88±2.09 | 68.61±4.67 |
| OCTMNIST | 35.00±0.00 | 43.30±2.18 | 32.43±2.00 | 41.80±9.72 | 40.65±9.55 | 26.25±8.40 | 32.57±9.67 | 34.93±5.76 |
| DermaMNIST | 30.87±0.00 | 19.63±3.27 | 16.99±1.25 | 21.20±15.79 | 18.20±7.34 | 14.66±3.09 | 15.73±1.71 | 22.72±3.00 |
| RetinaMNIST | 27.68±0.00 | 33.81±5.17 | 39.36±6.29 | 28.43±1.81 | 30.60±4.05 | 28.75±4.53 | 40.25±6.32 | 42.98±2.35 |
| Kvasir | 55.50±0.00 | 42.97±1.12 | 39.72±2.19 | 28.90±6.37 | 26.33±2.99 | 19.97±2.53 | 42.94±3.05 | 46.80±2.79 |
| CTKidney | 36.73±0.00 | 31.96±4.00 | 37.46±7.72 | 42.98±2.26 | 32.19±3.82 | 27.56±13.87 | 32.75±1.17 | 29.03±6.35 |
| KneeXray Chen (2018) | 27.48±0.00 | 31.62±5.73 | 34.42±2.92 | 24.83±7.42 | 30.25±2.78 | 19.10±6.73 | 38.30±1.18 | 26.67±2.30 |
B.2 Dataset Characteristics
The results in Tables 13 16 show that backbone performance varies with the characteristics of a dataset. Datasets characterized by global morphology or whole image context, such as CHMNIST, COVID, LC25000, and RetinaMNIST, generally favour Vision Mamba, with FedSSMCoOp performing best across most shot settings. In contrast, datasets requiring fine-grained or localized discrimination, such as BUSI and KneeXray, favor attention-based backbones. These observations are summarized in Table 17
Table 13: Few-shot classification accuracy (%) under the 2-shot setting across biomedical datasets. For each of the datasets, Best performing and second best performing models are reported.
| Dataset | FedCoCoOp | FedKgCoOp | PromptFL | PromptFL+FedProx | FedOTP | FedSSMCoOp (Ours) |
|---|---|---|---|---|---|---|
| BTMRI | ||||||
| BUSI | ||||||
| CHMNIST | ||||||
| COVID | ||||||
| LungColon | ||||||
| OCTMNIST | ||||||
| DermaMNIST | ||||||
| RetinaMNIST | ||||||
| Kvasir | ||||||
| CTKidney | ||||||
| KneeXray |
Table 14: Few-shot classification accuracy (%) under the 4-shot setting across biomedical datasets. For each of the datasets, Best performing and second best performing models are reported.
| Dataset | FedCoCoOp | FedKgCoOp | PromptFL | PromptFL+FedProx | FedOTP | FedSSMCoOp (Ours) |
|---|---|---|---|---|---|---|
| BTMRI | ||||||
| BUSI | ||||||
| CHMNIST | ||||||
| COVID | ||||||
| LungColon | ||||||
| OCTMNIST | ||||||
| DermaMNIST | ||||||
| RetinaMNIST | ||||||
| Kvasir | ||||||
| CTKidney | ||||||
| KneeXray |
Table 15: Few-shot classification accuracy (%) under the 8-shot setting across biomedical datasets. For each of the datasets, Best performing and second best performing models are reported.
| Dataset | FedCoCoOp | FedKgCoOp | PromptFL | PromptFL+FedProx | FedOTP | FedSSMCoOp (Ours) |
|---|---|---|---|---|---|---|
| BTMRI | ||||||
| BUSI | ||||||
| CHMNIST | ||||||
| COVID | ||||||
| LungColon | ||||||
| OCTMNIST | ||||||
| DermaMNIST | ||||||
| RetinaMNIST | ||||||
| Kvasir | ||||||
| CTKidney | ||||||
| KneeXray |
Table 16: Few-shot classification accuracy (%) under the 16-shot setting across biomedical datasets. For each of the datasets, Best performing and second best performing models are reported.
| Dataset | FedCoCoOp | FedKgCoOp | PromptFL | PromptFL+FedProx | FedOTP | FedSSMCoOp (Ours) |
|---|---|---|---|---|---|---|
| BTMRI | ||||||
| BUSI BUSI | ||||||
| CHMNIST | ||||||
| COVID | ||||||
| LungColon | ||||||
| OCTMNIST | ||||||
| DermaMNIST | ||||||
| RetinaMNIST | ||||||
| Kvasir | ||||||
| CTKidney | ||||||
| KneeXray |
Table 17: Observed relationship between dataset characteristics and best-performing backbone family, based on the few-shot results across shot settings.
| Dataset | Discriminative signal | Favoured backbone |
|---|---|---|
| CHMNIST | Global morphology | Vision Mamba |
| COVID | Global context | Vision Mamba |
| LC25000 | Tissue context | Vision Mamba |
| RetinaMNIST | Global structures | Vision Mamba |
| CTKidney | Fine details | Shot-dependent |
| BUSI | Local lesions | Attention |
| KneeXray | Fine-grained grading | Attention |