Fair Federated Learning with Biased Vision-Language Models (2024)

Abstract: Existing literature that integrates CLIP into federated learning (FL) largely ignores the inherent group unfairness within CLIP and its ethical implications on FL applications. Furthermore, such CLIP bias may be amplified in FL, due to the unique issue of data heterogeneity across clients. However, in identity-sensitive FL applications, model fairness (i.e., group fairness) is imperative for model development. Therefore, this work explores a critical question ignored by the existing literature: how can we build a fair FL framework using biased pre-trained VLMs (e.g., CLIP)? To address this problem, we propose a fairness-aware adaptation framework tailored for VLM (e.g., CLIP) in the context of FL, named F air F ederated D eep V isiual P rompting or FF-DVP . As implied by its name, trains a fair FL model with fairness-aware deep visual prompting (DVP). Moreover, incorporates modality-fused classification heads to learn client-specific knowledge and fairness constraints. These modules explicitly addresses a unique bias in FL, namely the bias triggered by data heterogeneity. We show that can be readily extended to prevailing parameter-efficient fine-tuning methods (e.g., adapter or LoRA) for debiasing. To the best of our knowledge, is the first to leverage biased VLMs for building fair FL frameworks. Extensive results on human face attribute recognition (FAR) applications suggest that effectively improves model fairness and training convergence, outperforming state-of-the-art baselines.

## introduction federated learning (fl) emerges as a novel machine learning (ml) paradigm wherein ml models are trained from distributed data sources @xcite . in fl, a central server stores a global model, while multiple local clients participate in the collaborative model training without sharing their private data. such a decentralized design of fl makes it a promising solution for privacy-sensitive applications, like online facial services or medical diagnosis @xcite . however, fl models commonly suffer from scalability issues. that is, traditional fl models struggle to achieve training convergence under high data complexity (e.g., data amount, data dimensionality) and high data heterogeneity (e.g., non-i.i.d. data) @xcite . therefore, we aim to design a scalable fair fl framework that withstands high data complexity and heterogeneity. on the other hand, large foundation models become increasingly popular for ml tasks involving complex and large-scale data. these models, with billions parameters, are pre-trained using internetscale data @xcite . they can extract domain-generalized features from inputs, and generalize to various downstream tasks across different domains (e.g., sentiment analysis, image classification @xcite ). recently, exploiting large vision-languagemodels (vlms) for federated learning (fl) has gained increased attention @xcite @xcite . the strong generalization ability of vlms has empowered fl models to overcome the data complexity and data heterogeneity across clients, leading to better personalization and generalization @xcite . however, existing literature that combines vlms (e.g., clip) and fl largely neglects the inherent bias within such vlms and its ethical implications on fl applications. the unique issue of data heterogeneity in fl would exacerbate clip bias, severely compromising the fairness of the aggregated fl model @xcite . on the other hand, in privacy-and identity-sensitive applications, it is imperative to develop fl models that are both accurate and fair. for instance, in an far-based criminal detection system, if the model consistently makes false-positive predictions on a specific demographic group, great ethical concerns would be raised @xcite . unfortunately, as shown in figure 1 , pre-trained vlms indeed encode the bias of their pre-training data, and may perpetuate such bias in downstream tasks @xcite . additionally, in fl applications, to transfer a pre-trained vlm to the domain-specific data, it is common to fine-tune the model on the clients' data and then update the global model via aggregation. in this case, if the local data distributions are biased and heterogeneous, fine-tuning a biased vlm on such local data would further amplify the bias of the global model. the bias triggered by data heterogeneity in fl represents a unique challenge, whereas there exist no fair methods tailored for vlm-based fl frameworks. therefore, this work studies a critical question: how can we develop a fair fl framework using the biased pre-trained vlms? in this work, we focus on the fairness of the fl model w.r.t. the unknown global data distribution. ideally, a fair fl model shall perform nondiscriminatively against any demographic group (i.g., group fairness) while achieving satisfactory overall performance. to achieve this, we propose a fairness-aware adaptation framework tailored for vlms in the context of fl: fair federated deep visiual prompting or ff-dvp. we highlight that ff-dvp is specifically designed to mitigate the bias in fl settings: 1) ff-dvp minimizes the communication burden between the server and clients: given the large size of clip, ff-dvp is lightweighted in terms of communication costs in fl; 2) ff-dvp performs demographic-agnostic and domain-generalized feature extraction: it removes sensitive demographic information from clip features while retaining domain-generalized ones to counter data-heterogeneity-triggered bias in fl; to this end, ff-dvp consists of two debiasing modules. firstly, ff-dvp debiases the clip features through fairness-aware deep visual prompting (dvp). the fairness-aware dvp is a sequence of learnable parameters prepended to the visual tokens. this dvp is designed to remove the demographic-related information from clip features while preserving the domain-generalized information. the extracted fair, domain-generalized feature overcomes the unique data-heterogeneitytrigger bias in fl. secondly, ff-dvp learns clientspecific knowledge and fairness constraints with modality-fused classification heads. the classification heads also contribute to the learning of fair and robust representations. with both modules, the aggregated global model achieves desired group fairness despite the data heterogeneity in local clients. finally, we show that ff-dvp is flexible and can be extended to other parameter-efficient fine-tuning (peft) methods, such as adapter-style tuning @xcite or low-rank adaptation (lora) @xcite . we summarize the contributions of our paper as follows foot_0 : learnable/prompted module fixed module forward pass gradients ground-truth prompts (e.g. smiling, not smiling.) demo.-only prompts (e.g. male, female.) prompted image encoder text encoder classifier cross entropy fair regularizer clip losses ff-dvp ff-dvp ff-dvp ff-dvp aggregate/ distribute client 1 client 2 client 3 ff-dvp 2 related work foundation models and federated learning. large foundation models (e.g., gpt family (ope-nai, 2023), llama (touvron et al., 2023), clip (radford et al., 2021)) exhibit robust generalization capabilities across a wide spectrum of tasks. recently, efforts have been made to integrate foundation models (e.g., clip) into fl frameworks for better personalization and generalization (lu et al., 2023; yang et al., 2023; guo et al., 2023a; chen et al., 2023). for instance, guo et al. (2023a,b) focus on learning text prompts to personalize clip on client data, whereas li et al. (2023) leverage visual prompts for the same goal. in addition to prompt learning, lu et al. (2023); chen et al. (2023) fine-tune clip with light-weighted adapters to adapt clip to the personalized data on clients. however, existing literature that combines clip and fl merely focuses on accuracy, largely overlooking the inherent bias of clip and its impact on fair fl applications. in contrast, our work is the first to consider the bias issue of clip in fl and leverage biased clip to build fair fl frameworks. group fairness in federated learning. for identity-sensitive applications, concerns have been raised about the fairness of the fl models (i.e. group fairness): they could perform discriminatively against under-represented demographic groups (ezzeldin et al., 2023). in terms of group fairness in fl, cui et al. (2021) strive to satisfy the local personalized fairness on each client. in comparison, a larger amount of studies (including our work) focus on a more general notion of global fairness, for its profound significance in real-world applications mohri et al. (2019); du et al. (2021); ezzeldin et al. (2023); hong et al. (2021). for in-stance, agnostic federated learning (mohri et al., 2019) achieves the good-intent fairness that protects the worst-case performance on any client. a fairness-aware aggregation protocol is introduced in (ezzeldin et al., 2023) to obtain a fair global model. however, above methods usually suffer from the issue of scalability: in the era of large foundation models, the performance of traditional fair fl methods might degrade significantly when the data is complex and heterogeneous @xcite . in this work, we present the very first framework that leverages large foundation models (e.g., clip) to address the bias issue in fl. to find the optimal global model f * θ in an fl application, @xcite proposed fedavg (appendix a). specifically, at each round, each local client trains its local model with its own data. then, clients send the trained local model weights to the central server for aggregation. on the central server, the global model will be updated using a weighted-average of the received weights. however, if the local data distributions are imbalanced, the locally trained models are also biased. this eventually leads to an unfair global model after the aggregation @xcite . ## conclusion this work presents a novel fair fl framework using biased vision language models. ff-dvp provides an effective solution to develop fair ml models while protecting data privacy on users' end. we highlight the significance of this work: despite the promising integration of large foundation models with fl applications, existing literature largely overlooks the inherent bias of these foundation models. in contrast, our work is the first to address the inherent bias of these foundation models and their bias implication on fl applications. finally, in addition to the performance of ff-dvp, we show that our method could easily extended to other peft methods for the adaptation of vlms. one limitation of this work is that our method introduces extra hyperparameters. for different applications, one might need to finetune these hyperparameters, which brings extra computational cost, such as the trade-off factor λ and number of tunnable visual tokens. as for the actually trainable modules, there is only a small two-layer network and light-weight perturbations. another limitation of this work is that our method only focuses on the bias, whereas clip has encoded other ethicsrelated issues (e.g., stereotypical data, racism and hate speech). such malicious contents could have negative ethical implications on downstream fl applications as well. therefore, a future research direction is to develop a benign, fair fl framework. receive trainable models: for ff-dvp, ff-adp, ff-lora, we select clip with configuration of vit-l/14@336px to run experiments, and the learning rate is initialized as 1e-5. the models are optimized via adamw. the local training epoch is 2 and the global epoch is also 2. for other baselines, including fedavg, afl, fairfed, fade, we train the models by starting with the default training configuration and recommendations. however, we observed training divergence, and therefore, increased both local epochs (up to 30) and global epochs (up to 30). for all methods with key hyperparameters, we firstly performed grid search with the resolution of 0.1 until find the best performance. based on that, we further reduce the search resolution to 0.01 until find best performance. our hardware is nvidia a40.