Leveraging Large Language Models for Bias Detection and Mitigation in Data Analytics Models
Manideep Marripudugala · 2025
Bias in data analytics models presents significant challenges, leading to unfair outcomes and undermining trust in artificial intelligence systems. Traditional methods for bias detection often rely on statistical techniques that may not capture complex patterns embedded within data. This study proposes a novel approach utilizing Large Language Models (LLMs) to detect and mitigate bias in data analytics models. By harnessing the deep contextual understanding of LLMs, we aim to identify subtle biases that standard methods might overlook. We developed a framework where LLMs are employed to analyze both the input data and the outputs of predictive models to detect bias related to sensitive attributes such as race, gender, and age. The LLMs are fine-tuned on datasets annotated for bias-related features, enabling them to recognize and interpret nuanced patterns of discrimination. To validate our approach, we conducted experiments on real-world datasets, including the COMPAS dataset for criminal recidivism risk assessment and the Adult Income dataset from the UCI Machine Learning Repository. Our LLM-based method successfully identified biased predictions and provided insights into their origins. For instance, in the COMPAS dataset, the LLM detected disproportionate risk assessments against certain demographic groups. Upon applying our mitigation strategies, there was a notable improvement in the fairness metrics without compromising the overall model performance. The results demonstrate that LLMs can be powerful tools for enhancing the fairness of data analytics models. They offer a more comprehensive understanding of bias by considering contextual information that traditional statistical methods may miss. This research contributes to the field by providing an effective methodology for bias detection and mitigation, promoting the development of more equitable AI systems.