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

Pragyan Banerjee, Abhinav Java, Surgan Jandial, Simra Shahid, Shaz Furniturewala +2 more
11/9/2023
cs.CLcs.CYcs.LG

Official code: banerjeepragyan/CAFIE (1 star, last commit 2024-06-09).

Abstract

Fairness in Language Models (LMs) remains a longstanding challenge, given the inherent biases in training data that can be perpetuated by models and affect the downstream tasks. Recent methods employ expensive retraining or attempt debiasing during inference by constraining model outputs to contrast from a reference set of biased templates or exemplars. Regardless, they dont address the primary goal of fairness to maintain equitability across different demographic groups. In this work, we posit that inferencing LMs to generate unbiased output for one demographic under a context ensues from being aware of outputs for other demographics under the same context. To this end, we propose Counterfactually Aware Fair InferencE (CAFIE), a framework that dynamically compares the model understanding of diverse demographics to generate more equitable sentences. We conduct an extensive empirical evaluation using base LMs of varying sizes and across three diverse datasets and found that CAFIE outperforms strong baselines. CAFIE produces fairer text and strikes the best balance between fairness and language modeling capability

View on arXivView PDF

Code Implementations(1)

This repository contains code for CAFIE: Counterfactually Aware Fair InferencE

13PythonDec 18, 20232 years ago

Similar Papers

Cite this paper

@article{banerjee2023should,
  title  = {All Should Be Equal in the Eyes of Language Models: Counterfactually Aware Fair Text Generation},
  author = {Pragyan Banerjee and Abhinav Java and Surgan Jandial and Simra Shahid and Shaz Furniturewala and Balaji Krishnamurthy and Sumit Bhatia},
  year   = {2023},
  eprint = {2311.05451},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2311.05451v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2311.05451.svg)](https://codeofpaper.com/paper/2311.05451)

Discussion