atlas

Research map / Large language models / Language, safety and interpretability

All Should Be Equal in the Eyes of LMs: Counterfactually Aware Fair Text Generation

AAAI 2024 · Large language models › Language, safety and interpretability · approach: Controlled text generation · 1 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes CAFIE, a training-free inference-time method that generates counterfactual prompts by swapping sensitive tokens across demographic groups and reweights next-token distributions so outputs are equitable across groups.

Problem

Bias in language model text generation; existing inference-time debiasing methods contrast against biased templates and do not enforce equitable treatment across all demographic groups.

Approach

Generate counterfactual contexts by replacing sensitive tokens with tokens from other groups in the same attribute, then adjust the source next-token distribution using tanh-based weights on differences from counterfactual distributions, mixed with the original distribution.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Apply CAFIE instead of the strongest listed baselineGPT-2 Small · StereoSet overallstereotype score: 59.02 -> 55.85Helped
Apply CAFIE instead of the strongest listed baselineGPT-2 Small · StereoSet overallICAT: 73.53 -> 76.78Helped
Apply CAFIE instead of SDBGPT-2 Small · CrowS-Pairs religionstereotype score: 37.14 -> 52.38Helped
Apply CAFIE instead of the strongest listed baselineGPT-2 Small · BOLDmean sentiment: 0.44 -> 0.47Helped
Apply CAFIE instead of SDBGPT-2 Small · BOLDsentiment SD: 0.32 -> 0.18Helped
Apply CAFIE instead of SDBGPT-2 Small · WikiText-2fluency (perplexity): 11.80 -> 18.19Hurt
Increase α from 0 to 0.99 (ablation)CAFIE on GPT-2 Large · StereoSet genderICAT: 60.13 -> 77.32Helped
Set α to 1 rather than 0.99 (ablation)CAFIE on GPT-2 Large · StereoSet genderICAT: 77.32 -> 61.47Hurt
Use tanh token weights rather than jpdf (ablation)CAFIE on GPT-2 Large · StereoSet genderICAT: 59.17 -> 77.32Helped
Use tanh token weights rather than ratio averaging (ablation)CAFIE on GPT-2 Large · StereoSet genderICAT: 65.52 -> 77.32Helped
Use tanh token weights rather than weight function (ablation)CAFIE on GPT-2 Large · StereoSet genderICAT: 58.62 -> 77.32Helped
Use tanh token weights rather than softsign (ablation)CAFIE on GPT-2 Large · StereoSet genderICAT: 58.54 -> 77.32Helped

Surprising findings

Limitations

Experimental setup

Datasets: StereoSet CrowS-Pairs BOLD WikiText-2 NLG-bias

Benchmarks: StereoSet CrowS-Pairs BOLD WikiText-2

Metrics: stereotype score language modeling score ICAT fluency perplexity BOLD mean sentiment BOLD sentiment standard deviation VADER sentiment

Baselines: Base LM SentenceDebias Self-Debias Zero-shot CoT Instruction prompting

Builds on: SentenceDebias Self-Debias Counterfactual Data Augmentation

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy