Counterfactual Fairness in Text Classification through Robustness
Sahaj Garg,1* Vincent Perot,2 Nicole Limtiaco,2 Ankur Taly,3 Ed H. Chi,3 Alex Beutel2 1Stanford University, Stanford, CA 2Google AI, New York, NY 3Google AI, Mountain View, CA *Work done while the author was an intern at Google. {vperot, nlimtiaco, ataly, edchi,
Abstract
In this paper, we study counterfactual fairness in text classification, which asks the question: How would the prediction change if the sensitive attribute referenced in the example were different? Toxicity classifiers demonstrate a counterfactual fairness issue by predicting that “Some people are gay” is toxic while “Some people are straight” is nontoxic. We offer a metric, counterfactual token fairness (CTF), for measuring this particular form of fairness in text classifiers, and describe its relationship with group fairness. Further, we offer three approaches, blindness, counterfactual augmentation, and counterfactual logit pairing (CLP), for optimizing counterfactual token fairness during training, bridging the robustness and fairness literature. Empirically, we find that blindness and CLP address counterfactual token fairness. The methods do not harm classifier performance, and have varying tradeoffs with group fairness. These approaches, both for measurement and optimization, provide a new path forward for addressing fairness concerns in text classification.
中文速览
现实中的毒性检测分类器会把"Some people are gay"判定为有毒内容,却把"Some people are straight"判定为无毒,这种因敏感身份词(如性取向、种族、宗教)不同而导致预测不一致的问题,正是本文要解决的反事实公平性(counterfactual fairness)缺陷。为此,研究者提出了一个可量化的指标——反事实词元公平性(counterfactual token fairness, CTF),通过在文本中替换身份词来生成反事实样本对,并衡量模型对这些样本对预测结果的差异;同时提出了三种训练方法:遮盲法(blindness,将所有身份词替换为统一占位符)、反事实数据增强(counterfactual augmentation,将生成的反事实样本加入训练集),以及反事实对数几率配对(counterfactual logit pairing, CLP,惩罚模型对反事实样本对输出的差异)。实验结果表明,遮盲法和CLP都能有效提升反事实公平性,且不明显损害分类器的整体准确率,但与群体公平性(group fairness)之间存在一定权衡。这项工作将稳健性研究与公平性研究联系起来,为文本分类中的公平性问题提供了既可测量又可优化的系统性解决路径。
原文 arXiv:1809.10610;中英对照 + 大白话阅读 https://aha.fim.ai/paper/1809.10610v2