Conceptor-Aided Debiasing of Large Language Models (2023)

Abstract: Pre-trained large language models (LLMs) reflect the inherent social biases of their training corpus. Many methods have been proposed to mitigate this issue, but they often fail to debias or they sacrifice model accuracy. We use *conceptors*–a soft projection method–to identify and remove the bias subspace in LLMs such as BERT and GPT. We propose two methods of applying conceptors (1) bias subspace projection by post-processing by the conceptor NOT operation; and (2) a new architecture, conceptor-intervened BERT (CI-BERT), which explicitly incorporates the conceptor projection into all layers during training. We find that conceptor post-processing achieves state-of-the-art (SoTA) debiasing results while maintaining LLMs’ performance on the GLUE benchmark. Further, it is robust in various scenarios and can mitigate intersectional bias efficiently by its AND operation on the existing bias subspaces. Although CI-BERT’s training takes all layers’ bias into account and can beat its post-processing counterpart in bias mitigation, CI-BERT reduces the language model accuracy. We also show the importance of carefully constructing the bias subspace. The best results are obtained by removing outliers from the list of biased words, combining them (via the OR operation), and computing their embeddings using the sentences from a cleaner corpus.

## introduction llms such as bert @xcite and gpt @xcite are extremely successful in most natural language processing (nlp) tasks. however, since they are trained on texts written by humans, the social bias is inherited and represented in the parameters of llms @xcite . for example, gender bias has been found in contextualized embeddings @xcite figure 1 : the pipeline of the conceptor-aided debiasing paradigm. we first use different settings (wordlists with outlier filter and corpora) to generate the best bias subspace (conceptor matrix), then apply them to two conceptor-aided debiasing methods and measure the debiasing performance by two evaluation metrics. the experiment is conducted on two llms: bert and gpt. @xcite . therefore, many researchers have developed debiasing techniques to improve the social fairness of nlp. however, such debiasing often fails to debias effectively and reduces language model performance in downstream tasks @xcite . furthermore, most debiasing methods neither follow @xcite 's suggestion to reduce bias in all layers nor tackle intersectional bias in an efficient way @xcite . in this paper, we challenge @xcite 's conclusion that conceptor negation fails to debias bert stably. instead, we are the first ones to empirically find that as a soft shrinkage of the principal components of the subspace defined by the list of biased words @xcite , conceptors is a powerful tool to debias llms such as bert and gpt using either post-processing or continued-training. in this process, we demonstrate the effect on debiasing performance of choosing different corpora, subspace removal methods, and criteria for selecting the list of bias attribute words that are used to construct the bias subspace. further, we unprecedentedly show that the conceptor can tackle varied types of biases (e.g. gender, race) intersectionally and efficiently by its unique logical operation. specifically, the attribute wordlists at the core of our method, and the methods we build on, are sets of attribute words related to bias. these typically come in opposing pairs (e.g. 'man'/'woman', 'prince'/'princess'). @xcite , @xcite and others use the first principal component (pc) to define the bias subspace-which can be later subtracted entirely to debias. we similarly construct such subspaces, but use conceptors as a 'soft' way to remove them-downscale the pc adjusted by a regularized identity map. when generating such wordlists, it may be more representative of bias by removing outliers in the embedding space. considering the embeddings are contextualized, we select the contextualized token-level word embeddings using sentences from a specific corpus. then we stack them to generate a bias subspace in a form of a conceptor matrix for the debiasing in the next step. the pipeline is shown in figure 1 . this work contributes the following: ## the mechanism of conceptors let us take a closer look at the mathematics of conceptors: considering a set of vectors {x 1 , • • • , x n }, x @xmath0, • • • , n}, a conceptor matrix c is a regularized identity map that minimizes figure 2 : geometry of three conceptors in the shape of ellipsoids @xcite . conceptors support boolean operations such as not (¬), and (∧) and or (∨). for two arbitrary conceptors c 1 and c 2 , we have ## debiasing results this section aims to answer these questions: ## conclusion and future work we have shown that conceptor-aided debiasing can successfully mitigate bias from llms (e.g., bert, gpt) by its not operation. specifically, conceptor post-processing outperforms many stateof-the-art debiasing methods in both debiasing effectiveness and semantic retention. we also tested a new architecture, conceptor-intervened bert (ci-bert), which in combination with continued training, takes all layers' biases into account and shows the promise to outperform its post-processing counterpart. however, it might be at the cost of increased instability and worse semantic retention. in all cases, the best conceptor matrices are generally obtained when the bias subspace is constructed using (1) a cleaner corpus, (2) the union of different related wordlists (e.g. pronouns, roles, and names) by the conceptor or operation, and (3) removal of outliers from the wordlists. we further show that cocneptor-aided debiasing is robust in different llms, various layers of models, and varied types of biases. moreover, conceptors can utilize the current conceptor matrices to construct a new conceptor matrix to mitigate the intersectional bias in an efficient manner by and operation. in future research we plan to make ci-bert and intersectional conceptors more robust and effective.