BiasFinder: Metamorphic Test Generation to Uncover Bias for Sentiment Analysis Systems

被引:27
作者
Asyrofi, Muhammad Hilmi [1 ]
Yang, Zhou [1 ]
Yusuf, Imam Nur Bani [1 ]
Kang, Hong Jin [1 ]
Thung, Ferdian [1 ]
Lo, David [1 ]
机构
[1] Singapore Management Univ, Sch Comp & Informat Syst, Singapore 188065, Singapore
关键词
Sentiment analysis; test case generation; metamorphic testing; bias; fairness bug;
D O I
10.1109/TSE.2021.3136169
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Artificial intelligence systems, such as Sentiment Analysis (SA) systems, typically learn from large amounts of data that may reflect human bias. Consequently, such systems may exhibit unintended demographic bias against specific characteristics (e.g., gender, occupation, country-of-origin, etc.). Such bias manifests in an SA system when it predicts different sentiments for similar texts that differ only in the characteristic of individuals described. To automatically uncover bias in SA systems, this paper presents BiasFinder, an approach that can discover biased predictions in SA systems via metamorphic testing. A key feature of BiasFinder is the automatic curation of suitable templates from any given text inputs, using various Natural Language Processing (NLP) techniques to identify words that describe demographic characteristics. Next, BiasFinder generates new texts from these templates by mutating words associated with a class of a characteristic (e.g., gender-specific words such as female names, "she", "her"). These texts are then used to tease out bias in an SA system. BiasFinder identifies a bias-uncovering test case (BTC) when an SA system predicts different sentiments for texts that differ only in words associated with a different class (e.g., male vs. female) of a target characteristic (e.g., gender). We evaluate BiasFinder on 10 SA systems and 2 large scale datasets, and the results show that BiasFinder can create more BTCs than two popular baselines. We also conduct an annotation study and find that human annotators consistently think that test cases generated by BiasFinder are more fluent than the two baselines.
引用
收藏
页码:5087 / 5101
页数:15
相关论文
共 82 条
  • [31] Gong J., 2018, P 27 INT C COMP LING, P2742
  • [32] Gupta VS, 2016, PROCEEDINGS OF THE 10TH INDIACOM - 2016 3RD INTERNATIONAL CONFERENCE ON COMPUTING FOR SUSTAINABLE GLOBAL DEVELOPMENT, P3766
  • [33] Hardt M, 2016, ADV NEUR IN, V29
  • [34] Sentiment analysis of political communication: combining a dictionary approach with crowdcoding
    Haselmayer, Martin
    Jenny, Marcelo
    [J]. QUALITY & QUANTITY, 2017, 51 (06) : 2623 - 2646
  • [35] Howard J, 2018, PROCEEDINGS OF THE 56TH ANNUAL MEETING OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS (ACL), VOL 1, P328
  • [36] Iyyer M, 2018, PROC 2018 C N AM CHA, DOI DOI 10.18653/V1/N18-1170
  • [37] Khoshgoftaar T. M., 2017, J BIG DATA-GER, V5, P1
  • [38] Kiritchenko S., 2018, P 7 JOINT C LEXICAL, P43, DOI [10.18653/v1/S18-2005, DOI 10.18653/V1/S18-2005]
  • [39] Sentiment analysis of financial news articles using performance indicators
    Krishnamoorthy, Srikumar
    [J]. KNOWLEDGE AND INFORMATION SYSTEMS, 2018, 56 (02) : 373 - 394
  • [40] Kubler S., 2009, Synthesis Lectures on Human Lang. Techn., V1, P1