$$\rightleftharpoonup{xx}$$
$$\longleftharp{xx}$$,
$$\longrightharp{xx}$$,
Large Language Models have prodigious reverberation as tools to support diverse tasks, including decision-making1,2, text generation3, text translation4, customer sentiment analysis5, question answering6, and generating clinical reports7. Several instances have occurred in recent times in which applications have used LLMs to generate content that harms socially disadvantaged individuals or groups8,9,10. The main reason behind such platitudinous responses is that these models are trained on datasets that inherently contain societal biases associated with race, gender, socioeconomic class, and similar factors. But what you mean by "bias" and "fairness" in a healthcare AI system can be subjective and context-dependent. Researchers have exerted considerable effort to mitigate social biases in LLMs11,12; however, further improvement remains necessary. The researchers have proposed multiple bias mitigation strategies, which can be classified as pre-processing, in-processing, post-processing, or combinations thereof, across a heterogeneous range of applications. This categorization is based on the stage at which the mitigation measure is taken. This protocol combines all three strategies to tackle and alleviate social bias in six variants of LLMs and investigates bias reduction across four social bias dimensions: Gender, Profession, Race, and Religion. First, an inference dataset is developed using a data augmentation technique to enable LLMs to generate inferences. Second, twelve types of prompts are designed to elicit stereotyped responses from LLMs. Third, Llama-2-7B13, Mistral-7B14, and Dolly-7B15 are fine-tuned on a dataset containing unbiased sentences across the four social categories: gender, race, profession, and religion, to get Llama-2-7BFinetuned, Mistral-7BFinetuned, and Dolly-7BFinetuned, respectively. Lastly, inferences are drawn by prompting the fine-tuned LLMs to investigate their effectiveness in giving fair responses.
We formulated the following research questions and addressed them in this paper. For each formulated research question (RQ), a null hypothesis (H0) and an alternative hypothesis (H1) were framed.
RQ1: Are the inference dataset and basic prompting techniques effective in evaluating the societal biases in LLMs? Null hypothesis (H01): The bias scores derived from an inference dataset when combined with basic prompts are statistically indistinguishable from the baseline bias scores of the LLMs. Alternative hypothesis (H11): Bias scores from the inference dataset with basic prompts are statistically significantly different from baseline bias scores of the LLMs. To test the hypothesis, a dataset, NeutralSet, was curated by modifying StereoSet16 and evaluating each LLM using basic prompting techniques to assess its ability to produce non-stereotypical responses. In our settings, we include six basic prompts -- Standard (A zero-shot prompt to instruct LLM to make inferences), Chain-of-Thoughts (CoT is designed to ask the LLM to think step-by-step to make inferences), System1 (A prompt to let the LLM think quickly while answering), System2 (A prompt to make the LLM think slowly and thoughtfully), Human Persona 1 (HP1 is designed to make the LLM adopt identity of a human who think quickly while taking decisions), and Human Persona 2 (HP2 is designed to make the LLM to adopt the human identity who think slowly and thoughtfully while answering).
RQ2: Are the debiasing prompting techniques effective in revealing and mitigating societal biases in LLMs? Null hypothesis (H0₂): Debiasing prompting techniques are not effective in revealing and mitigating societal biases in LLMs. Alternative hypothesis (H12): Measured bias scores decrease significantly when debiasing prompting techniques are used in LLMs. We investigate the impact of debiased variants of the basic prompts on three open-source LLMs to achieve fair text generation free of any social discrimination.
RQ3: Can societal biases be further reduced by fine-tuning the LLMs? Null hypothesis (H03): Fine-tuning the LLMs does not further reduce societal biases beyond the reductions achieved through prompting techniques alone. Alternative hypothesis (H13): Fine-tuning LLMs further reduces societal biases beyond the reductions achieved through prompting techniques alone. To answer this question, we modify the dataset17 and fine-tune the LLMs on it to further assess the impact of fine-tuning in reducing stereotype responses.
Figure 1 illustrates the effect of prompt variation and LLM fine-tuning on the gender-neutral predicted outcome. The novelty of our work stems from integrating manual dataset curation, multiple debiasing prompt strategies, and fine-tuning under a single protocol to analyze an LLM for societal bias identification and alleviation, relevant to sensitive real-world applications such as medical imaging and EHR maintenance. We grouped the literature on bias in LLMs into four perspectives: datasets for bias and cognitive associations; bias detection and evaluation frameworks; bias mitigation approaches; and bias in specialized domains.
Researchers are continually generating datasets to enable bias evaluation and semantic association analysis in LLMs. For instance, in cognitive psychology and linguistics, free associations are always pivotal in organizing the conceptual knowledge. Simulating the same association in the latent distribution of LLMs, Abramski et al.18 have constructed a dataset, LLM World of Words (LWOW). The LWOW English free association norms dataset, comprising millions of responses from three LLMs: Mistral-7B14, Llama-3.1-8B19, and Claude-3-5-haiku-latest20. It is inspired by Small World of Words (SWOW)21, the largest dataset of human English free association norms, which has been widely employed in a variety of psychological and linguistic investigations. Further, LWOW helps build a cognitive network comprising nodes, each representing a word, with nodes corresponding to semantically similar words that are closer together in the network. This helps evaluate bias in LLMs' output by estimating the distance between words in the artificial cognitive network as a key metric. One major stumbling block in using proprietary LLMs is that their internals are inaccessible. Even though significant efforts have been made in these models to address bias, alignment datasets are still scarce. To address this concern, a dataset named GenderAlign is proposed in Zhang et al.22 to mitigate gender bias in the LLMs. UnStereoEval23, a benchmark dataset, is proposed to investigate stereotypical gender bias in occupations and emotions. Their findings reveal a low level of fairness across 28 different LLMs. Bartl and Leavy24 developed a dataset, Tiny Heap, in which sentences featuring stereotypical mentions are replaced with their neutral equivalents and fine-tuned three language models (GPT-225, PHI-1.526, and RoBERTa27). In their findings, they observe a significant reduction in the models' gender-stereotypical tendencies.
Several multilayer frameworks have been proposed to identify and alleviate biases in LLMs. In Raza et al.28, a framework, NBIAS, is proposed that comprises four layers: dataset creation, model development, bias mitigation, and evaluation. The dataset within the framework is built from diverse domains, including healthcare, social media, and employment portals. They showcase the effectiveness of their model by outperforming the baseline (BERT29) by 1% to 8% in fairness. In another such framework, GenderCARE30, a strategy to mitigate gender bias in LLMS is proposed. In their extensive experimental setup, they effectively reduced gender bias by an average of 35% across twelve different LLMs. A framework, BiasAlet31, automatically detects social bias in the open text generated by the LLMs. It comes with some limitations: firstly, the study is conducted on a synthesized dataset due to the unavailability of a benchmark to evaluate bias in the LLM's open-text generation, and secondly, it is constructed on the antiquated dataset SBIC32, which makes it hard to distinguish between the relevance of implicit bias and the bias in the dataset itself. Bias in human-generated data may be introduced into models trained on it. The use of such models is controversial in high-stakes jobs, where their output may adversely impact disadvantaged groups. To tackle this, a framework, BiasBuster33, is designed to detect, evaluate, and mitigate cognitive bias in the LLMs. Aligned with this, in another work34, researchers propose an interactive framework to generate fair, logical, and critical text through System 2 prompts (designed to let the LLM think thoughtfully and slowly) that complement self-refined and implicative prompts. However, the framework is limited to the tasks within the LLMs' latent space. Dong et al.35 develop a framework that utilizes indirect probing to mitigate and evaluate gender bias in ten open-source LLMs. In their probing method, without exploiting direct stereotypical mentions, they disclose indirect gender bias.
Lin et al.36 investigate the political bias in text generation by the LLMs for both closed-ended (GPT-3.5-turbo, and GPT-437) and open-ended models (Llama-2-7B13, Mistral-7B14, Vicuna29). They determined whether the model-generated text induced left- or right-leaning media bias. Furthermore, they devised a mitigation strategy by fine-tuning the model and by providing additional debiased prompts during text generation. After applying the bias mitigation technique, the model tends to generate neutral text; left- or right-leaning media do not influence that. In line with this, Raj et al.17 have proposed a debiasing solution, Social Contact Debiasing (SCD), based on the contact hypothesis in psychology, which includes prompt generation that comprehends the ideologies of different social groups to reduce prejudice in the text generation of three open-sourced LLMs. In parallel with this, Kamruzzaman and Kim38 have proposed a social debiasing technique that exploits System 1 and System 2 chain-of-thought prompting to mitigate across twelve bias dimensions in five LLMs (GPT-3.5, GPT-437, Llama-2-7B13, Mistral-7B14, and Gemini-1.039). Here, the System 1 prompt is intended to make the LLM respond quickly, while the System 2 prompt is meant to guide it toward more thoughtful and deliberate answers. Although various studies were conducted that make use of prompt engineering to mitigate the bias in LLMs, hardly anyone has probed the impact of prompt variation on LLMs' output. To address this issue, Hida et al.40 have investigated the sensitivity of the outputs of the twelve open-sourced LLMs to prompt variation and analyzed their impact on task performance and bias trade-offs. Their findings reveal that debiasing results are sensitive to the prompt; less bias in the models' output leads to lower task performance. Kamboj et al.41 have proposed a post-processing approach to mitigate gender bias in contextualized embeddings of a T5 model (Text-To-Text-Transfer-Transformer model42). Oba et al.43 provide manually created textual preambles as prompts to LLMs to suppress their biased generation.
Cognitive biases, which have been a source of diagnostic error in healthcare for decades, are at risk of being imprinted into and amplified by large language models (LLMs) in clinical decision-making. To combat this risk, Mahajan et al.44 propose that mitigation strategies for implementing these technologies should centre on three themes: first, self-reflection (iterative re-evaluation of outputs), second, contextual reasoning (incorporating full patient history and evidence-based guidelines), and finally, transparent reasoning traces (explanations of reasoning processes made available for audit). LLMs, with their ubiquitous ability, are now also widely used to generate programming code. Hence, this is a prominent concern for researchers to investigate the adverse effects of any social bias in generated code. If such bias is detected, the corresponding mitigation techniques need to be devised. In the same direction, Huang et al.45 proposed a social bias evaluation and mitigation technique and tested it on five widely used LLMs. In recent times, we have seen tremendous advancements in LLM architectures and their ability to generate responses that sound human-like. Whether LLMs can serve as proxies for humans in decision-making remains underexplored and warrants further research. In this direction, a framework and a dataset are curated by Tjuatja et al.46 to investigate the ability of LLMs to give human-like responses in a survey questionnaire.
Despite these advances, three research gaps persist. First, previous research tends to focus on narrow types of bias (e.g., gender or political) or specific domains (e.g., a particular topic). Second, although prompt engineering is pervasive, few studies examine the effects of systematic prompt variation on LLM output. Third, limited research addresses debiasing in the challenging resource-restricted fine-tuning setting of open-source LLMs relevant to critical domains such as healthcare. Addressing these gaps, a single bias mitigation and evaluation protocol is presented that can help measure stereotypical bias across various model architectures, incorporating fine-tuning under computational constraints and assessing the robustness of model decisions against bias metrics.