Mitigating Bias in RAG: Controlling the Embedder
Taeyoun Kim, Jacob Springer, Aditi Raghunathan, Maarten Sap
TL;DR
This work tackles bias in retrieval augmented generation (RAG) by modeling how biases from the embedder, LLM, and corpus interact. It introduces a bias metric for each component and a linear model, $R_b = s\cdot E_b + L_b + \epsilon$, where $s$ is the sensitivity of the RAG to embedder bias, $L_b$ is the LLM bias, and $\epsilon$ captures extraneous knowledge conflict. Through extensive experiments across 6 LLMs and 120 embedders using gender and political bias case studies (GenderBias-QA and PoliticBias-QA), the authors demonstrate that reverse-biasing the embedder can debias the overall RAG system with minimal loss in utility, and that sensitivity varies by bias type and model. They further show that a linear relationship between embedder bias and RAG bias persists under fixed corpora and persists across several test conditions, enabling robust debiasing strategies such as fine-tuning and projection-based methods, though stochastic sampling offers limited relief. The results underscore the practical insight that addressing bias via the embedder — rather than solely the LLM or corpus — can yield fairer RAG systems, while also outlining limitations and directions for extending the analysis to more complex, real-world scenarios.
Abstract
In retrieval augmented generation (RAG) systems, each individual component -- the LLM, embedder, and corpus -- could introduce biases in the form of skews towards outputting certain perspectives or identities. In this work, we study the conflict between biases of each component and their relationship to the overall bias of the RAG system, which we call bias conflict. Examining both gender and political biases as case studies, we show that bias conflict can be characterized through a linear relationship among components despite its complexity in 6 different LLMs. Through comprehensive fine-tuning experiments creating 120 differently biased embedders, we demonstrate how to control bias while maintaining utility and reveal the importance of reverse-biasing the embedder to mitigate bias in the overall system. Additionally, we find that LLMs and tasks exhibit varying sensitivities to the embedder bias, a crucial factor to consider for debiasing. Our results underscore that a fair RAG system can be better achieved by carefully controlling the bias of the embedder rather than increasing its fairness.
