Table of Contents
Fetching ...

Test-Time Fairness and Robustness in Large Language Models

Leonardo Cotta, Chris J. Maddison

TL;DR

A stratified notion of debiasing called stratified invariance is developed, which can capture a range of debiasing requirements from population level to individual level through an additional measurement that stratifies the predictions.

Abstract

Frontier Large Language Models (LLMs) can be socially discriminatory or sensitive to spurious features of their inputs. Because only well-resourced corporations can train frontier LLMs, we need robust test-time strategies to control such biases. Existing solutions, which instruct the LLM to be fair or robust, rely on the model's implicit understanding of bias. Causality provides a rich formalism through which we can be explicit about our debiasing requirements. Yet, as we show, a naive application of the standard causal debiasing strategy, counterfactual data augmentation, fails under standard assumptions to debias predictions at an individual level at test time. To address this, we develop a stratified notion of debiasing called stratified invariance, which can capture a range of debiasing requirements from population level to individual level through an additional measurement that stratifies the predictions. We present a complete observational test for stratified invariance. Finally, we introduce a data augmentation strategy that guarantees stratified invariance at test time under suitable assumptions, together with a prompting strategy that encourages stratified invariance in LLMs. We show that our prompting strategy, unlike implicit instructions, consistently reduces the bias of frontier LLMs across a suite of synthetic and real-world benchmarks without requiring additional data, finetuning or pre-training.

Test-Time Fairness and Robustness in Large Language Models

TL;DR

A stratified notion of debiasing called stratified invariance is developed, which can capture a range of debiasing requirements from population level to individual level through an additional measurement that stratifies the predictions.

Abstract

Frontier Large Language Models (LLMs) can be socially discriminatory or sensitive to spurious features of their inputs. Because only well-resourced corporations can train frontier LLMs, we need robust test-time strategies to control such biases. Existing solutions, which instruct the LLM to be fair or robust, rely on the model's implicit understanding of bias. Causality provides a rich formalism through which we can be explicit about our debiasing requirements. Yet, as we show, a naive application of the standard causal debiasing strategy, counterfactual data augmentation, fails under standard assumptions to debias predictions at an individual level at test time. To address this, we develop a stratified notion of debiasing called stratified invariance, which can capture a range of debiasing requirements from population level to individual level through an additional measurement that stratifies the predictions. We present a complete observational test for stratified invariance. Finally, we introduce a data augmentation strategy that guarantees stratified invariance at test time under suitable assumptions, together with a prompting strategy that encourages stratified invariance in LLMs. We show that our prompting strategy, unlike implicit instructions, consistently reduces the bias of frontier LLMs across a suite of synthetic and real-world benchmarks without requiring additional data, finetuning or pre-training.
Paper Structure (30 sections, 7 equations, 8 figures, 4 tables, 1 algorithm)

This paper contains 30 sections, 7 equations, 8 figures, 4 tables, 1 algorithm.

Figures (8)

  • Figure 1: An example of how out-of-context prompting boosts the fairness of LLM predictions by (i) obfuscating the spurious/protected context of the input and (ii) replacing it with all other contexts.
  • Figure 2: OOC consistently boosts stratified invariance in real-world tasks. Here we show the difference in SI-bias of standard prompting with each method in real-world tasks.
  • Figure 3: Difference in F1 score of each method with standard prompting averaged across real-world tasks. In general, OOC does not affect the predictive performance of LLMs with standard prompting.
  • Figure 4: As $\mathbf{S}$ encompasses more exogenous variables, OOC is more likely to make the same prediction for individuals differing only in context, i.e., it is more counterfactual-invariant.
  • Figure 5: Examples of causal DAGs for text generation/classification tasks with LLMs veitch2021counterfactual.
  • ...and 3 more figures

Theorems & Definitions (3)

  • Definition 1: Stratified invariance
  • Definition 2: Adjustment set
  • Definition 3: Stratified Data Augmentation