Titolo della tesi: Quantifying and Addressing Bias in Large Language Models: From Detection to Mitigation
This doctoral thesis investigates the detection and mitigation of social bias in Large Language Models (LLMs) and Instruction-Following Language Models (IFLMs). Although these models have achieved remarkable success in a wide variety of Natural Language Processing (NLP) tasks, they often reproduce and even amplify existing social stereotypes present in the large-scale web data on which they are trained.
The first part of this research focuses on measuring the quantity of biases in IFLMs. To achieve this result, we introduced a new resource named \pat{}, composed of a dataset and a set of evaluation metrics specifically designed to quantify stereotypical associations. \itaPat{} is the Italian version of \pat{} to detect biases and stereotypes of Italian culture. Our findings revealed that IFLMs consistently generate outputs that are biased across multiple social dimensions, such as gender, race, and age.
The second part of the work investigates the mechanisms behind these behaviors. Through a series of controlled experiments, we observed that LLMs have a great memorization capacity, achieving excellent performance on previously encountered data. However, they often demonstrate a limited generalization ability to unseen inputs. This effect is particularly evident under extreme domain adaptation conditions: when exposed to domain-specific data, model performance increases, underscoring their strong reliance on memorized patterns.
Based on these results, we explored the possibility of debiasing using the extreme domain adaptation strategy on open LLM models on the PANDA dataset, which consists of anti-stereotyped sentences. To ensure the approach remained computationally efficient, we used Low-Rank Adaptation (LoRA), a Parameter-Efficient Fine-Tuning (PEFT) method. The results demonstrate that this technique can be a viable way to mitigate social bias while preserving task performance.
In summary, this thesis provides a comprehensive analysis of social bias in various LLMs and IFLMs, introducing \pat{} as a novel resource for bias assessment. Furthermore, a scalable and effective solution for mitigating a pre-trained model is proposed. Ultimately, I hope that work like this will lead to more equitable and accountable NLP systems.