Prompting Fairness: Integrating Causality to Debias Large Language Models

Jingling Li, Zeyu Tang, Xiaoyu Liu, Peter Spirtes, Kun Zhang, Liu Leqi, Yang Liu · DOI

Abstract

Large language models (LLMs), despite their remarkable capabilities, are susceptible to generating biased and discriminatory responses. As LLMs increasingly influence high-stakes decision-making (e.g., hiring and healthcare), mitigating these biases becomes critical. In this work, we propose a causality-guided debiasing framework to tackle social biases, aiming to reduce the objectionable dependence between LLMs' decisions and the social information in the input. Our framework introduces a novel perspective to identify how social information can affect an LLM's decision through different causal pathways. Leveraging these causal insights, we outline principled prompting strategies that regulate these pathways through selection mechanisms. This framework not only unifies existing prompting-based debiasing techniques, but also opens up new directions for reducing bias by encouraging the model to prioritize fact-based reasoning over reliance on biased social cues. We validate our framework through extensive experiments on real-world datasets across multiple domains, demonstrating its effectiveness in debiasing LLM decisions, even with only black-box access to the model.

Introduction

Large Language Models (LLMs) like GPT-4 and Claude have become central to modern AI applications. However, they frequently inherit and amplify societal biases present in their training data—stereotypically associating specific occupations with gendered pronouns or making biased decisions based on socioeconomic status. While fine-tuning can mitigate these issues, it is often impractical for proprietary "black-box" models accessible only via API.

This paper addresses the challenge of debiasing LLMs through a principled causal lens. The authors argue that bias is not merely a statistical error but an objectionable causal dependence between social information and model decisions. By mapping these dependencies, they propose a systematic framework to identify and "block" biased pathways, nudging models toward fact-based reasoning.

The Causal Framework of LLM Bias

The researchers utilize Directed Acyclic Graphs (DAGs) to represent the flow of information during the decision-making process. They identify that bias often arises from spurious correlations in training data, where social categories (e.g., gender) are confounded with specific scenarios or entities through "selection variables."

Causal pathways illustrating how social information and facts influence LLM decisions in training data and prompt modulation.

As shown in the causal graphs, social information can influence decisions through multiple routes. The framework identifies three primary intervention strategies to regulate these pathways:

  1. Nudging toward facts: Prioritizing "social-agnostic" factual representations over social shortcuts.
  2. Counteracting selection bias: Explicitly instructing the model to assume equal distributions across social categories (e.g., "Assume men and women are equally likely to be doctors").
  3. Nudging away from social cues: Directing the model to ignore explicit social identifiers in the prompt.

Dual Directional Prompting (DDP)

The core innovation of this work is Dual Directional Prompting (DDP). DDP is designed to force the model to align its reasoning with its own neutral logic. Instead of presenting a potentially biased question directly, DDP follows a four-step workflow to anchor the response in factual evidence.

The DDP workflow and reasoning contrast: anchoring responses in neutral logic to bypass biased social shortcuts.

In the DDP process, specific social information (e.g., "slim" vs "obese") is first replaced with neutral labels like "Person X" and "Person Y." The LLM is asked to solve this "Base Question" first. The model's neutral answer is then fed back into the original question as a factual anchor. By forcing the model to solve a neutral version of the problem first, DDP activates the model's latent world knowledge, making it significantly harder for the model to revert to biased shortcuts when the social context is reintroduced.

Evaluation and Key Results

The framework was validated across three major benchmarks: WinoBias (gender stereotypes), BBQ (multi-dimensional bias), and Discrim-Eval (decision-making scenarios). The results demonstrate that DDP consistently outperforms standard prompting and Chain-of-Thought (CoT) methods:

  • WinoBias: GPT-4’s performance gap between pro-stereotypical and anti-stereotypical scenarios in coreference resolution dropped from 15.47% to just 2.17%.
  • BBQ: DDP achieved the highest accuracy in 8 out of 9 social categories, showing dramatic improvements in subtle categories like physical appearance and socioeconomic status.
  • Discrim-Eval: The method universally reduced relative gaps in decision-making across age, ethnicity, and gender demographics by encouraging fact-based reasoning.

Conclusion

This work provides a robust foundation for LLM debiasing by treating bias as a shortcut that bypasses factual reasoning. While DDP depends on the model's underlying world knowledge being accurate, it represents a significant step toward more reliable and equitable AI systems. Future work may involve using these causal constraints to generate preference pairs for training more robust reward models in Reinforcement Learning from Human Feedback (RLHF).

Summary updated

BibTeX
@inproceedings{li2025prompting,
  author = {Jingling Li and Zeyu Tang and Xiaoyu Liu and Peter Spirtes and Kun Zhang and Liu Leqi and Yang Liu},
  title = {{Prompting Fairness: Integrating Causality to Debias Large Language Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=7GKbQ1WT1C},
}
Figure