TL;DR
This paper explores four in-context learning methods to improve group fairness in Large Language Models (LLMs) when applied to tabular data. They demonstrate that techniques like prompt optimization and strategic few-shot example selection can significantly enhance demographic parity without substantial performance degradation, offering practical guidance for deploying LLMs responsibly on tabular tasks.
What Problem Does This Paper Address?
Large Language Models (LLMs) are increasingly being used for tabular data prediction, especially in low-data scenarios where they leverage their pre-trained knowledge. However, a critical challenge arises: LLMs can exhibit biases, leading to unfair outcomes across different demographic groups. This "group fairness" issue is distinct from fairness concerns in natural language processing (NLP) and is particularly tricky because it relates to how predictions are distributed across protected attributes (like gender or race) within the tabular data itself. Existing debiasing methods from NLP don't directly translate, and there's a need for effective strategies to ensure LLMs provide equitable predictions on tabular datasets.
Methods
The authors investigate four in-context learning approaches to improve demographic parity in LLM predictions on tabular data:
- Fair Prompt Optimization: This involves refining the natural language instructions given to the LLM. They use a meta-LLM to iteratively optimize a "fairness instruction" that is appended to the main task prompt. This aims to guide the LLM towards fairer predictions.
- Soft Prompt Tuning: Instead of optimizing discrete text prompts, this method tunes continuous "soft prompts" in the embedding space. This allows for the integration of fairness penalties directly into the optimization objective, similar to how traditional machine learning models are trained with fairness constraints.
- Fair Few-Shot Examples: This approach focuses on carefully selecting the examples provided within the prompt (few-shot learning). They use a nearest-neighbor search to pick examples that are similar to the test instance and share the sensitive attribute. They also strategically adjust the ratio of positive examples for different groups to promote fairness.
- Self-Refinement: This is a post-processing technique where the LLM, after making initial predictions on a batch of data, uses its reasoning capabilities to assess demographic parity and adjust predictions if disparities exceed a certain threshold. This leverages the chain-of-thought abilities of LLMs.
Datasets
The study evaluates these methods on four publicly available tabular datasets commonly used in fairness research:
- Adult: Predicts whether an individual's yearly income exceeds $50k.
- German Credit: Predicts credit default risk.
- ACS Income & Coverage: Two prediction tasks (income and public health coverage) derived from the American Community Survey.
For all datasets, 'gender' was used as the protected attribute.
Key Insights and Ideas
- In-context learning is a powerful lever for fairness: The study demonstrates that by carefully crafting prompts, selecting examples, or even having the LLM refine its own outputs, significant improvements in demographic parity can be achieved without needing to retrain the entire model.
- No one-size-fits-all solution: Different methods excel in different scenarios. Fair prompt optimization and fair few-shot examples are highlighted as generally effective and interpretable approaches.
- Fairness can be achieved without sacrificing much accuracy: While there's often a trade-off, the proposed methods show that it's possible to achieve high demographic parity (e.g., >0.9) while maintaining competitive accuracy, especially with prompt optimization and few-shot learning.
- The "creativity" of LLMs matters for prompt optimization: The effectiveness of fair prompt optimization seems to depend on the LLM's ability to interpret and act on nuanced fairness instructions.
- Self-refinement offers a practical post-hoc solution: This method is particularly useful for large models and when predictions are made in batches, providing a way to correct biases after initial predictions.
Key Results
- The four investigated methods (fair prompt optimization, soft prompt tuning, fair few-shot examples, and self-refinement) were shown to effectively improve demographic parity on tabular datasets.
- Fair Prompt Optimization and Fair Few-Shot Examples were identified as particularly promising, often achieving Pareto-optimal trade-offs between accuracy and demographic parity. For instance, on the Adult dataset, optimized prompts achieved demographic parity ratios of up to 0.999 with competitive accuracy.
- Soft Prompt Tuning improved demographic parity but sometimes resulted in a less favorable accuracy trade-off compared to hard prompt optimization.
- Self-Refinement generally improved demographic parity across datasets, though it could sometimes lead to accuracy degradation.
- The paper provides detailed tables and plots (e.g., Figure 9) illustrating the Pareto frontiers for these methods, showing how different approaches balance accuracy and fairness.
Limitations and Future Work
- Limited scope of fairness metrics: The study primarily focuses on demographic parity, which is suitable for low-data regimes. While methods can be adapted for other metrics like equalized odds, this was not the main focus.
- Exclusion of other debiasing techniques: The research exclusively explores in-context approaches and does not delve into data pre-processing, model training, or fine-tuning strategies beyond soft prompt tuning.
- Potential for unintended biases: Optimizing for one fairness dimension might inadvertently amplify other biases.
- Practitioner guidance: The authors provide actionable insights for practitioners to select the most suitable approach based on their specific needs and constraints.
- Future work: The paper suggests adapting these methods to other fairness notions and exploring their effectiveness with different LLMs and tabular data characteristics.
Summary updated