Addressing Gender Bias in Large Language Models
| dc.contributor.author | Zhou, Hanqing | |
| dc.contributor.supervisor | Inkpen, Diana | |
| dc.contributor.supervisor | Kantarci, Burak | |
| dc.date.accessioned | 2026-12-03T20:28:40Z | |
| dc.date.issued | 2026-12-03 | |
| dc.description.abstract | Gender bias, along with biases related to race, nationality, and religion, in generative large language models (LLMs) is an important issue receiving attention from both researchers and industry. These biases can affect model performance and fairness, reinforce stereotypes, and lead to unequal treatment of different groups. Addressing gender representation in natural language processing (NLP) is necessary for building fair and inclusive technologies. To reduce gender bias in generative models, this thesis studies three main approaches: prompt engineering, fine-tuning with neutral data, and model distillation from larger teacher models to smaller student models. These approaches aim to reduce biased outputs while preserving the original meaning and fluency of the text. This thesis makes three main contributions to gender bias mitigation in large language models. The first contribution examines prompt engineering as a direct method to reduce gender bias in generative LLMs. Gender bias, along with other demographic biases, can appear in model outputs and affect real-world applications. Several generative LLMs are evaluated to measure gender bias in zero-shot generation settings. Carefully designed prompts are used to guide models to produce gender-neutral text instead of biased content. The results show clear improvements in gender bias scores compared to standard zero-shot generation, with reductions of up to 46\%. The impact of model precision and quantization is also examined to understand how technical settings influence bias mitigation. These findings show that prompt design alone can reduce bias without changing model parameters. The second contribution investigates gender bias mitigation in LLM-generated text using activation steering and LoRA-based fine-tuning. Contrastive examples from WinoGender and WinoBias are first used to build steering vectors. These vectors are applied during generation to guide the model toward less gender-biased outputs without changing the full model parameters. LoRA fine-tuning is then used with rewrite-style examples to help the model produce more gender-neutral text while keeping the meaning close to the original input. The paper compares four settings: baseline generation, activation steering only, LoRA fine-tuning only, and LoRA fine-tuning with activation steering. The results show that activation steering alone can reduce some gender-coded terms, but it may also shift the gendered pattern. LoRA fine-tuning gives more balanced reductions, and combining LoRA with steering works best for some model families. The third contribution introduces model distillation within a teacher–student framework. A larger teacher model is prompted to rewrite gender-biased sentences into neutral versions. These rewritten sentences are used to fine-tune smaller open-source student models. The dataset is divided so that part of the biased data is used for distillation training and the remaining part is used for evaluation. The effectiveness of distillation is measured by examining reductions in biased classifications and by computing semantic similarity scores to ensure meaning is preserved. The results show that bias mitigation ability can be transferred from larger models to smaller models while maintaining text consistency. Addressing gender bias is part of the broader goal of ensuring fairness in AI systems. This work highlights the importance of continuous evaluation and improvement of LLMs to promote fairness across diverse linguistic and demographic contexts. | |
| dc.identifier.uri | http://hdl.handle.net/10393/52316 | |
| dc.identifier.uri | https://doi.org/10.20381/ruor-32435 | |
| dc.language.iso | en | |
| dc.publisher | Université d'Ottawa | University of Ottawa | |
| dc.subject | Artificial Intelligence | |
| dc.subject | Natural language processing | |
| dc.title | Addressing Gender Bias in Large Language Models | |
| dc.type | Thesis | en |
| thesis.degree.discipline | Génie / Engineering | |
| thesis.degree.level | Doctoral | |
| thesis.degree.name | PhD | |
| uottawa.department | Science informatique et génie électrique / Electrical Engineering and Computer Science |
Fichiers
Trousse originale
1 - 1 sur 1
En cours de chargement...
- Nom:
- Zhou_Hanqing_2026_thesis.pdf
- Taille:
- 2.06 MB
- Format:
- Adobe Portable Document Format
Trousse de licence
1 - 1 sur 1
En cours de chargement...
- Nom:
- license.txt
- Taille:
- 2.51 KB
- Format:
- Item-specific license agreed upon to submission
- Description:
