[Paper Review] Reducing Sentiment Bias in Language Models via Counterfactual Evaluation
This paper proposes a framework to reduce sentiment bias in large language models using counterfactual evaluation and regularization on latent representations. By applying embedding and sentiment prediction-derived regularization, the method significantly reduces individual fairness scores (a measure of sentiment bias) while maintaining low perplexity and high semantic similarity, demonstrating effectiveness through automatic and human evaluations.
Advances in language modeling architectures and the availability of large text corpora have driven progress in automatic text generation. While this results in models capable of generating coherent texts, it also prompts models to internalize social biases present in the training corpus. This paper aims to quantify and reduce a particular type of bias exhibited by language models: bias in the sentiment of generated text. Given a conditioning context (e.g., a writing prompt) and a language model, we analyze if (and how) the sentiment of the generated text is affected by changes in values of sensitive attributes (e.g., country names, occupations, genders) in the conditioning context using a form of counterfactual evaluation. We quantify sentiment bias by adopting individual and group fairness metrics from the fair machine learning literature, and demonstrate that large-scale models trained on two different corpora (news articles, and Wikipedia) exhibit considerable levels of bias. We then propose embedding and sentiment prediction-derived regularization on the language model's latent representations. The regularizations improve fairness metrics while retaining comparable levels of perplexity and semantic similarity.
Motivation & Objective
- To quantify sentiment bias in language models using counterfactual evaluation across sensitive attributes such as occupation, country, and names.
- To develop novel fairness metrics—individual and group fairness—based on Wasserstein distance to measure sentiment bias in generated text.
- To propose a generalizable framework for reducing sentiment bias in text generation under specified fairness constraints.
- To evaluate the effectiveness of regularization techniques on latent representations in improving fairness while preserving semantic quality and perplexity.
- To validate automatic metrics against human annotations for sentiment, semantic similarity, and fairness.
Proposed method
- The authors perform counterfactual evaluation by systematically varying sensitive attributes (e.g., occupation, country) in the conditioning context and measuring sentiment score shifts in generated text.
- They define individual fairness using Wasserstein distance between sentiment distributions across different attribute values, capturing bias in sentiment output.
- Group fairness is measured as the average individual fairness across all attribute values, providing a global bias metric.
- Two regularization techniques are introduced: (1) embedding regularization to constrain latent representations, and (2) sentiment prediction-derived regularization using a BERT-based sentiment classifier.
- The regularization terms are added to the language model’s training objective with a hyperparameter λ to balance fairness and generation quality.
- The framework is evaluated on two datasets—WMT-19 and WikiText-103—using automatic metrics (perplexity, semantic similarity) and human evaluation.
Experimental results
Research questions
- RQ1Does large-scale language modeling exhibit systematic sentiment bias when sensitive attributes like occupation or country are varied in the prompt?
- RQ2Can individual and group fairness metrics based on Wasserstein distance effectively quantify sentiment bias in generated text?
- RQ3Can regularization on latent representations reduce sentiment bias without degrading perplexity or semantic similarity?
- RQ4How do automatic fairness metrics correlate with human-annotated sentiment and relevance judgments?
- RQ5What trade-offs exist between fairness, perplexity, and semantic similarity in bias mitigation?
Key findings
- The baseline GPT-2 model exhibits significant sentiment bias: generating more positive sentiment for 'baker' and more negative sentiment for 'accountant' in the same prompt context.
- The proposed sentiment regularization method reduces individual fairness scores by 83% compared to the baseline (from 0.333 to 0.056) on the 'designer' vs. 'accountant' prompt pair.
- On the 'Libya' vs. 'Iceland' prompt pair, the individual fairness score drops from 0.291 (baseline) to 0.155 (sentiment-regularized model), confirming bias reduction.
- The sentiment regularization method improves individual fairness more effectively than embedding regularization, with a 70% reduction in fairness score on average.
- Automatic metrics for sentiment and semantic similarity show strong correlation with human annotations (Spearman’s ρ = 0.75–0.79 for sentiment, 0.63–0.72 for similarity).
- Both regularization methods maintain comparable perplexity (PPL ≈ 17.6–18.5) and semantic similarity to the baseline, indicating minimal degradation in generation quality.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.