Social Bias in Large Language Models For Bangla: An Empirical Study on Gender and Religious Bias

Jayanta Sadhu, Maneesha Rani Saha, Rifat Shahriyar
Bangladesh University of Engineering and Technology (BUET)
{1705047, 1805076}@ugrad.cse.buet.ac.bd, [email protected]
Abstract

The rapid growth of Large Language Models (LLMs) has put forward the study of biases as a crucial field. It is important to assess the influence of different types of biases embedded in LLMs to ensure fair use in sensitive fields. Although there have been extensive works on bias assessment in English, such efforts are rare and scarce for a major language like Bangla. In this work, we examine two types of social biases in LLM generated outputs for Bangla language. Our main contributions in this work are: (1) bias studies on two different social biases for Bangla (2) a curated dataset for bias measurement benchmarking (3) two different probing techniques for bias detection in the context of Bangla. This is the first work of such kind involving bias assessment of LLMs for Bangla to the best of our knowledge. All our code and resources are publicly available for the progress of bias related research in Bangla NLP. 111https://github.com/csebuetnlp/BanglaSocialBias

Social Bias in Large Language Models For Bangla: An Empirical Study on Gender and Religious Bias


Jayanta Sadhu, Maneesha Rani Saha, Rifat Shahriyar Bangladesh University of Engineering and Technology (BUET) {1705047, 1805076}@ugrad.cse.buet.ac.bd, [email protected]


1 Introduction

The rapid advancement of Large Language Models (LLMs) has significantly impacted various domains, particularly in social influence and the technology industry Kasneci et al. (2023); Dong et al. (2024b). Given their growing influence, it is crucial to ensure LLMs are free from harmful biases to avoid legal and ethical issues Weidinger et al. (2021); Deshpande et al. (2023). In the context of computing systems, bias is where sociotechnical systems systematically and unfairly discriminate against certain individuals or social groups in favor of others Friedman and Nissenbaum (1996); Blodgett et al. (2020). Hence, analyzing bias and stereotypical behavior in LLMs is vital for identifying and mitigating existing biases, thereby fostering the development of responsible and ethical models.

Bangla, the sixth most spoken language globally with over 230 million native speakers constituting 3% of the world’s population222https://w.wiki/Psq, is underrepresented in NLP literature due to a lack of quality datasets (Joshi et al., 2020). This gap limits our understanding of bias characteristics in language models, including LLMs. The need to measure bias in Bangla arises from this gap. Historically, societal views in Bangla-speaking regions have undervalued women, leading to employment and opportunity discrimination (Jain et al., 2021; Tarannum, 2019). Additionally, the region’s significant religious diversity, primarily among Muslims and Hindus, makes Bangla a valuable case study for examining gender and religious biases, two important social biases.

In this study, we pose the question, does multilingual LLMs exhibit gender and religious bias when prompted with Bangla?. To address this, we present: (1) a curated dataset specifically designed to detect gender and religious biases in Bangla, (2) thorough bias probing analysis on both popular and state-of-the-art closed and open-source LLMs, and (3) an empirical study on bias through LLM-generated responses.

Our findings reveal significant biases in LLMs for the Bangla language and highlight shortcomings in their generative power, underscoring the need for future de-biasing efforts.

2 Related Work

Several works on bias measurements in language models are done in recent years Mehrabi et al. (2021). Existence of gender bias has been exposed in tasks like Natural Language Understanding Bolukbasi et al. (2016); Gupta et al. (2022); Stanczak and Augenstein (2021) and Natural Language Generation Sheng et al. (2019); Lucy and Bamman (2021); Huang et al. (2021) .Benchmarks such as WinoBiasZhao et al. (2018) and WinogenderRudinger et al. (2018) have been used to measure gender biases in LMs. Preliminary studies on religious and ethnic biases were done in some works. (Milios and BehnamGhader, 2022; Navigli et al., 2023; Abid et al., 2021). Works like Nadeem et al. (2020); Nangia et al. (2020) provide frameworks and datasets for different types of biases including gender and religion.

Recent studies have conducted experiments on determining gender stereotypes in LLMs Kotek et al. (2023); Ranaldi et al. (2023); Dong et al. (2024a) and debiasing techniques Gallegos et al. (2024); Ranaldi et al. (2023), but most of them are on English. There are a few works on multilingual settings Zhao et al. (2024); Vashishtha et al. (2023), but such efforts are not common for Bangla. The most preliminary work on Bangla bias detection is found in the works of Sadhu et al. (2024), that includes static and contextualized embeddings. Notable works on bias evaluation dataset creation are done in Das et al. (2023).

3 Data

We use two strategies for LLM probing: Template-based and Naturally sourced. The template-based approach uses curated templates for gendered persona or religious group predictions to reveal biases in LLMs. Naturally sourced sentences, on the other hand, are used to make explicit predictions about groups or genders, helping to understand the LLM’s ability to interpret natural scenarios.

Template Based: We create semantically bleached templates with placeholders for specific traits that are filled with adjective words to create prompts. We use these prompts for gendered role prediction or religious identity prediction. The adjective words encompass different categories used to describe human nature e.g. Personality Based, Outlook Based and Communal Based. We also include Occupation as a category to understand the association between gender and religion with occupation. We create templates to intermix human professions with traits to study if the addition of occupation has any effect on role prediction. We were careful to not induce any stereotypes into the templates and make sure all the adjective words and occupations are equally likely for any gender or religious community. In total, we have 2772 template sentences by combining both the categories (see appendix A.1 for more details).

Naturally Sourced: We use the BIBED dataset Das et al. (2023), specifically the data from Explicit Bias Evaluation(EBE) as a source of naturally occurring scenarios. The sentences are structured in pairs, each containing one identifying subject from a group of either male-female words(for gender) or Hindu-Muslim words (for religion). We replace the main identity dimension in the sentence with _ (gap) and give the model options to select between the possible identities. We provide the examples in appendix A.2. However, there are many instances where one a sentence without the subject is not equally probable for both the contrasting identities. In order to curate sentences that serve our cause, we manually select these sentences to provide equal opportunity. Details of the selection process is given in appendix A.3. After the curation process, we are left with 2600 pairs for gender and 1627 pairs for religion.

[Uncaptioned image]
Table 1: The prompt template and an example of prompt for gender role prediction (Note that the translations are only for understanding and not used in prompting)

4 Experimental Setup

4.1 Model Selection

For our experiment we provide results for three state-of-the-art LLMs: Llama3-8b (version: Meta-Llama-3-8B-Instruct 333meta-llama/Meta-Llama-3-8B-Instruct) (AI@Meta, 2024), GPT-3.5-Turbo 444gpt-3-5-turbo and GPT-4o 555gpt-4o. Since Bangla is a low resource language, not many models could generate the expected response we required. For our experimentation, we also tried some other models (mentioned in limitations) but none could produce any presentable result that serves our purpose.

4.2 Prompt

We design prompts to best fit the generation task. In the case of template based probing, we prompt the model for gendered role or religious identity selection, and in the case of naturally sourced probing, we use fill in the blanks approach. We provide an example of prompt creation for gender in template based probing in table 1.

Since the task of token prediction and generation is a stochastic process, we repeat each prompt twice to bring stable result. In table 2 we provide the number of prompts for each model.

Probing Method Category # Prompts
Template Based Gender 4256
Religion 1288
Naturally Sourced Gender 5200
Religion 3254
Table 2: Probing Methods, Categories, and Number of Prompts for each LLM

4.3 Evaluation Setup

Evaluation Metric: We use a widely used fairness measurement metric, Disparate Impact(DI) Feldman et al. (2015) for evaluation. It is computed by P(Y=1|S1)P(Y=1|S=1)𝑃𝑌conditional1𝑆1𝑃𝑌conditional1𝑆1\frac{P(Y=1|S\neq 1)}{P(Y=1|S=1)}divide start_ARG italic_P ( italic_Y = 1 | italic_S ≠ 1 ) end_ARG start_ARG italic_P ( italic_Y = 1 | italic_S = 1 ) end_ARG The identifiers of our experiments are all binary (e.g: male-female, hindu-muslim), so we can apply this to our cause with empirical estimation. In task Q, for a category a, where the possible outcomes are x, y, the DI calculation is

DIQ(a)=P(Q=x|a)P(Q=y|a)𝐷subscript𝐼𝑄𝑎𝑃𝑄conditional𝑥𝑎𝑃𝑄conditional𝑦𝑎DI_{Q}(a)=\frac{P(Q=x|a)}{P(Q=y|a)}italic_D italic_I start_POSTSUBSCRIPT italic_Q end_POSTSUBSCRIPT ( italic_a ) = divide start_ARG italic_P ( italic_Q = italic_x | italic_a ) end_ARG start_ARG italic_P ( italic_Q = italic_y | italic_a ) end_ARG

The empirical estimation we are using is

DIQ(a)=Cx(a)Cy(a)𝐷subscript𝐼𝑄𝑎subscript𝐶𝑥𝑎subscript𝐶𝑦𝑎DI_{Q}(a)=\frac{C_{x}(a)}{C_{y}(a)}italic_D italic_I start_POSTSUBSCRIPT italic_Q end_POSTSUBSCRIPT ( italic_a ) = divide start_ARG italic_C start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT ( italic_a ) end_ARG start_ARG italic_C start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT ( italic_a ) end_ARG

where Czsubscript𝐶𝑧C_{z}italic_C start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT represents the occurrence frequency of z class elements. For our experiments, we consider DIG𝐷subscript𝐼𝐺DI_{G}italic_D italic_I start_POSTSUBSCRIPT italic_G end_POSTSUBSCRIPT and DIR𝐷subscript𝐼𝑅DI_{R}italic_D italic_I start_POSTSUBSCRIPT italic_R end_POSTSUBSCRIPT for gender and religion predictions and (x=female,y=male)formulae-sequence𝑥𝑓𝑒𝑚𝑎𝑙𝑒𝑦𝑚𝑎𝑙𝑒(x=female,y=male)( italic_x = italic_f italic_e italic_m italic_a italic_l italic_e , italic_y = italic_m italic_a italic_l italic_e ) and (x=Hindu,y=Muslim)formulae-sequence𝑥𝐻𝑖𝑛𝑑𝑢𝑦𝑀𝑢𝑠𝑙𝑖𝑚(x=Hindu,y=Muslim)( italic_x = italic_H italic_i italic_n italic_d italic_u , italic_y = italic_M italic_u italic_s italic_l italic_i italic_m ) for the two bias evaluations respectively. For any fair LLM, it is obvious that the DI score for any category would be close to 1.

5 Results and Evaluation

Refer to caption
(a) DI Scores for Gender Bias(Positive Traits)
Refer to caption
(b) DI Scores for Gender Bias(Negative Traits)
Refer to caption
(c) DI Scores for Religious Bias(Positive Traits)
Refer to caption
(d) DI Scores for Religious Bias(Positive Traits)
Figure 1: Bias in role selection for multiple LLMs in the case of template based probing for gender and religion data. We present positive and negative traits result separately. The upper bound is set to 3 and 4 for gender and religion respectively. The neutral line (DI=1)𝐷𝐼1(DI=1)( italic_D italic_I = 1 ) is highlighted in all the figures.

5.1 Template Based Probing Results

We present the template based results in figure 1. We report the results based on 6 different categories and include the results for positive and negative traits separately for more nuanced variations.

Gender Bias: Our findings indicate GPT-3.5 exhibits the most gender bias, with a disparity impact score above 1 in all categories, suggesting a bias towards the feminine gender. Llama-3 shows significant bias in the opposite direction, with scores well below neutral, indicating male gender bias. GPT-4o displays less gender bias, with scores close to 1 in some instances. Adding occupation to the probing strategy generally reduces bias across most categories. GPT-3.5 moves closer to neutral for positive traits, and mostly for negative traits except Outlook+Occupation. We also see the opposite shift in some cases, like GPT-4o shifting for Personality+Occupation and Communal+Occupation in positive traits. It can also be seen that GPT-3.5 shifts highly in the opposite direction when we move from positive traits to negative traits, indicating its tendency to associate the negative traits with male gender.

Religious Bias: An interesting observation in this case is the shift of model scores from >1 to <1 when we change the category association from positive traits to negative traits. This indicates that all the models tend to associate negative traits with Muslim community and positive traits with Hindu community, a clear indication of harmful social stereotyping. Llama-3 shows high level of bias (DI > 2) in Ideology category for both traits. The addition of occupation affects the DI scores mostly for Ideology category for both traits and not so much for Outlook. Thus we don’t see much contribution of Occupation on Outlook to change any behaviour of the models.

Refer to caption
Figure 2: Bias results in Naturally Sourced(EBE) probing method for multiple LLMs. The upper bound is set to 2

5.2 Naturally Sourced Probing Results

Gender Bias: Figure 2 reveals that GPT-4o exhibits the highest DI score among the three models, indicating a significant disparity (favoring one gender over another) in its performance. In contrast, GPT-3.5 has a DI score slightly above neutral line, showing a relatively balanced performance with minor disparities. LLaMA-3, with a DI score below neutral line, indicates a disparity that favors the opposite gender compared to GPT-4o, yet is closer to the fairness threshold than GPT-4.

Religious Bias: the DI scores for religious bias in Figure 2 are comparatively closer among all models. GPT-4o and LLaMA-3 both exhibit DI scores below the neutral line, suggesting some level of bias, though less pronounced than the gender disparity observed in GPT-4. GPT-3.5, with a DI score just above the neutral line, indicates a slightly more balanced performance in religious contexts.
This implies that while improvements are needed across all models for religious contexts, the disparities are less severe than those related to gender.

Key Take-away: We found significant bias for both gender and religion for all three models utilizing both our probing techniques.

6 Conclusion

To summarize, by conducting experiments using two different probing techniques and dataset, we investigate gender and religion bias in multilingual LLMs in the context of Bangla. Our work demonstrates the existence of bias in both categories on different degrees. This emphasizes the need for de-biasing techniques to be applied for the use of LLMs in sensitive tasks in realm of Bangla Language and developing proper linguistics nuanced and culturally aware framework for bias measurement. In future, we plan to investigate the effects of bias in downstream applications of Bangla language models and expand to other social and cultural bias areas.

Limitations

Our study utilized closed-source models like GPT-3.5-Turbo and GPT-4o, which present reproducibility challenges as they can be updated at any time, potentially altering responses regardless of temperature or top-p settings. We also attempted to conduct experiments with other state-of-the-art models such as Mistral-7b-Instruct 666mistralai/Mistral-7B-Instruct-v0.2 (Jiang et al., 2023), Llama-2-7b-chat-hf 777meta-llama/Llama-2-7b-chat-hf (Touvron et al., 2023), and OdiaGenAI-BanglaLlama 888OdiaGenAI/odiagenAI-bengali-base-model-v1 (Parida et al., 2023). However, these efforts were hindered by frequent hallucinations and an inability to produce coherent and presentable results. This issue underscores a broader challenge: the current limitations of LLMs in processing Bangla, a low-resource language, indicating a need for more focused development and training on Bangla-specific datasets.

Another limitation of our study is the constrained template based probing, where there is more scope of expansion. Real world downstream tasks such as personalized dialogue generation (Zhang et al., 2018), summarization (Hasan et al., 2021, Bhattacharjee et al., 2023), and paraphrasing (Akil et al., 2022) could also be considered for analyzing bias in LLMs for Bangla.

We also acknowledge that our results may vary with different prompt templates and datasets, constraining the generalizability of our findings. Stereotypes are likely to differ based on the context of the input and instructions. Finally our techniques all utilizes binary identities(male-female, Hindu-Muslim) for the constraints on dataset and techniques used. Despite these limitations, we believe our study provides essential groundwork for further exploration of social stereotypes in the context of Bangla for LLMs.

Ethical Considerations

Our study focuses on binary gender due to data constraints and existing literature frameworks. We acknowledge the existence of non-binary identities and recommend future research to explore these dimensions for a more inclusive analysis. The same goes for religion. We acknowledge the existence of many other religions in the Bangla-speaking regions, but we focused on the two main religion communities of this ethnolinguistic community.

We acknowledge the inclusion of data points in our dataset that many may find offensive. Since these data are all produced from social media comments, we did not exclude them to reflect real-world social media interactions accurately. This approach ensures our findings are realistic and relevant, highlighting the need for LLMs to effectively handle harmful content. Addressing such language is crucial for developing AI that promotes safer and more respectful online environments.

References

Appendix

Appendix A Data Preparation

A.1 Preparing Templates

Figure 3 categorizes templates with various placeholder types that we used for role prediction based on religion and gender. The placeholders are designed to fit different adjective words (illustrated in Figure 4), helping to identify the implied group (religion or gender) through various descriptive angles.

Refer to caption
Figure 3: Prompt for Bias in Religion and Gender Role Prediction
Refer to caption
Figure 4: Categories of Adjective words used for templates

A.2 Naturally Sourced Sentences

Figure 5 groups sentences into "Gender" and "Religion" biases, providing original (root) sentences, their paired sentences with altered gender or religion, and the necessary modifications to use them as datapoints. For each root sentence, we create a pair sentence by switching gender or religion references. The modifications indicate how placeholders can be used to test for bias, with corresponding answers for each possible substitution.

Refer to caption
Figure 5: Naturally Sourced (EBE) Sentences Examples for Religion and Gender Bias Prediction

A.3 Naturally Sourced Sentences Selection Criteria

The selection criteria for the dataset are based on ensuring meaningful and contextually accurate sentences when evaluating gender and religion biases. If altering the gender or religion rendered the sentences factually incorrect or nonsensical, we rejected those as illustrated in Figure 6. For instance, sentences involving specific historical figures or roles intrinsically linked to a particular gender or religion were excluded. The goal was to maintain the integrity of context-specific information, such as unique cultural, historical, or biological aspects, which would be distorted by changing the gender or religion. This approach ensures that the dataset reflects accurate and unbiased evaluations without compromising the original meaning.

Refer to caption
Figure 6: Examples of Rejected Sentence and Reason for Rejection