BendVLM: Test-Time Debiasing of Vision-Language Embeddings

Authors: walter  gerych
haoran  zhang
kimia  hamidieh
eileen  pan
maanas  sharma
thomas  hartvigsen
marzyeh  ghassemi
  mit
Venue: NeurIPS_cc_2024_Conference
Published: 2024-05-15 18:39:45

Abstract: Vision-language (VL) embedding models have been shown to encode biases present in their training data, such as societal biases that prescribe negative characteristics to members of various racial and gender identities. Due to their wide-spread adoption for various tasks ranging from few-shot classification to text-guided image generation, debiasing VL models is crucial. Debiasing approaches that fine-tune the VL model often suffer from catastrophic forgetting. On the other hand, fine-tuning-free methods typically utilize a ``one-size-fits-all" approach that assumes that correlation with the spurious attribute can be explained using a single linear direction across all possible inputs. In this work, we propose a nonlinear, fine-tuning-free approach for VL embedding model debiasing that tailors the debiasing operation to each unique input. This allows for a more flexible debiasing approach. Additionally, we do not require knowledge of the set of inputs a priori to inference time, making our method more appropriate for online tasks such as retrieval and text guided image generation.

Main paper: 
 introduction: 
 Background. Pretrained foundation Vision-language models (VLMs) such as CLIP [33] , BLIP [22] , and LLaVA [25] have seen wide adoption for tasks like image retrieval [21] , zero and few-shot classification [33, 4] , text-guided image generation [32] , and facial recognition [58] . But VL models also encode societal biases [5, 27, 43, 49, 53] . As more and more systems rely on CLIP, the encoded representational harm [12, 3, 15, 52] can lead to allocative harm [34, 46, 14, 51, 16, 29] , such as Black individuals being three times more likely to be misclassified into a nonhuman category by computer vision systems [1] .State of the art. Debiasing VLMs is an active area of research [6, 10, 20, 19, 50, 28] . One common approach is finetuning the embedding models to remove spurious correlations [59, 2, 42] . However, finetuning often decreases accuracy and generalizability of foundation models [31] -a significant drawback as these models are commonly used for zero-shot tasks. Most existing finetuning-free methods learn debiasing transformations of the initial text embeddings, but typically use one-size-fitsall linear debiasing functions that apply the same fixed transformation to every input [6, 10, 50] .While recent work has explored nonlinear VLMs [11] , their method assumes access to the set of classes at test-time, requiring the debiasing training pipeline to be rerun if a query for a new class is made. This is a major limitation in practice because many tasks VLMs are used for are often naturally open-set, where the classes to be evaluated for at test-time are unknown prior to inference.Problem Definition. We study online, open-set debiasing for VLM embeddings. In this setup, we only have access to a VLM, along with a single-modal image dataset. This image dataset is only for the purpose of "training", and is not the dataset that the downstream task will work on. We assume that this dataset, which we call the reference dataset, has labels for the protected attribute(s) of interest. During test-time, we receive online input queries one at a time. These queries are also open-set, meaning that the classes or concepts they refer to are not known to us beforehand. For instance, the query may be "a photo of a nurse", but we do not have knowledge that nurse is a potential class of interest before receiving the query. Our goal is to debias the query embedding from the VLM in such as way that it does not more strongly associate the query embedding with any protected attribute value over another. For instance, the embedding for "a photo of a nurse" should not be more associated with images of women than with men.Challenges. Online, open-set VLM debiasing is a challenging task. First, we must overcome catastrophic forgetting-a solution that debiases the embeddings, but degrades performance. Second, the interaction between protected attributes and query classes may be nonlinear and instancedependent. For example, the transformation required to remove the gender bias from the embedding of "nurse" is likely not the same as the one to untangle gender bias associated with the embedding of "handyman". Third, queries from open-set classes means that our approach must be flexible enough to remove the association of protected attributes from classes unknown prior to inference time. Lastly, online settings demand computational efficiency and thus rule out refitting the debiasing component for each now class or query.Proposed approach. We propose Bias Elimination with Nonlinear Debiasing of Vision Language Models (BEND-VLM), a test-time VLM debiasing method that leaves the VLM's weights unchanged, being efficient enough for online streaming queries. By using the easy-to-get pre-debiasing reference dataset with protected attributes, BEND-VLM allows for unsupervised test-time debiasing. On a high level, BEND-VLM consists of two main parts: First, given an online query, we generate augmented queries that introduce protected attribute information. For example, given "a photo of a nurse" we generate "a photo of a {ATTRIBUTE} nurse", filling in {ATTRIBUTE} with male / female / nonbinary for gender debiasing, for instance. We get these augmented queries from a small language model, and use them to find the directions in the embedding space for that specific query that are most associated with the protected attribute. Given these directions, we project the embedding such that it is orthogonal to the protected attribute dimension, resulting in the first-stage debiased representation.For the second step, we make use of the reference image dataset. We find the images in this dataset that are most associated with the query, and then subset them by protected attribute value. We find an updated, debiased query representation by solving a constrained optimization equation with the goal of finding an embedding with minimal distance to the first-stage debiased representation while being equally similar to the example images for each attribute value. For instance, we find an embedding that is equally similar to the nearest images for each gender. The resulting embedding will have little to no excess association with any of the debiased protected attribute values over any other. The output can then be passed to the downstream task.• We introduce BEND-VLM, a novel test-time VLM debiasing approach that does not require finetuning. • We propose a technique for finding local attribute subspaces specific to each query on-the-fly.• We introduce a novel method for equalization by using a reference image dataset.• We experimentally evaluate for classification, retrieval, and image captioning settings, showing BEND-VLM consistently outperforms the compared approaches. 
problem definition: 
 Let (m, t, c, a) be an (image, text, class, attribute) tuple distributed according to P M ×P T ×P C ×P A , a joint distribution over images, texts, classes, and attributes. Using the running example of nurses,Step 2Step 2: Distance Debiasing "doctor" "female doctor""male doctor" Classified FemaleStep 1Step 1: Textual Debiasing In this example, the initial query embedding of doctor is more strongly associated with males, and the CCF distance is 0.10. After performing debiasing step 1, Orthogonalizing the Embedding, the embedding is modified to remove bias along the gender direction defined by "male doctor" and "female doctor". This still results in a CCF distance of 0.05. We then perform the second debiasing step, where the query embedding is again modified to be equidistant to the relevant male and female images. The final representation achieves the optimal distance of 0.00. a realization of m could be an image of a nurse, t the text "a photo of a nurse", c the class nurse, and a a protected attribute such as gender. Importantly, we do not assume that C, the support of P C , is known. This means we do not know what classes the user will query for during inference, and do not have access to a training set with these class labels. Let f T θ : T → R d represent the text embedding model (e.g., CLIP's image encoder) and f M θ : M → R d represent the image encoder, where T and M are the text and image domain, respectively. We will use f θ = {f T θ , f M θ } when referring to the VL model in general, rather than its modality-specific encoders. f θ is used to obtain d f M θ (m), f T θ (t) , where d(•, •) is a distance metric such as cosine distance. In practice, these (image, text) distance scores are used for zero-shot classification or image retrieval.Let t c ∈ T be a textual instance relating to class c. For instance, class c could be nurse and t c "a picture of a nurse". Then, our goal is to obtain a text embedding z * c ∈ R d that is Class Conditionally Fair.. A text embedding z * c is Class Conditionally Fair for embedding model f θ , class c, and metric d if for all a i , a j ∈ A the following holds:E m|ai,c d(f M θ (m ′ ), z * c ) = E m ′ |aj ,c d(f M θ (m ′ ), z * c ) .Intuitively, a text embedding is CCF for class c if the expected similarity between the text representation and relevant image embeddings -image embeddings that are also associated with class c -is independent of the protected attribute value a. For instance, an embedding of the query "a picture of a nurse" is CCF if its expected similarity score for pictures of female nurses is equal to the expected similarity score for male nurses.We also define Class Conditionally Fair Distance as a measure from how far off an embedding is from being CCF:Definition 2 (Class Conditionally Fair Distance). The Class Conditionally Fair Distance for a text embedding z c class c, and metric d is given by:d CCF (z c , c) = ||E m|ai,c d(f M θ (m ′ ), z c ) -E m ′ |aj ,c d(f M θ (m ′ ), z c ) || 1 .The CCF distance of z c is 0 if and only if z c is CCF. In practice, we can't exactly compute the expectations in the CCF distance definition. Instead, these expectations can be replaced with the average distances from relevant samples in the evaluation dataset.Reference and Target Datasets.In practice, we assume that we have a datasetD ref = {(m i , a i )} Ni=1 consisting of N images with labeled attributes. For instance, D ref could be a dataset of pictures of people with corresponding gender, race, or age labels2 . We focus on both the image retrieval and zero-shot classification setting. This reference dataset will be used to obtain debiased text embedding, as we describe in detail in the following section. We refer to the downstream dataset to be used in retrieval or zero-shot applications as the target dataset D target = {m j } Ntarget j=1. D target is not available prior to inference.For retrieval, we assume that D target is an unlabeled dataset of images, such that we want to retrieve images from this dataset that relate to streaming, open-set queries. For instance, the queries can be free-form text searches coming from a search engine user. In this open-set scenario the set of classes C is unknown -we do not know what classes users will search for a priori. For zero-shot classification, we likewise focus on the streaming, open-set scenario. Images from D target will be compared against a set of texts {t c0 , t c1 , • • • , t cK } for the purpose of classification, where this set of texts relates to classes c 1 , c 2 , . . . , c K ∈ C, where C is unknown to us and potentially variable. For instance, a user may first wish to obtain zero-shot predictions of hair color of the portraits in D target , and later wish to obtain predictions of whether the individuals have eyeglasses.In both settings, we make the simplifying assumption that each user query t c does not explicitly reference the protected attribute of interest. For instance, the query is "a picture of a nurse", not "a picture of a male nurse" -and thus it is desirable for the query embedding to not be more associated with a particular gender. In the case where the query does contain explicit reference to a -"a picture of a male nurse" -it is straightforward to abstain from debiasing by using a language model to filter out these queries, or by checking for explicit attribute terms3 . 
methodology: 
 On a high level, our BEND-VLM approach consists of a two-phase debiasing pipeline. We perform an initial debiasing pass by first employing the classic approach of orthogonalizing f θ (t) to the attribute subspace v [24, 9] . However, unlike most prior works, we do not assume that the attribute subspace is globally constant for all queries; it may be the case that the direction in the embedding space corresponding to gender that differentiates "a picture of a male nurse" from "a picture of a female nurse" may not be equivalent to the gender direction between "a picture of a baby boy" and "a picture of a baby girl". We find these local attribute subspaces using our ATTRIBUTEAUGMENT module to obtain attribute augmented versions of t. After this first phase, we are left with the partially-debiased embedding z ′ c . Our second and final debiasing pass consists of equalizing the distances between the embedding and relevant images from the reference dataset D ref belonging to each attribute class. We obtain the final debiased embedding z * c through an analytical solution to a constrained optimization equation.Orthogonalizing text embeddings with respect to an attribute subspace, such as setting embedding dimensions corresponding to gender or race equal to zero, is a classic approach used for standard text embeddings [24, 9] and has recently shown promise in debiasing VL models [10] . Whereas existing approaches typically find a single attribute subspace for instances, we find local attribute subspaces in addition to the global subspace.Let t c be the initial text query coming in to the system. We then obtain t c,ai for all a i ∈ A.For instance, if a refers to gender and t c = "a picture of a nurse", then we would obtain "a picture of a male nurse" and "a picture of a female nurse" for t c,a male and t c,a f emale , respectively. We draw each t c,ai from our ATTRIBUTEAUGMENT module: {t c,ai } i∈A = ATTRIBUTEAUGMENT(t c,ai ; A). In practice, we use an LLM to instantiate ATTRIBUTEAUGMENT. In a lower resource setting, ATTRIBUTEAUGMENT could feasibly be implemented through simpler text processing techniques to identify the subject of the query and insert corresponding attribute strings before the subject; e.g. inserting "male" and "female" before the subject for gender debiasing.Let A be a matrix whose columns aref T θ (t c,ai ) -f T θ (t c ) for i = 1 → |A|.To combat potential noise from estimating the local attribute subspace, we additonally include generic attribute text embeddings into the columns of A as well. For instance, for gender debiasing we include the embeddings of "a picture of a man" and "a picture of a woman". We then obtain the initial debiased embedding z ′ c as:z ′ c = V f T θ (t c ), where V = I -A(A ⊤ A) -1 A ⊤ is the orthogonal projection matrix of A [10].Importantly, despite z ′ c being orthogonal to the local attribute subspace it is not necessarily equally similar to the image embeddings of relevant instances when conditioned on the "debiased" attribute.Lemma 1 (Orthogonalization does not yield Class Conditional Fairness.). The following does not hold in general:E m|ai,c d(f M θ (m ′ ), z ′ c ) = E m ′ |aj ,c d(f M θ (m ′ ), z ′ c ) .We show an example of this in Figure 1 , where we see that step 1 does not result in significantly improved CCF distances. To mitigate this, we propose a second debiasing step.In this second stage, we equalize the distances between the images in D ref and the debiased embedding z ′ c , with the goal of making relevant images from each attribute group equally similar to the text embedding. Let D ref (a i , c) be images in the reference dataset that are associated with attribute class a i and class c. We want to find the embedding z * c that satisfies the following set of conditions C:C = mj ∈Dref(ai,c) d(f M θ (m j , z * c )) |D ref (a i , c)| = m k ∈Dref(a1,c) d(f M θ (m k , z * c )) |D ref (a 1 , c)| i=1→|A|These constraints say that the average distance between relevant image embeddings should be equal for all attribute value splits. For example, the distance between the embedding of "a picture of a nurse" and relevant male images should match the distance between the embedding and relevant female images.Note that since we do not assume access to context labels for D ref , it is not immediately obvious on how to obtain each D ref (a i , c). Instead, D ref (a i , c) is by selecting n images with attribute value a i that are most similar to the query embedding z ′ c . The value of n could be found using change-point detection, such that n is the value where the elbow in the plot of similarity over indexes sorted by similarity score [38] . A less sophisticated approach -but one we find works well in practice -is to simple chose n as a hyperparameter, and use the same value for each attribute and query.Finding any embedding that satisfies C is not enough, since we want to ensure that the debiased embedding does not lose information unrelated to the protected attribute a. This means we want to find a debiased embedding with minimal distance to the previous embedding. We want to find a z * c that minimizes distance to the first-pass debiased z ′ c :L initial = d z * c , z ′ cWe thus find z * c by solving the following constrained optimization equation:EQUATIONEquation 1 has a simple analytical solution for the binary attribute case, when d(•, •) is cosine distance and each embedding has unit norm length.Lemma 2. The value of z * c that minimizes the distance from the initial embedding z ′ c while satisfying the image-embedding fairness constraint is:z * c = z ′ c -λµ(a 2 , c) + λµ(a 1 , c) ||z ′ c -λµ(a 2 , c) + λµ(a 1 , c)|| 2 ,where λ is given by:λ = µ(a 1 , c) • z ′ c -µ(a 2 , c) • z ′ c 2µ(a 2 , c) • µ(a 1 , c) -µ(a 2 , c) • µ(a 2 , c) -µ(a 1 , c) • µ(a 1 , c) ,and µ(a i , c) =1 |D ref (ai,c)| mj ∈D ref (ai,c) m j is the average embedding of D ref (a i , c).As the requirement that the embeddings have unit norm length simplifies the analytical solution, we add in this norm constraint {||z * c || 2 = 1} to the set C. In the case where the protected attribute is not binary, z * c can be found using a constrained optimization solver [48] . After obtaining the result of this final debiasing step, our modified embedding can then be passed along to a downstream task such as retrieval or zero-shot classification on a target dataset D target , or used to condition another model such as a text to image generator. 
experiments: 
 Datasets. We compare our BEND-VLM to existing debiasing approaches on the FAIRFACE [18] , CELEBA [26] , and UTKFACE [57] datasets. Each dataset contains pictures of people. CELEBA has gender annotations, while FAIRFACE and UTKFACE have both gender and race labels.Models. We evaluate the ability of the debiasing approaches to improve the performance of the CLIP-ViT-Base-Patch16 (CLIP-ViT-B-P16) and CLIP-ViT-Large-Patch14 (CLIP-ViT-L-P14) VLMs. For image captioning, we use ClipCap [30] pretrained on Conceptual Captions [41] , which uses a ViT-B/32 architecture. We use Mistral-7B-Instruct-v0.2 [17] for our ATTRIBUTEAUGMENT module.Compared Methods. We compare BEND-VLM against the following debiasing methods:• Baseline CLIP [33] is simply the original CLIP model (e.g. ViT-B-P16 or ViT-L-P14) without any debiasing steps. This acts as our baseline. • Orthogonal Projection (Orth-Proj.) [10] debiases the query embedding by making the embedding orthogonal to the global spurious attribute subspace (e.g. making the embedding orthogonal to the directions in the embedding space most correlated with gender). • Orthogonal Calibration (Orth-Cal.) [10] likewise makes the embedding orthogonal to the global spurious attribute subspace, but introduces an additional regularization term to encourage attribute-augmented versions of the query to be close together after projection. • DebiasCLIP [6] finetunes a CLIP model to remove spurious attribute bias. The authors have released the weights for DebiasCLIP trained to do gender debiasing on CLIP-ViT-B-P16, but have not made their training code available. This means we compare against this method only when evaluating on experiments that use CLIP-ViT-B-P16. Note that while the released DebiasCLIP model was trained for gender debiasing, we also include it in evaluations for race debiasing but do not expect it to be competitive in these settings.Implementation details. We do a 50/50 split of each dataset for the reference and target datasets. We additionally create 5 folds for the target dataset so that we can compute confidence intervals for all methods. We chose n = 100 when selecting the n most relevant images for computing each D ref (a i , c) (see Section 3.2). We use the default value of λ = 1000 for Orth-Cal. and Orth-Proj.'s main hyperparameter. During retrieval, we always sample 500 images from the target dataset. Our reference and target datasets are drawn from the pre-established training split of each dataset.Evaluation metrics. We measure KL[ Pa ||P a ], the KL divergence between the attribute prior P a (e.g. the true distribution of genders in the target dataset) and Pa , the empirical distribution of attribute labels for the set of images retrieved from the target dataset for a given query. Intuitively, if the query does not rely on the spurious attribute when computing similarity, then the instances retrieved (e.g. the most similar instances) should result in an empirical attribute distribution that matches the overall distribution of the spurious attribute. For instance, if a dataset contains 40% males and 60% females, then if we sample independently of gender we should retrieve roughly 40% males and 60% females. We also report the M axSkew between the attribute prior and empirical retrieved distribution, M axSkew = max ai log( Pa (a i )/P a (a i )).For zero-shot classification, we compute the AUC ROC for each group using the similarity between the query and images from each group in the retrieval set as the score. We then report Worst Group AUC ROC:min ai AU C_ROC [1 -d(m j,ai , z)] na i j=1 , [c j ] na i j=1, where d(•, •) is cosine distance and 1 -d(•, •) is cosine similarity. Worst Group AUC ROC tells us how useful the similarity score to the text embedding is for zero-shot classification for members of the most disadvantaged group.Queries sets. Since CELEBA has class labels for hair color, we use a set of queries relating to this which we refer to as HAIRCOLOR so that we can measure zero-shot classification performance via Worst Group AUC. HAIRCOLOR is the set {"A photo of a celebrity with {COLOR} hair"}, for COLOR ∈ {blond, black, brown, gray}. We also use the query set STEREOTYPES, a set of negative words such as "delinquent" and "terrorist" taken from the SO-B-IT VLM auditing taxonomy [15] , which is known to contain race and gender bias. Each of our queries is given in the appendix.We study the effect debiasing has on accuracy through Worst Group AUC ROC as well as the KL divergence and MaxSkew bias metrics. We use CELEBA since it has class labels for HAIRCOLOR.Figure 2 shows Worst Group AUC vs MaxSkew. The ideal method would be in the top left of the plot, indicating high accuracy and low bias. Our BEND-VLM method is close to this ideal region. We increase Worst Group AUC over the baseline, roughly matching the AUC performance of Orth-Proj. and Orth-Cal. while having significantly less bias than them. DebiasCLIP has a better MaxSkew than Orth-Proj. and Orth-Cal -but still worse than BEND-VLM -while decreasing AUC compared to the baseline. We include additional results for this experiment in Section A.1 in the appendix; see Table 6 for results for this same setting, along with the KL divergence metric. We clearly see that BEND-VLM consistently has significantly better bias scores than all compared method, while having negligibly worse AUC than the next method and significantly better AUC than the baseline.We evaluate our method on removing the association the Stereotype words have to race and gender. The results for UTKFACE, FAIRFACE, CELEBA are shown in Tables 1, 2 , and 3 respectively. We again see that BEND-VLM consistently has less bias than the compared methods in all the scenarios we evaluated. Notably, the other debiasing techniques generally improve over the baseline but sometimes have worse MaxSkew or KL Divergence -which is never observed for our approach. We have conducted a new experiment where we debias FairFace with respect to gender for HairColor queries, but evaluate on race. We do not expect to see improvements with respect to racial bias after gender debiasing for any method. Table 4 that racial bias goes up for all debiasing methods after gender debiasing. This reflects a known, frustrating "Whac-A-Mole" issue where debiasing for one attribute often increases the bias of another attribute [23] . Interestingly, we do not see racial bias increase when performing only Step 2 of the Bend-VLM debiasing, indicating that this short cut issue is most strongly affected by the orthogonalization operation performed in Step 1. The other debiasing methods also perform a similar orthogonalization step and likewise experience this shortcut problem. In this experiment, we evaluate the effect of BEND-VLM on debiasing automatic image captioning. We study ClipCap [30] (ViT-B/32 vision encoder, pretrained on Conceptual Captions [41] ), as it is one of the few captioning methods which takes in only the final layer embedding vector, as opposed to BLIP [22] or LLaVA [25] , which take in the sequence of embeddings from the ViT.We hand picked 20 images that we observed to have significantly negative or harmful captions generated from the Baseline CLIP embeddings. After debiasing with BEND-VLM, we performed a manual inspection and determined that 6 out of the 20 had less harmful captions after debiasing, 3 had increased harm, and 11 were equal to the original captions.Next, we randomly sample 1600 images from FAIRFACE's validation set that result in captions containg any of the following negative words: [ "abandoned", "murder", "homeless", "accuse", "kill", "anime", "arrest", "surprised", "blood", "shot", "pregnant", "intoxicat", "charged", "bad day", "permanently surprised", "bandage", "hit", "wilful", "no idea", "prison", "abuse", "attack" ]. We then perform automated sentiment analysis using CLIP. Table 5 shows that BEND-VLM decreases the average negative sentiment per race, and makes this average more equal between the races.  
limitations and broader impact: 
 BEND-VLM requires a reference dataset with protected attribute annotations, which is not feasible for every scenario. In our current implementation, our ATTRIBUTESWAP module requires the use of a relatively small 7B LLM. This could still incur too much computational overhead for very resource-constrained settings. Additionally, our evaluation datasets are not perfect. They contain only binary gender labels, but there is a large population of people who don't identify that way. Moreover, the race and gender labels are not from self-identification, meaning they are only a noisy signal for identity. We believe that our method overall takes a step towards understanding and mitigating biases, and can still be directly extended to support a more nuanced solution to the extreme challenges of mitigating social biases. 
related works: 
 Biases in Vision-Language Models.Vision-Language models have become increasingly widespread in recent years [33, 35, 37, 36] . However, these models are known to suffer from spurious correlations [55] and can be biased towards certain races and genders [8] . Studies have shown that biases in these models can stem from the datasets they are trained on. For example, Agarwal et al. [1] found that the CLIP model associates "white" text labels less accurately with white individuals than with individuals from other racial groups, and images of people labeled as Black are more likely to be mislabeled as animals. Additionally, Dehouche [12] identified gender bias in CLIP when prompted with gender-neutral text, and Wolfe et al. [53] noted that multiracial individuals are more likely to be assigned minority racial labels. The biases embedded in these models reflect the biases present in the training data, which often include offensive and stereotypical content [7, 8, 47, 39] .Debiasing Vision-Language Models. Recent advancements in debiasing vision, language, and vision-language models have led to various methods for mitigating biases, ranging from data augmentation and balancing [7] to model-level adjustments such as adversarial training [45] . For instance, Wang et al. [50] proposed removing dimensions in the CLIP embedding correlated with gender attributes, while Berg et al. [6] used prompt learning via an adversarial approach to debias CLIP models. Other techniques include learning additive residual image representations [40] and improving robustness to spurious correlations in CLIP via employing contrastive learning [56] and spuriousaware fine-tuning [55] . Friedrich et al. [13] developed a look-up table for fair text-to-image diffusion models. Similarly, Kong et al. [20] addressed test-time bias in image retrieval by downsampling the majority class in query results, and the Adept framework [54] use debiasing prompts for text embeddings. Chuang et al. [10] reduced bias without extensive fine-tuning by orthogonalizing embedding dimensions associated with protected attributes. Kim et al. [19] emphasized the importance of addressing gender and racial biases in vision-language models. Despite these efforts, achieving effective debiasing without extensive retraining remains challenging. In contrast, our approach, which is fully zero-shot and does not depend on any downstream dataset or model training, aims to provide a more scalable solution to debiasing vision-language models, especially in open-set scenarios where only a piece of text is provided, rather than multiple classes. 
conclusion: 
 This work proposes a test-time VLM debiasing method that does not require finetuning, and is able to perform query-specific nonlinear debiasing rather than a one-size-fits-all approach. Our experiments on removing race and gender bias in retrieval, classification, and image captioning indicate that our method consistently decreases bias while improving worst group performance. We found that our method consistently matches the accuracy of the best performing compared method, while significantly decreasing bias beyond all compared methods. We hope that our method inspires more work on efficient, nonlinear debiasing techniques for VLMs. 
 
 Appendix: A.1 Expanded CelebA HAIRCOLOR Results 6 shows the results for debiasing Gender for the CELEBA dataset. We clearly see that BEND-VLM consistently has significantly better bias scores than all compared method, while having negligibly worse AUC than the next method and significantly better AUC than the baseline.We verify that both Step 1 and Step 2 contribute to the success of BEND-VLM through an ablation study. Table 7 shows that while most of the Worst-Group Accuracy performance comes from Step 1, utilizing only step 1 results in a much more biased retrieval metric by having a much higher KL divergence from a fair distribution. Utilizing step 2 alone results in a fair retrieval roughly equivalent to the full BEND-VLM approach, but does not have as good of a Worst Group Accuracy. We achieve the best results by combining Step 1 and Step 2 to make the full BEND-VLM approach. Results shown on CELEBA for HAIRCOLOR queries. Our method requires a VLM that can construct a vector representation of text and images in a joint space, but this does not need to be a CLIP model. To show this generalizability, we evaluate our method on FLAVA [44] . Table 9 shows that Bend-VLM still outperforms the compared methods when FALVA is the VLM. Results shown for the CelebA dataset. Note that there are no "ground truth" labels for the stereotype queries, so it isn't possible to compute AUC for them. Proof of Lemma 1. We will prove by counter example. Without lack of generalizability, consider the case where the embedding space is 2 dimensional and there are two instances in the reference dataset, m 1 and m 2 , where the first is associated with the spurious attribute value a 1 and one associated with a 2 . Define a basis where [0, 1] corresponds to the spurious attribute subspace and [1, 0] is the space orthogonal to it. Let [1, 0] be the directtion of a 1 and [-1, 0] be the direction of a 2 . After orthogonalizing, the query embedding z ′ lies on [0, 1], and has equal cosine similarity to [1, 0] and [-1, 0]. Since m 1 is associated with a 1 , it will have a higher cosine similarity with[1, 0] than [-1, 0].The opposite is true for m 2 . However, this does not mean that the d(m1 , [1, 0]) = d(m 2 , [-1, 0]). This implies that d(m 1 , z ′ c ) = d(m 2 , z ′ c )does not always hold.Proof of Lemma 2. . We can obtain this solution using Lagrange multipliers. In the binary case, we will have two constraints: constraint 1 :1 |D ref (a2,c)| mj ∈D ref (a2,c) d(f M θ (m j , z * c )) = 1 |D ref (a1,c)| m k ∈D ref (a1,c) d(f M θ (m k , z * c )), (which states that the average distances to both attribute values should equal), and z * • z * = 1 (which states that the solution should have a length of 1). We want to minimize -d(z * , z) = -z * • z/||z * || • ||z|| = -z * • z (as each vector has a norm of 1).For ease of notation, let us refer to1 |D ref (a2,c)| as 1 nx , 1 |D ref (a2,c)| as 1 n2, the jth instance of D ref (a 1 , c) as x j and the ith instance of D ref (a 2 , c) as y i .We can write then Lagrange multiplier equation as:EQUATIONTaking the gradient with respect to z * c and setting it to 0, we obtain:0 = -z c + λ 1 n y ny i=1 y i - 1 n x nx j=1 x j + 2πz * c Let ȳ = 1 ny ny i=1 y i and x = 1 nx nx j=1 x j . Then, 0 = -z c + λ 1 n y ny i=1 y i - 1 n x nx j=1 x j + 2πz * c = -z c + λ ȳ -x + 2πz * c = -z c + λ ȳ -λ x + 2πz * c Solving for z * c : z * c = z c -λ ȳ + λ x 2πPlugging this into our norm constraint:EQUATIONNow plugging our equation for z * c into constraint 1 :0 = 1 n y ny i=1 y i • z c - 1 n x nx j=1 x j • z c = 1 n y ny i=1 y i • z c - 1 n x nx j=1 x j • z c = ȳ • z * c -x • z * c = ȳ • z c -λ ȳ + λ x 2π -x • z c -λ ȳ + λ x 2π = ȳ • z c -λ ȳ + λ x -x z c -λ ȳ + λ x 2π = ȳ • z c -λ ȳ + λ x -x z c -λ ȳ + λ x = ȳ • z c -λ ȳ • ȳ + λ ȳ • x -x • z c + λ x • ȳ -λ x • x Solving for λ: λ = x • z c -ȳ • z c 2 x • x -ȳ • ȳ -x • xNote that x is equivalent to µ(a 1 , c) and ȳ is equivalent to µ(a 2 , c).The last thing to note is that when plugging in π:z * c = z c -λ ȳ + λ x 2π = z c -λ ȳ + λ x ||z c -λ ȳ + λ x|| 2We have now obtained the solution given in Lemma 2. code: https://github.com/waltergerych/bend_vlm 38th Conference on Neural Information Processing Systems (NeurIPS2024).In a practical application, these protected attributes could be noisy labels assigned by an attribute predictor. For instance, gender labels could be obtained by using CLIP for zero-shot gender prediction.e.g. we could filter for gender with GenderspacY: https://github.com/sidatasciencelab/gender-spacy 


Decision: The paper proposes BEND-VLM, a 2-phase nonlinear approach for debiasing Vision Language Model (VLM) embeddings, which does not need any fine-tuning but is still able to customize the operation to each input. The paper formalizes the Class Conditionally Fair conditions that ideal debiased embedding should meet and designs a corresponding two-phase debiasing pipeline. The first phase makes the embedding orthogonal to the local attribute subspace. The second phase uses reference images to equalize the text embedding. The experiments show the effectiveness of this approach.

The reviewers overall gave the paper a positive review. The paper is recommended for acceptance as a poster paper.

Reviews: review: paper_summary: paper_summary: This paper proposes a two step test-time debasing method for VLMs. In the first step, an orthogonalizing approach is applied to text embeddings. In the second step,  a constraint is utilized to equalize the distances between the debiased embeddings and images from a reference dataset. Experimental results show its effectiveness in mitigating stereotype biases.
strength_weakness: strength_weakness: - Missing ablation study. The experimental section does not show how each step contributes to the debasing performance. For example, only use step 2.

- The proposed method uses a two-step debiasing strategy. Besides, a LLM is also used to help with the attribute augment. How is the efficiency of the proposed method? Can the authors provide a detailed time comparison?

- This paper claimed debiasing of VLMs but in experiments only CLIP models are used. Can the proposed method debias other VLMs?
questions: questions: See weaknesses above.
limitations: limitations: Please see the questions and experiments I suggested above. I will be carefully reviewing the rebuttal as well as the opinions of the other reviewers to decide if I would like to change my rating.
paper_summary: paper_summary: The paper introduces a novel approach named BEND-VLM (Bias Elimination with Nonlinear Debiasing of Vision Language Models), designed to debias vision-language model embeddings at test time. The key innovation lies in a fine-tuning-free, nonlinear debiasing method that is adaptive to each specific query, enhancing flexibility and robustness in online, open-set tasks like image retrieval and text-guided image generation.
strength_weakness: strength_weakness: W1: BEND-VLM's reliance on a reference dataset with protected attribute annotations may limit its applicability in scenarios where such datasets are unavailable or impractical to obtain. The authors acknowledge this limitation but it would be better if there is an ablation for the reference dataset and desired properties of the reference dataset.


W2: The approach focuses on debiasing based on specific attributes (e.g., gender, race), but it does not explicitly address contextual biases that might arise from the interplay of multiple attributes or the broader context of the query. Complex scenarios where biases are context-dependent require more sophisticated handling. It would be better if the paper discussed how to use the method for this kind of situation.
questions: questions: Please refer to "weakness".
limitations: limitations: Please refer to "weakness".
paper_summary: paper_summary: This paper focuses on debiasing VLM embeddings and proposes a fine-tuning-free method for online open-set embedding debiasing and tailors the debiasing operation to each unique input, which is advanced over the previous one-size-fits-all linear approach. The paper assumes that the debiased embeddings should satisfy the criteria of Class Conditionally Fair. In addition to mapping embeddings to the direction orthogonal to the protected attribute, it utilizes the reference image dataset to make relevant images from each attribute group equally similar to the query embedding, while ensuring debiased embedding does not lose information beyond protected attributes.
strength_weakness: strength_weakness: 1. The “open-set” ability of BEND-VLM may be overstated. The process of debiasing in BEND-VLM cannot avoid the defined attributes. It is impossible to know the attributes  (didn't happen in training)  of a completely new class, leading to the collapse of BEND-VLM's debiasing ability.

2. The paper seems to neglect to explain why can the proposed BEND-VLM overcomes catastrophic forgetting (the aspect in which the proposed BEND-VLM is stronger than fine-tuning-based methods), which is one of the main challenges that BEND-VLM overcomes.

3. All definitions and lemmas should be organized more formally.
questions: questions: See Weaknesses.
limitations: limitations: See Weaknesses.
paper_summary: paper_summary: This paper presents to address the bias problem in CLIP models from a novel angle - directly debiasing CLIP without fine-tuning.
To begin with, this work defines two metrics: CCF and CCFD, which can quantify the bias effect of CLIP embeddings.
The authors then propose a method involving two approaches to address the bias problem.
The experiments are conducted on three human face-aware datasets.
As can be observed from the experimental results, the proposed can outperform two baselines.
strength_weakness: strength_weakness: - I'm a little confused about the original model's performance in image classification and image-text retrieval.
Generally, after debiasing, the original downstream model performance will face certain degradation.
However, this paper does not show this.
Is it because this zero-shot way does not change the original CLIP embeddings?

- The authors should at least provide some time efficiency evidence to show the effectiveness of the proposed method, since their method utilizes another LLM (though not very large).

- I'm also not sure about the usefulness of the second approach - using reference images to equalize text embeddings.
To me, the first orthogonal way is already good enough as per previous studies.
Besides, there are no ablation studies on these two.

- Why did the authors compute the CCF and CCDF for both their method and baselines?

- Figure 1 is not a good example. 
It is because the improvement is largely limited - from 0.03 to 0.01.
questions: questions: Please refer to the weakness part.

Overall I like this paper and I do believe this paper offers some significant insights.
limitations: limitations: NA

Comments: title: Thank you
Response to rebuttal
Thank you
Thank you
comment: Thank you for the constructive feedback and support for our work. We're very happy that you continue to recommend acceptance.
I previously held a positive view of this paper.
After reading the authors' rebuttal, I chose to maintain my original acceptance score.
Thank you for your time and expertise providing an ethics review to our work. We are glad to see that you agree that there are no ethical issues with our work. 

We are happy to extend the discussion of our approach to multiple attributes in our camera-ready version. We have added a new experiment on intersectional bias in our general rebuttal, and will be adding this to our main paper. For attributes like marital status, the datasets we've investigated do not contain labels for this so we are unable to evaluate bias for marital status in this case. We will make it clear in our limitations that we perform debiasing for attributes for which we have some labeled examples.
Thank you again for your insightful suggestions, and we're happy to have addressed your concerns.
Thank you again for your constructive feedback and time spent reviewing our work. We're very happy to see that we've addressed your concerns and that you have raised your score.
The author's response addressed my concerns. I changed my rating to 6.
The author's response addressed my concerns well.