Reducing Sentiment Bias in Language Models via Counterfactual Evaluation
Recent improvements in large-scale language models have driven progress on automatic generation of syntactically and semantically consistent text for many real-world applications.Many of these advances leverage the availability of large corpora.While training on such corpora encourages the model to understand long-range dependencies in text, it can also result in the models internalizing the social biases present in the corpora.This paper aims to quantify and reduce biases exhibited by language models.Given a conditioning context and a language model, we analyze if the sentiment of the generated text is affected by changes in values of sensitive attributes in the conditioning context, a.k.a. counterfactual evaluation.We quantify these biases by adapting individual and group fairness metrics from the fair machine learning literature.Extensive evaluation on two different corpora shows that state-of-the-art Transformer-based language models exhibit biases learned from data.We propose embedding-similarity and sentiment-similarity regularization methods that improve both individual and group fairness metrics without sacrificing perplexity and semantic similarity---a positive step toward development and deployment of fairer language models for real-world applications.
We reduce sentiment biases based on counterfactual evaluation of text generation using language models.This paper measures sentiment bias in language models as reflected by text generated by the models, and adds other objective terms to the usual language modeling objective to reduce bias.This paper proposes to evaluate bias in pre-trained language models by using a fixed sentiment system and tests several different prefix templates.A method based on semantic simiilarity and a method based on sentiment similarity to debias the neural language models trained from large datasets.